generated-configure.sh revision 521:754f91d22e1c
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711OBJEXT
712EXEEXT
713ac_ct_CC
714CPPFLAGS
715LDFLAGS
716CFLAGS
717CC
718ac_ct_PROPER_COMPILER_CC
719PROPER_COMPILER_CC
720POTENTIAL_CC
721BUILD_LD
722BUILD_CXX
723BUILD_CC
724MSVCR_DLL
725VS_PATH
726VS_LIB
727VS_INCLUDE
728CYGWIN_LINK
729AR_OUT_OPTION
730LD_OUT_OPTION
731EXE_OUT_OPTION
732CC_OUT_OPTION
733BUILD_HOTSPOT
734HOTSPOT_DIST
735BUILD_OUTPUT
736OVERRIDE_SRC_ROOT
737ADD_SRC_ROOT
738JDK_TOPDIR
739HOTSPOT_TOPDIR
740JAXWS_TOPDIR
741JAXP_TOPDIR
742CORBA_TOPDIR
743LANGTOOLS_TOPDIR
744BOOT_JDK_JVMARGS
745JAVAC_FLAGS
746BOOT_JDK_SOURCETARGET
747BOOT_JDK
748BOOT_TOOLSJAR
749BOOT_RTJAR
750JAVA_CHECK
751JAVAC_CHECK
752COOKED_BUILD_NUMBER
753FULL_VERSION
754RELEASE
755JDK_VERSION
756RUNTIME_NAME
757COPYRIGHT_YEAR
758MACOSX_BUNDLE_ID_BASE
759MACOSX_BUNDLE_NAME_BASE
760COMPANY_NAME
761JDK_RC_PLATFORM_NAME
762PRODUCT_SUFFIX
763PRODUCT_NAME
764LAUNCHER_NAME
765MILESTONE
766JDK_BUILD_NUMBER
767JDK_UPDATE_VERSION
768JDK_MICRO_VERSION
769JDK_MINOR_VERSION
770JDK_MAJOR_VERSION
771COMPRESS_JARS
772UNLIMITED_CRYPTO
773CACERTS_FILE
774TEST_IN_BUILD
775BUILD_HEADLESS
776SUPPORT_HEADFUL
777SUPPORT_HEADLESS
778SET_OPENJDK
779BDEPS_FTP
780BDEPS_UNZIP
781OS_VERSION_MICRO
782OS_VERSION_MINOR
783OS_VERSION_MAJOR
784PKG_CONFIG
785COMM
786TIME
787STAT
788HG
789READELF
790OTOOL
791LDD
792ZIP
793UNZIP
794FIND_DELETE
795MAKE
796CHECK_TOOLSDIR_MAKE
797CHECK_TOOLSDIR_GMAKE
798CHECK_MAKE
799CHECK_GMAKE
800PKGHANDLER
801OUTPUT_ROOT
802CONF_NAME
803SPEC
804BUILD_VARIANT_RELEASE
805DEBUG_CLASSFILES
806FASTDEBUG
807VARIANT
808DEBUG_LEVEL
809MACOSX_UNIVERSAL
810JVM_VARIANT_ZEROSHARK
811JVM_VARIANT_ZERO
812JVM_VARIANT_KERNEL
813JVM_VARIANT_CLIENT
814JVM_VARIANT_SERVER
815JVM_VARIANTS
816JDK_VARIANT
817BUILD_LOG_WRAPPER
818BUILD_LOG_PREVIOUS
819BUILD_LOG
820SYS_ROOT
821PATH_SEP
822SRC_ROOT
823DEFINE_CROSS_COMPILE_ARCH
824LP64
825OPENJDK_TARGET_OS_API_DIR
826OPENJDK_TARGET_CPU_JLI_CFLAGS
827OPENJDK_TARGET_CPU_OSARCH
828OPENJDK_TARGET_CPU_ISADIR
829OPENJDK_TARGET_CPU_LIBDIR
830OPENJDK_TARGET_CPU_LEGACY_LIB
831OPENJDK_TARGET_CPU_LEGACY
832REQUIRED_OS_VERSION
833REQUIRED_OS_NAME
834COMPILE_TYPE
835OPENJDK_TARGET_CPU_ENDIAN
836OPENJDK_TARGET_CPU_BITS
837OPENJDK_TARGET_CPU_ARCH
838OPENJDK_TARGET_CPU
839OPENJDK_TARGET_OS_API
840OPENJDK_TARGET_OS
841OPENJDK_BUILD_CPU_ENDIAN
842OPENJDK_BUILD_CPU_BITS
843OPENJDK_BUILD_CPU_ARCH
844OPENJDK_BUILD_CPU
845OPENJDK_BUILD_OS_API
846OPENJDK_BUILD_OS
847OPENJDK_BUILD_AUTOCONF_NAME
848OPENJDK_TARGET_AUTOCONF_NAME
849target_os
850target_vendor
851target_cpu
852target
853host_os
854host_vendor
855host_cpu
856host
857build_os
858build_vendor
859build_cpu
860build
861SETFILE
862DF
863READLINK
864CYGPATH
865NAWK
866SED
867FGREP
868EGREP
869GREP
870AWK
871XARGS
872WHICH
873WC
874UNIQ
875UNAME
876TR
877TOUCH
878TEE
879TAR
880TAIL
881SORT
882SH
883RM
884THEPWDCMD
885PRINTF
886MV
887MKTEMP
888MKDIR
889LS
890LN
891HEAD
892FIND
893FILE
894EXPR
895ECHO
896DIRNAME
897DIFF
898DATE
899CUT
900CP
901CMP
902CHMOD
903CAT
904BASH
905BASENAME
906DATE_WHEN_CONFIGURED
907CONFIGURE_COMMAND_LINE
908CUSTOM_MAKE_DIR
909target_alias
910host_alias
911build_alias
912LIBS
913ECHO_T
914ECHO_N
915ECHO_C
916DEFS
917mandir
918localedir
919libdir
920psdir
921pdfdir
922dvidir
923htmldir
924infodir
925docdir
926oldincludedir
927includedir
928localstatedir
929sharedstatedir
930sysconfdir
931datadir
932datarootdir
933libexecdir
934sbindir
935bindir
936program_transform_name
937prefix
938exec_prefix
939PACKAGE_URL
940PACKAGE_BUGREPORT
941PACKAGE_STRING
942PACKAGE_VERSION
943PACKAGE_TARNAME
944PACKAGE_NAME
945PATH_SEPARATOR
946SHELL'
947ac_subst_files=''
948ac_user_opts='
949enable_option_checking
950with_custom_make_dir
951with_target_bits
952with_sys_root
953with_tools_dir
954with_devkit
955with_jdk_variant
956with_jvm_variants
957enable_debug
958with_debug_level
959with_conf_name
960with_builddeps_conf
961with_builddeps_server
962with_builddeps_dir
963with_builddeps_group
964enable_openjdk_only
965enable_headful
966enable_hotspot_test_in_build
967with_cacerts_file
968enable_unlimited_crypto
969with_boot_jdk
970with_boot_jdk_jvmargs
971with_add_source_root
972with_override_source_root
973with_adds_and_overrides
974with_override_langtools
975with_override_corba
976with_override_jaxp
977with_override_jaxws
978with_override_hotspot
979with_override_jdk
980with_import_hotspot
981with_msvcr_dll
982with_extra_cflags
983with_extra_cxxflags
984with_extra_ldflags
985enable_debug_symbols
986enable_zip_debug_info
987enable_macosx_runtime_support
988with_x
989with_cups
990with_cups_include
991with_freetype
992with_alsa
993with_alsa_include
994with_alsa_lib
995with_zlib
996with_stdc__lib
997with_num_cores
998with_memory_size
999with_sjavac_server_java
1000with_sjavac_server_cores
1001enable_sjavac
1002enable_precompiled_headers
1003enable_ccache
1004with_ccache_dir
1005'
1006      ac_precious_vars='build_alias
1007host_alias
1008target_alias
1009PKG_CONFIG
1010CC
1011CFLAGS
1012LDFLAGS
1013LIBS
1014CPPFLAGS
1015CXX
1016CXXFLAGS
1017CCC
1018OBJC
1019OBJCFLAGS
1020CPP
1021CXXCPP
1022XMKMF
1023FREETYPE2_CFLAGS
1024FREETYPE2_LIBS
1025ALSA_CFLAGS
1026ALSA_LIBS'
1027
1028
1029# Initialize some variables set by options.
1030ac_init_help=
1031ac_init_version=false
1032ac_unrecognized_opts=
1033ac_unrecognized_sep=
1034# The variables have the same names as the options, with
1035# dashes changed to underlines.
1036cache_file=/dev/null
1037exec_prefix=NONE
1038no_create=
1039no_recursion=
1040prefix=NONE
1041program_prefix=NONE
1042program_suffix=NONE
1043program_transform_name=s,x,x,
1044silent=
1045site=
1046srcdir=
1047verbose=
1048x_includes=NONE
1049x_libraries=NONE
1050
1051# Installation directory options.
1052# These are left unexpanded so users can "make install exec_prefix=/foo"
1053# and all the variables that are supposed to be based on exec_prefix
1054# by default will actually change.
1055# Use braces instead of parens because sh, perl, etc. also accept them.
1056# (The list follows the same order as the GNU Coding Standards.)
1057bindir='${exec_prefix}/bin'
1058sbindir='${exec_prefix}/sbin'
1059libexecdir='${exec_prefix}/libexec'
1060datarootdir='${prefix}/share'
1061datadir='${datarootdir}'
1062sysconfdir='${prefix}/etc'
1063sharedstatedir='${prefix}/com'
1064localstatedir='${prefix}/var'
1065includedir='${prefix}/include'
1066oldincludedir='/usr/include'
1067docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1068infodir='${datarootdir}/info'
1069htmldir='${docdir}'
1070dvidir='${docdir}'
1071pdfdir='${docdir}'
1072psdir='${docdir}'
1073libdir='${exec_prefix}/lib'
1074localedir='${datarootdir}/locale'
1075mandir='${datarootdir}/man'
1076
1077ac_prev=
1078ac_dashdash=
1079for ac_option
1080do
1081  # If the previous option needs an argument, assign it.
1082  if test -n "$ac_prev"; then
1083    eval $ac_prev=\$ac_option
1084    ac_prev=
1085    continue
1086  fi
1087
1088  case $ac_option in
1089  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1090  *=)   ac_optarg= ;;
1091  *)    ac_optarg=yes ;;
1092  esac
1093
1094  # Accept the important Cygnus configure options, so we can diagnose typos.
1095
1096  case $ac_dashdash$ac_option in
1097  --)
1098    ac_dashdash=yes ;;
1099
1100  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1101    ac_prev=bindir ;;
1102  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1103    bindir=$ac_optarg ;;
1104
1105  -build | --build | --buil | --bui | --bu)
1106    ac_prev=build_alias ;;
1107  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1108    build_alias=$ac_optarg ;;
1109
1110  -cache-file | --cache-file | --cache-fil | --cache-fi \
1111  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1112    ac_prev=cache_file ;;
1113  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1114  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1115    cache_file=$ac_optarg ;;
1116
1117  --config-cache | -C)
1118    cache_file=config.cache ;;
1119
1120  -datadir | --datadir | --datadi | --datad)
1121    ac_prev=datadir ;;
1122  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1123    datadir=$ac_optarg ;;
1124
1125  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1126  | --dataroo | --dataro | --datar)
1127    ac_prev=datarootdir ;;
1128  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1129  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1130    datarootdir=$ac_optarg ;;
1131
1132  -disable-* | --disable-*)
1133    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1134    # Reject names that are not valid shell variable names.
1135    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1136      as_fn_error $? "invalid feature name: $ac_useropt"
1137    ac_useropt_orig=$ac_useropt
1138    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1139    case $ac_user_opts in
1140      *"
1141"enable_$ac_useropt"
1142"*) ;;
1143      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1144	 ac_unrecognized_sep=', ';;
1145    esac
1146    eval enable_$ac_useropt=no ;;
1147
1148  -docdir | --docdir | --docdi | --doc | --do)
1149    ac_prev=docdir ;;
1150  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1151    docdir=$ac_optarg ;;
1152
1153  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1154    ac_prev=dvidir ;;
1155  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1156    dvidir=$ac_optarg ;;
1157
1158  -enable-* | --enable-*)
1159    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1160    # Reject names that are not valid shell variable names.
1161    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1162      as_fn_error $? "invalid feature name: $ac_useropt"
1163    ac_useropt_orig=$ac_useropt
1164    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1165    case $ac_user_opts in
1166      *"
1167"enable_$ac_useropt"
1168"*) ;;
1169      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1170	 ac_unrecognized_sep=', ';;
1171    esac
1172    eval enable_$ac_useropt=\$ac_optarg ;;
1173
1174  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1175  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1176  | --exec | --exe | --ex)
1177    ac_prev=exec_prefix ;;
1178  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1179  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1180  | --exec=* | --exe=* | --ex=*)
1181    exec_prefix=$ac_optarg ;;
1182
1183  -gas | --gas | --ga | --g)
1184    # Obsolete; use --with-gas.
1185    with_gas=yes ;;
1186
1187  -help | --help | --hel | --he | -h)
1188    ac_init_help=long ;;
1189  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1190    ac_init_help=recursive ;;
1191  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1192    ac_init_help=short ;;
1193
1194  -host | --host | --hos | --ho)
1195    ac_prev=host_alias ;;
1196  -host=* | --host=* | --hos=* | --ho=*)
1197    host_alias=$ac_optarg ;;
1198
1199  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1200    ac_prev=htmldir ;;
1201  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1202  | --ht=*)
1203    htmldir=$ac_optarg ;;
1204
1205  -includedir | --includedir | --includedi | --included | --include \
1206  | --includ | --inclu | --incl | --inc)
1207    ac_prev=includedir ;;
1208  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1209  | --includ=* | --inclu=* | --incl=* | --inc=*)
1210    includedir=$ac_optarg ;;
1211
1212  -infodir | --infodir | --infodi | --infod | --info | --inf)
1213    ac_prev=infodir ;;
1214  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1215    infodir=$ac_optarg ;;
1216
1217  -libdir | --libdir | --libdi | --libd)
1218    ac_prev=libdir ;;
1219  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1220    libdir=$ac_optarg ;;
1221
1222  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1223  | --libexe | --libex | --libe)
1224    ac_prev=libexecdir ;;
1225  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1226  | --libexe=* | --libex=* | --libe=*)
1227    libexecdir=$ac_optarg ;;
1228
1229  -localedir | --localedir | --localedi | --localed | --locale)
1230    ac_prev=localedir ;;
1231  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1232    localedir=$ac_optarg ;;
1233
1234  -localstatedir | --localstatedir | --localstatedi | --localstated \
1235  | --localstate | --localstat | --localsta | --localst | --locals)
1236    ac_prev=localstatedir ;;
1237  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1238  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1239    localstatedir=$ac_optarg ;;
1240
1241  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1242    ac_prev=mandir ;;
1243  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1244    mandir=$ac_optarg ;;
1245
1246  -nfp | --nfp | --nf)
1247    # Obsolete; use --without-fp.
1248    with_fp=no ;;
1249
1250  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1251  | --no-cr | --no-c | -n)
1252    no_create=yes ;;
1253
1254  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1255  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1256    no_recursion=yes ;;
1257
1258  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1259  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1260  | --oldin | --oldi | --old | --ol | --o)
1261    ac_prev=oldincludedir ;;
1262  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1263  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1264  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1265    oldincludedir=$ac_optarg ;;
1266
1267  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1268    ac_prev=prefix ;;
1269  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1270    prefix=$ac_optarg ;;
1271
1272  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1273  | --program-pre | --program-pr | --program-p)
1274    ac_prev=program_prefix ;;
1275  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1276  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1277    program_prefix=$ac_optarg ;;
1278
1279  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1280  | --program-suf | --program-su | --program-s)
1281    ac_prev=program_suffix ;;
1282  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1283  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1284    program_suffix=$ac_optarg ;;
1285
1286  -program-transform-name | --program-transform-name \
1287  | --program-transform-nam | --program-transform-na \
1288  | --program-transform-n | --program-transform- \
1289  | --program-transform | --program-transfor \
1290  | --program-transfo | --program-transf \
1291  | --program-trans | --program-tran \
1292  | --progr-tra | --program-tr | --program-t)
1293    ac_prev=program_transform_name ;;
1294  -program-transform-name=* | --program-transform-name=* \
1295  | --program-transform-nam=* | --program-transform-na=* \
1296  | --program-transform-n=* | --program-transform-=* \
1297  | --program-transform=* | --program-transfor=* \
1298  | --program-transfo=* | --program-transf=* \
1299  | --program-trans=* | --program-tran=* \
1300  | --progr-tra=* | --program-tr=* | --program-t=*)
1301    program_transform_name=$ac_optarg ;;
1302
1303  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1304    ac_prev=pdfdir ;;
1305  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1306    pdfdir=$ac_optarg ;;
1307
1308  -psdir | --psdir | --psdi | --psd | --ps)
1309    ac_prev=psdir ;;
1310  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1311    psdir=$ac_optarg ;;
1312
1313  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1314  | -silent | --silent | --silen | --sile | --sil)
1315    silent=yes ;;
1316
1317  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1318    ac_prev=sbindir ;;
1319  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1320  | --sbi=* | --sb=*)
1321    sbindir=$ac_optarg ;;
1322
1323  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1324  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1325  | --sharedst | --shareds | --shared | --share | --shar \
1326  | --sha | --sh)
1327    ac_prev=sharedstatedir ;;
1328  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1329  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1330  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1331  | --sha=* | --sh=*)
1332    sharedstatedir=$ac_optarg ;;
1333
1334  -site | --site | --sit)
1335    ac_prev=site ;;
1336  -site=* | --site=* | --sit=*)
1337    site=$ac_optarg ;;
1338
1339  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1340    ac_prev=srcdir ;;
1341  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1342    srcdir=$ac_optarg ;;
1343
1344  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1345  | --syscon | --sysco | --sysc | --sys | --sy)
1346    ac_prev=sysconfdir ;;
1347  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1348  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1349    sysconfdir=$ac_optarg ;;
1350
1351  -target | --target | --targe | --targ | --tar | --ta | --t)
1352    ac_prev=target_alias ;;
1353  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1354    target_alias=$ac_optarg ;;
1355
1356  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1357    verbose=yes ;;
1358
1359  -version | --version | --versio | --versi | --vers | -V)
1360    ac_init_version=: ;;
1361
1362  -with-* | --with-*)
1363    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1364    # Reject names that are not valid shell variable names.
1365    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1366      as_fn_error $? "invalid package name: $ac_useropt"
1367    ac_useropt_orig=$ac_useropt
1368    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1369    case $ac_user_opts in
1370      *"
1371"with_$ac_useropt"
1372"*) ;;
1373      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1374	 ac_unrecognized_sep=', ';;
1375    esac
1376    eval with_$ac_useropt=\$ac_optarg ;;
1377
1378  -without-* | --without-*)
1379    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1380    # Reject names that are not valid shell variable names.
1381    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1382      as_fn_error $? "invalid package name: $ac_useropt"
1383    ac_useropt_orig=$ac_useropt
1384    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1385    case $ac_user_opts in
1386      *"
1387"with_$ac_useropt"
1388"*) ;;
1389      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1390	 ac_unrecognized_sep=', ';;
1391    esac
1392    eval with_$ac_useropt=no ;;
1393
1394  --x)
1395    # Obsolete; use --with-x.
1396    with_x=yes ;;
1397
1398  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1399  | --x-incl | --x-inc | --x-in | --x-i)
1400    ac_prev=x_includes ;;
1401  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1402  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1403    x_includes=$ac_optarg ;;
1404
1405  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1406  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1407    ac_prev=x_libraries ;;
1408  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1409  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1410    x_libraries=$ac_optarg ;;
1411
1412  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1413Try \`$0 --help' for more information"
1414    ;;
1415
1416  *=*)
1417    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1418    # Reject names that are not valid shell variable names.
1419    case $ac_envvar in #(
1420      '' | [0-9]* | *[!_$as_cr_alnum]* )
1421      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1422    esac
1423    eval $ac_envvar=\$ac_optarg
1424    export $ac_envvar ;;
1425
1426  *)
1427    # FIXME: should be removed in autoconf 3.0.
1428    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1429    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1430      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1431    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1432    ;;
1433
1434  esac
1435done
1436
1437if test -n "$ac_prev"; then
1438  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1439  as_fn_error $? "missing argument to $ac_option"
1440fi
1441
1442if test -n "$ac_unrecognized_opts"; then
1443  case $enable_option_checking in
1444    no) ;;
1445    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1446    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1447  esac
1448fi
1449
1450# Check all directory arguments for consistency.
1451for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1452		datadir sysconfdir sharedstatedir localstatedir includedir \
1453		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1454		libdir localedir mandir
1455do
1456  eval ac_val=\$$ac_var
1457  # Remove trailing slashes.
1458  case $ac_val in
1459    */ )
1460      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1461      eval $ac_var=\$ac_val;;
1462  esac
1463  # Be sure to have absolute directory names.
1464  case $ac_val in
1465    [\\/$]* | ?:[\\/]* )  continue;;
1466    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1467  esac
1468  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1469done
1470
1471# There might be people who depend on the old broken behavior: `$host'
1472# used to hold the argument of --host etc.
1473# FIXME: To remove some day.
1474build=$build_alias
1475host=$host_alias
1476target=$target_alias
1477
1478# FIXME: To remove some day.
1479if test "x$host_alias" != x; then
1480  if test "x$build_alias" = x; then
1481    cross_compiling=maybe
1482    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1483    If a cross compiler is detected then cross compile mode will be used" >&2
1484  elif test "x$build_alias" != "x$host_alias"; then
1485    cross_compiling=yes
1486  fi
1487fi
1488
1489ac_tool_prefix=
1490test -n "$host_alias" && ac_tool_prefix=$host_alias-
1491
1492test "$silent" = yes && exec 6>/dev/null
1493
1494
1495ac_pwd=`pwd` && test -n "$ac_pwd" &&
1496ac_ls_di=`ls -di .` &&
1497ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1498  as_fn_error $? "working directory cannot be determined"
1499test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1500  as_fn_error $? "pwd does not report name of working directory"
1501
1502
1503# Find the source files, if location was not specified.
1504if test -z "$srcdir"; then
1505  ac_srcdir_defaulted=yes
1506  # Try the directory containing this script, then the parent directory.
1507  ac_confdir=`$as_dirname -- "$as_myself" ||
1508$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1509	 X"$as_myself" : 'X\(//\)[^/]' \| \
1510	 X"$as_myself" : 'X\(//\)$' \| \
1511	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1512$as_echo X"$as_myself" |
1513    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1514	    s//\1/
1515	    q
1516	  }
1517	  /^X\(\/\/\)[^/].*/{
1518	    s//\1/
1519	    q
1520	  }
1521	  /^X\(\/\/\)$/{
1522	    s//\1/
1523	    q
1524	  }
1525	  /^X\(\/\).*/{
1526	    s//\1/
1527	    q
1528	  }
1529	  s/.*/./; q'`
1530  srcdir=$ac_confdir
1531  if test ! -r "$srcdir/$ac_unique_file"; then
1532    srcdir=..
1533  fi
1534else
1535  ac_srcdir_defaulted=no
1536fi
1537if test ! -r "$srcdir/$ac_unique_file"; then
1538  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1539  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1540fi
1541ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1542ac_abs_confdir=`(
1543	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1544	pwd)`
1545# When building in place, set srcdir=.
1546if test "$ac_abs_confdir" = "$ac_pwd"; then
1547  srcdir=.
1548fi
1549# Remove unnecessary trailing slashes from srcdir.
1550# Double slashes in file names in object file debugging info
1551# mess up M-x gdb in Emacs.
1552case $srcdir in
1553*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1554esac
1555for ac_var in $ac_precious_vars; do
1556  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1557  eval ac_env_${ac_var}_value=\$${ac_var}
1558  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1559  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1560done
1561
1562#
1563# Report the --help message.
1564#
1565if test "$ac_init_help" = "long"; then
1566  # Omit some internal or obsolete options to make the list less imposing.
1567  # This message is too long to be a string in the A/UX 3.1 sh.
1568  cat <<_ACEOF
1569\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1570
1571Usage: $0 [OPTION]... [VAR=VALUE]...
1572
1573To assign environment variables (e.g., CC, CFLAGS...), specify them as
1574VAR=VALUE.  See below for descriptions of some of the useful variables.
1575
1576Defaults for the options are specified in brackets.
1577
1578Configuration:
1579  -h, --help              display this help and exit
1580      --help=short        display options specific to this package
1581      --help=recursive    display the short help of all the included packages
1582  -V, --version           display version information and exit
1583  -q, --quiet, --silent   do not print \`checking ...' messages
1584      --cache-file=FILE   cache test results in FILE [disabled]
1585  -C, --config-cache      alias for \`--cache-file=config.cache'
1586  -n, --no-create         do not create output files
1587      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1588
1589Installation directories:
1590  --prefix=PREFIX         install architecture-independent files in PREFIX
1591                          [$ac_default_prefix]
1592  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1593                          [PREFIX]
1594
1595By default, \`make install' will install all the files in
1596\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1597an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1598for instance \`--prefix=\$HOME'.
1599
1600For better control, use the options below.
1601
1602Fine tuning of the installation directories:
1603  --bindir=DIR            user executables [EPREFIX/bin]
1604  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1605  --libexecdir=DIR        program executables [EPREFIX/libexec]
1606  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1607  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1608  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1609  --libdir=DIR            object code libraries [EPREFIX/lib]
1610  --includedir=DIR        C header files [PREFIX/include]
1611  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1612  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1613  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1614  --infodir=DIR           info documentation [DATAROOTDIR/info]
1615  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1616  --mandir=DIR            man documentation [DATAROOTDIR/man]
1617  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1618  --htmldir=DIR           html documentation [DOCDIR]
1619  --dvidir=DIR            dvi documentation [DOCDIR]
1620  --pdfdir=DIR            pdf documentation [DOCDIR]
1621  --psdir=DIR             ps documentation [DOCDIR]
1622_ACEOF
1623
1624  cat <<\_ACEOF
1625
1626X features:
1627  --x-includes=DIR    X include files are in DIR
1628  --x-libraries=DIR   X library files are in DIR
1629
1630System types:
1631  --build=BUILD     configure for building on BUILD [guessed]
1632  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1633  --target=TARGET   configure for building compilers for TARGET [HOST]
1634_ACEOF
1635fi
1636
1637if test -n "$ac_init_help"; then
1638  case $ac_init_help in
1639     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1640   esac
1641  cat <<\_ACEOF
1642
1643Optional Features:
1644  --disable-option-checking  ignore unrecognized --enable/--with options
1645  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1646  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1647  --enable-debug          set the debug level to fastdebug (shorthand for
1648                          --with-debug-level=fastdebug) [disabled]
1649  --enable-openjdk-only   supress building closed source even if present
1650                          [disabled]
1651  --disable-headful       disable building headful support (graphical UI
1652                          support) [enabled]
1653  --enable-hotspot-test-in-build
1654                          run the Queens test after Hotspot build [disabled]
1655  --enable-unlimited-crypto
1656                          Enable unlimited crypto policy [disabled]
1657  --disable-debug-symbols disable generation of debug symbols [enabled]
1658  --disable-zip-debug-info
1659                          disable zipping of debug-info files [enabled]
1660  --disable-macosx-runtime-support
1661                          disable the use of MacOSX Java runtime support
1662                          framework [enabled]
1663  --enable-sjavac         use sjavac to do fast incremental compiles
1664                          [disabled]
1665  --disable-precompiled-headers
1666                          disable using precompiled headers when compiling C++
1667                          [enabled]
1668  --disable-ccache        disable using ccache to speed up recompilations
1669                          [enabled]
1670
1671Optional Packages:
1672  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1673  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1674  --with-custom-make-dir  use this directory for custom build/make files
1675  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1676                          support it), e.g. --with-target-bits=32 [guessed]
1677  --with-sys-root         pass this sys-root to the compilers and tools (for
1678                          cross-compiling)
1679  --with-tools-dir        search this directory for compilers and tools (for
1680                          cross-compiling)
1681  --with-devkit           use this directory as base for tools-dir and
1682                          sys-root (for cross-compiling)
1683  --with-jdk-variant      JDK variant to build (normal) [normal]
1684  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1685                          client, kernel, zero, zeroshark) [server]
1686  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1687                          [release]
1688  --with-conf-name        use this as the name of the configuration [generated
1689                          from important configuration options]
1690  --with-builddeps-conf   use this configuration file for the builddeps
1691  --with-builddeps-server download and use build dependencies from this server
1692                          url
1693  --with-builddeps-dir    store downloaded build dependencies here
1694                          [/localhome/builddeps]
1695  --with-builddeps-group  chgrp the downloaded build dependencies to this
1696                          group
1697  --with-cacerts-file     specify alternative cacerts file
1698  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1699  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1700                          invocations of the Boot JDK, overriding the default
1701                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1702                          -enableassertions"
1703  --with-add-source-root  for each and every source directory, look in this
1704                          additional source root for the same directory; if it
1705                          exists and have files in it, include it in the build
1706  --with-override-source-root
1707                          for each and every source directory, look in this
1708                          override source root for the same directory; if it
1709                          exists, use that directory instead and ignore the
1710                          directory in the original source root
1711  --with-adds-and-overrides
1712                          use the subdirs 'adds' and 'overrides' in the
1713                          specified directory as add-source-root and
1714                          override-source-root
1715  --with-override-langtools
1716                          use this langtools dir for the build
1717  --with-override-corba   use this corba dir for the build
1718  --with-override-jaxp    use this jaxp dir for the build
1719  --with-override-jaxws   use this jaxws dir for the build
1720  --with-override-hotspot use this hotspot dir for the build
1721  --with-override-jdk     use this jdk dir for the build
1722  --with-import-hotspot   import hotspot binaries from this jdk image or
1723                          hotspot build dist dir instead of building from
1724                          source
1725  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1726                          only) [probed]
1727  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1728  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1729  --with-extra-ldflags    extra flags to be used when linking jdk
1730  --with-x                use the X Window System
1731  --with-cups             specify prefix directory for the cups package
1732                          (expecting the headers under PATH/include)
1733  --with-cups-include     specify directory for the cups include files
1734  --with-freetype         specify prefix directory for the freetype2 package
1735                          (expecting the libraries under PATH/lib and the
1736                          headers under PATH/include)
1737  --with-alsa             specify prefix directory for the alsa package
1738                          (expecting the libraries under PATH/lib and the
1739                          headers under PATH/include)
1740  --with-alsa-include     specify directory for the alsa include files
1741  --with-alsa-lib         specify directory for the alsa library
1742  --with-zlib             use zlib from build system or OpenJDK source
1743                          (system, bundled) [bundled]
1744  --with-stdc++lib=<static>,<dynamic>,<default>
1745                          force linking of the C++ runtime on Linux to either
1746                          static or dynamic, default is static with dynamic as
1747                          fallback
1748  --with-num-cores        number of cores in the build system, e.g.
1749                          --with-num-cores=8 [probed]
1750  --with-memory-size      memory (in MB) available in the build system, e.g.
1751                          --with-memory-size=1024 [probed]
1752  --with-sjavac-server-java
1753                          use this java binary for running the sjavac
1754                          background server [Boot JDK java]
1755  --with-sjavac-server-cores
1756                          use at most this number of concurrent threads on the
1757                          sjavac server [probed]
1758  --with-ccache-dir       where to store ccache files [~/.ccache]
1759
1760Some influential environment variables:
1761  PKG_CONFIG  path to pkg-config utility
1762  CC          C compiler command
1763  CFLAGS      C compiler flags
1764  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1765              nonstandard directory <lib dir>
1766  LIBS        libraries to pass to the linker, e.g. -l<library>
1767  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1768              you have headers in a nonstandard directory <include dir>
1769  CXX         C++ compiler command
1770  CXXFLAGS    C++ compiler flags
1771  OBJC        Objective C compiler command
1772  OBJCFLAGS   Objective C compiler flags
1773  CPP         C preprocessor
1774  CXXCPP      C++ preprocessor
1775  XMKMF       Path to xmkmf, Makefile generator for X Window System
1776  FREETYPE2_CFLAGS
1777              C compiler flags for FREETYPE2, overriding pkg-config
1778  FREETYPE2_LIBS
1779              linker flags for FREETYPE2, overriding pkg-config
1780  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1781  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1782
1783Use these variables to override the choices made by `configure' or to help
1784it to find libraries and programs with nonstandard names/locations.
1785
1786Report bugs to <build-dev@openjdk.java.net>.
1787OpenJDK home page: <http://openjdk.java.net>.
1788_ACEOF
1789ac_status=$?
1790fi
1791
1792if test "$ac_init_help" = "recursive"; then
1793  # If there are subdirs, report their specific --help.
1794  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1795    test -d "$ac_dir" ||
1796      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1797      continue
1798    ac_builddir=.
1799
1800case "$ac_dir" in
1801.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1802*)
1803  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1804  # A ".." for each directory in $ac_dir_suffix.
1805  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1806  case $ac_top_builddir_sub in
1807  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1808  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1809  esac ;;
1810esac
1811ac_abs_top_builddir=$ac_pwd
1812ac_abs_builddir=$ac_pwd$ac_dir_suffix
1813# for backward compatibility:
1814ac_top_builddir=$ac_top_build_prefix
1815
1816case $srcdir in
1817  .)  # We are building in place.
1818    ac_srcdir=.
1819    ac_top_srcdir=$ac_top_builddir_sub
1820    ac_abs_top_srcdir=$ac_pwd ;;
1821  [\\/]* | ?:[\\/]* )  # Absolute name.
1822    ac_srcdir=$srcdir$ac_dir_suffix;
1823    ac_top_srcdir=$srcdir
1824    ac_abs_top_srcdir=$srcdir ;;
1825  *) # Relative name.
1826    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1827    ac_top_srcdir=$ac_top_build_prefix$srcdir
1828    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1829esac
1830ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1831
1832    cd "$ac_dir" || { ac_status=$?; continue; }
1833    # Check for guested configure.
1834    if test -f "$ac_srcdir/configure.gnu"; then
1835      echo &&
1836      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1837    elif test -f "$ac_srcdir/configure"; then
1838      echo &&
1839      $SHELL "$ac_srcdir/configure" --help=recursive
1840    else
1841      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1842    fi || ac_status=$?
1843    cd "$ac_pwd" || { ac_status=$?; break; }
1844  done
1845fi
1846
1847test -n "$ac_init_help" && exit $ac_status
1848if $ac_init_version; then
1849  cat <<\_ACEOF
1850OpenJDK configure jdk8
1851generated by GNU Autoconf 2.67
1852
1853Copyright (C) 2010 Free Software Foundation, Inc.
1854This configure script is free software; the Free Software Foundation
1855gives unlimited permission to copy, distribute and modify it.
1856_ACEOF
1857  exit
1858fi
1859
1860## ------------------------ ##
1861## Autoconf initialization. ##
1862## ------------------------ ##
1863
1864# ac_fn_c_try_compile LINENO
1865# --------------------------
1866# Try to compile conftest.$ac_ext, and return whether this succeeded.
1867ac_fn_c_try_compile ()
1868{
1869  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870  rm -f conftest.$ac_objext
1871  if { { ac_try="$ac_compile"
1872case "(($ac_try" in
1873  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1874  *) ac_try_echo=$ac_try;;
1875esac
1876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1877$as_echo "$ac_try_echo"; } >&5
1878  (eval "$ac_compile") 2>conftest.err
1879  ac_status=$?
1880  if test -s conftest.err; then
1881    grep -v '^ *+' conftest.err >conftest.er1
1882    cat conftest.er1 >&5
1883    mv -f conftest.er1 conftest.err
1884  fi
1885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886  test $ac_status = 0; } && {
1887	 test -z "$ac_c_werror_flag" ||
1888	 test ! -s conftest.err
1889       } && test -s conftest.$ac_objext; then :
1890  ac_retval=0
1891else
1892  $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895	ac_retval=1
1896fi
1897  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1898  as_fn_set_status $ac_retval
1899
1900} # ac_fn_c_try_compile
1901
1902# ac_fn_cxx_try_compile LINENO
1903# ----------------------------
1904# Try to compile conftest.$ac_ext, and return whether this succeeded.
1905ac_fn_cxx_try_compile ()
1906{
1907  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908  rm -f conftest.$ac_objext
1909  if { { ac_try="$ac_compile"
1910case "(($ac_try" in
1911  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1912  *) ac_try_echo=$ac_try;;
1913esac
1914eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1915$as_echo "$ac_try_echo"; } >&5
1916  (eval "$ac_compile") 2>conftest.err
1917  ac_status=$?
1918  if test -s conftest.err; then
1919    grep -v '^ *+' conftest.err >conftest.er1
1920    cat conftest.er1 >&5
1921    mv -f conftest.er1 conftest.err
1922  fi
1923  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1924  test $ac_status = 0; } && {
1925	 test -z "$ac_cxx_werror_flag" ||
1926	 test ! -s conftest.err
1927       } && test -s conftest.$ac_objext; then :
1928  ac_retval=0
1929else
1930  $as_echo "$as_me: failed program was:" >&5
1931sed 's/^/| /' conftest.$ac_ext >&5
1932
1933	ac_retval=1
1934fi
1935  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1936  as_fn_set_status $ac_retval
1937
1938} # ac_fn_cxx_try_compile
1939
1940# ac_fn_objc_try_compile LINENO
1941# -----------------------------
1942# Try to compile conftest.$ac_ext, and return whether this succeeded.
1943ac_fn_objc_try_compile ()
1944{
1945  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1946  rm -f conftest.$ac_objext
1947  if { { ac_try="$ac_compile"
1948case "(($ac_try" in
1949  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1950  *) ac_try_echo=$ac_try;;
1951esac
1952eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1953$as_echo "$ac_try_echo"; } >&5
1954  (eval "$ac_compile") 2>conftest.err
1955  ac_status=$?
1956  if test -s conftest.err; then
1957    grep -v '^ *+' conftest.err >conftest.er1
1958    cat conftest.er1 >&5
1959    mv -f conftest.er1 conftest.err
1960  fi
1961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1962  test $ac_status = 0; } && {
1963	 test -z "$ac_objc_werror_flag" ||
1964	 test ! -s conftest.err
1965       } && test -s conftest.$ac_objext; then :
1966  ac_retval=0
1967else
1968  $as_echo "$as_me: failed program was:" >&5
1969sed 's/^/| /' conftest.$ac_ext >&5
1970
1971	ac_retval=1
1972fi
1973  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1974  as_fn_set_status $ac_retval
1975
1976} # ac_fn_objc_try_compile
1977
1978# ac_fn_c_try_cpp LINENO
1979# ----------------------
1980# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1981ac_fn_c_try_cpp ()
1982{
1983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984  if { { ac_try="$ac_cpp conftest.$ac_ext"
1985case "(($ac_try" in
1986  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1987  *) ac_try_echo=$ac_try;;
1988esac
1989eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1990$as_echo "$ac_try_echo"; } >&5
1991  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1992  ac_status=$?
1993  if test -s conftest.err; then
1994    grep -v '^ *+' conftest.err >conftest.er1
1995    cat conftest.er1 >&5
1996    mv -f conftest.er1 conftest.err
1997  fi
1998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1999  test $ac_status = 0; } > conftest.i && {
2000	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2001	 test ! -s conftest.err
2002       }; then :
2003  ac_retval=0
2004else
2005  $as_echo "$as_me: failed program was:" >&5
2006sed 's/^/| /' conftest.$ac_ext >&5
2007
2008    ac_retval=1
2009fi
2010  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2011  as_fn_set_status $ac_retval
2012
2013} # ac_fn_c_try_cpp
2014
2015# ac_fn_cxx_try_cpp LINENO
2016# ------------------------
2017# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2018ac_fn_cxx_try_cpp ()
2019{
2020  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2021  if { { ac_try="$ac_cpp conftest.$ac_ext"
2022case "(($ac_try" in
2023  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2024  *) ac_try_echo=$ac_try;;
2025esac
2026eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2027$as_echo "$ac_try_echo"; } >&5
2028  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2029  ac_status=$?
2030  if test -s conftest.err; then
2031    grep -v '^ *+' conftest.err >conftest.er1
2032    cat conftest.er1 >&5
2033    mv -f conftest.er1 conftest.err
2034  fi
2035  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2036  test $ac_status = 0; } > conftest.i && {
2037	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2038	 test ! -s conftest.err
2039       }; then :
2040  ac_retval=0
2041else
2042  $as_echo "$as_me: failed program was:" >&5
2043sed 's/^/| /' conftest.$ac_ext >&5
2044
2045    ac_retval=1
2046fi
2047  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2048  as_fn_set_status $ac_retval
2049
2050} # ac_fn_cxx_try_cpp
2051
2052# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2053# ---------------------------------------------------------
2054# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2055# the include files in INCLUDES and setting the cache variable VAR
2056# accordingly.
2057ac_fn_cxx_check_header_mongrel ()
2058{
2059  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2060  if eval "test \"\${$3+set}\"" = set; then :
2061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2062$as_echo_n "checking for $2... " >&6; }
2063if eval "test \"\${$3+set}\"" = set; then :
2064  $as_echo_n "(cached) " >&6
2065fi
2066eval ac_res=\$$3
2067	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2068$as_echo "$ac_res" >&6; }
2069else
2070  # Is the header compilable?
2071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2072$as_echo_n "checking $2 usability... " >&6; }
2073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2074/* end confdefs.h.  */
2075$4
2076#include <$2>
2077_ACEOF
2078if ac_fn_cxx_try_compile "$LINENO"; then :
2079  ac_header_compiler=yes
2080else
2081  ac_header_compiler=no
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2085$as_echo "$ac_header_compiler" >&6; }
2086
2087# Is the header present?
2088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2089$as_echo_n "checking $2 presence... " >&6; }
2090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2091/* end confdefs.h.  */
2092#include <$2>
2093_ACEOF
2094if ac_fn_cxx_try_cpp "$LINENO"; then :
2095  ac_header_preproc=yes
2096else
2097  ac_header_preproc=no
2098fi
2099rm -f conftest.err conftest.i conftest.$ac_ext
2100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2101$as_echo "$ac_header_preproc" >&6; }
2102
2103# So?  What about this header?
2104case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2105  yes:no: )
2106    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2107$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2108    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2109$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2110    ;;
2111  no:yes:* )
2112    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2113$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2114    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2115$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2117$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2119$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2120    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2121$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2122( $as_echo "## ----------------------------------------- ##
2123## Report this to build-dev@openjdk.java.net ##
2124## ----------------------------------------- ##"
2125     ) | sed "s/^/$as_me: WARNING:     /" >&2
2126    ;;
2127esac
2128  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2129$as_echo_n "checking for $2... " >&6; }
2130if eval "test \"\${$3+set}\"" = set; then :
2131  $as_echo_n "(cached) " >&6
2132else
2133  eval "$3=\$ac_header_compiler"
2134fi
2135eval ac_res=\$$3
2136	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2137$as_echo "$ac_res" >&6; }
2138fi
2139  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2140
2141} # ac_fn_cxx_check_header_mongrel
2142
2143# ac_fn_cxx_try_run LINENO
2144# ------------------------
2145# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2146# that executables *can* be run.
2147ac_fn_cxx_try_run ()
2148{
2149  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2150  if { { ac_try="$ac_link"
2151case "(($ac_try" in
2152  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2153  *) ac_try_echo=$ac_try;;
2154esac
2155eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2156$as_echo "$ac_try_echo"; } >&5
2157  (eval "$ac_link") 2>&5
2158  ac_status=$?
2159  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2160  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2161  { { case "(($ac_try" in
2162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2163  *) ac_try_echo=$ac_try;;
2164esac
2165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2166$as_echo "$ac_try_echo"; } >&5
2167  (eval "$ac_try") 2>&5
2168  ac_status=$?
2169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2170  test $ac_status = 0; }; }; then :
2171  ac_retval=0
2172else
2173  $as_echo "$as_me: program exited with status $ac_status" >&5
2174       $as_echo "$as_me: failed program was:" >&5
2175sed 's/^/| /' conftest.$ac_ext >&5
2176
2177       ac_retval=$ac_status
2178fi
2179  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2180  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2181  as_fn_set_status $ac_retval
2182
2183} # ac_fn_cxx_try_run
2184
2185# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2186# ---------------------------------------------------------
2187# Tests whether HEADER exists and can be compiled using the include files in
2188# INCLUDES, setting the cache variable VAR accordingly.
2189ac_fn_cxx_check_header_compile ()
2190{
2191  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2192  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2193$as_echo_n "checking for $2... " >&6; }
2194if eval "test \"\${$3+set}\"" = set; then :
2195  $as_echo_n "(cached) " >&6
2196else
2197  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2198/* end confdefs.h.  */
2199$4
2200#include <$2>
2201_ACEOF
2202if ac_fn_cxx_try_compile "$LINENO"; then :
2203  eval "$3=yes"
2204else
2205  eval "$3=no"
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208fi
2209eval ac_res=\$$3
2210	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2211$as_echo "$ac_res" >&6; }
2212  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2213
2214} # ac_fn_cxx_check_header_compile
2215
2216# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2217# ----------------------------------------------
2218# Tries to find the compile-time value of EXPR in a program that includes
2219# INCLUDES, setting VAR accordingly. Returns whether the value could be
2220# computed
2221ac_fn_cxx_compute_int ()
2222{
2223  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2224  if test "$cross_compiling" = yes; then
2225    # Depending upon the size, compute the lo and hi bounds.
2226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227/* end confdefs.h.  */
2228$4
2229int
2230main ()
2231{
2232static int test_array [1 - 2 * !(($2) >= 0)];
2233test_array [0] = 0
2234
2235  ;
2236  return 0;
2237}
2238_ACEOF
2239if ac_fn_cxx_try_compile "$LINENO"; then :
2240  ac_lo=0 ac_mid=0
2241  while :; do
2242    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243/* end confdefs.h.  */
2244$4
2245int
2246main ()
2247{
2248static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2249test_array [0] = 0
2250
2251  ;
2252  return 0;
2253}
2254_ACEOF
2255if ac_fn_cxx_try_compile "$LINENO"; then :
2256  ac_hi=$ac_mid; break
2257else
2258  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2259			if test $ac_lo -le $ac_mid; then
2260			  ac_lo= ac_hi=
2261			  break
2262			fi
2263			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2264fi
2265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2266  done
2267else
2268  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2269/* end confdefs.h.  */
2270$4
2271int
2272main ()
2273{
2274static int test_array [1 - 2 * !(($2) < 0)];
2275test_array [0] = 0
2276
2277  ;
2278  return 0;
2279}
2280_ACEOF
2281if ac_fn_cxx_try_compile "$LINENO"; then :
2282  ac_hi=-1 ac_mid=-1
2283  while :; do
2284    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2285/* end confdefs.h.  */
2286$4
2287int
2288main ()
2289{
2290static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2291test_array [0] = 0
2292
2293  ;
2294  return 0;
2295}
2296_ACEOF
2297if ac_fn_cxx_try_compile "$LINENO"; then :
2298  ac_lo=$ac_mid; break
2299else
2300  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2301			if test $ac_mid -le $ac_hi; then
2302			  ac_lo= ac_hi=
2303			  break
2304			fi
2305			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2306fi
2307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2308  done
2309else
2310  ac_lo= ac_hi=
2311fi
2312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315# Binary search between lo and hi bounds.
2316while test "x$ac_lo" != "x$ac_hi"; do
2317  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2318  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2319/* end confdefs.h.  */
2320$4
2321int
2322main ()
2323{
2324static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2325test_array [0] = 0
2326
2327  ;
2328  return 0;
2329}
2330_ACEOF
2331if ac_fn_cxx_try_compile "$LINENO"; then :
2332  ac_hi=$ac_mid
2333else
2334  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2335fi
2336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337done
2338case $ac_lo in #((
2339?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2340'') ac_retval=1 ;;
2341esac
2342  else
2343    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344/* end confdefs.h.  */
2345$4
2346static long int longval () { return $2; }
2347static unsigned long int ulongval () { return $2; }
2348#include <stdio.h>
2349#include <stdlib.h>
2350int
2351main ()
2352{
2353
2354  FILE *f = fopen ("conftest.val", "w");
2355  if (! f)
2356    return 1;
2357  if (($2) < 0)
2358    {
2359      long int i = longval ();
2360      if (i != ($2))
2361	return 1;
2362      fprintf (f, "%ld", i);
2363    }
2364  else
2365    {
2366      unsigned long int i = ulongval ();
2367      if (i != ($2))
2368	return 1;
2369      fprintf (f, "%lu", i);
2370    }
2371  /* Do not output a trailing newline, as this causes \r\n confusion
2372     on some platforms.  */
2373  return ferror (f) || fclose (f) != 0;
2374
2375  ;
2376  return 0;
2377}
2378_ACEOF
2379if ac_fn_cxx_try_run "$LINENO"; then :
2380  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2381else
2382  ac_retval=1
2383fi
2384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2385  conftest.$ac_objext conftest.beam conftest.$ac_ext
2386rm -f conftest.val
2387
2388  fi
2389  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2390  as_fn_set_status $ac_retval
2391
2392} # ac_fn_cxx_compute_int
2393
2394# ac_fn_cxx_try_link LINENO
2395# -------------------------
2396# Try to link conftest.$ac_ext, and return whether this succeeded.
2397ac_fn_cxx_try_link ()
2398{
2399  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2400  rm -f conftest.$ac_objext conftest$ac_exeext
2401  if { { ac_try="$ac_link"
2402case "(($ac_try" in
2403  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2404  *) ac_try_echo=$ac_try;;
2405esac
2406eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2407$as_echo "$ac_try_echo"; } >&5
2408  (eval "$ac_link") 2>conftest.err
2409  ac_status=$?
2410  if test -s conftest.err; then
2411    grep -v '^ *+' conftest.err >conftest.er1
2412    cat conftest.er1 >&5
2413    mv -f conftest.er1 conftest.err
2414  fi
2415  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2416  test $ac_status = 0; } && {
2417	 test -z "$ac_cxx_werror_flag" ||
2418	 test ! -s conftest.err
2419       } && test -s conftest$ac_exeext && {
2420	 test "$cross_compiling" = yes ||
2421	 $as_test_x conftest$ac_exeext
2422       }; then :
2423  ac_retval=0
2424else
2425  $as_echo "$as_me: failed program was:" >&5
2426sed 's/^/| /' conftest.$ac_ext >&5
2427
2428	ac_retval=1
2429fi
2430  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2431  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2432  # interfere with the next link command; also delete a directory that is
2433  # left behind by Apple's compiler.  We do this before executing the actions.
2434  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2435  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2436  as_fn_set_status $ac_retval
2437
2438} # ac_fn_cxx_try_link
2439
2440# ac_fn_cxx_check_func LINENO FUNC VAR
2441# ------------------------------------
2442# Tests whether FUNC exists, setting the cache variable VAR accordingly
2443ac_fn_cxx_check_func ()
2444{
2445  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2447$as_echo_n "checking for $2... " >&6; }
2448if eval "test \"\${$3+set}\"" = set; then :
2449  $as_echo_n "(cached) " >&6
2450else
2451  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2452/* end confdefs.h.  */
2453/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2454   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2455#define $2 innocuous_$2
2456
2457/* System header to define __stub macros and hopefully few prototypes,
2458    which can conflict with char $2 (); below.
2459    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2460    <limits.h> exists even on freestanding compilers.  */
2461
2462#ifdef __STDC__
2463# include <limits.h>
2464#else
2465# include <assert.h>
2466#endif
2467
2468#undef $2
2469
2470/* Override any GCC internal prototype to avoid an error.
2471   Use char because int might match the return type of a GCC
2472   builtin and then its argument prototype would still apply.  */
2473#ifdef __cplusplus
2474extern "C"
2475#endif
2476char $2 ();
2477/* The GNU C library defines this for functions which it implements
2478    to always fail with ENOSYS.  Some functions are actually named
2479    something starting with __ and the normal name is an alias.  */
2480#if defined __stub_$2 || defined __stub___$2
2481choke me
2482#endif
2483
2484int
2485main ()
2486{
2487return $2 ();
2488  ;
2489  return 0;
2490}
2491_ACEOF
2492if ac_fn_cxx_try_link "$LINENO"; then :
2493  eval "$3=yes"
2494else
2495  eval "$3=no"
2496fi
2497rm -f core conftest.err conftest.$ac_objext \
2498    conftest$ac_exeext conftest.$ac_ext
2499fi
2500eval ac_res=\$$3
2501	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2502$as_echo "$ac_res" >&6; }
2503  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2504
2505} # ac_fn_cxx_check_func
2506
2507# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2508# -------------------------------------------------------
2509# Tests whether HEADER exists and can be compiled using the include files in
2510# INCLUDES, setting the cache variable VAR accordingly.
2511ac_fn_c_check_header_compile ()
2512{
2513  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2515$as_echo_n "checking for $2... " >&6; }
2516if eval "test \"\${$3+set}\"" = set; then :
2517  $as_echo_n "(cached) " >&6
2518else
2519  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2520/* end confdefs.h.  */
2521$4
2522#include <$2>
2523_ACEOF
2524if ac_fn_c_try_compile "$LINENO"; then :
2525  eval "$3=yes"
2526else
2527  eval "$3=no"
2528fi
2529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2530fi
2531eval ac_res=\$$3
2532	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2533$as_echo "$ac_res" >&6; }
2534  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2535
2536} # ac_fn_c_check_header_compile
2537cat >config.log <<_ACEOF
2538This file contains any messages produced by compilers while
2539running configure, to aid debugging if configure makes a mistake.
2540
2541It was created by OpenJDK $as_me jdk8, which was
2542generated by GNU Autoconf 2.67.  Invocation command line was
2543
2544  $ $0 $@
2545
2546_ACEOF
2547exec 5>>config.log
2548{
2549cat <<_ASUNAME
2550## --------- ##
2551## Platform. ##
2552## --------- ##
2553
2554hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2555uname -m = `(uname -m) 2>/dev/null || echo unknown`
2556uname -r = `(uname -r) 2>/dev/null || echo unknown`
2557uname -s = `(uname -s) 2>/dev/null || echo unknown`
2558uname -v = `(uname -v) 2>/dev/null || echo unknown`
2559
2560/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2561/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2562
2563/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2564/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2565/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2566/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2567/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2568/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2569/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2570
2571_ASUNAME
2572
2573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2574for as_dir in $PATH
2575do
2576  IFS=$as_save_IFS
2577  test -z "$as_dir" && as_dir=.
2578    $as_echo "PATH: $as_dir"
2579  done
2580IFS=$as_save_IFS
2581
2582} >&5
2583
2584cat >&5 <<_ACEOF
2585
2586
2587## ----------- ##
2588## Core tests. ##
2589## ----------- ##
2590
2591_ACEOF
2592
2593
2594# Keep a trace of the command line.
2595# Strip out --no-create and --no-recursion so they do not pile up.
2596# Strip out --silent because we don't want to record it for future runs.
2597# Also quote any args containing shell meta-characters.
2598# Make two passes to allow for proper duplicate-argument suppression.
2599ac_configure_args=
2600ac_configure_args0=
2601ac_configure_args1=
2602ac_must_keep_next=false
2603for ac_pass in 1 2
2604do
2605  for ac_arg
2606  do
2607    case $ac_arg in
2608    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2609    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2610    | -silent | --silent | --silen | --sile | --sil)
2611      continue ;;
2612    *\'*)
2613      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2614    esac
2615    case $ac_pass in
2616    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2617    2)
2618      as_fn_append ac_configure_args1 " '$ac_arg'"
2619      if test $ac_must_keep_next = true; then
2620	ac_must_keep_next=false # Got value, back to normal.
2621      else
2622	case $ac_arg in
2623	  *=* | --config-cache | -C | -disable-* | --disable-* \
2624	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2625	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2626	  | -with-* | --with-* | -without-* | --without-* | --x)
2627	    case "$ac_configure_args0 " in
2628	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2629	    esac
2630	    ;;
2631	  -* ) ac_must_keep_next=true ;;
2632	esac
2633      fi
2634      as_fn_append ac_configure_args " '$ac_arg'"
2635      ;;
2636    esac
2637  done
2638done
2639{ ac_configure_args0=; unset ac_configure_args0;}
2640{ ac_configure_args1=; unset ac_configure_args1;}
2641
2642# When interrupted or exit'd, cleanup temporary files, and complete
2643# config.log.  We remove comments because anyway the quotes in there
2644# would cause problems or look ugly.
2645# WARNING: Use '\'' to represent an apostrophe within the trap.
2646# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2647trap 'exit_status=$?
2648  # Save into config.log some information that might help in debugging.
2649  {
2650    echo
2651
2652    $as_echo "## ---------------- ##
2653## Cache variables. ##
2654## ---------------- ##"
2655    echo
2656    # The following way of writing the cache mishandles newlines in values,
2657(
2658  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2659    eval ac_val=\$$ac_var
2660    case $ac_val in #(
2661    *${as_nl}*)
2662      case $ac_var in #(
2663      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2664$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2665      esac
2666      case $ac_var in #(
2667      _ | IFS | as_nl) ;; #(
2668      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2669      *) { eval $ac_var=; unset $ac_var;} ;;
2670      esac ;;
2671    esac
2672  done
2673  (set) 2>&1 |
2674    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2675    *${as_nl}ac_space=\ *)
2676      sed -n \
2677	"s/'\''/'\''\\\\'\'''\''/g;
2678	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2679      ;; #(
2680    *)
2681      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2682      ;;
2683    esac |
2684    sort
2685)
2686    echo
2687
2688    $as_echo "## ----------------- ##
2689## Output variables. ##
2690## ----------------- ##"
2691    echo
2692    for ac_var in $ac_subst_vars
2693    do
2694      eval ac_val=\$$ac_var
2695      case $ac_val in
2696      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2697      esac
2698      $as_echo "$ac_var='\''$ac_val'\''"
2699    done | sort
2700    echo
2701
2702    if test -n "$ac_subst_files"; then
2703      $as_echo "## ------------------- ##
2704## File substitutions. ##
2705## ------------------- ##"
2706      echo
2707      for ac_var in $ac_subst_files
2708      do
2709	eval ac_val=\$$ac_var
2710	case $ac_val in
2711	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2712	esac
2713	$as_echo "$ac_var='\''$ac_val'\''"
2714      done | sort
2715      echo
2716    fi
2717
2718    if test -s confdefs.h; then
2719      $as_echo "## ----------- ##
2720## confdefs.h. ##
2721## ----------- ##"
2722      echo
2723      cat confdefs.h
2724      echo
2725    fi
2726    test "$ac_signal" != 0 &&
2727      $as_echo "$as_me: caught signal $ac_signal"
2728    $as_echo "$as_me: exit $exit_status"
2729  } >&5
2730  rm -f core *.core core.conftest.* &&
2731    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2732    exit $exit_status
2733' 0
2734for ac_signal in 1 2 13 15; do
2735  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2736done
2737ac_signal=0
2738
2739# confdefs.h avoids OS command line length limits that DEFS can exceed.
2740rm -f -r conftest* confdefs.h
2741
2742$as_echo "/* confdefs.h */" > confdefs.h
2743
2744# Predefined preprocessor variables.
2745
2746cat >>confdefs.h <<_ACEOF
2747#define PACKAGE_NAME "$PACKAGE_NAME"
2748_ACEOF
2749
2750cat >>confdefs.h <<_ACEOF
2751#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2752_ACEOF
2753
2754cat >>confdefs.h <<_ACEOF
2755#define PACKAGE_VERSION "$PACKAGE_VERSION"
2756_ACEOF
2757
2758cat >>confdefs.h <<_ACEOF
2759#define PACKAGE_STRING "$PACKAGE_STRING"
2760_ACEOF
2761
2762cat >>confdefs.h <<_ACEOF
2763#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2764_ACEOF
2765
2766cat >>confdefs.h <<_ACEOF
2767#define PACKAGE_URL "$PACKAGE_URL"
2768_ACEOF
2769
2770
2771# Let the site file select an alternate cache file if it wants to.
2772# Prefer an explicitly selected file to automatically selected ones.
2773ac_site_file1=NONE
2774ac_site_file2=NONE
2775if test -n "$CONFIG_SITE"; then
2776  # We do not want a PATH search for config.site.
2777  case $CONFIG_SITE in #((
2778    -*)  ac_site_file1=./$CONFIG_SITE;;
2779    */*) ac_site_file1=$CONFIG_SITE;;
2780    *)   ac_site_file1=./$CONFIG_SITE;;
2781  esac
2782elif test "x$prefix" != xNONE; then
2783  ac_site_file1=$prefix/share/config.site
2784  ac_site_file2=$prefix/etc/config.site
2785else
2786  ac_site_file1=$ac_default_prefix/share/config.site
2787  ac_site_file2=$ac_default_prefix/etc/config.site
2788fi
2789for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2790do
2791  test "x$ac_site_file" = xNONE && continue
2792  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2793    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2794$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2795    sed 's/^/| /' "$ac_site_file" >&5
2796    . "$ac_site_file" \
2797      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2799as_fn_error $? "failed to load site script $ac_site_file
2800See \`config.log' for more details" "$LINENO" 5 ; }
2801  fi
2802done
2803
2804if test -r "$cache_file"; then
2805  # Some versions of bash will fail to source /dev/null (special files
2806  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2807  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2808    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2809$as_echo "$as_me: loading cache $cache_file" >&6;}
2810    case $cache_file in
2811      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2812      *)                      . "./$cache_file";;
2813    esac
2814  fi
2815else
2816  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2817$as_echo "$as_me: creating cache $cache_file" >&6;}
2818  >$cache_file
2819fi
2820
2821# Check that the precious variables saved in the cache have kept the same
2822# value.
2823ac_cache_corrupted=false
2824for ac_var in $ac_precious_vars; do
2825  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2826  eval ac_new_set=\$ac_env_${ac_var}_set
2827  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2828  eval ac_new_val=\$ac_env_${ac_var}_value
2829  case $ac_old_set,$ac_new_set in
2830    set,)
2831      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2832$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2833      ac_cache_corrupted=: ;;
2834    ,set)
2835      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2836$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2837      ac_cache_corrupted=: ;;
2838    ,);;
2839    *)
2840      if test "x$ac_old_val" != "x$ac_new_val"; then
2841	# differences in whitespace do not lead to failure.
2842	ac_old_val_w=`echo x $ac_old_val`
2843	ac_new_val_w=`echo x $ac_new_val`
2844	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2845	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2846$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2847	  ac_cache_corrupted=:
2848	else
2849	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2850$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2851	  eval $ac_var=\$ac_old_val
2852	fi
2853	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2854$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2855	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2856$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2857      fi;;
2858  esac
2859  # Pass precious variables to config.status.
2860  if test "$ac_new_set" = set; then
2861    case $ac_new_val in
2862    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2863    *) ac_arg=$ac_var=$ac_new_val ;;
2864    esac
2865    case " $ac_configure_args " in
2866      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2867      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2868    esac
2869  fi
2870done
2871if $ac_cache_corrupted; then
2872  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2873$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2874  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2875$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2876  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2877fi
2878## -------------------- ##
2879## Main body of script. ##
2880## -------------------- ##
2881
2882ac_ext=c
2883ac_cpp='$CPP $CPPFLAGS'
2884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2886ac_compiler_gnu=$ac_cv_c_compiler_gnu
2887
2888
2889
2890ac_aux_dir=
2891for ac_dir in build-aux "$srcdir"/build-aux; do
2892  if test -f "$ac_dir/install-sh"; then
2893    ac_aux_dir=$ac_dir
2894    ac_install_sh="$ac_aux_dir/install-sh -c"
2895    break
2896  elif test -f "$ac_dir/install.sh"; then
2897    ac_aux_dir=$ac_dir
2898    ac_install_sh="$ac_aux_dir/install.sh -c"
2899    break
2900  elif test -f "$ac_dir/shtool"; then
2901    ac_aux_dir=$ac_dir
2902    ac_install_sh="$ac_aux_dir/shtool install -c"
2903    break
2904  fi
2905done
2906if test -z "$ac_aux_dir"; then
2907  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2908fi
2909
2910# These three variables are undocumented and unsupported,
2911# and are intended to be withdrawn in a future Autoconf release.
2912# They can cause serious problems if a builder's source tree is in a directory
2913# whose full name contains unusual characters.
2914ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2915ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2916ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2917
2918
2919# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2920#
2921# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2922#
2923# This program is free software; you can redistribute it and/or modify
2924# it under the terms of the GNU General Public License as published by
2925# the Free Software Foundation; either version 2 of the License, or
2926# (at your option) any later version.
2927#
2928# This program is distributed in the hope that it will be useful, but
2929# WITHOUT ANY WARRANTY; without even the implied warranty of
2930# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2931# General Public License for more details.
2932#
2933# You should have received a copy of the GNU General Public License
2934# along with this program; if not, write to the Free Software
2935# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2936#
2937# As a special exception to the GNU General Public License, if you
2938# distribute this file as part of a program that contains a
2939# configuration script generated by Autoconf, you may include it under
2940# the same distribution terms that you use for the rest of that program.
2941
2942# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2943# ----------------------------------
2944# PKG_PROG_PKG_CONFIG
2945
2946# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2947#
2948# Check to see whether a particular set of modules exists.  Similar
2949# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2950#
2951#
2952# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2953# this or PKG_CHECK_MODULES is called, or make sure to call
2954# PKG_CHECK_EXISTS manually
2955# --------------------------------------------------------------
2956
2957
2958
2959# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2960# ---------------------------------------------
2961# _PKG_CONFIG
2962
2963# _PKG_SHORT_ERRORS_SUPPORTED
2964# -----------------------------
2965# _PKG_SHORT_ERRORS_SUPPORTED
2966
2967
2968# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2969# [ACTION-IF-NOT-FOUND])
2970#
2971#
2972# Note that if there is a possibility the first call to
2973# PKG_CHECK_MODULES might not happen, you should be sure to include an
2974# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2975#
2976#
2977# --------------------------------------------------------------
2978# PKG_CHECK_MODULES
2979
2980
2981# Include these first...
2982#
2983# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
2984# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2985#
2986# This code is free software; you can redistribute it and/or modify it
2987# under the terms of the GNU General Public License version 2 only, as
2988# published by the Free Software Foundation.  Oracle designates this
2989# particular file as subject to the "Classpath" exception as provided
2990# by Oracle in the LICENSE file that accompanied this code.
2991#
2992# This code is distributed in the hope that it will be useful, but WITHOUT
2993# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2994# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2995# version 2 for more details (a copy is included in the LICENSE file that
2996# accompanied this code).
2997#
2998# You should have received a copy of the GNU General Public License version
2999# 2 along with this work; if not, write to the Free Software Foundation,
3000# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3001#
3002# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3003# or visit www.oracle.com if you need additional information or have any
3004# questions.
3005#
3006
3007
3008
3009# This will make sure the given variable points to a full and proper
3010# path. This means:
3011# 1) There will be no spaces in the path. On posix platforms,
3012#    spaces in the path will result in an error. On Windows,
3013#    the path will be rewritten using short-style to be space-free.
3014# 2) The path will be absolute, and it will be in unix-style (on
3015#     cygwin).
3016# $1: The name of the variable to fix
3017
3018
3019# This will make sure the given variable points to a executable
3020# with a full and proper path. This means:
3021# 1) There will be no spaces in the path. On posix platforms,
3022#    spaces in the path will result in an error. On Windows,
3023#    the path will be rewritten using short-style to be space-free.
3024# 2) The path will be absolute, and it will be in unix-style (on
3025#     cygwin).
3026# Any arguments given to the executable is preserved.
3027# If the input variable does not have a directory specification, then
3028# it need to be in the PATH.
3029# $1: The name of the variable to fix
3030
3031
3032
3033
3034
3035
3036# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3037# $1: variable to check
3038# $2: executable name to print in warning (optional)
3039
3040
3041# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3042# Arguments as AC_PATH_PROG:
3043# $1: variable to set
3044# $2: executable name to look for
3045
3046
3047# Setup the most fundamental tools that relies on not much else to set up,
3048# but is used by much of the early bootstrap code.
3049
3050
3051# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3052
3053
3054
3055
3056
3057
3058
3059#%%% Simple tools %%%
3060
3061# Check if we have found a usable version of make
3062# $1: the path to a potential make binary (or empty)
3063# $2: the description on how we found this
3064
3065
3066# Goes looking for a usable version of GNU make.
3067
3068
3069
3070
3071
3072
3073# Check if build directory is on local disk. If not possible to determine,
3074# we prefer to claim it's local.
3075# Argument 1: directory to test
3076# Argument 2: what to do if it is on local disk
3077# Argument 3: what to do otherwise (remote disk or failure)
3078
3079
3080
3081
3082#
3083# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3084# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3085#
3086# This code is free software; you can redistribute it and/or modify it
3087# under the terms of the GNU General Public License version 2 only, as
3088# published by the Free Software Foundation.  Oracle designates this
3089# particular file as subject to the "Classpath" exception as provided
3090# by Oracle in the LICENSE file that accompanied this code.
3091#
3092# This code is distributed in the hope that it will be useful, but WITHOUT
3093# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3094# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3095# version 2 for more details (a copy is included in the LICENSE file that
3096# accompanied this code).
3097#
3098# You should have received a copy of the GNU General Public License version
3099# 2 along with this work; if not, write to the Free Software Foundation,
3100# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3101#
3102# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3103# or visit www.oracle.com if you need additional information or have any
3104# questions.
3105#
3106
3107
3108
3109
3110
3111# Helper function which possibly converts a path using DOS-style short mode.
3112# If so, the updated path is stored in $new_path.
3113# $1: The path to check
3114
3115
3116# Helper function which possibly converts a path using DOS-style short mode.
3117# If so, the updated path is stored in $new_path.
3118# $1: The path to check
3119
3120
3121# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3122# and could probably be heavily simplified. However, all changes in this
3123# area tend to need lot of testing in different scenarios, and in lack of
3124# proper unit testing, cleaning this up has not been deemed worth the effort
3125# at the moment.
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3136
3137
3138
3139
3140#
3141# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3142# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3143#
3144# This code is free software; you can redistribute it and/or modify it
3145# under the terms of the GNU General Public License version 2 only, as
3146# published by the Free Software Foundation.  Oracle designates this
3147# particular file as subject to the "Classpath" exception as provided
3148# by Oracle in the LICENSE file that accompanied this code.
3149#
3150# This code is distributed in the hope that it will be useful, but WITHOUT
3151# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3152# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3153# version 2 for more details (a copy is included in the LICENSE file that
3154# accompanied this code).
3155#
3156# You should have received a copy of the GNU General Public License version
3157# 2 along with this work; if not, write to the Free Software Foundation,
3158# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3159#
3160# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3161# or visit www.oracle.com if you need additional information or have any
3162# questions.
3163#
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175# ... then the rest
3176#
3177# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3178# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3179#
3180# This code is free software; you can redistribute it and/or modify it
3181# under the terms of the GNU General Public License version 2 only, as
3182# published by the Free Software Foundation.  Oracle designates this
3183# particular file as subject to the "Classpath" exception as provided
3184# by Oracle in the LICENSE file that accompanied this code.
3185#
3186# This code is distributed in the hope that it will be useful, but WITHOUT
3187# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3188# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3189# version 2 for more details (a copy is included in the LICENSE file that
3190# accompanied this code).
3191#
3192# You should have received a copy of the GNU General Public License version
3193# 2 along with this work; if not, write to the Free Software Foundation,
3194# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3195#
3196# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3197# or visit www.oracle.com if you need additional information or have any
3198# questions.
3199#
3200
3201# Execute the check given as argument, and verify the result
3202# If the Boot JDK was previously found, do nothing
3203# $1 A command line (typically autoconf macro) to execute
3204
3205
3206# Test: Is bootjdk explicitely set by command line arguments?
3207
3208
3209# Test: Is bootjdk available from builddeps?
3210
3211
3212# Test: Is $JAVA_HOME set?
3213
3214
3215# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3216
3217
3218# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3219
3220
3221# Look for a jdk in the given path. If there are multiple, try to select the newest.
3222# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3223# $1 = Path to directory containing jdk installations.
3224# $2 = String to append to the found JDK directory to get the proper JDK home
3225
3226
3227# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3228# environmental variable as base for where to look.
3229# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3230
3231
3232# Test: Is there a JDK installed in default, well-known locations?
3233
3234
3235# Check that a command-line tool in the Boot JDK is correct
3236# $1 = name of variable to assign
3237# $2 = name of binary
3238
3239
3240###############################################################################
3241#
3242# We need a Boot JDK to bootstrap the build.
3243#
3244
3245
3246
3247
3248
3249#
3250# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3251# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3252#
3253# This code is free software; you can redistribute it and/or modify it
3254# under the terms of the GNU General Public License version 2 only, as
3255# published by the Free Software Foundation.  Oracle designates this
3256# particular file as subject to the "Classpath" exception as provided
3257# by Oracle in the LICENSE file that accompanied this code.
3258#
3259# This code is distributed in the hope that it will be useful, but WITHOUT
3260# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3261# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3262# version 2 for more details (a copy is included in the LICENSE file that
3263# accompanied this code).
3264#
3265# You should have received a copy of the GNU General Public License version
3266# 2 along with this work; if not, write to the Free Software Foundation,
3267# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3268#
3269# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3270# or visit www.oracle.com if you need additional information or have any
3271# questions.
3272#
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291#
3292# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3293# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3294#
3295# This code is free software; you can redistribute it and/or modify it
3296# under the terms of the GNU General Public License version 2 only, as
3297# published by the Free Software Foundation.  Oracle designates this
3298# particular file as subject to the "Classpath" exception as provided
3299# by Oracle in the LICENSE file that accompanied this code.
3300#
3301# This code is distributed in the hope that it will be useful, but WITHOUT
3302# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3303# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3304# version 2 for more details (a copy is included in the LICENSE file that
3305# accompanied this code).
3306#
3307# You should have received a copy of the GNU General Public License version
3308# 2 along with this work; if not, write to the Free Software Foundation,
3309# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3310#
3311# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3312# or visit www.oracle.com if you need additional information or have any
3313# questions.
3314#
3315
3316
3317
3318
3319
3320cygwin_help() {
3321    case $1 in
3322    unzip)
3323        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3324    zip)
3325        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3326    make)
3327        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3328    * )
3329       break ;;
3330    esac
3331}
3332
3333apt_help() {
3334    case $1 in
3335    devkit)
3336        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3337    openjdk)
3338        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3339    alsa)
3340        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3341    cups)
3342        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3343    freetype2)
3344        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3345    pulse)
3346        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3347    x11)
3348        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3349    ccache)
3350        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3351    * )
3352       break ;;
3353    esac
3354}
3355
3356yum_help() {
3357    case $1 in
3358    devkit)
3359        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3360    openjdk)
3361        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3362    alsa)
3363        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3364    cups)
3365        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3366    freetype2)
3367        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3368    pulse)
3369        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3370    x11)
3371        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3372    ccache)
3373        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3374    * )
3375       break ;;
3376    esac
3377}
3378
3379port_help() {
3380    PKGHANDLER_COMMAND=""
3381}
3382
3383pkgutil_help() {
3384    PKGHANDLER_COMMAND=""
3385}
3386
3387pkgadd_help() {
3388    PKGHANDLER_COMMAND=""
3389}
3390
3391
3392
3393#
3394# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3395# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3396#
3397# This code is free software; you can redistribute it and/or modify it
3398# under the terms of the GNU General Public License version 2 only, as
3399# published by the Free Software Foundation.  Oracle designates this
3400# particular file as subject to the "Classpath" exception as provided
3401# by Oracle in the LICENSE file that accompanied this code.
3402#
3403# This code is distributed in the hope that it will be useful, but WITHOUT
3404# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3405# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3406# version 2 for more details (a copy is included in the LICENSE file that
3407# accompanied this code).
3408#
3409# You should have received a copy of the GNU General Public License version
3410# 2 along with this work; if not, write to the Free Software Foundation,
3411# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3412#
3413# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3414# or visit www.oracle.com if you need additional information or have any
3415# questions.
3416#
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432# Support for customization of the build process. Some build files
3433# will include counterparts from this location, if they exist. This allows
3434# for a degree of customization of the build targets and the rules/recipes
3435# to create them
3436
3437# Check whether --with-custom-make-dir was given.
3438if test "${with_custom_make_dir+set}" = set; then :
3439  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3440fi
3441
3442
3443
3444#
3445# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3446# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3447#
3448# This code is free software; you can redistribute it and/or modify it
3449# under the terms of the GNU General Public License version 2 only, as
3450# published by the Free Software Foundation.  Oracle designates this
3451# particular file as subject to the "Classpath" exception as provided
3452# by Oracle in the LICENSE file that accompanied this code.
3453#
3454# This code is distributed in the hope that it will be useful, but WITHOUT
3455# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3456# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3457# version 2 for more details (a copy is included in the LICENSE file that
3458# accompanied this code).
3459#
3460# You should have received a copy of the GNU General Public License version
3461# 2 along with this work; if not, write to the Free Software Foundation,
3462# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3463#
3464# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3465# or visit www.oracle.com if you need additional information or have any
3466# questions.
3467#
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483#
3484# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3485# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3486#
3487# This code is free software; you can redistribute it and/or modify it
3488# under the terms of the GNU General Public License version 2 only, as
3489# published by the Free Software Foundation.  Oracle designates this
3490# particular file as subject to the "Classpath" exception as provided
3491# by Oracle in the LICENSE file that accompanied this code.
3492#
3493# This code is distributed in the hope that it will be useful, but WITHOUT
3494# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3495# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3496# version 2 for more details (a copy is included in the LICENSE file that
3497# accompanied this code).
3498#
3499# You should have received a copy of the GNU General Public License version
3500# 2 along with this work; if not, write to the Free Software Foundation,
3501# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3502#
3503# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3504# or visit www.oracle.com if you need additional information or have any
3505# questions.
3506#
3507
3508# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3509# Converts autoconf style CPU name to OpenJDK style, into
3510# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3511
3512
3513# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3514# Converts autoconf style OS name to OpenJDK style, into
3515# VAR_OS and VAR_OS_API.
3516
3517
3518# Expects $host_os $host_cpu $build_os and $build_cpu
3519# and $with_target_bits to have been setup!
3520#
3521# Translate the standard triplet(quadruplet) definition
3522# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3523# OPENJDK_BUILD_OS, etc.
3524
3525
3526# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3527# accordingly. Must be done after setting up build and target system, but before
3528# doing anything else with these values.
3529
3530
3531    # Setup the legacy variables, for controlling the old makefiles.
3532    #
3533
3534
3535
3536
3537#%%% Build and target systems %%%
3538
3539
3540
3541
3542# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3543# Add -mX to various FLAGS variables.
3544
3545
3546
3547
3548
3549
3550#
3551# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
3573#
3574
3575
3576
3577
3578
3579
3580
3581
3582#
3583# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3584# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3585#
3586# This code is free software; you can redistribute it and/or modify it
3587# under the terms of the GNU General Public License version 2 only, as
3588# published by the Free Software Foundation.  Oracle designates this
3589# particular file as subject to the "Classpath" exception as provided
3590# by Oracle in the LICENSE file that accompanied this code.
3591#
3592# This code is distributed in the hope that it will be useful, but WITHOUT
3593# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3594# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3595# version 2 for more details (a copy is included in the LICENSE file that
3596# accompanied this code).
3597#
3598# You should have received a copy of the GNU General Public License version
3599# 2 along with this work; if not, write to the Free Software Foundation,
3600# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3601#
3602# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3603# or visit www.oracle.com if you need additional information or have any
3604# questions.
3605#
3606
3607# $1 = compiler to test (CC or CXX)
3608# $2 = human readable name of compiler (C or C++)
3609
3610
3611
3612
3613
3614# $1 = compiler to test (CC or CXX)
3615# $2 = human readable name of compiler (C or C++)
3616# $3 = list of compiler names to search for
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629#
3630# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3631# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3632#
3633# This code is free software; you can redistribute it and/or modify it
3634# under the terms of the GNU General Public License version 2 only, as
3635# published by the Free Software Foundation.  Oracle designates this
3636# particular file as subject to the "Classpath" exception as provided
3637# by Oracle in the LICENSE file that accompanied this code.
3638#
3639# This code is distributed in the hope that it will be useful, but WITHOUT
3640# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3641# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3642# version 2 for more details (a copy is included in the LICENSE file that
3643# accompanied this code).
3644#
3645# You should have received a copy of the GNU General Public License version
3646# 2 along with this work; if not, write to the Free Software Foundation,
3647# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3648#
3649# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3650# or visit www.oracle.com if you need additional information or have any
3651# questions.
3652#
3653
3654
3655
3656
3657
3658
3659
3660# Check if the VS env variables were setup prior to running configure.
3661# If not, then find vcvarsall.bat and run it automatically, and integrate
3662# the set env variables into the spec file.
3663
3664
3665
3666
3667
3668
3669# This line needs to be here, verbatim, after all includes and the dummy hook
3670# definitions. It is replaced with custom functionality when building
3671# custom sources.
3672#CUSTOM_AUTOCONF_INCLUDE
3673
3674# Do not change or remove the following line, it is needed for consistency checks:
3675DATE_WHEN_GENERATED=1354696609
3676
3677###############################################################################
3678#
3679# Initialization / Boot-strapping
3680#
3681# The bootstrapping process needs to solve the "chicken or the egg" problem,
3682# thus it jumps back and forth, each time gaining something needed later on.
3683#
3684###############################################################################
3685
3686# Basic initialization that must happen first of all
3687
3688# Save the original command line. This is passed to us by the wrapper configure script.
3689
3690DATE_WHEN_CONFIGURED=`LANG=C date`
3691
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3693$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3694{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3695$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3696
3697
3698
3699# Start with tools that do not need have cross compilation support
3700# and can be expected to be found in the default PATH. These tools are
3701# used by configure. Nor are these tools expected to be found in the
3702# devkit from the builddeps server either, since they are
3703# needed to download the devkit.
3704
3705# First are all the simple required tools.
3706
3707    for ac_prog in basename
3708do
3709  # Extract the first word of "$ac_prog", so it can be a program name with args.
3710set dummy $ac_prog; ac_word=$2
3711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
3713if test "${ac_cv_path_BASENAME+set}" = set; then :
3714  $as_echo_n "(cached) " >&6
3715else
3716  case $BASENAME in
3717  [\\/]* | ?:[\\/]*)
3718  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3719  ;;
3720  *)
3721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3722for as_dir in $PATH
3723do
3724  IFS=$as_save_IFS
3725  test -z "$as_dir" && as_dir=.
3726    for ac_exec_ext in '' $ac_executable_extensions; do
3727  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3728    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3730    break 2
3731  fi
3732done
3733  done
3734IFS=$as_save_IFS
3735
3736  ;;
3737esac
3738fi
3739BASENAME=$ac_cv_path_BASENAME
3740if test -n "$BASENAME"; then
3741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3742$as_echo "$BASENAME" >&6; }
3743else
3744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3745$as_echo "no" >&6; }
3746fi
3747
3748
3749  test -n "$BASENAME" && break
3750done
3751
3752
3753    if test "x$BASENAME" = x; then
3754        if test "xbasename" = x; then
3755          PROG_NAME=basename
3756        else
3757          PROG_NAME=basename
3758        fi
3759        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3760$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3761        as_fn_error $? "Cannot continue" "$LINENO" 5
3762    fi
3763
3764
3765
3766    for ac_prog in bash
3767do
3768  # Extract the first word of "$ac_prog", so it can be a program name with args.
3769set dummy $ac_prog; ac_word=$2
3770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
3772if test "${ac_cv_path_BASH+set}" = set; then :
3773  $as_echo_n "(cached) " >&6
3774else
3775  case $BASH in
3776  [\\/]* | ?:[\\/]*)
3777  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3778  ;;
3779  *)
3780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783  IFS=$as_save_IFS
3784  test -z "$as_dir" && as_dir=.
3785    for ac_exec_ext in '' $ac_executable_extensions; do
3786  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3787    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3789    break 2
3790  fi
3791done
3792  done
3793IFS=$as_save_IFS
3794
3795  ;;
3796esac
3797fi
3798BASH=$ac_cv_path_BASH
3799if test -n "$BASH"; then
3800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3801$as_echo "$BASH" >&6; }
3802else
3803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
3805fi
3806
3807
3808  test -n "$BASH" && break
3809done
3810
3811
3812    if test "x$BASH" = x; then
3813        if test "xbash" = x; then
3814          PROG_NAME=bash
3815        else
3816          PROG_NAME=bash
3817        fi
3818        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3819$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3820        as_fn_error $? "Cannot continue" "$LINENO" 5
3821    fi
3822
3823
3824
3825    for ac_prog in cat
3826do
3827  # Extract the first word of "$ac_prog", so it can be a program name with args.
3828set dummy $ac_prog; ac_word=$2
3829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3830$as_echo_n "checking for $ac_word... " >&6; }
3831if test "${ac_cv_path_CAT+set}" = set; then :
3832  $as_echo_n "(cached) " >&6
3833else
3834  case $CAT in
3835  [\\/]* | ?:[\\/]*)
3836  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3837  ;;
3838  *)
3839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840for as_dir in $PATH
3841do
3842  IFS=$as_save_IFS
3843  test -z "$as_dir" && as_dir=.
3844    for ac_exec_ext in '' $ac_executable_extensions; do
3845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3846    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3848    break 2
3849  fi
3850done
3851  done
3852IFS=$as_save_IFS
3853
3854  ;;
3855esac
3856fi
3857CAT=$ac_cv_path_CAT
3858if test -n "$CAT"; then
3859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3860$as_echo "$CAT" >&6; }
3861else
3862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3863$as_echo "no" >&6; }
3864fi
3865
3866
3867  test -n "$CAT" && break
3868done
3869
3870
3871    if test "x$CAT" = x; then
3872        if test "xcat" = x; then
3873          PROG_NAME=cat
3874        else
3875          PROG_NAME=cat
3876        fi
3877        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3878$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3879        as_fn_error $? "Cannot continue" "$LINENO" 5
3880    fi
3881
3882
3883
3884    for ac_prog in chmod
3885do
3886  # Extract the first word of "$ac_prog", so it can be a program name with args.
3887set dummy $ac_prog; ac_word=$2
3888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3889$as_echo_n "checking for $ac_word... " >&6; }
3890if test "${ac_cv_path_CHMOD+set}" = set; then :
3891  $as_echo_n "(cached) " >&6
3892else
3893  case $CHMOD in
3894  [\\/]* | ?:[\\/]*)
3895  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3896  ;;
3897  *)
3898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3899for as_dir in $PATH
3900do
3901  IFS=$as_save_IFS
3902  test -z "$as_dir" && as_dir=.
3903    for ac_exec_ext in '' $ac_executable_extensions; do
3904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3905    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3907    break 2
3908  fi
3909done
3910  done
3911IFS=$as_save_IFS
3912
3913  ;;
3914esac
3915fi
3916CHMOD=$ac_cv_path_CHMOD
3917if test -n "$CHMOD"; then
3918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3919$as_echo "$CHMOD" >&6; }
3920else
3921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922$as_echo "no" >&6; }
3923fi
3924
3925
3926  test -n "$CHMOD" && break
3927done
3928
3929
3930    if test "x$CHMOD" = x; then
3931        if test "xchmod" = x; then
3932          PROG_NAME=chmod
3933        else
3934          PROG_NAME=chmod
3935        fi
3936        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3937$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3938        as_fn_error $? "Cannot continue" "$LINENO" 5
3939    fi
3940
3941
3942
3943    for ac_prog in cmp
3944do
3945  # Extract the first word of "$ac_prog", so it can be a program name with args.
3946set dummy $ac_prog; ac_word=$2
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3948$as_echo_n "checking for $ac_word... " >&6; }
3949if test "${ac_cv_path_CMP+set}" = set; then :
3950  $as_echo_n "(cached) " >&6
3951else
3952  case $CMP in
3953  [\\/]* | ?:[\\/]*)
3954  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3955  ;;
3956  *)
3957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3958for as_dir in $PATH
3959do
3960  IFS=$as_save_IFS
3961  test -z "$as_dir" && as_dir=.
3962    for ac_exec_ext in '' $ac_executable_extensions; do
3963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3964    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3966    break 2
3967  fi
3968done
3969  done
3970IFS=$as_save_IFS
3971
3972  ;;
3973esac
3974fi
3975CMP=$ac_cv_path_CMP
3976if test -n "$CMP"; then
3977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
3978$as_echo "$CMP" >&6; }
3979else
3980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3981$as_echo "no" >&6; }
3982fi
3983
3984
3985  test -n "$CMP" && break
3986done
3987
3988
3989    if test "x$CMP" = x; then
3990        if test "xcmp" = x; then
3991          PROG_NAME=cmp
3992        else
3993          PROG_NAME=cmp
3994        fi
3995        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3996$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3997        as_fn_error $? "Cannot continue" "$LINENO" 5
3998    fi
3999
4000
4001
4002    for ac_prog in cp
4003do
4004  # Extract the first word of "$ac_prog", so it can be a program name with args.
4005set dummy $ac_prog; ac_word=$2
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4007$as_echo_n "checking for $ac_word... " >&6; }
4008if test "${ac_cv_path_CP+set}" = set; then :
4009  $as_echo_n "(cached) " >&6
4010else
4011  case $CP in
4012  [\\/]* | ?:[\\/]*)
4013  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4014  ;;
4015  *)
4016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4017for as_dir in $PATH
4018do
4019  IFS=$as_save_IFS
4020  test -z "$as_dir" && as_dir=.
4021    for ac_exec_ext in '' $ac_executable_extensions; do
4022  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4023    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4025    break 2
4026  fi
4027done
4028  done
4029IFS=$as_save_IFS
4030
4031  ;;
4032esac
4033fi
4034CP=$ac_cv_path_CP
4035if test -n "$CP"; then
4036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4037$as_echo "$CP" >&6; }
4038else
4039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4040$as_echo "no" >&6; }
4041fi
4042
4043
4044  test -n "$CP" && break
4045done
4046
4047
4048    if test "x$CP" = x; then
4049        if test "xcp" = x; then
4050          PROG_NAME=cp
4051        else
4052          PROG_NAME=cp
4053        fi
4054        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4055$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4056        as_fn_error $? "Cannot continue" "$LINENO" 5
4057    fi
4058
4059
4060
4061    for ac_prog in cut
4062do
4063  # Extract the first word of "$ac_prog", so it can be a program name with args.
4064set dummy $ac_prog; ac_word=$2
4065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4066$as_echo_n "checking for $ac_word... " >&6; }
4067if test "${ac_cv_path_CUT+set}" = set; then :
4068  $as_echo_n "(cached) " >&6
4069else
4070  case $CUT in
4071  [\\/]* | ?:[\\/]*)
4072  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4073  ;;
4074  *)
4075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4076for as_dir in $PATH
4077do
4078  IFS=$as_save_IFS
4079  test -z "$as_dir" && as_dir=.
4080    for ac_exec_ext in '' $ac_executable_extensions; do
4081  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4082    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4084    break 2
4085  fi
4086done
4087  done
4088IFS=$as_save_IFS
4089
4090  ;;
4091esac
4092fi
4093CUT=$ac_cv_path_CUT
4094if test -n "$CUT"; then
4095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4096$as_echo "$CUT" >&6; }
4097else
4098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4099$as_echo "no" >&6; }
4100fi
4101
4102
4103  test -n "$CUT" && break
4104done
4105
4106
4107    if test "x$CUT" = x; then
4108        if test "xcut" = x; then
4109          PROG_NAME=cut
4110        else
4111          PROG_NAME=cut
4112        fi
4113        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4114$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4115        as_fn_error $? "Cannot continue" "$LINENO" 5
4116    fi
4117
4118
4119
4120    for ac_prog in date
4121do
4122  # Extract the first word of "$ac_prog", so it can be a program name with args.
4123set dummy $ac_prog; ac_word=$2
4124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4125$as_echo_n "checking for $ac_word... " >&6; }
4126if test "${ac_cv_path_DATE+set}" = set; then :
4127  $as_echo_n "(cached) " >&6
4128else
4129  case $DATE in
4130  [\\/]* | ?:[\\/]*)
4131  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4132  ;;
4133  *)
4134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4135for as_dir in $PATH
4136do
4137  IFS=$as_save_IFS
4138  test -z "$as_dir" && as_dir=.
4139    for ac_exec_ext in '' $ac_executable_extensions; do
4140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4141    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4143    break 2
4144  fi
4145done
4146  done
4147IFS=$as_save_IFS
4148
4149  ;;
4150esac
4151fi
4152DATE=$ac_cv_path_DATE
4153if test -n "$DATE"; then
4154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4155$as_echo "$DATE" >&6; }
4156else
4157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4158$as_echo "no" >&6; }
4159fi
4160
4161
4162  test -n "$DATE" && break
4163done
4164
4165
4166    if test "x$DATE" = x; then
4167        if test "xdate" = x; then
4168          PROG_NAME=date
4169        else
4170          PROG_NAME=date
4171        fi
4172        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4173$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4174        as_fn_error $? "Cannot continue" "$LINENO" 5
4175    fi
4176
4177
4178
4179    for ac_prog in gdiff diff
4180do
4181  # Extract the first word of "$ac_prog", so it can be a program name with args.
4182set dummy $ac_prog; ac_word=$2
4183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4184$as_echo_n "checking for $ac_word... " >&6; }
4185if test "${ac_cv_path_DIFF+set}" = set; then :
4186  $as_echo_n "(cached) " >&6
4187else
4188  case $DIFF in
4189  [\\/]* | ?:[\\/]*)
4190  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4191  ;;
4192  *)
4193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4194for as_dir in $PATH
4195do
4196  IFS=$as_save_IFS
4197  test -z "$as_dir" && as_dir=.
4198    for ac_exec_ext in '' $ac_executable_extensions; do
4199  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4200    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4202    break 2
4203  fi
4204done
4205  done
4206IFS=$as_save_IFS
4207
4208  ;;
4209esac
4210fi
4211DIFF=$ac_cv_path_DIFF
4212if test -n "$DIFF"; then
4213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4214$as_echo "$DIFF" >&6; }
4215else
4216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4217$as_echo "no" >&6; }
4218fi
4219
4220
4221  test -n "$DIFF" && break
4222done
4223
4224
4225    if test "x$DIFF" = x; then
4226        if test "xgdiff diff" = x; then
4227          PROG_NAME=diff
4228        else
4229          PROG_NAME=gdiff diff
4230        fi
4231        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4232$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4233        as_fn_error $? "Cannot continue" "$LINENO" 5
4234    fi
4235
4236
4237
4238    for ac_prog in dirname
4239do
4240  # Extract the first word of "$ac_prog", so it can be a program name with args.
4241set dummy $ac_prog; ac_word=$2
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4243$as_echo_n "checking for $ac_word... " >&6; }
4244if test "${ac_cv_path_DIRNAME+set}" = set; then :
4245  $as_echo_n "(cached) " >&6
4246else
4247  case $DIRNAME in
4248  [\\/]* | ?:[\\/]*)
4249  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4250  ;;
4251  *)
4252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4253for as_dir in $PATH
4254do
4255  IFS=$as_save_IFS
4256  test -z "$as_dir" && as_dir=.
4257    for ac_exec_ext in '' $ac_executable_extensions; do
4258  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4259    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4261    break 2
4262  fi
4263done
4264  done
4265IFS=$as_save_IFS
4266
4267  ;;
4268esac
4269fi
4270DIRNAME=$ac_cv_path_DIRNAME
4271if test -n "$DIRNAME"; then
4272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4273$as_echo "$DIRNAME" >&6; }
4274else
4275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4276$as_echo "no" >&6; }
4277fi
4278
4279
4280  test -n "$DIRNAME" && break
4281done
4282
4283
4284    if test "x$DIRNAME" = x; then
4285        if test "xdirname" = x; then
4286          PROG_NAME=dirname
4287        else
4288          PROG_NAME=dirname
4289        fi
4290        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4291$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4292        as_fn_error $? "Cannot continue" "$LINENO" 5
4293    fi
4294
4295
4296
4297    for ac_prog in echo
4298do
4299  # Extract the first word of "$ac_prog", so it can be a program name with args.
4300set dummy $ac_prog; ac_word=$2
4301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4302$as_echo_n "checking for $ac_word... " >&6; }
4303if test "${ac_cv_path_ECHO+set}" = set; then :
4304  $as_echo_n "(cached) " >&6
4305else
4306  case $ECHO in
4307  [\\/]* | ?:[\\/]*)
4308  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4309  ;;
4310  *)
4311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4312for as_dir in $PATH
4313do
4314  IFS=$as_save_IFS
4315  test -z "$as_dir" && as_dir=.
4316    for ac_exec_ext in '' $ac_executable_extensions; do
4317  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4318    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4320    break 2
4321  fi
4322done
4323  done
4324IFS=$as_save_IFS
4325
4326  ;;
4327esac
4328fi
4329ECHO=$ac_cv_path_ECHO
4330if test -n "$ECHO"; then
4331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4332$as_echo "$ECHO" >&6; }
4333else
4334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4335$as_echo "no" >&6; }
4336fi
4337
4338
4339  test -n "$ECHO" && break
4340done
4341
4342
4343    if test "x$ECHO" = x; then
4344        if test "xecho" = x; then
4345          PROG_NAME=echo
4346        else
4347          PROG_NAME=echo
4348        fi
4349        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4350$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4351        as_fn_error $? "Cannot continue" "$LINENO" 5
4352    fi
4353
4354
4355
4356    for ac_prog in expr
4357do
4358  # Extract the first word of "$ac_prog", so it can be a program name with args.
4359set dummy $ac_prog; ac_word=$2
4360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4361$as_echo_n "checking for $ac_word... " >&6; }
4362if test "${ac_cv_path_EXPR+set}" = set; then :
4363  $as_echo_n "(cached) " >&6
4364else
4365  case $EXPR in
4366  [\\/]* | ?:[\\/]*)
4367  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4368  ;;
4369  *)
4370  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4371for as_dir in $PATH
4372do
4373  IFS=$as_save_IFS
4374  test -z "$as_dir" && as_dir=.
4375    for ac_exec_ext in '' $ac_executable_extensions; do
4376  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4377    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4379    break 2
4380  fi
4381done
4382  done
4383IFS=$as_save_IFS
4384
4385  ;;
4386esac
4387fi
4388EXPR=$ac_cv_path_EXPR
4389if test -n "$EXPR"; then
4390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4391$as_echo "$EXPR" >&6; }
4392else
4393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4394$as_echo "no" >&6; }
4395fi
4396
4397
4398  test -n "$EXPR" && break
4399done
4400
4401
4402    if test "x$EXPR" = x; then
4403        if test "xexpr" = x; then
4404          PROG_NAME=expr
4405        else
4406          PROG_NAME=expr
4407        fi
4408        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4409$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4410        as_fn_error $? "Cannot continue" "$LINENO" 5
4411    fi
4412
4413
4414
4415    for ac_prog in file
4416do
4417  # Extract the first word of "$ac_prog", so it can be a program name with args.
4418set dummy $ac_prog; ac_word=$2
4419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4420$as_echo_n "checking for $ac_word... " >&6; }
4421if test "${ac_cv_path_FILE+set}" = set; then :
4422  $as_echo_n "(cached) " >&6
4423else
4424  case $FILE in
4425  [\\/]* | ?:[\\/]*)
4426  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4427  ;;
4428  *)
4429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4430for as_dir in $PATH
4431do
4432  IFS=$as_save_IFS
4433  test -z "$as_dir" && as_dir=.
4434    for ac_exec_ext in '' $ac_executable_extensions; do
4435  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4436    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4438    break 2
4439  fi
4440done
4441  done
4442IFS=$as_save_IFS
4443
4444  ;;
4445esac
4446fi
4447FILE=$ac_cv_path_FILE
4448if test -n "$FILE"; then
4449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4450$as_echo "$FILE" >&6; }
4451else
4452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4453$as_echo "no" >&6; }
4454fi
4455
4456
4457  test -n "$FILE" && break
4458done
4459
4460
4461    if test "x$FILE" = x; then
4462        if test "xfile" = x; then
4463          PROG_NAME=file
4464        else
4465          PROG_NAME=file
4466        fi
4467        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4468$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4469        as_fn_error $? "Cannot continue" "$LINENO" 5
4470    fi
4471
4472
4473
4474    for ac_prog in find
4475do
4476  # Extract the first word of "$ac_prog", so it can be a program name with args.
4477set dummy $ac_prog; ac_word=$2
4478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4479$as_echo_n "checking for $ac_word... " >&6; }
4480if test "${ac_cv_path_FIND+set}" = set; then :
4481  $as_echo_n "(cached) " >&6
4482else
4483  case $FIND in
4484  [\\/]* | ?:[\\/]*)
4485  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4486  ;;
4487  *)
4488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4489for as_dir in $PATH
4490do
4491  IFS=$as_save_IFS
4492  test -z "$as_dir" && as_dir=.
4493    for ac_exec_ext in '' $ac_executable_extensions; do
4494  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4495    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4497    break 2
4498  fi
4499done
4500  done
4501IFS=$as_save_IFS
4502
4503  ;;
4504esac
4505fi
4506FIND=$ac_cv_path_FIND
4507if test -n "$FIND"; then
4508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4509$as_echo "$FIND" >&6; }
4510else
4511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4512$as_echo "no" >&6; }
4513fi
4514
4515
4516  test -n "$FIND" && break
4517done
4518
4519
4520    if test "x$FIND" = x; then
4521        if test "xfind" = x; then
4522          PROG_NAME=find
4523        else
4524          PROG_NAME=find
4525        fi
4526        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4527$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4528        as_fn_error $? "Cannot continue" "$LINENO" 5
4529    fi
4530
4531
4532
4533    for ac_prog in head
4534do
4535  # Extract the first word of "$ac_prog", so it can be a program name with args.
4536set dummy $ac_prog; ac_word=$2
4537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4538$as_echo_n "checking for $ac_word... " >&6; }
4539if test "${ac_cv_path_HEAD+set}" = set; then :
4540  $as_echo_n "(cached) " >&6
4541else
4542  case $HEAD in
4543  [\\/]* | ?:[\\/]*)
4544  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4545  ;;
4546  *)
4547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4548for as_dir in $PATH
4549do
4550  IFS=$as_save_IFS
4551  test -z "$as_dir" && as_dir=.
4552    for ac_exec_ext in '' $ac_executable_extensions; do
4553  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4554    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4556    break 2
4557  fi
4558done
4559  done
4560IFS=$as_save_IFS
4561
4562  ;;
4563esac
4564fi
4565HEAD=$ac_cv_path_HEAD
4566if test -n "$HEAD"; then
4567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4568$as_echo "$HEAD" >&6; }
4569else
4570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4571$as_echo "no" >&6; }
4572fi
4573
4574
4575  test -n "$HEAD" && break
4576done
4577
4578
4579    if test "x$HEAD" = x; then
4580        if test "xhead" = x; then
4581          PROG_NAME=head
4582        else
4583          PROG_NAME=head
4584        fi
4585        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4586$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4587        as_fn_error $? "Cannot continue" "$LINENO" 5
4588    fi
4589
4590
4591
4592    for ac_prog in ln
4593do
4594  # Extract the first word of "$ac_prog", so it can be a program name with args.
4595set dummy $ac_prog; ac_word=$2
4596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if test "${ac_cv_path_LN+set}" = set; then :
4599  $as_echo_n "(cached) " >&6
4600else
4601  case $LN in
4602  [\\/]* | ?:[\\/]*)
4603  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4604  ;;
4605  *)
4606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in $PATH
4608do
4609  IFS=$as_save_IFS
4610  test -z "$as_dir" && as_dir=.
4611    for ac_exec_ext in '' $ac_executable_extensions; do
4612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4613    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615    break 2
4616  fi
4617done
4618  done
4619IFS=$as_save_IFS
4620
4621  ;;
4622esac
4623fi
4624LN=$ac_cv_path_LN
4625if test -n "$LN"; then
4626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4627$as_echo "$LN" >&6; }
4628else
4629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
4633
4634  test -n "$LN" && break
4635done
4636
4637
4638    if test "x$LN" = x; then
4639        if test "xln" = x; then
4640          PROG_NAME=ln
4641        else
4642          PROG_NAME=ln
4643        fi
4644        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4645$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4646        as_fn_error $? "Cannot continue" "$LINENO" 5
4647    fi
4648
4649
4650
4651    for ac_prog in ls
4652do
4653  # Extract the first word of "$ac_prog", so it can be a program name with args.
4654set dummy $ac_prog; ac_word=$2
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656$as_echo_n "checking for $ac_word... " >&6; }
4657if test "${ac_cv_path_LS+set}" = set; then :
4658  $as_echo_n "(cached) " >&6
4659else
4660  case $LS in
4661  [\\/]* | ?:[\\/]*)
4662  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4663  ;;
4664  *)
4665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4666for as_dir in $PATH
4667do
4668  IFS=$as_save_IFS
4669  test -z "$as_dir" && as_dir=.
4670    for ac_exec_ext in '' $ac_executable_extensions; do
4671  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4672    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4674    break 2
4675  fi
4676done
4677  done
4678IFS=$as_save_IFS
4679
4680  ;;
4681esac
4682fi
4683LS=$ac_cv_path_LS
4684if test -n "$LS"; then
4685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4686$as_echo "$LS" >&6; }
4687else
4688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4689$as_echo "no" >&6; }
4690fi
4691
4692
4693  test -n "$LS" && break
4694done
4695
4696
4697    if test "x$LS" = x; then
4698        if test "xls" = x; then
4699          PROG_NAME=ls
4700        else
4701          PROG_NAME=ls
4702        fi
4703        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4704$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4705        as_fn_error $? "Cannot continue" "$LINENO" 5
4706    fi
4707
4708
4709
4710    for ac_prog in mkdir
4711do
4712  # Extract the first word of "$ac_prog", so it can be a program name with args.
4713set dummy $ac_prog; ac_word=$2
4714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4715$as_echo_n "checking for $ac_word... " >&6; }
4716if test "${ac_cv_path_MKDIR+set}" = set; then :
4717  $as_echo_n "(cached) " >&6
4718else
4719  case $MKDIR in
4720  [\\/]* | ?:[\\/]*)
4721  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4722  ;;
4723  *)
4724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4725for as_dir in $PATH
4726do
4727  IFS=$as_save_IFS
4728  test -z "$as_dir" && as_dir=.
4729    for ac_exec_ext in '' $ac_executable_extensions; do
4730  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4731    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4733    break 2
4734  fi
4735done
4736  done
4737IFS=$as_save_IFS
4738
4739  ;;
4740esac
4741fi
4742MKDIR=$ac_cv_path_MKDIR
4743if test -n "$MKDIR"; then
4744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4745$as_echo "$MKDIR" >&6; }
4746else
4747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4748$as_echo "no" >&6; }
4749fi
4750
4751
4752  test -n "$MKDIR" && break
4753done
4754
4755
4756    if test "x$MKDIR" = x; then
4757        if test "xmkdir" = x; then
4758          PROG_NAME=mkdir
4759        else
4760          PROG_NAME=mkdir
4761        fi
4762        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4763$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4764        as_fn_error $? "Cannot continue" "$LINENO" 5
4765    fi
4766
4767
4768
4769    for ac_prog in mktemp
4770do
4771  # Extract the first word of "$ac_prog", so it can be a program name with args.
4772set dummy $ac_prog; ac_word=$2
4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4774$as_echo_n "checking for $ac_word... " >&6; }
4775if test "${ac_cv_path_MKTEMP+set}" = set; then :
4776  $as_echo_n "(cached) " >&6
4777else
4778  case $MKTEMP in
4779  [\\/]* | ?:[\\/]*)
4780  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4781  ;;
4782  *)
4783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4784for as_dir in $PATH
4785do
4786  IFS=$as_save_IFS
4787  test -z "$as_dir" && as_dir=.
4788    for ac_exec_ext in '' $ac_executable_extensions; do
4789  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4790    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4792    break 2
4793  fi
4794done
4795  done
4796IFS=$as_save_IFS
4797
4798  ;;
4799esac
4800fi
4801MKTEMP=$ac_cv_path_MKTEMP
4802if test -n "$MKTEMP"; then
4803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4804$as_echo "$MKTEMP" >&6; }
4805else
4806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4807$as_echo "no" >&6; }
4808fi
4809
4810
4811  test -n "$MKTEMP" && break
4812done
4813
4814
4815    if test "x$MKTEMP" = x; then
4816        if test "xmktemp" = x; then
4817          PROG_NAME=mktemp
4818        else
4819          PROG_NAME=mktemp
4820        fi
4821        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4822$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4823        as_fn_error $? "Cannot continue" "$LINENO" 5
4824    fi
4825
4826
4827
4828    for ac_prog in mv
4829do
4830  # Extract the first word of "$ac_prog", so it can be a program name with args.
4831set dummy $ac_prog; ac_word=$2
4832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833$as_echo_n "checking for $ac_word... " >&6; }
4834if test "${ac_cv_path_MV+set}" = set; then :
4835  $as_echo_n "(cached) " >&6
4836else
4837  case $MV in
4838  [\\/]* | ?:[\\/]*)
4839  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4840  ;;
4841  *)
4842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843for as_dir in $PATH
4844do
4845  IFS=$as_save_IFS
4846  test -z "$as_dir" && as_dir=.
4847    for ac_exec_ext in '' $ac_executable_extensions; do
4848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4849    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4851    break 2
4852  fi
4853done
4854  done
4855IFS=$as_save_IFS
4856
4857  ;;
4858esac
4859fi
4860MV=$ac_cv_path_MV
4861if test -n "$MV"; then
4862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
4863$as_echo "$MV" >&6; }
4864else
4865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866$as_echo "no" >&6; }
4867fi
4868
4869
4870  test -n "$MV" && break
4871done
4872
4873
4874    if test "x$MV" = x; then
4875        if test "xmv" = x; then
4876          PROG_NAME=mv
4877        else
4878          PROG_NAME=mv
4879        fi
4880        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4881$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4882        as_fn_error $? "Cannot continue" "$LINENO" 5
4883    fi
4884
4885
4886
4887    for ac_prog in printf
4888do
4889  # Extract the first word of "$ac_prog", so it can be a program name with args.
4890set dummy $ac_prog; ac_word=$2
4891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4892$as_echo_n "checking for $ac_word... " >&6; }
4893if test "${ac_cv_path_PRINTF+set}" = set; then :
4894  $as_echo_n "(cached) " >&6
4895else
4896  case $PRINTF in
4897  [\\/]* | ?:[\\/]*)
4898  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
4899  ;;
4900  *)
4901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4902for as_dir in $PATH
4903do
4904  IFS=$as_save_IFS
4905  test -z "$as_dir" && as_dir=.
4906    for ac_exec_ext in '' $ac_executable_extensions; do
4907  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4908    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
4909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4910    break 2
4911  fi
4912done
4913  done
4914IFS=$as_save_IFS
4915
4916  ;;
4917esac
4918fi
4919PRINTF=$ac_cv_path_PRINTF
4920if test -n "$PRINTF"; then
4921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
4922$as_echo "$PRINTF" >&6; }
4923else
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4925$as_echo "no" >&6; }
4926fi
4927
4928
4929  test -n "$PRINTF" && break
4930done
4931
4932
4933    if test "x$PRINTF" = x; then
4934        if test "xprintf" = x; then
4935          PROG_NAME=printf
4936        else
4937          PROG_NAME=printf
4938        fi
4939        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4940$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4941        as_fn_error $? "Cannot continue" "$LINENO" 5
4942    fi
4943
4944
4945
4946    for ac_prog in pwd
4947do
4948  # Extract the first word of "$ac_prog", so it can be a program name with args.
4949set dummy $ac_prog; ac_word=$2
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4951$as_echo_n "checking for $ac_word... " >&6; }
4952if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
4953  $as_echo_n "(cached) " >&6
4954else
4955  case $THEPWDCMD in
4956  [\\/]* | ?:[\\/]*)
4957  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
4958  ;;
4959  *)
4960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in $PATH
4962do
4963  IFS=$as_save_IFS
4964  test -z "$as_dir" && as_dir=.
4965    for ac_exec_ext in '' $ac_executable_extensions; do
4966  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4967    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
4968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969    break 2
4970  fi
4971done
4972  done
4973IFS=$as_save_IFS
4974
4975  ;;
4976esac
4977fi
4978THEPWDCMD=$ac_cv_path_THEPWDCMD
4979if test -n "$THEPWDCMD"; then
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
4981$as_echo "$THEPWDCMD" >&6; }
4982else
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984$as_echo "no" >&6; }
4985fi
4986
4987
4988  test -n "$THEPWDCMD" && break
4989done
4990
4991
4992    if test "x$THEPWDCMD" = x; then
4993        if test "xpwd" = x; then
4994          PROG_NAME=thepwdcmd
4995        else
4996          PROG_NAME=pwd
4997        fi
4998        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4999$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5000        as_fn_error $? "Cannot continue" "$LINENO" 5
5001    fi
5002
5003
5004
5005    for ac_prog in rm
5006do
5007  # Extract the first word of "$ac_prog", so it can be a program name with args.
5008set dummy $ac_prog; ac_word=$2
5009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5010$as_echo_n "checking for $ac_word... " >&6; }
5011if test "${ac_cv_path_RM+set}" = set; then :
5012  $as_echo_n "(cached) " >&6
5013else
5014  case $RM in
5015  [\\/]* | ?:[\\/]*)
5016  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5017  ;;
5018  *)
5019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022  IFS=$as_save_IFS
5023  test -z "$as_dir" && as_dir=.
5024    for ac_exec_ext in '' $ac_executable_extensions; do
5025  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5026    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5028    break 2
5029  fi
5030done
5031  done
5032IFS=$as_save_IFS
5033
5034  ;;
5035esac
5036fi
5037RM=$ac_cv_path_RM
5038if test -n "$RM"; then
5039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5040$as_echo "$RM" >&6; }
5041else
5042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5043$as_echo "no" >&6; }
5044fi
5045
5046
5047  test -n "$RM" && break
5048done
5049
5050
5051    if test "x$RM" = x; then
5052        if test "xrm" = x; then
5053          PROG_NAME=rm
5054        else
5055          PROG_NAME=rm
5056        fi
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5058$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5059        as_fn_error $? "Cannot continue" "$LINENO" 5
5060    fi
5061
5062
5063
5064    for ac_prog in sh
5065do
5066  # Extract the first word of "$ac_prog", so it can be a program name with args.
5067set dummy $ac_prog; ac_word=$2
5068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5069$as_echo_n "checking for $ac_word... " >&6; }
5070if test "${ac_cv_path_SH+set}" = set; then :
5071  $as_echo_n "(cached) " >&6
5072else
5073  case $SH in
5074  [\\/]* | ?:[\\/]*)
5075  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5076  ;;
5077  *)
5078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5079for as_dir in $PATH
5080do
5081  IFS=$as_save_IFS
5082  test -z "$as_dir" && as_dir=.
5083    for ac_exec_ext in '' $ac_executable_extensions; do
5084  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5085    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5087    break 2
5088  fi
5089done
5090  done
5091IFS=$as_save_IFS
5092
5093  ;;
5094esac
5095fi
5096SH=$ac_cv_path_SH
5097if test -n "$SH"; then
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5099$as_echo "$SH" >&6; }
5100else
5101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5102$as_echo "no" >&6; }
5103fi
5104
5105
5106  test -n "$SH" && break
5107done
5108
5109
5110    if test "x$SH" = x; then
5111        if test "xsh" = x; then
5112          PROG_NAME=sh
5113        else
5114          PROG_NAME=sh
5115        fi
5116        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5117$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5118        as_fn_error $? "Cannot continue" "$LINENO" 5
5119    fi
5120
5121
5122
5123    for ac_prog in sort
5124do
5125  # Extract the first word of "$ac_prog", so it can be a program name with args.
5126set dummy $ac_prog; ac_word=$2
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128$as_echo_n "checking for $ac_word... " >&6; }
5129if test "${ac_cv_path_SORT+set}" = set; then :
5130  $as_echo_n "(cached) " >&6
5131else
5132  case $SORT in
5133  [\\/]* | ?:[\\/]*)
5134  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5135  ;;
5136  *)
5137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138for as_dir in $PATH
5139do
5140  IFS=$as_save_IFS
5141  test -z "$as_dir" && as_dir=.
5142    for ac_exec_ext in '' $ac_executable_extensions; do
5143  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5144    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146    break 2
5147  fi
5148done
5149  done
5150IFS=$as_save_IFS
5151
5152  ;;
5153esac
5154fi
5155SORT=$ac_cv_path_SORT
5156if test -n "$SORT"; then
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5158$as_echo "$SORT" >&6; }
5159else
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5161$as_echo "no" >&6; }
5162fi
5163
5164
5165  test -n "$SORT" && break
5166done
5167
5168
5169    if test "x$SORT" = x; then
5170        if test "xsort" = x; then
5171          PROG_NAME=sort
5172        else
5173          PROG_NAME=sort
5174        fi
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5176$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5177        as_fn_error $? "Cannot continue" "$LINENO" 5
5178    fi
5179
5180
5181
5182    for ac_prog in tail
5183do
5184  # Extract the first word of "$ac_prog", so it can be a program name with args.
5185set dummy $ac_prog; ac_word=$2
5186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5187$as_echo_n "checking for $ac_word... " >&6; }
5188if test "${ac_cv_path_TAIL+set}" = set; then :
5189  $as_echo_n "(cached) " >&6
5190else
5191  case $TAIL in
5192  [\\/]* | ?:[\\/]*)
5193  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5194  ;;
5195  *)
5196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5197for as_dir in $PATH
5198do
5199  IFS=$as_save_IFS
5200  test -z "$as_dir" && as_dir=.
5201    for ac_exec_ext in '' $ac_executable_extensions; do
5202  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5203    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5205    break 2
5206  fi
5207done
5208  done
5209IFS=$as_save_IFS
5210
5211  ;;
5212esac
5213fi
5214TAIL=$ac_cv_path_TAIL
5215if test -n "$TAIL"; then
5216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5217$as_echo "$TAIL" >&6; }
5218else
5219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5220$as_echo "no" >&6; }
5221fi
5222
5223
5224  test -n "$TAIL" && break
5225done
5226
5227
5228    if test "x$TAIL" = x; then
5229        if test "xtail" = x; then
5230          PROG_NAME=tail
5231        else
5232          PROG_NAME=tail
5233        fi
5234        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5235$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5236        as_fn_error $? "Cannot continue" "$LINENO" 5
5237    fi
5238
5239
5240
5241    for ac_prog in tar
5242do
5243  # Extract the first word of "$ac_prog", so it can be a program name with args.
5244set dummy $ac_prog; ac_word=$2
5245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5246$as_echo_n "checking for $ac_word... " >&6; }
5247if test "${ac_cv_path_TAR+set}" = set; then :
5248  $as_echo_n "(cached) " >&6
5249else
5250  case $TAR in
5251  [\\/]* | ?:[\\/]*)
5252  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5253  ;;
5254  *)
5255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5256for as_dir in $PATH
5257do
5258  IFS=$as_save_IFS
5259  test -z "$as_dir" && as_dir=.
5260    for ac_exec_ext in '' $ac_executable_extensions; do
5261  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5262    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5264    break 2
5265  fi
5266done
5267  done
5268IFS=$as_save_IFS
5269
5270  ;;
5271esac
5272fi
5273TAR=$ac_cv_path_TAR
5274if test -n "$TAR"; then
5275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5276$as_echo "$TAR" >&6; }
5277else
5278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5279$as_echo "no" >&6; }
5280fi
5281
5282
5283  test -n "$TAR" && break
5284done
5285
5286
5287    if test "x$TAR" = x; then
5288        if test "xtar" = x; then
5289          PROG_NAME=tar
5290        else
5291          PROG_NAME=tar
5292        fi
5293        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5294$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5295        as_fn_error $? "Cannot continue" "$LINENO" 5
5296    fi
5297
5298
5299
5300    for ac_prog in tee
5301do
5302  # Extract the first word of "$ac_prog", so it can be a program name with args.
5303set dummy $ac_prog; ac_word=$2
5304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5305$as_echo_n "checking for $ac_word... " >&6; }
5306if test "${ac_cv_path_TEE+set}" = set; then :
5307  $as_echo_n "(cached) " >&6
5308else
5309  case $TEE in
5310  [\\/]* | ?:[\\/]*)
5311  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5312  ;;
5313  *)
5314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5315for as_dir in $PATH
5316do
5317  IFS=$as_save_IFS
5318  test -z "$as_dir" && as_dir=.
5319    for ac_exec_ext in '' $ac_executable_extensions; do
5320  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5321    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5323    break 2
5324  fi
5325done
5326  done
5327IFS=$as_save_IFS
5328
5329  ;;
5330esac
5331fi
5332TEE=$ac_cv_path_TEE
5333if test -n "$TEE"; then
5334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5335$as_echo "$TEE" >&6; }
5336else
5337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338$as_echo "no" >&6; }
5339fi
5340
5341
5342  test -n "$TEE" && break
5343done
5344
5345
5346    if test "x$TEE" = x; then
5347        if test "xtee" = x; then
5348          PROG_NAME=tee
5349        else
5350          PROG_NAME=tee
5351        fi
5352        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5353$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5354        as_fn_error $? "Cannot continue" "$LINENO" 5
5355    fi
5356
5357
5358
5359    for ac_prog in touch
5360do
5361  # Extract the first word of "$ac_prog", so it can be a program name with args.
5362set dummy $ac_prog; ac_word=$2
5363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5364$as_echo_n "checking for $ac_word... " >&6; }
5365if test "${ac_cv_path_TOUCH+set}" = set; then :
5366  $as_echo_n "(cached) " >&6
5367else
5368  case $TOUCH in
5369  [\\/]* | ?:[\\/]*)
5370  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5371  ;;
5372  *)
5373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5374for as_dir in $PATH
5375do
5376  IFS=$as_save_IFS
5377  test -z "$as_dir" && as_dir=.
5378    for ac_exec_ext in '' $ac_executable_extensions; do
5379  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5380    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5382    break 2
5383  fi
5384done
5385  done
5386IFS=$as_save_IFS
5387
5388  ;;
5389esac
5390fi
5391TOUCH=$ac_cv_path_TOUCH
5392if test -n "$TOUCH"; then
5393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5394$as_echo "$TOUCH" >&6; }
5395else
5396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5397$as_echo "no" >&6; }
5398fi
5399
5400
5401  test -n "$TOUCH" && break
5402done
5403
5404
5405    if test "x$TOUCH" = x; then
5406        if test "xtouch" = x; then
5407          PROG_NAME=touch
5408        else
5409          PROG_NAME=touch
5410        fi
5411        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5412$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5413        as_fn_error $? "Cannot continue" "$LINENO" 5
5414    fi
5415
5416
5417
5418    for ac_prog in tr
5419do
5420  # Extract the first word of "$ac_prog", so it can be a program name with args.
5421set dummy $ac_prog; ac_word=$2
5422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5423$as_echo_n "checking for $ac_word... " >&6; }
5424if test "${ac_cv_path_TR+set}" = set; then :
5425  $as_echo_n "(cached) " >&6
5426else
5427  case $TR in
5428  [\\/]* | ?:[\\/]*)
5429  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5430  ;;
5431  *)
5432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5433for as_dir in $PATH
5434do
5435  IFS=$as_save_IFS
5436  test -z "$as_dir" && as_dir=.
5437    for ac_exec_ext in '' $ac_executable_extensions; do
5438  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5439    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5441    break 2
5442  fi
5443done
5444  done
5445IFS=$as_save_IFS
5446
5447  ;;
5448esac
5449fi
5450TR=$ac_cv_path_TR
5451if test -n "$TR"; then
5452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5453$as_echo "$TR" >&6; }
5454else
5455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5456$as_echo "no" >&6; }
5457fi
5458
5459
5460  test -n "$TR" && break
5461done
5462
5463
5464    if test "x$TR" = x; then
5465        if test "xtr" = x; then
5466          PROG_NAME=tr
5467        else
5468          PROG_NAME=tr
5469        fi
5470        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5471$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5472        as_fn_error $? "Cannot continue" "$LINENO" 5
5473    fi
5474
5475
5476
5477    for ac_prog in uname
5478do
5479  # Extract the first word of "$ac_prog", so it can be a program name with args.
5480set dummy $ac_prog; ac_word=$2
5481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5482$as_echo_n "checking for $ac_word... " >&6; }
5483if test "${ac_cv_path_UNAME+set}" = set; then :
5484  $as_echo_n "(cached) " >&6
5485else
5486  case $UNAME in
5487  [\\/]* | ?:[\\/]*)
5488  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5489  ;;
5490  *)
5491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5492for as_dir in $PATH
5493do
5494  IFS=$as_save_IFS
5495  test -z "$as_dir" && as_dir=.
5496    for ac_exec_ext in '' $ac_executable_extensions; do
5497  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5498    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5500    break 2
5501  fi
5502done
5503  done
5504IFS=$as_save_IFS
5505
5506  ;;
5507esac
5508fi
5509UNAME=$ac_cv_path_UNAME
5510if test -n "$UNAME"; then
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5512$as_echo "$UNAME" >&6; }
5513else
5514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5515$as_echo "no" >&6; }
5516fi
5517
5518
5519  test -n "$UNAME" && break
5520done
5521
5522
5523    if test "x$UNAME" = x; then
5524        if test "xuname" = x; then
5525          PROG_NAME=uname
5526        else
5527          PROG_NAME=uname
5528        fi
5529        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5530$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5531        as_fn_error $? "Cannot continue" "$LINENO" 5
5532    fi
5533
5534
5535
5536    for ac_prog in uniq
5537do
5538  # Extract the first word of "$ac_prog", so it can be a program name with args.
5539set dummy $ac_prog; ac_word=$2
5540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541$as_echo_n "checking for $ac_word... " >&6; }
5542if test "${ac_cv_path_UNIQ+set}" = set; then :
5543  $as_echo_n "(cached) " >&6
5544else
5545  case $UNIQ in
5546  [\\/]* | ?:[\\/]*)
5547  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5548  ;;
5549  *)
5550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5551for as_dir in $PATH
5552do
5553  IFS=$as_save_IFS
5554  test -z "$as_dir" && as_dir=.
5555    for ac_exec_ext in '' $ac_executable_extensions; do
5556  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5557    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5559    break 2
5560  fi
5561done
5562  done
5563IFS=$as_save_IFS
5564
5565  ;;
5566esac
5567fi
5568UNIQ=$ac_cv_path_UNIQ
5569if test -n "$UNIQ"; then
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5571$as_echo "$UNIQ" >&6; }
5572else
5573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5574$as_echo "no" >&6; }
5575fi
5576
5577
5578  test -n "$UNIQ" && break
5579done
5580
5581
5582    if test "x$UNIQ" = x; then
5583        if test "xuniq" = x; then
5584          PROG_NAME=uniq
5585        else
5586          PROG_NAME=uniq
5587        fi
5588        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5589$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5590        as_fn_error $? "Cannot continue" "$LINENO" 5
5591    fi
5592
5593
5594
5595    for ac_prog in wc
5596do
5597  # Extract the first word of "$ac_prog", so it can be a program name with args.
5598set dummy $ac_prog; ac_word=$2
5599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5600$as_echo_n "checking for $ac_word... " >&6; }
5601if test "${ac_cv_path_WC+set}" = set; then :
5602  $as_echo_n "(cached) " >&6
5603else
5604  case $WC in
5605  [\\/]* | ?:[\\/]*)
5606  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5607  ;;
5608  *)
5609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5610for as_dir in $PATH
5611do
5612  IFS=$as_save_IFS
5613  test -z "$as_dir" && as_dir=.
5614    for ac_exec_ext in '' $ac_executable_extensions; do
5615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5616    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5618    break 2
5619  fi
5620done
5621  done
5622IFS=$as_save_IFS
5623
5624  ;;
5625esac
5626fi
5627WC=$ac_cv_path_WC
5628if test -n "$WC"; then
5629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5630$as_echo "$WC" >&6; }
5631else
5632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5633$as_echo "no" >&6; }
5634fi
5635
5636
5637  test -n "$WC" && break
5638done
5639
5640
5641    if test "x$WC" = x; then
5642        if test "xwc" = x; then
5643          PROG_NAME=wc
5644        else
5645          PROG_NAME=wc
5646        fi
5647        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5648$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5649        as_fn_error $? "Cannot continue" "$LINENO" 5
5650    fi
5651
5652
5653
5654    for ac_prog in which
5655do
5656  # Extract the first word of "$ac_prog", so it can be a program name with args.
5657set dummy $ac_prog; ac_word=$2
5658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5659$as_echo_n "checking for $ac_word... " >&6; }
5660if test "${ac_cv_path_WHICH+set}" = set; then :
5661  $as_echo_n "(cached) " >&6
5662else
5663  case $WHICH in
5664  [\\/]* | ?:[\\/]*)
5665  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5666  ;;
5667  *)
5668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5669for as_dir in $PATH
5670do
5671  IFS=$as_save_IFS
5672  test -z "$as_dir" && as_dir=.
5673    for ac_exec_ext in '' $ac_executable_extensions; do
5674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5675    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5677    break 2
5678  fi
5679done
5680  done
5681IFS=$as_save_IFS
5682
5683  ;;
5684esac
5685fi
5686WHICH=$ac_cv_path_WHICH
5687if test -n "$WHICH"; then
5688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5689$as_echo "$WHICH" >&6; }
5690else
5691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5692$as_echo "no" >&6; }
5693fi
5694
5695
5696  test -n "$WHICH" && break
5697done
5698
5699
5700    if test "x$WHICH" = x; then
5701        if test "xwhich" = x; then
5702          PROG_NAME=which
5703        else
5704          PROG_NAME=which
5705        fi
5706        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5707$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5708        as_fn_error $? "Cannot continue" "$LINENO" 5
5709    fi
5710
5711
5712
5713    for ac_prog in xargs
5714do
5715  # Extract the first word of "$ac_prog", so it can be a program name with args.
5716set dummy $ac_prog; ac_word=$2
5717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5718$as_echo_n "checking for $ac_word... " >&6; }
5719if test "${ac_cv_path_XARGS+set}" = set; then :
5720  $as_echo_n "(cached) " >&6
5721else
5722  case $XARGS in
5723  [\\/]* | ?:[\\/]*)
5724  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5725  ;;
5726  *)
5727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5728for as_dir in $PATH
5729do
5730  IFS=$as_save_IFS
5731  test -z "$as_dir" && as_dir=.
5732    for ac_exec_ext in '' $ac_executable_extensions; do
5733  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5734    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5736    break 2
5737  fi
5738done
5739  done
5740IFS=$as_save_IFS
5741
5742  ;;
5743esac
5744fi
5745XARGS=$ac_cv_path_XARGS
5746if test -n "$XARGS"; then
5747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5748$as_echo "$XARGS" >&6; }
5749else
5750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5751$as_echo "no" >&6; }
5752fi
5753
5754
5755  test -n "$XARGS" && break
5756done
5757
5758
5759    if test "x$XARGS" = x; then
5760        if test "xxargs" = x; then
5761          PROG_NAME=xargs
5762        else
5763          PROG_NAME=xargs
5764        fi
5765        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5766$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5767        as_fn_error $? "Cannot continue" "$LINENO" 5
5768    fi
5769
5770
5771
5772# Then required tools that require some special treatment.
5773for ac_prog in gawk mawk nawk awk
5774do
5775  # Extract the first word of "$ac_prog", so it can be a program name with args.
5776set dummy $ac_prog; ac_word=$2
5777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5778$as_echo_n "checking for $ac_word... " >&6; }
5779if test "${ac_cv_prog_AWK+set}" = set; then :
5780  $as_echo_n "(cached) " >&6
5781else
5782  if test -n "$AWK"; then
5783  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5784else
5785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5786for as_dir in $PATH
5787do
5788  IFS=$as_save_IFS
5789  test -z "$as_dir" && as_dir=.
5790    for ac_exec_ext in '' $ac_executable_extensions; do
5791  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5792    ac_cv_prog_AWK="$ac_prog"
5793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5794    break 2
5795  fi
5796done
5797  done
5798IFS=$as_save_IFS
5799
5800fi
5801fi
5802AWK=$ac_cv_prog_AWK
5803if test -n "$AWK"; then
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5805$as_echo "$AWK" >&6; }
5806else
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5808$as_echo "no" >&6; }
5809fi
5810
5811
5812  test -n "$AWK" && break
5813done
5814
5815
5816    if test "x$AWK" = x; then
5817        if test "x" = x; then
5818          PROG_NAME=awk
5819        else
5820          PROG_NAME=
5821        fi
5822        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5823$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5824        as_fn_error $? "Cannot continue" "$LINENO" 5
5825    fi
5826
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5828$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5829if test "${ac_cv_path_GREP+set}" = set; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  if test -z "$GREP"; then
5833  ac_path_GREP_found=false
5834  # Loop through the user's path and test for each of PROGNAME-LIST
5835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5836for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5837do
5838  IFS=$as_save_IFS
5839  test -z "$as_dir" && as_dir=.
5840    for ac_prog in grep ggrep; do
5841    for ac_exec_ext in '' $ac_executable_extensions; do
5842      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5843      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5844# Check for GNU ac_path_GREP and select it if it is found.
5845  # Check for GNU $ac_path_GREP
5846case `"$ac_path_GREP" --version 2>&1` in
5847*GNU*)
5848  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5849*)
5850  ac_count=0
5851  $as_echo_n 0123456789 >"conftest.in"
5852  while :
5853  do
5854    cat "conftest.in" "conftest.in" >"conftest.tmp"
5855    mv "conftest.tmp" "conftest.in"
5856    cp "conftest.in" "conftest.nl"
5857    $as_echo 'GREP' >> "conftest.nl"
5858    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5859    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5860    as_fn_arith $ac_count + 1 && ac_count=$as_val
5861    if test $ac_count -gt ${ac_path_GREP_max-0}; then
5862      # Best one so far, save it but keep looking for a better one
5863      ac_cv_path_GREP="$ac_path_GREP"
5864      ac_path_GREP_max=$ac_count
5865    fi
5866    # 10*(2^10) chars as input seems more than enough
5867    test $ac_count -gt 10 && break
5868  done
5869  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5870esac
5871
5872      $ac_path_GREP_found && break 3
5873    done
5874  done
5875  done
5876IFS=$as_save_IFS
5877  if test -z "$ac_cv_path_GREP"; then
5878    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5879  fi
5880else
5881  ac_cv_path_GREP=$GREP
5882fi
5883
5884fi
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5886$as_echo "$ac_cv_path_GREP" >&6; }
5887 GREP="$ac_cv_path_GREP"
5888
5889
5890
5891    if test "x$GREP" = x; then
5892        if test "x" = x; then
5893          PROG_NAME=grep
5894        else
5895          PROG_NAME=
5896        fi
5897        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5898$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5899        as_fn_error $? "Cannot continue" "$LINENO" 5
5900    fi
5901
5902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5903$as_echo_n "checking for egrep... " >&6; }
5904if test "${ac_cv_path_EGREP+set}" = set; then :
5905  $as_echo_n "(cached) " >&6
5906else
5907  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5908   then ac_cv_path_EGREP="$GREP -E"
5909   else
5910     if test -z "$EGREP"; then
5911  ac_path_EGREP_found=false
5912  # Loop through the user's path and test for each of PROGNAME-LIST
5913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5915do
5916  IFS=$as_save_IFS
5917  test -z "$as_dir" && as_dir=.
5918    for ac_prog in egrep; do
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5921      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5922# Check for GNU ac_path_EGREP and select it if it is found.
5923  # Check for GNU $ac_path_EGREP
5924case `"$ac_path_EGREP" --version 2>&1` in
5925*GNU*)
5926  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5927*)
5928  ac_count=0
5929  $as_echo_n 0123456789 >"conftest.in"
5930  while :
5931  do
5932    cat "conftest.in" "conftest.in" >"conftest.tmp"
5933    mv "conftest.tmp" "conftest.in"
5934    cp "conftest.in" "conftest.nl"
5935    $as_echo 'EGREP' >> "conftest.nl"
5936    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5937    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5938    as_fn_arith $ac_count + 1 && ac_count=$as_val
5939    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5940      # Best one so far, save it but keep looking for a better one
5941      ac_cv_path_EGREP="$ac_path_EGREP"
5942      ac_path_EGREP_max=$ac_count
5943    fi
5944    # 10*(2^10) chars as input seems more than enough
5945    test $ac_count -gt 10 && break
5946  done
5947  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5948esac
5949
5950      $ac_path_EGREP_found && break 3
5951    done
5952  done
5953  done
5954IFS=$as_save_IFS
5955  if test -z "$ac_cv_path_EGREP"; then
5956    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5957  fi
5958else
5959  ac_cv_path_EGREP=$EGREP
5960fi
5961
5962   fi
5963fi
5964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5965$as_echo "$ac_cv_path_EGREP" >&6; }
5966 EGREP="$ac_cv_path_EGREP"
5967
5968
5969
5970    if test "x$EGREP" = x; then
5971        if test "x" = x; then
5972          PROG_NAME=egrep
5973        else
5974          PROG_NAME=
5975        fi
5976        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5977$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5978        as_fn_error $? "Cannot continue" "$LINENO" 5
5979    fi
5980
5981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5982$as_echo_n "checking for fgrep... " >&6; }
5983if test "${ac_cv_path_FGREP+set}" = set; then :
5984  $as_echo_n "(cached) " >&6
5985else
5986  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5987   then ac_cv_path_FGREP="$GREP -F"
5988   else
5989     if test -z "$FGREP"; then
5990  ac_path_FGREP_found=false
5991  # Loop through the user's path and test for each of PROGNAME-LIST
5992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5993for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5994do
5995  IFS=$as_save_IFS
5996  test -z "$as_dir" && as_dir=.
5997    for ac_prog in fgrep; do
5998    for ac_exec_ext in '' $ac_executable_extensions; do
5999      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6000      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6001# Check for GNU ac_path_FGREP and select it if it is found.
6002  # Check for GNU $ac_path_FGREP
6003case `"$ac_path_FGREP" --version 2>&1` in
6004*GNU*)
6005  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6006*)
6007  ac_count=0
6008  $as_echo_n 0123456789 >"conftest.in"
6009  while :
6010  do
6011    cat "conftest.in" "conftest.in" >"conftest.tmp"
6012    mv "conftest.tmp" "conftest.in"
6013    cp "conftest.in" "conftest.nl"
6014    $as_echo 'FGREP' >> "conftest.nl"
6015    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6016    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6017    as_fn_arith $ac_count + 1 && ac_count=$as_val
6018    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6019      # Best one so far, save it but keep looking for a better one
6020      ac_cv_path_FGREP="$ac_path_FGREP"
6021      ac_path_FGREP_max=$ac_count
6022    fi
6023    # 10*(2^10) chars as input seems more than enough
6024    test $ac_count -gt 10 && break
6025  done
6026  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6027esac
6028
6029      $ac_path_FGREP_found && break 3
6030    done
6031  done
6032  done
6033IFS=$as_save_IFS
6034  if test -z "$ac_cv_path_FGREP"; then
6035    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6036  fi
6037else
6038  ac_cv_path_FGREP=$FGREP
6039fi
6040
6041   fi
6042fi
6043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6044$as_echo "$ac_cv_path_FGREP" >&6; }
6045 FGREP="$ac_cv_path_FGREP"
6046
6047
6048
6049    if test "x$FGREP" = x; then
6050        if test "x" = x; then
6051          PROG_NAME=fgrep
6052        else
6053          PROG_NAME=
6054        fi
6055        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6056$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6057        as_fn_error $? "Cannot continue" "$LINENO" 5
6058    fi
6059
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6061$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6062if test "${ac_cv_path_SED+set}" = set; then :
6063  $as_echo_n "(cached) " >&6
6064else
6065            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6066     for ac_i in 1 2 3 4 5 6 7; do
6067       ac_script="$ac_script$as_nl$ac_script"
6068     done
6069     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6070     { ac_script=; unset ac_script;}
6071     if test -z "$SED"; then
6072  ac_path_SED_found=false
6073  # Loop through the user's path and test for each of PROGNAME-LIST
6074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6075for as_dir in $PATH
6076do
6077  IFS=$as_save_IFS
6078  test -z "$as_dir" && as_dir=.
6079    for ac_prog in sed gsed; do
6080    for ac_exec_ext in '' $ac_executable_extensions; do
6081      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6082      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6083# Check for GNU ac_path_SED and select it if it is found.
6084  # Check for GNU $ac_path_SED
6085case `"$ac_path_SED" --version 2>&1` in
6086*GNU*)
6087  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6088*)
6089  ac_count=0
6090  $as_echo_n 0123456789 >"conftest.in"
6091  while :
6092  do
6093    cat "conftest.in" "conftest.in" >"conftest.tmp"
6094    mv "conftest.tmp" "conftest.in"
6095    cp "conftest.in" "conftest.nl"
6096    $as_echo '' >> "conftest.nl"
6097    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6098    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6099    as_fn_arith $ac_count + 1 && ac_count=$as_val
6100    if test $ac_count -gt ${ac_path_SED_max-0}; then
6101      # Best one so far, save it but keep looking for a better one
6102      ac_cv_path_SED="$ac_path_SED"
6103      ac_path_SED_max=$ac_count
6104    fi
6105    # 10*(2^10) chars as input seems more than enough
6106    test $ac_count -gt 10 && break
6107  done
6108  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6109esac
6110
6111      $ac_path_SED_found && break 3
6112    done
6113  done
6114  done
6115IFS=$as_save_IFS
6116  if test -z "$ac_cv_path_SED"; then
6117    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6118  fi
6119else
6120  ac_cv_path_SED=$SED
6121fi
6122
6123fi
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6125$as_echo "$ac_cv_path_SED" >&6; }
6126 SED="$ac_cv_path_SED"
6127  rm -f conftest.sed
6128
6129
6130    if test "x$SED" = x; then
6131        if test "x" = x; then
6132          PROG_NAME=sed
6133        else
6134          PROG_NAME=
6135        fi
6136        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6137$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6138        as_fn_error $? "Cannot continue" "$LINENO" 5
6139    fi
6140
6141
6142for ac_prog in nawk gawk awk
6143do
6144  # Extract the first word of "$ac_prog", so it can be a program name with args.
6145set dummy $ac_prog; ac_word=$2
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6147$as_echo_n "checking for $ac_word... " >&6; }
6148if test "${ac_cv_path_NAWK+set}" = set; then :
6149  $as_echo_n "(cached) " >&6
6150else
6151  case $NAWK in
6152  [\\/]* | ?:[\\/]*)
6153  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6154  ;;
6155  *)
6156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6157for as_dir in $PATH
6158do
6159  IFS=$as_save_IFS
6160  test -z "$as_dir" && as_dir=.
6161    for ac_exec_ext in '' $ac_executable_extensions; do
6162  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6163    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6165    break 2
6166  fi
6167done
6168  done
6169IFS=$as_save_IFS
6170
6171  ;;
6172esac
6173fi
6174NAWK=$ac_cv_path_NAWK
6175if test -n "$NAWK"; then
6176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6177$as_echo "$NAWK" >&6; }
6178else
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6180$as_echo "no" >&6; }
6181fi
6182
6183
6184  test -n "$NAWK" && break
6185done
6186
6187
6188    if test "x$NAWK" = x; then
6189        if test "x" = x; then
6190          PROG_NAME=nawk
6191        else
6192          PROG_NAME=
6193        fi
6194        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6195$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6196        as_fn_error $? "Cannot continue" "$LINENO" 5
6197    fi
6198
6199
6200# Always force rm.
6201RM="$RM -f"
6202
6203# These are not required on all platforms
6204# Extract the first word of "cygpath", so it can be a program name with args.
6205set dummy cygpath; ac_word=$2
6206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6207$as_echo_n "checking for $ac_word... " >&6; }
6208if test "${ac_cv_path_CYGPATH+set}" = set; then :
6209  $as_echo_n "(cached) " >&6
6210else
6211  case $CYGPATH in
6212  [\\/]* | ?:[\\/]*)
6213  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6214  ;;
6215  *)
6216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6217for as_dir in $PATH
6218do
6219  IFS=$as_save_IFS
6220  test -z "$as_dir" && as_dir=.
6221    for ac_exec_ext in '' $ac_executable_extensions; do
6222  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6223    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6225    break 2
6226  fi
6227done
6228  done
6229IFS=$as_save_IFS
6230
6231  ;;
6232esac
6233fi
6234CYGPATH=$ac_cv_path_CYGPATH
6235if test -n "$CYGPATH"; then
6236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6237$as_echo "$CYGPATH" >&6; }
6238else
6239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6240$as_echo "no" >&6; }
6241fi
6242
6243
6244# Extract the first word of "readlink", so it can be a program name with args.
6245set dummy readlink; ac_word=$2
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247$as_echo_n "checking for $ac_word... " >&6; }
6248if test "${ac_cv_path_READLINK+set}" = set; then :
6249  $as_echo_n "(cached) " >&6
6250else
6251  case $READLINK in
6252  [\\/]* | ?:[\\/]*)
6253  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6254  ;;
6255  *)
6256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257for as_dir in $PATH
6258do
6259  IFS=$as_save_IFS
6260  test -z "$as_dir" && as_dir=.
6261    for ac_exec_ext in '' $ac_executable_extensions; do
6262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6263    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265    break 2
6266  fi
6267done
6268  done
6269IFS=$as_save_IFS
6270
6271  ;;
6272esac
6273fi
6274READLINK=$ac_cv_path_READLINK
6275if test -n "$READLINK"; then
6276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6277$as_echo "$READLINK" >&6; }
6278else
6279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280$as_echo "no" >&6; }
6281fi
6282
6283
6284# Extract the first word of "df", so it can be a program name with args.
6285set dummy df; ac_word=$2
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6287$as_echo_n "checking for $ac_word... " >&6; }
6288if test "${ac_cv_path_DF+set}" = set; then :
6289  $as_echo_n "(cached) " >&6
6290else
6291  case $DF in
6292  [\\/]* | ?:[\\/]*)
6293  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6294  ;;
6295  *)
6296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6297for as_dir in $PATH
6298do
6299  IFS=$as_save_IFS
6300  test -z "$as_dir" && as_dir=.
6301    for ac_exec_ext in '' $ac_executable_extensions; do
6302  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6303    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6305    break 2
6306  fi
6307done
6308  done
6309IFS=$as_save_IFS
6310
6311  ;;
6312esac
6313fi
6314DF=$ac_cv_path_DF
6315if test -n "$DF"; then
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6317$as_echo "$DF" >&6; }
6318else
6319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6320$as_echo "no" >&6; }
6321fi
6322
6323
6324# Extract the first word of "SetFile", so it can be a program name with args.
6325set dummy SetFile; ac_word=$2
6326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6327$as_echo_n "checking for $ac_word... " >&6; }
6328if test "${ac_cv_path_SETFILE+set}" = set; then :
6329  $as_echo_n "(cached) " >&6
6330else
6331  case $SETFILE in
6332  [\\/]* | ?:[\\/]*)
6333  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6334  ;;
6335  *)
6336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6337for as_dir in $PATH
6338do
6339  IFS=$as_save_IFS
6340  test -z "$as_dir" && as_dir=.
6341    for ac_exec_ext in '' $ac_executable_extensions; do
6342  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6343    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6345    break 2
6346  fi
6347done
6348  done
6349IFS=$as_save_IFS
6350
6351  ;;
6352esac
6353fi
6354SETFILE=$ac_cv_path_SETFILE
6355if test -n "$SETFILE"; then
6356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6357$as_echo "$SETFILE" >&6; }
6358else
6359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6360$as_echo "no" >&6; }
6361fi
6362
6363
6364
6365
6366# Now we can determine OpenJDK build and target platforms. This is required to
6367# have early on.
6368# Make sure we can run config.sub.
6369$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6370  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6371
6372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6373$as_echo_n "checking build system type... " >&6; }
6374if test "${ac_cv_build+set}" = set; then :
6375  $as_echo_n "(cached) " >&6
6376else
6377  ac_build_alias=$build_alias
6378test "x$ac_build_alias" = x &&
6379  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6380test "x$ac_build_alias" = x &&
6381  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6382ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6383  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6384
6385fi
6386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6387$as_echo "$ac_cv_build" >&6; }
6388case $ac_cv_build in
6389*-*-*) ;;
6390*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6391esac
6392build=$ac_cv_build
6393ac_save_IFS=$IFS; IFS='-'
6394set x $ac_cv_build
6395shift
6396build_cpu=$1
6397build_vendor=$2
6398shift; shift
6399# Remember, the first character of IFS is used to create $*,
6400# except with old shells:
6401build_os=$*
6402IFS=$ac_save_IFS
6403case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6404
6405
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6407$as_echo_n "checking host system type... " >&6; }
6408if test "${ac_cv_host+set}" = set; then :
6409  $as_echo_n "(cached) " >&6
6410else
6411  if test "x$host_alias" = x; then
6412  ac_cv_host=$ac_cv_build
6413else
6414  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6415    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6416fi
6417
6418fi
6419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6420$as_echo "$ac_cv_host" >&6; }
6421case $ac_cv_host in
6422*-*-*) ;;
6423*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6424esac
6425host=$ac_cv_host
6426ac_save_IFS=$IFS; IFS='-'
6427set x $ac_cv_host
6428shift
6429host_cpu=$1
6430host_vendor=$2
6431shift; shift
6432# Remember, the first character of IFS is used to create $*,
6433# except with old shells:
6434host_os=$*
6435IFS=$ac_save_IFS
6436case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6437
6438
6439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6440$as_echo_n "checking target system type... " >&6; }
6441if test "${ac_cv_target+set}" = set; then :
6442  $as_echo_n "(cached) " >&6
6443else
6444  if test "x$target_alias" = x; then
6445  ac_cv_target=$ac_cv_host
6446else
6447  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6448    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6449fi
6450
6451fi
6452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6453$as_echo "$ac_cv_target" >&6; }
6454case $ac_cv_target in
6455*-*-*) ;;
6456*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6457esac
6458target=$ac_cv_target
6459ac_save_IFS=$IFS; IFS='-'
6460set x $ac_cv_target
6461shift
6462target_cpu=$1
6463target_vendor=$2
6464shift; shift
6465# Remember, the first character of IFS is used to create $*,
6466# except with old shells:
6467target_os=$*
6468IFS=$ac_save_IFS
6469case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6470
6471
6472# The aliases save the names the user supplied, while $host etc.
6473# will get canonicalized.
6474test -n "$target_alias" &&
6475  test "$program_prefix$program_suffix$program_transform_name" = \
6476    NONENONEs,x,x, &&
6477  program_prefix=${target_alias}-
6478
6479# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6480# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6481# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6482# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6483# to use the configure naming style.
6484
6485
6486
6487
6488
6489    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6490    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6491    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6492    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6493    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6494    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6495
6496
6497
6498    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6499
6500  case "$build_os" in
6501    *linux*)
6502      VAR_OS=linux
6503      VAR_OS_API=posix
6504      VAR_OS_ENV=linux
6505      ;;
6506    *solaris*)
6507      VAR_OS=solaris
6508      VAR_OS_API=posix
6509      VAR_OS_ENV=solaris
6510      ;;
6511    *darwin*)
6512      VAR_OS=macosx
6513      VAR_OS_API=posix
6514      VAR_OS_ENV=macosx
6515      ;;
6516    *bsd*)
6517      VAR_OS=bsd
6518      VAR_OS_API=posix
6519      VAR_OS_ENV=bsd
6520      ;;
6521    *cygwin*)
6522      VAR_OS=windows
6523      VAR_OS_API=winapi
6524      VAR_OS_ENV=windows.cygwin
6525      ;;
6526    *mingw*)
6527      VAR_OS=windows
6528      VAR_OS_API=winapi
6529      VAR_OS_ENV=windows.msys
6530      ;;
6531    *)
6532      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6533      ;;
6534  esac
6535
6536
6537  # First argument is the cpu name from the trip/quad
6538  case "$build_cpu" in
6539    x86_64)
6540      VAR_CPU=x86_64
6541      VAR_CPU_ARCH=x86
6542      VAR_CPU_BITS=64
6543      VAR_CPU_ENDIAN=little
6544      ;;
6545    i?86)
6546      VAR_CPU=x86
6547      VAR_CPU_ARCH=x86
6548      VAR_CPU_BITS=32
6549      VAR_CPU_ENDIAN=little
6550      ;;
6551    arm*)
6552      VAR_CPU=arm
6553      VAR_CPU_ARCH=arm
6554      VAR_CPU_BITS=32
6555      VAR_CPU_ENDIAN=little
6556      ;;
6557    powerpc)
6558      VAR_CPU=ppc
6559      VAR_CPU_ARCH=ppc
6560      VAR_CPU_BITS=32
6561      VAR_CPU_ENDIAN=big
6562       ;;
6563    powerpc64)
6564      VAR_CPU=ppc64
6565      VAR_CPU_ARCH=ppc
6566      VAR_CPU_BITS=64
6567      VAR_CPU_ENDIAN=big
6568       ;;
6569    sparc)
6570      VAR_CPU=sparc
6571      VAR_CPU_ARCH=sparc
6572      VAR_CPU_BITS=32
6573      VAR_CPU_ENDIAN=big
6574       ;;
6575    sparcv9)
6576      VAR_CPU=sparcv9
6577      VAR_CPU_ARCH=sparc
6578      VAR_CPU_BITS=64
6579      VAR_CPU_ENDIAN=big
6580       ;;
6581    *)
6582      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6583      ;;
6584  esac
6585
6586    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6587    OPENJDK_BUILD_OS="$VAR_OS"
6588    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6589    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6590    OPENJDK_BUILD_CPU="$VAR_CPU"
6591    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6592    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6593    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6594
6595
6596
6597
6598
6599
6600
6601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6602$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6603    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6604$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6605
6606    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6607
6608  case "$host_os" in
6609    *linux*)
6610      VAR_OS=linux
6611      VAR_OS_API=posix
6612      VAR_OS_ENV=linux
6613      ;;
6614    *solaris*)
6615      VAR_OS=solaris
6616      VAR_OS_API=posix
6617      VAR_OS_ENV=solaris
6618      ;;
6619    *darwin*)
6620      VAR_OS=macosx
6621      VAR_OS_API=posix
6622      VAR_OS_ENV=macosx
6623      ;;
6624    *bsd*)
6625      VAR_OS=bsd
6626      VAR_OS_API=posix
6627      VAR_OS_ENV=bsd
6628      ;;
6629    *cygwin*)
6630      VAR_OS=windows
6631      VAR_OS_API=winapi
6632      VAR_OS_ENV=windows.cygwin
6633      ;;
6634    *mingw*)
6635      VAR_OS=windows
6636      VAR_OS_API=winapi
6637      VAR_OS_ENV=windows.msys
6638      ;;
6639    *)
6640      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6641      ;;
6642  esac
6643
6644
6645  # First argument is the cpu name from the trip/quad
6646  case "$host_cpu" in
6647    x86_64)
6648      VAR_CPU=x86_64
6649      VAR_CPU_ARCH=x86
6650      VAR_CPU_BITS=64
6651      VAR_CPU_ENDIAN=little
6652      ;;
6653    i?86)
6654      VAR_CPU=x86
6655      VAR_CPU_ARCH=x86
6656      VAR_CPU_BITS=32
6657      VAR_CPU_ENDIAN=little
6658      ;;
6659    arm*)
6660      VAR_CPU=arm
6661      VAR_CPU_ARCH=arm
6662      VAR_CPU_BITS=32
6663      VAR_CPU_ENDIAN=little
6664      ;;
6665    powerpc)
6666      VAR_CPU=ppc
6667      VAR_CPU_ARCH=ppc
6668      VAR_CPU_BITS=32
6669      VAR_CPU_ENDIAN=big
6670       ;;
6671    powerpc64)
6672      VAR_CPU=ppc64
6673      VAR_CPU_ARCH=ppc
6674      VAR_CPU_BITS=64
6675      VAR_CPU_ENDIAN=big
6676       ;;
6677    sparc)
6678      VAR_CPU=sparc
6679      VAR_CPU_ARCH=sparc
6680      VAR_CPU_BITS=32
6681      VAR_CPU_ENDIAN=big
6682       ;;
6683    sparcv9)
6684      VAR_CPU=sparcv9
6685      VAR_CPU_ARCH=sparc
6686      VAR_CPU_BITS=64
6687      VAR_CPU_ENDIAN=big
6688       ;;
6689    *)
6690      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6691      ;;
6692  esac
6693
6694    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6695    OPENJDK_TARGET_OS="$VAR_OS"
6696    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6697    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6698    OPENJDK_TARGET_CPU="$VAR_CPU"
6699    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6700    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6701    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6702
6703
6704
6705
6706
6707
6708
6709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6710$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6711    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6712$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6713
6714
6715
6716# Check whether --with-target-bits was given.
6717if test "${with_target_bits+set}" = set; then :
6718  withval=$with_target_bits;
6719fi
6720
6721
6722  # We have three types of compiles:
6723  # native  == normal compilation, target system == build system
6724  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6725  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6726  #
6727  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6728    # We're doing a proper cross-compilation
6729    COMPILE_TYPE="cross"
6730  else
6731    COMPILE_TYPE="native"
6732  fi
6733
6734  if test "x$with_target_bits" != x; then
6735    if test "x$COMPILE_TYPE" = "xcross"; then
6736      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6737    fi
6738
6739    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6740      # A reduced build is requested
6741      COMPILE_TYPE="reduced"
6742      OPENJDK_TARGET_CPU_BITS=32
6743      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6744        OPENJDK_TARGET_CPU=x86
6745      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6746        OPENJDK_TARGET_CPU=sparc
6747      else
6748        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6749      fi
6750    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6751      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
6752    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6753      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6754$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6755    else
6756      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6757    fi
6758  fi
6759
6760
6761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6762$as_echo_n "checking compilation type... " >&6; }
6763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6764$as_echo "$COMPILE_TYPE" >&6; }
6765
6766
6767    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6768       REQUIRED_OS_NAME=SunOS
6769       REQUIRED_OS_VERSION=5.10
6770    fi
6771    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6772       REQUIRED_OS_NAME=Linux
6773       REQUIRED_OS_VERSION=2.6
6774    fi
6775    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6776        REQUIRED_OS_NAME=Windows
6777        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6778            REQUIRED_OS_VERSION=5.2
6779        else
6780            REQUIRED_OS_VERSION=5.1
6781        fi
6782    fi
6783    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6784        REQUIRED_OS_NAME=Darwin
6785        REQUIRED_OS_VERSION=11.2
6786    fi
6787
6788
6789
6790
6791
6792    # Also store the legacy naming of the cpu.
6793    # Ie i586 and amd64 instead of x86 and x86_64
6794    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6795    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6796      OPENJDK_TARGET_CPU_LEGACY="i586"
6797    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6798      # On all platforms except MacOSX replace x86_64 with amd64.
6799      OPENJDK_TARGET_CPU_LEGACY="amd64"
6800    fi
6801
6802
6803    # And the second legacy naming of the cpu.
6804    # Ie i386 and amd64 instead of x86 and x86_64.
6805    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6806    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6807      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6808    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6809      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6810    fi
6811
6812
6813    # This is the name of the cpu (but using i386 and amd64 instead of
6814    # x86 and x86_64, respectively), preceeded by a /, to be used when
6815    # locating libraries. On macosx, it's empty, though.
6816    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6817    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6818        OPENJDK_TARGET_CPU_LIBDIR=""
6819    fi
6820
6821
6822    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6823    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6824    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6825    OPENJDK_TARGET_CPU_ISADIR=""
6826    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6827      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6828          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6829      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6830          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6831      fi
6832    fi
6833
6834
6835    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6836    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6837    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6838      # On linux only, we replace x86 with i386.
6839      OPENJDK_TARGET_CPU_OSARCH="i386"
6840    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6841      # On all platforms except macosx, we replace x86_64 with amd64.
6842      OPENJDK_TARGET_CPU_OSARCH="amd64"
6843    fi
6844
6845
6846    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6847    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6848      OPENJDK_TARGET_CPU_JLI="i386"
6849    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6850      # On all platforms except macosx, we replace x86_64 with amd64.
6851      OPENJDK_TARGET_CPU_JLI="amd64"
6852    fi
6853    # Now setup the -D flags for building libjli.
6854    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6855    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6856      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
6857        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
6858      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
6859        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
6860      fi
6861    fi
6862
6863
6864    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
6865    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
6866        OPENJDK_TARGET_OS_API_DIR="solaris"
6867    fi
6868    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
6869        OPENJDK_TARGET_OS_API_DIR="windows"
6870    fi
6871
6872
6873    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6874        A_LP64="LP64:="
6875        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
6876        # unpack200.exe
6877        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
6878            ADD_LP64="-D_LP64=1"
6879        fi
6880    fi
6881    LP64=$A_LP64
6882
6883
6884    if test "x$COMPILE_TYPE" = "xcross"; then
6885      # FIXME: ... or should this include reduced builds..?
6886      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
6887    else
6888      DEFINE_CROSS_COMPILE_ARCH=""
6889    fi
6890
6891
6892
6893
6894# Continue setting up basic stuff. Most remaining code require fundamental tools.
6895
6896# Locate the directory of this script.
6897SCRIPT="$0"
6898
6899    if test "x$OPENJDK_BUILD_OS" != xwindows; then
6900        # Follow a chain of symbolic links. Use readlink
6901        # where it exists, else fall back to horribly
6902        # complicated shell code.
6903        if test "x$READLINK_TESTED" != yes; then
6904            # On MacOSX there is a readlink tool with a different
6905            # purpose than the GNU readlink tool. Check the found readlink.
6906            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
6907            if test "x$ISGNU" = x; then
6908                 # A readlink that we do not know how to use.
6909                 # Are there other non-GNU readlinks out there?
6910                 READLINK_TESTED=yes
6911                 READLINK=
6912            fi
6913        fi
6914
6915        if test "x$READLINK" != x; then
6916            SCRIPT=`$READLINK -f $SCRIPT`
6917        else
6918            # Save the current directory for restoring afterwards
6919            STARTDIR=$PWD
6920            COUNTER=0
6921            sym_link_dir=`$DIRNAME $SCRIPT`
6922            sym_link_file=`$BASENAME $SCRIPT`
6923            # Use the system pwd and not the shell builtin to resolve directory symlinks
6924            cd $sym_link_dir
6925            cd `$THEPWDCMD`
6926            sym_link_dir=`$THEPWDCMD`
6927            # Resolve file symlinks
6928            while test $COUNTER -lt 20; do
6929                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
6930                if test "x$ISLINK" == x; then
6931                    # This is not a symbolic link! We are done!
6932                    break
6933                fi
6934                # Again resolve directory symlinks since the target of the just found
6935                # link could be in a different directory
6936                cd `$DIRNAME $ISLINK`
6937                sym_link_dir=`$THEPWDCMD`
6938                sym_link_file=`$BASENAME $ISLINK`
6939                let COUNTER=COUNTER+1
6940            done
6941            cd $STARTDIR
6942            SCRIPT=$sym_link_dir/$sym_link_file
6943        fi
6944    fi
6945
6946AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
6947
6948# Where is the source? It is located two levels above the configure script.
6949CURDIR="$PWD"
6950cd "$AUTOCONF_DIR/../.."
6951SRC_ROOT="`$THEPWDCMD`"
6952
6953if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6954  PATH_SEP=";"
6955
6956  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
6957  if test $SRC_ROOT_LENGTH -gt 100; then
6958      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
6959  fi
6960
6961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
6962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
6963$as_echo_n "checking cygwin release... " >&6; }
6964    CYGWIN_VERSION=`$UNAME -r`
6965    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
6966$as_echo "$CYGWIN_VERSION" >&6; }
6967    WINDOWS_ENV_VENDOR='cygwin'
6968    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
6969
6970    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
6971    if test "x$CYGWIN_VERSION_OK" = x; then
6972      { $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
6973$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;}
6974      as_fn_error $? "Cannot continue" "$LINENO" 5
6975    fi
6976    if test "x$CYGPATH" = x; then
6977        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
6978    fi
6979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
6980$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
6981    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
6982    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
6983    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
6984    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
6985    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
6986$as_echo "$CYGWIN_ROOT_PATH" >&6; }
6987    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
6988    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
6989    if test "x$test_cygdrive_prefix" = x; then
6990        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
6991    fi
6992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
6993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
6994$as_echo_n "checking msys release... " >&6; }
6995    MSYS_VERSION=`$UNAME -r`
6996    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
6997$as_echo "$MSYS_VERSION" >&6; }
6998
6999    WINDOWS_ENV_VENDOR='msys'
7000    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7001
7002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7003$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7004    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7005    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7006
7007  windows_path="$MSYS_ROOT_PATH"
7008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7009    unix_path=`$CYGPATH -u "$windows_path"`
7010    MSYS_ROOT_PATH="$unix_path"
7011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7013    MSYS_ROOT_PATH="$unix_path"
7014  fi
7015
7016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7017$as_echo "$MSYS_ROOT_PATH" >&6; }
7018    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7019  else
7020    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7021  fi
7022
7023  # Test if windows or unix (cygwin/msys) find is first in path.
7024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7025$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7026  FIND_BINARY_OUTPUT=`find --version 2>&1`
7027  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7029$as_echo "unix style" >&6; }
7030  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7032$as_echo "Windows" >&6; }
7033    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7034$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7035    { $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
7036$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7037    as_fn_error $? "Cannot continue" "$LINENO" 5
7038  else
7039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7040$as_echo "unknown" >&6; }
7041    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7042$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7043  fi
7044
7045else
7046  PATH_SEP=":"
7047fi
7048
7049
7050
7051cd "$CURDIR"
7052
7053
7054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7055
7056  # Input might be given as Windows format, start by converting to
7057  # unix format.
7058  path="$SRC_ROOT"
7059  new_path=`$CYGPATH -u "$path"`
7060
7061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7064  # "foo.exe" is OK but "foo" is an error.
7065  #
7066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7067  # It is also a way to make sure we got the proper file name for the real test later on.
7068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7069  if test "x$test_shortpath" = x; then
7070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7071$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7072    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7073  fi
7074
7075  # Call helper function which possibly converts this using DOS-style short mode.
7076  # If so, the updated path is stored in $new_path.
7077
7078  input_path="$new_path"
7079  # Check if we need to convert this using DOS-style short mode. If the path
7080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7081  # take no chances and rewrite it.
7082  # Note: m4 eats our [], so we need to use [ and ] instead.
7083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7084  if test "x$has_forbidden_chars" != x; then
7085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7089      # Going to short mode and back again did indeed matter. Since short mode is
7090      # case insensitive, let's make it lowercase to improve readability.
7091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7092      # Now convert it back to Unix-stile (cygpath)
7093      input_path=`$CYGPATH -u "$shortmode_path"`
7094      new_path="$input_path"
7095    fi
7096  fi
7097
7098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7099  if test "x$test_cygdrive_prefix" = x; then
7100    # As a simple fix, exclude /usr/bin since it's not a real path.
7101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7103      # a path prefixed by /cygdrive for fixpath to work.
7104      new_path="$CYGWIN_ROOT_PATH$input_path"
7105    fi
7106  fi
7107
7108
7109  if test "x$path" != "x$new_path"; then
7110    SRC_ROOT="$new_path"
7111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7112$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7113  fi
7114
7115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7116
7117  path="$SRC_ROOT"
7118  has_colon=`$ECHO $path | $GREP ^.:`
7119  new_path="$path"
7120  if test "x$has_colon" = x; then
7121    # Not in mixed or Windows style, start by that.
7122    new_path=`cmd //c echo $path`
7123  fi
7124
7125
7126  input_path="$new_path"
7127  # Check if we need to convert this using DOS-style short mode. If the path
7128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7129  # take no chances and rewrite it.
7130  # Note: m4 eats our [], so we need to use [ and ] instead.
7131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7132  if test "x$has_forbidden_chars" != x; then
7133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7135  fi
7136
7137
7138  windows_path="$new_path"
7139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7140    unix_path=`$CYGPATH -u "$windows_path"`
7141    new_path="$unix_path"
7142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7144    new_path="$unix_path"
7145  fi
7146
7147  if test "x$path" != "x$new_path"; then
7148    SRC_ROOT="$new_path"
7149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7150$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7151  fi
7152
7153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7155
7156  else
7157    # We're on a posix platform. Hooray! :)
7158    path="$SRC_ROOT"
7159
7160    if test ! -f "$path" && test ! -d "$path"; then
7161      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7162    fi
7163
7164    has_space=`$ECHO "$path" | $GREP " "`
7165    if test "x$has_space" != x; then
7166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7167$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7168      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7169    fi
7170  fi
7171
7172
7173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7174
7175  # Input might be given as Windows format, start by converting to
7176  # unix format.
7177  path="$CURDIR"
7178  new_path=`$CYGPATH -u "$path"`
7179
7180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7183  # "foo.exe" is OK but "foo" is an error.
7184  #
7185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7186  # It is also a way to make sure we got the proper file name for the real test later on.
7187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7188  if test "x$test_shortpath" = x; then
7189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7190$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7191    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7192  fi
7193
7194  # Call helper function which possibly converts this using DOS-style short mode.
7195  # If so, the updated path is stored in $new_path.
7196
7197  input_path="$new_path"
7198  # Check if we need to convert this using DOS-style short mode. If the path
7199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7200  # take no chances and rewrite it.
7201  # Note: m4 eats our [], so we need to use [ and ] instead.
7202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7203  if test "x$has_forbidden_chars" != x; then
7204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7208      # Going to short mode and back again did indeed matter. Since short mode is
7209      # case insensitive, let's make it lowercase to improve readability.
7210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7211      # Now convert it back to Unix-stile (cygpath)
7212      input_path=`$CYGPATH -u "$shortmode_path"`
7213      new_path="$input_path"
7214    fi
7215  fi
7216
7217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7218  if test "x$test_cygdrive_prefix" = x; then
7219    # As a simple fix, exclude /usr/bin since it's not a real path.
7220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7222      # a path prefixed by /cygdrive for fixpath to work.
7223      new_path="$CYGWIN_ROOT_PATH$input_path"
7224    fi
7225  fi
7226
7227
7228  if test "x$path" != "x$new_path"; then
7229    CURDIR="$new_path"
7230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7231$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7232  fi
7233
7234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7235
7236  path="$CURDIR"
7237  has_colon=`$ECHO $path | $GREP ^.:`
7238  new_path="$path"
7239  if test "x$has_colon" = x; then
7240    # Not in mixed or Windows style, start by that.
7241    new_path=`cmd //c echo $path`
7242  fi
7243
7244
7245  input_path="$new_path"
7246  # Check if we need to convert this using DOS-style short mode. If the path
7247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7248  # take no chances and rewrite it.
7249  # Note: m4 eats our [], so we need to use [ and ] instead.
7250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7251  if test "x$has_forbidden_chars" != x; then
7252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7254  fi
7255
7256
7257  windows_path="$new_path"
7258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7259    unix_path=`$CYGPATH -u "$windows_path"`
7260    new_path="$unix_path"
7261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7263    new_path="$unix_path"
7264  fi
7265
7266  if test "x$path" != "x$new_path"; then
7267    CURDIR="$new_path"
7268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7269$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7270  fi
7271
7272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7274
7275  else
7276    # We're on a posix platform. Hooray! :)
7277    path="$CURDIR"
7278
7279    if test ! -f "$path" && test ! -d "$path"; then
7280      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7281    fi
7282
7283    has_space=`$ECHO "$path" | $GREP " "`
7284    if test "x$has_space" != x; then
7285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7286$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7287      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7288    fi
7289  fi
7290
7291
7292if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7293    # Add extra search paths on solaris for utilities like ar and as etc...
7294    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7295fi
7296
7297# You can force the sys-root if the sys-root encoded into the cross compiler tools
7298# is not correct.
7299
7300# Check whether --with-sys-root was given.
7301if test "${with_sys_root+set}" = set; then :
7302  withval=$with_sys_root;
7303fi
7304
7305
7306if test "x$with_sys_root" != x; then
7307  SYS_ROOT=$with_sys_root
7308else
7309  SYS_ROOT=/
7310fi
7311
7312
7313
7314# Check whether --with-tools-dir was given.
7315if test "${with_tools_dir+set}" = set; then :
7316  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7317fi
7318
7319
7320
7321# Check whether --with-devkit was given.
7322if test "${with_devkit+set}" = set; then :
7323  withval=$with_devkit;
7324    if test "x$with_sys_root" != x; then
7325      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7326    fi
7327    if test "x$with_tools_dir" != x; then
7328      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7329    fi
7330    TOOLS_DIR=$with_devkit/bin
7331    SYS_ROOT=$with_devkit/$host_alias/libc
7332
7333fi
7334
7335
7336
7337
7338# Setup default logging of stdout and stderr to build.log in the output root.
7339BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7340BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7341BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7342
7343
7344
7345
7346
7347# These are needed to be able to create a configuration name (and thus the output directory)
7348
7349###############################################################################
7350#
7351# Check which variant of the JDK that we want to build.
7352# Currently we have:
7353#    normal:   standard edition
7354# but the custom make system may add other variants
7355#
7356# Effectively the JDK variant gives a name to a specific set of
7357# modules to compile into the JDK. In the future, these modules
7358# might even be Jigsaw modules.
7359#
7360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7361$as_echo_n "checking which variant of the JDK to build... " >&6; }
7362
7363# Check whether --with-jdk-variant was given.
7364if test "${with_jdk_variant+set}" = set; then :
7365  withval=$with_jdk_variant;
7366fi
7367
7368
7369if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7370    JDK_VARIANT="normal"
7371else
7372    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7373fi
7374
7375
7376
7377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7378$as_echo "$JDK_VARIANT" >&6; }
7379
7380
7381
7382###############################################################################
7383#
7384# Check which variants of the JVM that we want to build.
7385# Currently we have:
7386#    server: normal interpreter and a tiered C1/C2 compiler
7387#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7388#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7389#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7390#    zero: no machine code interpreter, no compiler
7391#    zeroshark: zero interpreter and shark/llvm compiler backend
7392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7393$as_echo_n "checking which variants of the JVM to build... " >&6; }
7394
7395# Check whether --with-jvm-variants was given.
7396if test "${with_jvm_variants+set}" = set; then :
7397  withval=$with_jvm_variants;
7398fi
7399
7400
7401if test "x$with_jvm_variants" = x; then
7402     with_jvm_variants="server"
7403fi
7404
7405JVM_VARIANTS=",$with_jvm_variants,"
7406TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7407
7408if test "x$TEST_VARIANTS" != "x,"; then
7409   as_fn_error $? "The available JVM variants are: server, client, kernel, zero, zeroshark" "$LINENO" 5
7410fi
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7412$as_echo "$with_jvm_variants" >&6; }
7413
7414JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7415JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7416JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7417JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7418JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7419
7420if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7421    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7422        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7423    fi
7424fi
7425if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7426    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7427        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7428    fi
7429fi
7430
7431# Replace the commas with AND for use in the build directory name.
7432ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7433COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7434if test "x$COUNT_VARIANTS" != "x,1"; then
7435    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7436else
7437    BUILDING_MULTIPLE_JVM_VARIANTS=no
7438fi
7439
7440
7441
7442
7443
7444
7445
7446
7447if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7448   MACOSX_UNIVERSAL="true"
7449fi
7450
7451
7452
7453
7454
7455###############################################################################
7456#
7457# Set the debug level
7458#    release: no debug information, all optimizations, no asserts.
7459#    fastdebug: debug information (-g), all optimizations, all asserts
7460#    slowdebug: debug information (-g), no optimizations, all asserts
7461#
7462DEBUG_LEVEL="release"
7463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7464$as_echo_n "checking which debug level to use... " >&6; }
7465# Check whether --enable-debug was given.
7466if test "${enable_debug+set}" = set; then :
7467  enableval=$enable_debug;
7468        ENABLE_DEBUG="${enableval}"
7469        DEBUG_LEVEL="fastdebug"
7470
7471else
7472  ENABLE_DEBUG="no"
7473fi
7474
7475
7476
7477# Check whether --with-debug-level was given.
7478if test "${with_debug_level+set}" = set; then :
7479  withval=$with_debug_level;
7480        DEBUG_LEVEL="${withval}"
7481        if test "x$ENABLE_DEBUG" = xyes; then
7482			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7483        fi
7484
7485fi
7486
7487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7488$as_echo "$DEBUG_LEVEL" >&6; }
7489
7490if test "x$DEBUG_LEVEL" != xrelease && \
7491   test "x$DEBUG_LEVEL" != xfastdebug && \
7492   test "x$DEBUG_LEVEL" != xslowdebug; then
7493   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7494fi
7495
7496
7497###############################################################################
7498#
7499# Setup legacy vars/targets and new vars to deal with different debug levels.
7500#
7501
7502case $DEBUG_LEVEL in
7503      release )
7504          VARIANT="OPT"
7505          FASTDEBUG="false"
7506          DEBUG_CLASSFILES="false"
7507          BUILD_VARIANT_RELEASE=""
7508          HOTSPOT_DEBUG_LEVEL="product"
7509          HOTSPOT_EXPORT="product"
7510           ;;
7511      fastdebug )
7512          VARIANT="DBG"
7513          FASTDEBUG="true"
7514          DEBUG_CLASSFILES="true"
7515          BUILD_VARIANT_RELEASE="-fastdebug"
7516          HOTSPOT_DEBUG_LEVEL="fastdebug"
7517          HOTSPOT_EXPORT="fastdebug"
7518           ;;
7519      slowdebug )
7520          VARIANT="DBG"
7521          FASTDEBUG="false"
7522          DEBUG_CLASSFILES="true"
7523          BUILD_VARIANT_RELEASE="-debug"
7524          HOTSPOT_DEBUG_LEVEL="jvmg"
7525          HOTSPOT_EXPORT="debug"
7526           ;;
7527esac
7528
7529#####
7530# Generate the legacy makefile targets for hotspot.
7531# The hotspot api for selecting the build artifacts, really, needs to be improved.
7532#
7533HOTSPOT_TARGET=""
7534
7535if test "x$JVM_VARIANT_SERVER" = xtrue; then
7536    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7537fi
7538
7539if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7540    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7541fi
7542
7543if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7544    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7545fi
7546
7547if test "x$JVM_VARIANT_ZERO" = xtrue; then
7548    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7549fi
7550
7551if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7552    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7553fi
7554
7555HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7556
7557# On Macosx universal binaries are produced, but they only contain
7558# 64 bit intel. This invalidates control of which jvms are built
7559# from configure, but only server is valid anyway. Fix this
7560# when hotspot makefiles are rewritten.
7561if test "x$MACOSX_UNIVERSAL" = xtrue; then
7562    HOTSPOT_TARGET=universal_product
7563fi
7564
7565#####
7566
7567
7568
7569
7570
7571
7572
7573
7574# With basic setup done, call the custom early hook.
7575
7576
7577# To properly create a configuration name, we need to have the OpenJDK target
7578# and options (variants and debug level) parsed.
7579
7580
7581
7582# Check whether --with-conf-name was given.
7583if test "${with_conf_name+set}" = set; then :
7584  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7585fi
7586
7587
7588# Test from where we are running configure, in or outside of src root.
7589# To enable comparison of directories, CURDIR needs to be symlink free
7590# just like SRC_ROOT already is
7591NOSYM_CURDIR="$CURDIR"
7592
7593    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7594        # Follow a chain of symbolic links. Use readlink
7595        # where it exists, else fall back to horribly
7596        # complicated shell code.
7597        if test "x$READLINK_TESTED" != yes; then
7598            # On MacOSX there is a readlink tool with a different
7599            # purpose than the GNU readlink tool. Check the found readlink.
7600            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7601            if test "x$ISGNU" = x; then
7602                 # A readlink that we do not know how to use.
7603                 # Are there other non-GNU readlinks out there?
7604                 READLINK_TESTED=yes
7605                 READLINK=
7606            fi
7607        fi
7608
7609        if test "x$READLINK" != x; then
7610            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7611        else
7612            # Save the current directory for restoring afterwards
7613            STARTDIR=$PWD
7614            COUNTER=0
7615            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7616            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7617            # Use the system pwd and not the shell builtin to resolve directory symlinks
7618            cd $sym_link_dir
7619            cd `$THEPWDCMD`
7620            sym_link_dir=`$THEPWDCMD`
7621            # Resolve file symlinks
7622            while test $COUNTER -lt 20; do
7623                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7624                if test "x$ISLINK" == x; then
7625                    # This is not a symbolic link! We are done!
7626                    break
7627                fi
7628                # Again resolve directory symlinks since the target of the just found
7629                # link could be in a different directory
7630                cd `$DIRNAME $ISLINK`
7631                sym_link_dir=`$THEPWDCMD`
7632                sym_link_file=`$BASENAME $ISLINK`
7633                let COUNTER=COUNTER+1
7634            done
7635            cd $STARTDIR
7636            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7637        fi
7638    fi
7639
7640if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7641        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7642        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7643    # We are running configure from the src root.
7644    # Create a default ./build/target-variant-debuglevel output root.
7645    if test "x${CONF_NAME}" = x; then
7646        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7647    fi
7648    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7649    $MKDIR -p "$OUTPUT_ROOT"
7650    if test ! -d "$OUTPUT_ROOT"; then
7651        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7652    fi
7653else
7654    # We are running configure from outside of the src dir.
7655    # Then use the current directory as output dir!
7656    # If configuration is situated in normal build directory, just use the build
7657    # directory name as configuration name, otherwise use the complete path.
7658    if test "x${CONF_NAME}" = x; then
7659        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7660    fi
7661    OUTPUT_ROOT="$CURDIR"
7662
7663    # WARNING: This might be a bad thing to do. You need to be sure you want to
7664    # have a configuration in this directory. Do some sanity checks!
7665
7666    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7667      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7668      # other files
7669      files_present=`$LS $OUTPUT_ROOT`
7670      # Configure has already touched config.log and confdefs.h in the current dir when this check
7671      # is performed.
7672      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7673                                             | $TR -d '\n'`
7674      if test "x$filtered_files" != x; then
7675        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7676$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7678$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7679        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7680$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7681        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7682$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7683        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7684$as_echo "$as_me: seriously mess up just about everything." >&6;}
7685        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7686$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7687        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7688$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7689        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7690      fi
7691    fi
7692fi
7693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7694$as_echo_n "checking what configuration name to use... " >&6; }
7695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7696$as_echo "$CONF_NAME" >&6; }
7697
7698
7699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7700
7701  # Input might be given as Windows format, start by converting to
7702  # unix format.
7703  path="$OUTPUT_ROOT"
7704  new_path=`$CYGPATH -u "$path"`
7705
7706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7709  # "foo.exe" is OK but "foo" is an error.
7710  #
7711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7712  # It is also a way to make sure we got the proper file name for the real test later on.
7713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7714  if test "x$test_shortpath" = x; then
7715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7716$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7717    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7718  fi
7719
7720  # Call helper function which possibly converts this using DOS-style short mode.
7721  # If so, the updated path is stored in $new_path.
7722
7723  input_path="$new_path"
7724  # Check if we need to convert this using DOS-style short mode. If the path
7725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7726  # take no chances and rewrite it.
7727  # Note: m4 eats our [], so we need to use [ and ] instead.
7728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7729  if test "x$has_forbidden_chars" != x; then
7730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7734      # Going to short mode and back again did indeed matter. Since short mode is
7735      # case insensitive, let's make it lowercase to improve readability.
7736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7737      # Now convert it back to Unix-stile (cygpath)
7738      input_path=`$CYGPATH -u "$shortmode_path"`
7739      new_path="$input_path"
7740    fi
7741  fi
7742
7743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7744  if test "x$test_cygdrive_prefix" = x; then
7745    # As a simple fix, exclude /usr/bin since it's not a real path.
7746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7748      # a path prefixed by /cygdrive for fixpath to work.
7749      new_path="$CYGWIN_ROOT_PATH$input_path"
7750    fi
7751  fi
7752
7753
7754  if test "x$path" != "x$new_path"; then
7755    OUTPUT_ROOT="$new_path"
7756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7757$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7758  fi
7759
7760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7761
7762  path="$OUTPUT_ROOT"
7763  has_colon=`$ECHO $path | $GREP ^.:`
7764  new_path="$path"
7765  if test "x$has_colon" = x; then
7766    # Not in mixed or Windows style, start by that.
7767    new_path=`cmd //c echo $path`
7768  fi
7769
7770
7771  input_path="$new_path"
7772  # Check if we need to convert this using DOS-style short mode. If the path
7773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7774  # take no chances and rewrite it.
7775  # Note: m4 eats our [], so we need to use [ and ] instead.
7776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7777  if test "x$has_forbidden_chars" != x; then
7778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7780  fi
7781
7782
7783  windows_path="$new_path"
7784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7785    unix_path=`$CYGPATH -u "$windows_path"`
7786    new_path="$unix_path"
7787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7789    new_path="$unix_path"
7790  fi
7791
7792  if test "x$path" != "x$new_path"; then
7793    OUTPUT_ROOT="$new_path"
7794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7795$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7796  fi
7797
7798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7800
7801  else
7802    # We're on a posix platform. Hooray! :)
7803    path="$OUTPUT_ROOT"
7804
7805    if test ! -f "$path" && test ! -d "$path"; then
7806      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7807    fi
7808
7809    has_space=`$ECHO "$path" | $GREP " "`
7810    if test "x$has_space" != x; then
7811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7812$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7813      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7814    fi
7815  fi
7816
7817
7818SPEC=$OUTPUT_ROOT/spec.gmk
7819
7820CONF_NAME=$CONF_NAME
7821
7822OUTPUT_ROOT=$OUTPUT_ROOT
7823
7824
7825# Most of the probed defines are put into config.h
7826ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
7827
7828# The spec.gmk file contains all variables for the make system.
7829ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
7830
7831# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
7832ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
7833
7834# The bootcycle-spec.gmk file contains support for boot cycle builds.
7835ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
7836
7837# The compare.sh is used to compare the build output to other builds.
7838ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
7839
7840# Spec.sh is currently used by compare-objects.sh
7841ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
7842
7843# The generated Makefile knows where the spec.gmk is and where the source is.
7844# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
7845# which will look for generated configurations
7846ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
7847
7848
7849# Save the arguments given to us
7850echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
7851
7852
7853# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
7854
7855    for ac_prog in apt-get yum port pkgutil pkgadd
7856do
7857  # Extract the first word of "$ac_prog", so it can be a program name with args.
7858set dummy $ac_prog; ac_word=$2
7859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7860$as_echo_n "checking for $ac_word... " >&6; }
7861if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
7862  $as_echo_n "(cached) " >&6
7863else
7864  if test -n "$PKGHANDLER"; then
7865  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
7866else
7867as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7868for as_dir in $PATH
7869do
7870  IFS=$as_save_IFS
7871  test -z "$as_dir" && as_dir=.
7872    for ac_exec_ext in '' $ac_executable_extensions; do
7873  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
7874    ac_cv_prog_PKGHANDLER="$ac_prog"
7875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7876    break 2
7877  fi
7878done
7879  done
7880IFS=$as_save_IFS
7881
7882fi
7883fi
7884PKGHANDLER=$ac_cv_prog_PKGHANDLER
7885if test -n "$PKGHANDLER"; then
7886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
7887$as_echo "$PKGHANDLER" >&6; }
7888else
7889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7890$as_echo "no" >&6; }
7891fi
7892
7893
7894  test -n "$PKGHANDLER" && break
7895done
7896
7897
7898
7899# Setup tools that requires more complex handling, or that is not needed by the configure script.
7900
7901
7902  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
7903  if test "x$MAKE" != x; then
7904    # User has supplied a make, test it.
7905    if test ! -f "$MAKE"; then
7906      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
7907    fi
7908
7909  MAKE_CANDIDATE=""$MAKE""
7910  DESCRIPTION="user supplied MAKE=$MAKE"
7911  if test "x$MAKE_CANDIDATE" != x; then
7912    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
7913$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
7914    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
7915    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
7916    if test "x$IS_GNU_MAKE" = x; then
7917      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
7918$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
7919    else
7920      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
7921      if test "x$IS_MODERN_MAKE" = x; then
7922        { $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
7923$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;}
7924      else
7925        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
7926          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7927            MAKE_EXPECTED_ENV='cygwin'
7928          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7929            MAKE_EXPECTED_ENV='msys'
7930          else
7931            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
7932          fi
7933          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
7934          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
7935        else
7936          # Not relevant for non-Windows
7937          IS_MAKE_CORRECT_ENV=true
7938        fi
7939        if test "x$IS_MAKE_CORRECT_ENV" = x; then
7940          { $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
7941$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;}
7942        else
7943          FOUND_MAKE=$MAKE_CANDIDATE
7944
7945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7946
7947  # First separate the path from the arguments. This will split at the first
7948  # space.
7949  complete="$FOUND_MAKE"
7950  path="${complete%% *}"
7951  tmp="$complete EOL"
7952  arguments="${tmp#* }"
7953
7954  # Input might be given as Windows format, start by converting to
7955  # unix format.
7956  new_path=`$CYGPATH -u "$path"`
7957
7958  # Now try to locate executable using which
7959  new_path=`$WHICH "$new_path" 2> /dev/null`
7960  # bat and cmd files are not always considered executable in cygwin causing which
7961  # to not find them
7962  if test "x$new_path" = x \
7963           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7964           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7965    new_path=`$CYGPATH -u "$path"`
7966  fi
7967  if test "x$new_path" = x; then
7968    # Oops. Which didn't find the executable.
7969    # The splitting of arguments from the executable at a space might have been incorrect,
7970    # since paths with space are more likely in Windows. Give it another try with the whole
7971    # argument.
7972    path="$complete"
7973    arguments="EOL"
7974    new_path=`$CYGPATH -u "$path"`
7975    new_path=`$WHICH "$new_path" 2> /dev/null`
7976    # bat and cmd files are not always considered executable in cygwin causing which
7977    # to not find them
7978    if test "x$new_path" = x \
7979             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
7980             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
7981      new_path=`$CYGPATH -u "$path"`
7982    fi
7983    if test "x$new_path" = x; then
7984      # It's still not found. Now this is an unrecoverable error.
7985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
7986$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
7987      has_space=`$ECHO "$complete" | $GREP " "`
7988      if test "x$has_space" != x; then
7989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
7990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
7991      fi
7992      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
7993    fi
7994  fi
7995
7996  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7997  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7998  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7999  # "foo.exe" is OK but "foo" is an error.
8000  #
8001  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8002  # It is also a way to make sure we got the proper file name for the real test later on.
8003  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8004  if test "x$test_shortpath" = x; then
8005    # Short path failed, file does not exist as specified.
8006    # Try adding .exe or .cmd
8007    if test -f "${new_path}.exe"; then
8008       input_to_shortpath="${new_path}.exe"
8009    elif test -f "${new_path}.cmd"; then
8010       input_to_shortpath="${new_path}.cmd"
8011    else
8012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8013$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8014      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8015$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8016      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8017    fi
8018  else
8019    input_to_shortpath="$new_path"
8020  fi
8021
8022  # Call helper function which possibly converts this using DOS-style short mode.
8023  # If so, the updated path is stored in $new_path.
8024  new_path="$input_to_shortpath"
8025
8026  input_path="$input_to_shortpath"
8027  # Check if we need to convert this using DOS-style short mode. If the path
8028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8029  # take no chances and rewrite it.
8030  # Note: m4 eats our [], so we need to use [ and ] instead.
8031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8032  if test "x$has_forbidden_chars" != x; then
8033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8037      # Going to short mode and back again did indeed matter. Since short mode is
8038      # case insensitive, let's make it lowercase to improve readability.
8039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8040      # Now convert it back to Unix-stile (cygpath)
8041      input_path=`$CYGPATH -u "$shortmode_path"`
8042      new_path="$input_path"
8043    fi
8044  fi
8045
8046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8047  if test "x$test_cygdrive_prefix" = x; then
8048    # As a simple fix, exclude /usr/bin since it's not a real path.
8049    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8051      # a path prefixed by /cygdrive for fixpath to work.
8052      new_path="$CYGWIN_ROOT_PATH$input_path"
8053    fi
8054  fi
8055
8056  # remove trailing .exe if any
8057  new_path="${new_path/%.exe/}"
8058
8059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8060
8061  # First separate the path from the arguments. This will split at the first
8062  # space.
8063  complete="$FOUND_MAKE"
8064  path="${complete%% *}"
8065  tmp="$complete EOL"
8066  arguments="${tmp#* }"
8067
8068  # Input might be given as Windows format, start by converting to
8069  # unix format.
8070  new_path="$path"
8071
8072  windows_path="$new_path"
8073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8074    unix_path=`$CYGPATH -u "$windows_path"`
8075    new_path="$unix_path"
8076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8078    new_path="$unix_path"
8079  fi
8080
8081
8082  # Now try to locate executable using which
8083  new_path=`$WHICH "$new_path" 2> /dev/null`
8084
8085  if test "x$new_path" = x; then
8086    # Oops. Which didn't find the executable.
8087    # The splitting of arguments from the executable at a space might have been incorrect,
8088    # since paths with space are more likely in Windows. Give it another try with the whole
8089    # argument.
8090    path="$complete"
8091    arguments="EOL"
8092    new_path="$path"
8093
8094  windows_path="$new_path"
8095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8096    unix_path=`$CYGPATH -u "$windows_path"`
8097    new_path="$unix_path"
8098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8100    new_path="$unix_path"
8101  fi
8102
8103
8104    new_path=`$WHICH "$new_path" 2> /dev/null`
8105
8106    if test "x$new_path" = x; then
8107      # It's still not found. Now this is an unrecoverable error.
8108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8109$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8110      has_space=`$ECHO "$complete" | $GREP " "`
8111      if test "x$has_space" != x; then
8112        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8114      fi
8115      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8116    fi
8117  fi
8118
8119  # Now new_path has a complete unix path to the binary
8120  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8121    # Keep paths in /bin as-is, but remove trailing .exe if any
8122    new_path="${new_path/%.exe/}"
8123    # Do not save /bin paths to all_fixpath_prefixes!
8124  else
8125    # Not in mixed or Windows style, start by that.
8126    new_path=`cmd //c echo $new_path`
8127
8128  input_path="$new_path"
8129  # Check if we need to convert this using DOS-style short mode. If the path
8130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8131  # take no chances and rewrite it.
8132  # Note: m4 eats our [], so we need to use [ and ] instead.
8133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8134  if test "x$has_forbidden_chars" != x; then
8135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8136    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8137  fi
8138
8139    # Output is in $new_path
8140
8141  windows_path="$new_path"
8142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8143    unix_path=`$CYGPATH -u "$windows_path"`
8144    new_path="$unix_path"
8145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8147    new_path="$unix_path"
8148  fi
8149
8150    # remove trailing .exe if any
8151    new_path="${new_path/%.exe/}"
8152
8153    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8154    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8155  fi
8156
8157  else
8158    # We're on a posix platform. Hooray! :)
8159    # First separate the path from the arguments. This will split at the first
8160    # space.
8161    complete="$FOUND_MAKE"
8162    path="${complete%% *}"
8163    tmp="$complete EOL"
8164    arguments="${tmp#* }"
8165
8166    new_path=`$WHICH $path 2> /dev/null`
8167    if test "x$new_path" = x; then
8168      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8169      if test "x$is_absolute_path" != x; then
8170        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8171$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8172        new_path="$path"
8173      else
8174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8175$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8176        has_space=`$ECHO "$complete" | $GREP " "`
8177        if test "x$has_space" != x; then
8178          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8179$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8180        fi
8181        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8182      fi
8183    fi
8184  fi
8185
8186  # Now join together the path and the arguments once again
8187  if test "x$arguments" != xEOL; then
8188      new_complete="$new_path ${arguments% *}"
8189  else
8190      new_complete="$new_path"
8191  fi
8192
8193  if test "x$complete" != "x$new_complete"; then
8194    FOUND_MAKE="$new_complete"
8195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8196$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8197  fi
8198
8199        fi
8200      fi
8201    fi
8202  fi
8203
8204    if test "x$FOUND_MAKE" = x; then
8205      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8206    fi
8207  else
8208    # Try our hardest to locate a correct version of GNU make
8209    for ac_prog in gmake
8210do
8211  # Extract the first word of "$ac_prog", so it can be a program name with args.
8212set dummy $ac_prog; ac_word=$2
8213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8214$as_echo_n "checking for $ac_word... " >&6; }
8215if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8216  $as_echo_n "(cached) " >&6
8217else
8218  case $CHECK_GMAKE in
8219  [\\/]* | ?:[\\/]*)
8220  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8221  ;;
8222  *)
8223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8224for as_dir in $PATH
8225do
8226  IFS=$as_save_IFS
8227  test -z "$as_dir" && as_dir=.
8228    for ac_exec_ext in '' $ac_executable_extensions; do
8229  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8230    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8232    break 2
8233  fi
8234done
8235  done
8236IFS=$as_save_IFS
8237
8238  ;;
8239esac
8240fi
8241CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8242if test -n "$CHECK_GMAKE"; then
8243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8244$as_echo "$CHECK_GMAKE" >&6; }
8245else
8246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8247$as_echo "no" >&6; }
8248fi
8249
8250
8251  test -n "$CHECK_GMAKE" && break
8252done
8253
8254
8255  MAKE_CANDIDATE=""$CHECK_GMAKE""
8256  DESCRIPTION="gmake in PATH"
8257  if test "x$MAKE_CANDIDATE" != x; then
8258    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8259$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8260    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8261    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8262    if test "x$IS_GNU_MAKE" = x; then
8263      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8264$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8265    else
8266      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8267      if test "x$IS_MODERN_MAKE" = x; then
8268        { $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
8269$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;}
8270      else
8271        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8272          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8273            MAKE_EXPECTED_ENV='cygwin'
8274          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8275            MAKE_EXPECTED_ENV='msys'
8276          else
8277            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8278          fi
8279          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8280          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8281        else
8282          # Not relevant for non-Windows
8283          IS_MAKE_CORRECT_ENV=true
8284        fi
8285        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8286          { $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
8287$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;}
8288        else
8289          FOUND_MAKE=$MAKE_CANDIDATE
8290
8291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8292
8293  # First separate the path from the arguments. This will split at the first
8294  # space.
8295  complete="$FOUND_MAKE"
8296  path="${complete%% *}"
8297  tmp="$complete EOL"
8298  arguments="${tmp#* }"
8299
8300  # Input might be given as Windows format, start by converting to
8301  # unix format.
8302  new_path=`$CYGPATH -u "$path"`
8303
8304  # Now try to locate executable using which
8305  new_path=`$WHICH "$new_path" 2> /dev/null`
8306  # bat and cmd files are not always considered executable in cygwin causing which
8307  # to not find them
8308  if test "x$new_path" = x \
8309           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8310           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8311    new_path=`$CYGPATH -u "$path"`
8312  fi
8313  if test "x$new_path" = x; then
8314    # Oops. Which didn't find the executable.
8315    # The splitting of arguments from the executable at a space might have been incorrect,
8316    # since paths with space are more likely in Windows. Give it another try with the whole
8317    # argument.
8318    path="$complete"
8319    arguments="EOL"
8320    new_path=`$CYGPATH -u "$path"`
8321    new_path=`$WHICH "$new_path" 2> /dev/null`
8322    # bat and cmd files are not always considered executable in cygwin causing which
8323    # to not find them
8324    if test "x$new_path" = x \
8325             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8326             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8327      new_path=`$CYGPATH -u "$path"`
8328    fi
8329    if test "x$new_path" = x; then
8330      # It's still not found. Now this is an unrecoverable error.
8331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8332$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8333      has_space=`$ECHO "$complete" | $GREP " "`
8334      if test "x$has_space" != x; then
8335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8337      fi
8338      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8339    fi
8340  fi
8341
8342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8345  # "foo.exe" is OK but "foo" is an error.
8346  #
8347  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8348  # It is also a way to make sure we got the proper file name for the real test later on.
8349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8350  if test "x$test_shortpath" = x; then
8351    # Short path failed, file does not exist as specified.
8352    # Try adding .exe or .cmd
8353    if test -f "${new_path}.exe"; then
8354       input_to_shortpath="${new_path}.exe"
8355    elif test -f "${new_path}.cmd"; then
8356       input_to_shortpath="${new_path}.cmd"
8357    else
8358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8359$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8360      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8361$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8362      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8363    fi
8364  else
8365    input_to_shortpath="$new_path"
8366  fi
8367
8368  # Call helper function which possibly converts this using DOS-style short mode.
8369  # If so, the updated path is stored in $new_path.
8370  new_path="$input_to_shortpath"
8371
8372  input_path="$input_to_shortpath"
8373  # Check if we need to convert this using DOS-style short mode. If the path
8374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8375  # take no chances and rewrite it.
8376  # Note: m4 eats our [], so we need to use [ and ] instead.
8377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8378  if test "x$has_forbidden_chars" != x; then
8379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8383      # Going to short mode and back again did indeed matter. Since short mode is
8384      # case insensitive, let's make it lowercase to improve readability.
8385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8386      # Now convert it back to Unix-stile (cygpath)
8387      input_path=`$CYGPATH -u "$shortmode_path"`
8388      new_path="$input_path"
8389    fi
8390  fi
8391
8392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8393  if test "x$test_cygdrive_prefix" = x; then
8394    # As a simple fix, exclude /usr/bin since it's not a real path.
8395    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8397      # a path prefixed by /cygdrive for fixpath to work.
8398      new_path="$CYGWIN_ROOT_PATH$input_path"
8399    fi
8400  fi
8401
8402  # remove trailing .exe if any
8403  new_path="${new_path/%.exe/}"
8404
8405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8406
8407  # First separate the path from the arguments. This will split at the first
8408  # space.
8409  complete="$FOUND_MAKE"
8410  path="${complete%% *}"
8411  tmp="$complete EOL"
8412  arguments="${tmp#* }"
8413
8414  # Input might be given as Windows format, start by converting to
8415  # unix format.
8416  new_path="$path"
8417
8418  windows_path="$new_path"
8419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8420    unix_path=`$CYGPATH -u "$windows_path"`
8421    new_path="$unix_path"
8422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8424    new_path="$unix_path"
8425  fi
8426
8427
8428  # Now try to locate executable using which
8429  new_path=`$WHICH "$new_path" 2> /dev/null`
8430
8431  if test "x$new_path" = x; then
8432    # Oops. Which didn't find the executable.
8433    # The splitting of arguments from the executable at a space might have been incorrect,
8434    # since paths with space are more likely in Windows. Give it another try with the whole
8435    # argument.
8436    path="$complete"
8437    arguments="EOL"
8438    new_path="$path"
8439
8440  windows_path="$new_path"
8441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8442    unix_path=`$CYGPATH -u "$windows_path"`
8443    new_path="$unix_path"
8444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8446    new_path="$unix_path"
8447  fi
8448
8449
8450    new_path=`$WHICH "$new_path" 2> /dev/null`
8451
8452    if test "x$new_path" = x; then
8453      # It's still not found. Now this is an unrecoverable error.
8454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8455$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8456      has_space=`$ECHO "$complete" | $GREP " "`
8457      if test "x$has_space" != x; then
8458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8460      fi
8461      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8462    fi
8463  fi
8464
8465  # Now new_path has a complete unix path to the binary
8466  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8467    # Keep paths in /bin as-is, but remove trailing .exe if any
8468    new_path="${new_path/%.exe/}"
8469    # Do not save /bin paths to all_fixpath_prefixes!
8470  else
8471    # Not in mixed or Windows style, start by that.
8472    new_path=`cmd //c echo $new_path`
8473
8474  input_path="$new_path"
8475  # Check if we need to convert this using DOS-style short mode. If the path
8476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8477  # take no chances and rewrite it.
8478  # Note: m4 eats our [], so we need to use [ and ] instead.
8479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8480  if test "x$has_forbidden_chars" != x; then
8481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8483  fi
8484
8485    # Output is in $new_path
8486
8487  windows_path="$new_path"
8488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8489    unix_path=`$CYGPATH -u "$windows_path"`
8490    new_path="$unix_path"
8491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8493    new_path="$unix_path"
8494  fi
8495
8496    # remove trailing .exe if any
8497    new_path="${new_path/%.exe/}"
8498
8499    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8500    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8501  fi
8502
8503  else
8504    # We're on a posix platform. Hooray! :)
8505    # First separate the path from the arguments. This will split at the first
8506    # space.
8507    complete="$FOUND_MAKE"
8508    path="${complete%% *}"
8509    tmp="$complete EOL"
8510    arguments="${tmp#* }"
8511
8512    new_path=`$WHICH $path 2> /dev/null`
8513    if test "x$new_path" = x; then
8514      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8515      if test "x$is_absolute_path" != x; then
8516        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8517$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8518        new_path="$path"
8519      else
8520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8521$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8522        has_space=`$ECHO "$complete" | $GREP " "`
8523        if test "x$has_space" != x; then
8524          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8525$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8526        fi
8527        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8528      fi
8529    fi
8530  fi
8531
8532  # Now join together the path and the arguments once again
8533  if test "x$arguments" != xEOL; then
8534      new_complete="$new_path ${arguments% *}"
8535  else
8536      new_complete="$new_path"
8537  fi
8538
8539  if test "x$complete" != "x$new_complete"; then
8540    FOUND_MAKE="$new_complete"
8541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8542$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8543  fi
8544
8545        fi
8546      fi
8547    fi
8548  fi
8549
8550
8551    if test "x$FOUND_MAKE" = x; then
8552      for ac_prog in make
8553do
8554  # Extract the first word of "$ac_prog", so it can be a program name with args.
8555set dummy $ac_prog; ac_word=$2
8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8557$as_echo_n "checking for $ac_word... " >&6; }
8558if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8559  $as_echo_n "(cached) " >&6
8560else
8561  case $CHECK_MAKE in
8562  [\\/]* | ?:[\\/]*)
8563  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8564  ;;
8565  *)
8566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571    for ac_exec_ext in '' $ac_executable_extensions; do
8572  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8573    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578  done
8579IFS=$as_save_IFS
8580
8581  ;;
8582esac
8583fi
8584CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8585if test -n "$CHECK_MAKE"; then
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8587$as_echo "$CHECK_MAKE" >&6; }
8588else
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
8591fi
8592
8593
8594  test -n "$CHECK_MAKE" && break
8595done
8596
8597
8598  MAKE_CANDIDATE=""$CHECK_MAKE""
8599  DESCRIPTION="make in PATH"
8600  if test "x$MAKE_CANDIDATE" != x; then
8601    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8602$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8603    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8604    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8605    if test "x$IS_GNU_MAKE" = x; then
8606      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8607$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8608    else
8609      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8610      if test "x$IS_MODERN_MAKE" = x; then
8611        { $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
8612$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;}
8613      else
8614        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8615          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8616            MAKE_EXPECTED_ENV='cygwin'
8617          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8618            MAKE_EXPECTED_ENV='msys'
8619          else
8620            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8621          fi
8622          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8623          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8624        else
8625          # Not relevant for non-Windows
8626          IS_MAKE_CORRECT_ENV=true
8627        fi
8628        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8629          { $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
8630$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;}
8631        else
8632          FOUND_MAKE=$MAKE_CANDIDATE
8633
8634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8635
8636  # First separate the path from the arguments. This will split at the first
8637  # space.
8638  complete="$FOUND_MAKE"
8639  path="${complete%% *}"
8640  tmp="$complete EOL"
8641  arguments="${tmp#* }"
8642
8643  # Input might be given as Windows format, start by converting to
8644  # unix format.
8645  new_path=`$CYGPATH -u "$path"`
8646
8647  # Now try to locate executable using which
8648  new_path=`$WHICH "$new_path" 2> /dev/null`
8649  # bat and cmd files are not always considered executable in cygwin causing which
8650  # to not find them
8651  if test "x$new_path" = x \
8652           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8653           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8654    new_path=`$CYGPATH -u "$path"`
8655  fi
8656  if test "x$new_path" = x; then
8657    # Oops. Which didn't find the executable.
8658    # The splitting of arguments from the executable at a space might have been incorrect,
8659    # since paths with space are more likely in Windows. Give it another try with the whole
8660    # argument.
8661    path="$complete"
8662    arguments="EOL"
8663    new_path=`$CYGPATH -u "$path"`
8664    new_path=`$WHICH "$new_path" 2> /dev/null`
8665    # bat and cmd files are not always considered executable in cygwin causing which
8666    # to not find them
8667    if test "x$new_path" = x \
8668             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8669             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8670      new_path=`$CYGPATH -u "$path"`
8671    fi
8672    if test "x$new_path" = x; then
8673      # It's still not found. Now this is an unrecoverable error.
8674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8675$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8676      has_space=`$ECHO "$complete" | $GREP " "`
8677      if test "x$has_space" != x; then
8678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8680      fi
8681      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8682    fi
8683  fi
8684
8685  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8686  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8687  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8688  # "foo.exe" is OK but "foo" is an error.
8689  #
8690  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8691  # It is also a way to make sure we got the proper file name for the real test later on.
8692  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8693  if test "x$test_shortpath" = x; then
8694    # Short path failed, file does not exist as specified.
8695    # Try adding .exe or .cmd
8696    if test -f "${new_path}.exe"; then
8697       input_to_shortpath="${new_path}.exe"
8698    elif test -f "${new_path}.cmd"; then
8699       input_to_shortpath="${new_path}.cmd"
8700    else
8701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8702$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8703      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8704$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8705      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8706    fi
8707  else
8708    input_to_shortpath="$new_path"
8709  fi
8710
8711  # Call helper function which possibly converts this using DOS-style short mode.
8712  # If so, the updated path is stored in $new_path.
8713  new_path="$input_to_shortpath"
8714
8715  input_path="$input_to_shortpath"
8716  # Check if we need to convert this using DOS-style short mode. If the path
8717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8718  # take no chances and rewrite it.
8719  # Note: m4 eats our [], so we need to use [ and ] instead.
8720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8721  if test "x$has_forbidden_chars" != x; then
8722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8726      # Going to short mode and back again did indeed matter. Since short mode is
8727      # case insensitive, let's make it lowercase to improve readability.
8728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8729      # Now convert it back to Unix-stile (cygpath)
8730      input_path=`$CYGPATH -u "$shortmode_path"`
8731      new_path="$input_path"
8732    fi
8733  fi
8734
8735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8736  if test "x$test_cygdrive_prefix" = x; then
8737    # As a simple fix, exclude /usr/bin since it's not a real path.
8738    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8740      # a path prefixed by /cygdrive for fixpath to work.
8741      new_path="$CYGWIN_ROOT_PATH$input_path"
8742    fi
8743  fi
8744
8745  # remove trailing .exe if any
8746  new_path="${new_path/%.exe/}"
8747
8748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8749
8750  # First separate the path from the arguments. This will split at the first
8751  # space.
8752  complete="$FOUND_MAKE"
8753  path="${complete%% *}"
8754  tmp="$complete EOL"
8755  arguments="${tmp#* }"
8756
8757  # Input might be given as Windows format, start by converting to
8758  # unix format.
8759  new_path="$path"
8760
8761  windows_path="$new_path"
8762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8763    unix_path=`$CYGPATH -u "$windows_path"`
8764    new_path="$unix_path"
8765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8767    new_path="$unix_path"
8768  fi
8769
8770
8771  # Now try to locate executable using which
8772  new_path=`$WHICH "$new_path" 2> /dev/null`
8773
8774  if test "x$new_path" = x; then
8775    # Oops. Which didn't find the executable.
8776    # The splitting of arguments from the executable at a space might have been incorrect,
8777    # since paths with space are more likely in Windows. Give it another try with the whole
8778    # argument.
8779    path="$complete"
8780    arguments="EOL"
8781    new_path="$path"
8782
8783  windows_path="$new_path"
8784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8785    unix_path=`$CYGPATH -u "$windows_path"`
8786    new_path="$unix_path"
8787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8789    new_path="$unix_path"
8790  fi
8791
8792
8793    new_path=`$WHICH "$new_path" 2> /dev/null`
8794
8795    if test "x$new_path" = x; then
8796      # It's still not found. Now this is an unrecoverable error.
8797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8798$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8799      has_space=`$ECHO "$complete" | $GREP " "`
8800      if test "x$has_space" != x; then
8801        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8802$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8803      fi
8804      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8805    fi
8806  fi
8807
8808  # Now new_path has a complete unix path to the binary
8809  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8810    # Keep paths in /bin as-is, but remove trailing .exe if any
8811    new_path="${new_path/%.exe/}"
8812    # Do not save /bin paths to all_fixpath_prefixes!
8813  else
8814    # Not in mixed or Windows style, start by that.
8815    new_path=`cmd //c echo $new_path`
8816
8817  input_path="$new_path"
8818  # Check if we need to convert this using DOS-style short mode. If the path
8819  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8820  # take no chances and rewrite it.
8821  # Note: m4 eats our [], so we need to use [ and ] instead.
8822  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8823  if test "x$has_forbidden_chars" != x; then
8824    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8825    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8826  fi
8827
8828    # Output is in $new_path
8829
8830  windows_path="$new_path"
8831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8832    unix_path=`$CYGPATH -u "$windows_path"`
8833    new_path="$unix_path"
8834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8836    new_path="$unix_path"
8837  fi
8838
8839    # remove trailing .exe if any
8840    new_path="${new_path/%.exe/}"
8841
8842    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8843    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8844  fi
8845
8846  else
8847    # We're on a posix platform. Hooray! :)
8848    # First separate the path from the arguments. This will split at the first
8849    # space.
8850    complete="$FOUND_MAKE"
8851    path="${complete%% *}"
8852    tmp="$complete EOL"
8853    arguments="${tmp#* }"
8854
8855    new_path=`$WHICH $path 2> /dev/null`
8856    if test "x$new_path" = x; then
8857      is_absolute_path=`$ECHO "$path" | $GREP ^/`
8858      if test "x$is_absolute_path" != x; then
8859        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
8860$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
8861        new_path="$path"
8862      else
8863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8864$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8865        has_space=`$ECHO "$complete" | $GREP " "`
8866        if test "x$has_space" != x; then
8867          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8868$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8869        fi
8870        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8871      fi
8872    fi
8873  fi
8874
8875  # Now join together the path and the arguments once again
8876  if test "x$arguments" != xEOL; then
8877      new_complete="$new_path ${arguments% *}"
8878  else
8879      new_complete="$new_path"
8880  fi
8881
8882  if test "x$complete" != "x$new_complete"; then
8883    FOUND_MAKE="$new_complete"
8884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8885$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8886  fi
8887
8888        fi
8889      fi
8890    fi
8891  fi
8892
8893    fi
8894
8895    if test "x$FOUND_MAKE" = x; then
8896      if test "x$TOOLS_DIR" != x; then
8897        # We have a tools-dir, check that as well before giving up.
8898        OLD_PATH=$PATH
8899        PATH=$TOOLS_DIR:$PATH
8900        for ac_prog in gmake
8901do
8902  # Extract the first word of "$ac_prog", so it can be a program name with args.
8903set dummy $ac_prog; ac_word=$2
8904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8905$as_echo_n "checking for $ac_word... " >&6; }
8906if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
8907  $as_echo_n "(cached) " >&6
8908else
8909  case $CHECK_TOOLSDIR_GMAKE in
8910  [\\/]* | ?:[\\/]*)
8911  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
8912  ;;
8913  *)
8914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8915for as_dir in $PATH
8916do
8917  IFS=$as_save_IFS
8918  test -z "$as_dir" && as_dir=.
8919    for ac_exec_ext in '' $ac_executable_extensions; do
8920  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8921    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8923    break 2
8924  fi
8925done
8926  done
8927IFS=$as_save_IFS
8928
8929  ;;
8930esac
8931fi
8932CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
8933if test -n "$CHECK_TOOLSDIR_GMAKE"; then
8934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
8935$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
8936else
8937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8938$as_echo "no" >&6; }
8939fi
8940
8941
8942  test -n "$CHECK_TOOLSDIR_GMAKE" && break
8943done
8944
8945
8946  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
8947  DESCRIPTION="gmake in tools-dir"
8948  if test "x$MAKE_CANDIDATE" != x; then
8949    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8950$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8951    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8952    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8953    if test "x$IS_GNU_MAKE" = x; then
8954      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8955$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8956    else
8957      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8958      if test "x$IS_MODERN_MAKE" = x; then
8959        { $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
8960$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;}
8961      else
8962        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8963          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8964            MAKE_EXPECTED_ENV='cygwin'
8965          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8966            MAKE_EXPECTED_ENV='msys'
8967          else
8968            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8969          fi
8970          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8971          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8972        else
8973          # Not relevant for non-Windows
8974          IS_MAKE_CORRECT_ENV=true
8975        fi
8976        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8977          { $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
8978$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;}
8979        else
8980          FOUND_MAKE=$MAKE_CANDIDATE
8981
8982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8983
8984  # First separate the path from the arguments. This will split at the first
8985  # space.
8986  complete="$FOUND_MAKE"
8987  path="${complete%% *}"
8988  tmp="$complete EOL"
8989  arguments="${tmp#* }"
8990
8991  # Input might be given as Windows format, start by converting to
8992  # unix format.
8993  new_path=`$CYGPATH -u "$path"`
8994
8995  # Now try to locate executable using which
8996  new_path=`$WHICH "$new_path" 2> /dev/null`
8997  # bat and cmd files are not always considered executable in cygwin causing which
8998  # to not find them
8999  if test "x$new_path" = x \
9000           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9001           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9002    new_path=`$CYGPATH -u "$path"`
9003  fi
9004  if test "x$new_path" = x; then
9005    # Oops. Which didn't find the executable.
9006    # The splitting of arguments from the executable at a space might have been incorrect,
9007    # since paths with space are more likely in Windows. Give it another try with the whole
9008    # argument.
9009    path="$complete"
9010    arguments="EOL"
9011    new_path=`$CYGPATH -u "$path"`
9012    new_path=`$WHICH "$new_path" 2> /dev/null`
9013    # bat and cmd files are not always considered executable in cygwin causing which
9014    # to not find them
9015    if test "x$new_path" = x \
9016             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9017             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9018      new_path=`$CYGPATH -u "$path"`
9019    fi
9020    if test "x$new_path" = x; then
9021      # It's still not found. Now this is an unrecoverable error.
9022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9023$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9024      has_space=`$ECHO "$complete" | $GREP " "`
9025      if test "x$has_space" != x; then
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9028      fi
9029      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9030    fi
9031  fi
9032
9033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9036  # "foo.exe" is OK but "foo" is an error.
9037  #
9038  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9039  # It is also a way to make sure we got the proper file name for the real test later on.
9040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9041  if test "x$test_shortpath" = x; then
9042    # Short path failed, file does not exist as specified.
9043    # Try adding .exe or .cmd
9044    if test -f "${new_path}.exe"; then
9045       input_to_shortpath="${new_path}.exe"
9046    elif test -f "${new_path}.cmd"; then
9047       input_to_shortpath="${new_path}.cmd"
9048    else
9049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9051      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9052$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9053      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9054    fi
9055  else
9056    input_to_shortpath="$new_path"
9057  fi
9058
9059  # Call helper function which possibly converts this using DOS-style short mode.
9060  # If so, the updated path is stored in $new_path.
9061  new_path="$input_to_shortpath"
9062
9063  input_path="$input_to_shortpath"
9064  # Check if we need to convert this using DOS-style short mode. If the path
9065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9066  # take no chances and rewrite it.
9067  # Note: m4 eats our [], so we need to use [ and ] instead.
9068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9069  if test "x$has_forbidden_chars" != x; then
9070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9074      # Going to short mode and back again did indeed matter. Since short mode is
9075      # case insensitive, let's make it lowercase to improve readability.
9076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9077      # Now convert it back to Unix-stile (cygpath)
9078      input_path=`$CYGPATH -u "$shortmode_path"`
9079      new_path="$input_path"
9080    fi
9081  fi
9082
9083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9084  if test "x$test_cygdrive_prefix" = x; then
9085    # As a simple fix, exclude /usr/bin since it's not a real path.
9086    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9088      # a path prefixed by /cygdrive for fixpath to work.
9089      new_path="$CYGWIN_ROOT_PATH$input_path"
9090    fi
9091  fi
9092
9093  # remove trailing .exe if any
9094  new_path="${new_path/%.exe/}"
9095
9096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9097
9098  # First separate the path from the arguments. This will split at the first
9099  # space.
9100  complete="$FOUND_MAKE"
9101  path="${complete%% *}"
9102  tmp="$complete EOL"
9103  arguments="${tmp#* }"
9104
9105  # Input might be given as Windows format, start by converting to
9106  # unix format.
9107  new_path="$path"
9108
9109  windows_path="$new_path"
9110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9111    unix_path=`$CYGPATH -u "$windows_path"`
9112    new_path="$unix_path"
9113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9115    new_path="$unix_path"
9116  fi
9117
9118
9119  # Now try to locate executable using which
9120  new_path=`$WHICH "$new_path" 2> /dev/null`
9121
9122  if test "x$new_path" = x; then
9123    # Oops. Which didn't find the executable.
9124    # The splitting of arguments from the executable at a space might have been incorrect,
9125    # since paths with space are more likely in Windows. Give it another try with the whole
9126    # argument.
9127    path="$complete"
9128    arguments="EOL"
9129    new_path="$path"
9130
9131  windows_path="$new_path"
9132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9133    unix_path=`$CYGPATH -u "$windows_path"`
9134    new_path="$unix_path"
9135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9137    new_path="$unix_path"
9138  fi
9139
9140
9141    new_path=`$WHICH "$new_path" 2> /dev/null`
9142
9143    if test "x$new_path" = x; then
9144      # It's still not found. Now this is an unrecoverable error.
9145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9146$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9147      has_space=`$ECHO "$complete" | $GREP " "`
9148      if test "x$has_space" != x; then
9149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9151      fi
9152      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9153    fi
9154  fi
9155
9156  # Now new_path has a complete unix path to the binary
9157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9158    # Keep paths in /bin as-is, but remove trailing .exe if any
9159    new_path="${new_path/%.exe/}"
9160    # Do not save /bin paths to all_fixpath_prefixes!
9161  else
9162    # Not in mixed or Windows style, start by that.
9163    new_path=`cmd //c echo $new_path`
9164
9165  input_path="$new_path"
9166  # Check if we need to convert this using DOS-style short mode. If the path
9167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9168  # take no chances and rewrite it.
9169  # Note: m4 eats our [], so we need to use [ and ] instead.
9170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9171  if test "x$has_forbidden_chars" != x; then
9172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9174  fi
9175
9176    # Output is in $new_path
9177
9178  windows_path="$new_path"
9179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9180    unix_path=`$CYGPATH -u "$windows_path"`
9181    new_path="$unix_path"
9182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9184    new_path="$unix_path"
9185  fi
9186
9187    # remove trailing .exe if any
9188    new_path="${new_path/%.exe/}"
9189
9190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9192  fi
9193
9194  else
9195    # We're on a posix platform. Hooray! :)
9196    # First separate the path from the arguments. This will split at the first
9197    # space.
9198    complete="$FOUND_MAKE"
9199    path="${complete%% *}"
9200    tmp="$complete EOL"
9201    arguments="${tmp#* }"
9202
9203    new_path=`$WHICH $path 2> /dev/null`
9204    if test "x$new_path" = x; then
9205      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9206      if test "x$is_absolute_path" != x; then
9207        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9208$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9209        new_path="$path"
9210      else
9211        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9212$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9213        has_space=`$ECHO "$complete" | $GREP " "`
9214        if test "x$has_space" != x; then
9215          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9216$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9217        fi
9218        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9219      fi
9220    fi
9221  fi
9222
9223  # Now join together the path and the arguments once again
9224  if test "x$arguments" != xEOL; then
9225      new_complete="$new_path ${arguments% *}"
9226  else
9227      new_complete="$new_path"
9228  fi
9229
9230  if test "x$complete" != "x$new_complete"; then
9231    FOUND_MAKE="$new_complete"
9232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9233$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9234  fi
9235
9236        fi
9237      fi
9238    fi
9239  fi
9240
9241        if test "x$FOUND_MAKE" = x; then
9242          for ac_prog in make
9243do
9244  # Extract the first word of "$ac_prog", so it can be a program name with args.
9245set dummy $ac_prog; ac_word=$2
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9247$as_echo_n "checking for $ac_word... " >&6; }
9248if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9249  $as_echo_n "(cached) " >&6
9250else
9251  case $CHECK_TOOLSDIR_MAKE in
9252  [\\/]* | ?:[\\/]*)
9253  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9254  ;;
9255  *)
9256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9257for as_dir in $PATH
9258do
9259  IFS=$as_save_IFS
9260  test -z "$as_dir" && as_dir=.
9261    for ac_exec_ext in '' $ac_executable_extensions; do
9262  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9263    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9265    break 2
9266  fi
9267done
9268  done
9269IFS=$as_save_IFS
9270
9271  ;;
9272esac
9273fi
9274CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9275if test -n "$CHECK_TOOLSDIR_MAKE"; then
9276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9277$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9278else
9279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9280$as_echo "no" >&6; }
9281fi
9282
9283
9284  test -n "$CHECK_TOOLSDIR_MAKE" && break
9285done
9286
9287
9288  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9289  DESCRIPTION="make in tools-dir"
9290  if test "x$MAKE_CANDIDATE" != x; then
9291    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9292$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9293    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9294    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9295    if test "x$IS_GNU_MAKE" = x; then
9296      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9297$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9298    else
9299      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9300      if test "x$IS_MODERN_MAKE" = x; then
9301        { $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
9302$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;}
9303      else
9304        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9305          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9306            MAKE_EXPECTED_ENV='cygwin'
9307          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9308            MAKE_EXPECTED_ENV='msys'
9309          else
9310            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9311          fi
9312          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9313          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9314        else
9315          # Not relevant for non-Windows
9316          IS_MAKE_CORRECT_ENV=true
9317        fi
9318        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9319          { $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
9320$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;}
9321        else
9322          FOUND_MAKE=$MAKE_CANDIDATE
9323
9324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9325
9326  # First separate the path from the arguments. This will split at the first
9327  # space.
9328  complete="$FOUND_MAKE"
9329  path="${complete%% *}"
9330  tmp="$complete EOL"
9331  arguments="${tmp#* }"
9332
9333  # Input might be given as Windows format, start by converting to
9334  # unix format.
9335  new_path=`$CYGPATH -u "$path"`
9336
9337  # Now try to locate executable using which
9338  new_path=`$WHICH "$new_path" 2> /dev/null`
9339  # bat and cmd files are not always considered executable in cygwin causing which
9340  # to not find them
9341  if test "x$new_path" = x \
9342           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9343           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9344    new_path=`$CYGPATH -u "$path"`
9345  fi
9346  if test "x$new_path" = x; then
9347    # Oops. Which didn't find the executable.
9348    # The splitting of arguments from the executable at a space might have been incorrect,
9349    # since paths with space are more likely in Windows. Give it another try with the whole
9350    # argument.
9351    path="$complete"
9352    arguments="EOL"
9353    new_path=`$CYGPATH -u "$path"`
9354    new_path=`$WHICH "$new_path" 2> /dev/null`
9355    # bat and cmd files are not always considered executable in cygwin causing which
9356    # to not find them
9357    if test "x$new_path" = x \
9358             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9359             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9360      new_path=`$CYGPATH -u "$path"`
9361    fi
9362    if test "x$new_path" = x; then
9363      # It's still not found. Now this is an unrecoverable error.
9364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9365$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9366      has_space=`$ECHO "$complete" | $GREP " "`
9367      if test "x$has_space" != x; then
9368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9370      fi
9371      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9372    fi
9373  fi
9374
9375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9378  # "foo.exe" is OK but "foo" is an error.
9379  #
9380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9381  # It is also a way to make sure we got the proper file name for the real test later on.
9382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9383  if test "x$test_shortpath" = x; then
9384    # Short path failed, file does not exist as specified.
9385    # Try adding .exe or .cmd
9386    if test -f "${new_path}.exe"; then
9387       input_to_shortpath="${new_path}.exe"
9388    elif test -f "${new_path}.cmd"; then
9389       input_to_shortpath="${new_path}.cmd"
9390    else
9391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9392$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9393      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9394$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9395      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9396    fi
9397  else
9398    input_to_shortpath="$new_path"
9399  fi
9400
9401  # Call helper function which possibly converts this using DOS-style short mode.
9402  # If so, the updated path is stored in $new_path.
9403  new_path="$input_to_shortpath"
9404
9405  input_path="$input_to_shortpath"
9406  # Check if we need to convert this using DOS-style short mode. If the path
9407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9408  # take no chances and rewrite it.
9409  # Note: m4 eats our [], so we need to use [ and ] instead.
9410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9411  if test "x$has_forbidden_chars" != x; then
9412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9416      # Going to short mode and back again did indeed matter. Since short mode is
9417      # case insensitive, let's make it lowercase to improve readability.
9418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9419      # Now convert it back to Unix-stile (cygpath)
9420      input_path=`$CYGPATH -u "$shortmode_path"`
9421      new_path="$input_path"
9422    fi
9423  fi
9424
9425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9426  if test "x$test_cygdrive_prefix" = x; then
9427    # As a simple fix, exclude /usr/bin since it's not a real path.
9428    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9430      # a path prefixed by /cygdrive for fixpath to work.
9431      new_path="$CYGWIN_ROOT_PATH$input_path"
9432    fi
9433  fi
9434
9435  # remove trailing .exe if any
9436  new_path="${new_path/%.exe/}"
9437
9438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9439
9440  # First separate the path from the arguments. This will split at the first
9441  # space.
9442  complete="$FOUND_MAKE"
9443  path="${complete%% *}"
9444  tmp="$complete EOL"
9445  arguments="${tmp#* }"
9446
9447  # Input might be given as Windows format, start by converting to
9448  # unix format.
9449  new_path="$path"
9450
9451  windows_path="$new_path"
9452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9453    unix_path=`$CYGPATH -u "$windows_path"`
9454    new_path="$unix_path"
9455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9457    new_path="$unix_path"
9458  fi
9459
9460
9461  # Now try to locate executable using which
9462  new_path=`$WHICH "$new_path" 2> /dev/null`
9463
9464  if test "x$new_path" = x; then
9465    # Oops. Which didn't find the executable.
9466    # The splitting of arguments from the executable at a space might have been incorrect,
9467    # since paths with space are more likely in Windows. Give it another try with the whole
9468    # argument.
9469    path="$complete"
9470    arguments="EOL"
9471    new_path="$path"
9472
9473  windows_path="$new_path"
9474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9475    unix_path=`$CYGPATH -u "$windows_path"`
9476    new_path="$unix_path"
9477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9479    new_path="$unix_path"
9480  fi
9481
9482
9483    new_path=`$WHICH "$new_path" 2> /dev/null`
9484
9485    if test "x$new_path" = x; then
9486      # It's still not found. Now this is an unrecoverable error.
9487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9488$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9489      has_space=`$ECHO "$complete" | $GREP " "`
9490      if test "x$has_space" != x; then
9491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9493      fi
9494      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9495    fi
9496  fi
9497
9498  # Now new_path has a complete unix path to the binary
9499  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9500    # Keep paths in /bin as-is, but remove trailing .exe if any
9501    new_path="${new_path/%.exe/}"
9502    # Do not save /bin paths to all_fixpath_prefixes!
9503  else
9504    # Not in mixed or Windows style, start by that.
9505    new_path=`cmd //c echo $new_path`
9506
9507  input_path="$new_path"
9508  # Check if we need to convert this using DOS-style short mode. If the path
9509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9510  # take no chances and rewrite it.
9511  # Note: m4 eats our [], so we need to use [ and ] instead.
9512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9513  if test "x$has_forbidden_chars" != x; then
9514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9516  fi
9517
9518    # Output is in $new_path
9519
9520  windows_path="$new_path"
9521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9522    unix_path=`$CYGPATH -u "$windows_path"`
9523    new_path="$unix_path"
9524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9526    new_path="$unix_path"
9527  fi
9528
9529    # remove trailing .exe if any
9530    new_path="${new_path/%.exe/}"
9531
9532    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9533    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9534  fi
9535
9536  else
9537    # We're on a posix platform. Hooray! :)
9538    # First separate the path from the arguments. This will split at the first
9539    # space.
9540    complete="$FOUND_MAKE"
9541    path="${complete%% *}"
9542    tmp="$complete EOL"
9543    arguments="${tmp#* }"
9544
9545    new_path=`$WHICH $path 2> /dev/null`
9546    if test "x$new_path" = x; then
9547      is_absolute_path=`$ECHO "$path" | $GREP ^/`
9548      if test "x$is_absolute_path" != x; then
9549        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&5
9550$as_echo "$as_me: Resolving FOUND_MAKE (as $path) with 'which' failed, using $path directly." >&6;}
9551        new_path="$path"
9552      else
9553        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9554$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9555        has_space=`$ECHO "$complete" | $GREP " "`
9556        if test "x$has_space" != x; then
9557          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9559        fi
9560        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9561      fi
9562    fi
9563  fi
9564
9565  # Now join together the path and the arguments once again
9566  if test "x$arguments" != xEOL; then
9567      new_complete="$new_path ${arguments% *}"
9568  else
9569      new_complete="$new_path"
9570  fi
9571
9572  if test "x$complete" != "x$new_complete"; then
9573    FOUND_MAKE="$new_complete"
9574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9575$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9576  fi
9577
9578        fi
9579      fi
9580    fi
9581  fi
9582
9583        fi
9584        PATH=$OLD_PATH
9585      fi
9586    fi
9587
9588    if test "x$FOUND_MAKE" = x; then
9589      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
9590    fi
9591  fi
9592
9593  MAKE=$FOUND_MAKE
9594
9595  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9596$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9597
9598
9599
9600    # Test if find supports -delete
9601    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9602$as_echo_n "checking if find supports -delete... " >&6; }
9603    FIND_DELETE="-delete"
9604
9605    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9606
9607    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9608
9609    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9610    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9611        # No, it does not.
9612        rm $DELETEDIR/TestIfFindSupportsDelete
9613        FIND_DELETE="-exec rm \{\} \+"
9614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9615$as_echo "no" >&6; }
9616    else
9617        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9618$as_echo "yes" >&6; }
9619    fi
9620    rmdir $DELETEDIR
9621
9622
9623
9624# These tools might not be installed by default,
9625# need hint on how to install them.
9626
9627    for ac_prog in unzip
9628do
9629  # Extract the first word of "$ac_prog", so it can be a program name with args.
9630set dummy $ac_prog; ac_word=$2
9631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9632$as_echo_n "checking for $ac_word... " >&6; }
9633if test "${ac_cv_path_UNZIP+set}" = set; then :
9634  $as_echo_n "(cached) " >&6
9635else
9636  case $UNZIP in
9637  [\\/]* | ?:[\\/]*)
9638  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9639  ;;
9640  *)
9641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9642for as_dir in $PATH
9643do
9644  IFS=$as_save_IFS
9645  test -z "$as_dir" && as_dir=.
9646    for ac_exec_ext in '' $ac_executable_extensions; do
9647  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9648    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9650    break 2
9651  fi
9652done
9653  done
9654IFS=$as_save_IFS
9655
9656  ;;
9657esac
9658fi
9659UNZIP=$ac_cv_path_UNZIP
9660if test -n "$UNZIP"; then
9661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9662$as_echo "$UNZIP" >&6; }
9663else
9664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9665$as_echo "no" >&6; }
9666fi
9667
9668
9669  test -n "$UNZIP" && break
9670done
9671
9672
9673    if test "x$UNZIP" = x; then
9674        if test "xunzip" = x; then
9675          PROG_NAME=unzip
9676        else
9677          PROG_NAME=unzip
9678        fi
9679        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9680$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9681        as_fn_error $? "Cannot continue" "$LINENO" 5
9682    fi
9683
9684
9685
9686    for ac_prog in zip
9687do
9688  # Extract the first word of "$ac_prog", so it can be a program name with args.
9689set dummy $ac_prog; ac_word=$2
9690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9691$as_echo_n "checking for $ac_word... " >&6; }
9692if test "${ac_cv_path_ZIP+set}" = set; then :
9693  $as_echo_n "(cached) " >&6
9694else
9695  case $ZIP in
9696  [\\/]* | ?:[\\/]*)
9697  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9698  ;;
9699  *)
9700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9701for as_dir in $PATH
9702do
9703  IFS=$as_save_IFS
9704  test -z "$as_dir" && as_dir=.
9705    for ac_exec_ext in '' $ac_executable_extensions; do
9706  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9707    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9709    break 2
9710  fi
9711done
9712  done
9713IFS=$as_save_IFS
9714
9715  ;;
9716esac
9717fi
9718ZIP=$ac_cv_path_ZIP
9719if test -n "$ZIP"; then
9720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9721$as_echo "$ZIP" >&6; }
9722else
9723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9724$as_echo "no" >&6; }
9725fi
9726
9727
9728  test -n "$ZIP" && break
9729done
9730
9731
9732    if test "x$ZIP" = x; then
9733        if test "xzip" = x; then
9734          PROG_NAME=zip
9735        else
9736          PROG_NAME=zip
9737        fi
9738        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9739$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9740        as_fn_error $? "Cannot continue" "$LINENO" 5
9741    fi
9742
9743
9744
9745# Non-required basic tools
9746
9747# Extract the first word of "ldd", so it can be a program name with args.
9748set dummy ldd; ac_word=$2
9749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9750$as_echo_n "checking for $ac_word... " >&6; }
9751if test "${ac_cv_path_LDD+set}" = set; then :
9752  $as_echo_n "(cached) " >&6
9753else
9754  case $LDD in
9755  [\\/]* | ?:[\\/]*)
9756  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
9757  ;;
9758  *)
9759  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9760for as_dir in $PATH
9761do
9762  IFS=$as_save_IFS
9763  test -z "$as_dir" && as_dir=.
9764    for ac_exec_ext in '' $ac_executable_extensions; do
9765  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9766    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
9767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9768    break 2
9769  fi
9770done
9771  done
9772IFS=$as_save_IFS
9773
9774  ;;
9775esac
9776fi
9777LDD=$ac_cv_path_LDD
9778if test -n "$LDD"; then
9779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
9780$as_echo "$LDD" >&6; }
9781else
9782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9783$as_echo "no" >&6; }
9784fi
9785
9786
9787if test "x$LDD" = "x"; then
9788    # List shared lib dependencies is used for
9789    # debug output and checking for forbidden dependencies.
9790    # We can build without it.
9791    LDD="true"
9792fi
9793# Extract the first word of "otool", so it can be a program name with args.
9794set dummy otool; ac_word=$2
9795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9796$as_echo_n "checking for $ac_word... " >&6; }
9797if test "${ac_cv_path_OTOOL+set}" = set; then :
9798  $as_echo_n "(cached) " >&6
9799else
9800  case $OTOOL in
9801  [\\/]* | ?:[\\/]*)
9802  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
9803  ;;
9804  *)
9805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9806for as_dir in $PATH
9807do
9808  IFS=$as_save_IFS
9809  test -z "$as_dir" && as_dir=.
9810    for ac_exec_ext in '' $ac_executable_extensions; do
9811  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9812    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
9813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9814    break 2
9815  fi
9816done
9817  done
9818IFS=$as_save_IFS
9819
9820  ;;
9821esac
9822fi
9823OTOOL=$ac_cv_path_OTOOL
9824if test -n "$OTOOL"; then
9825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
9826$as_echo "$OTOOL" >&6; }
9827else
9828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9829$as_echo "no" >&6; }
9830fi
9831
9832
9833if test "x$OTOOL" = "x"; then
9834   OTOOL="true"
9835fi
9836for ac_prog in readelf greadelf
9837do
9838  # Extract the first word of "$ac_prog", so it can be a program name with args.
9839set dummy $ac_prog; ac_word=$2
9840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9841$as_echo_n "checking for $ac_word... " >&6; }
9842if test "${ac_cv_path_READELF+set}" = set; then :
9843  $as_echo_n "(cached) " >&6
9844else
9845  case $READELF in
9846  [\\/]* | ?:[\\/]*)
9847  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
9848  ;;
9849  *)
9850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9851for as_dir in $PATH
9852do
9853  IFS=$as_save_IFS
9854  test -z "$as_dir" && as_dir=.
9855    for ac_exec_ext in '' $ac_executable_extensions; do
9856  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9857    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
9858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9859    break 2
9860  fi
9861done
9862  done
9863IFS=$as_save_IFS
9864
9865  ;;
9866esac
9867fi
9868READELF=$ac_cv_path_READELF
9869if test -n "$READELF"; then
9870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
9871$as_echo "$READELF" >&6; }
9872else
9873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9874$as_echo "no" >&6; }
9875fi
9876
9877
9878  test -n "$READELF" && break
9879done
9880
9881# Extract the first word of "hg", so it can be a program name with args.
9882set dummy hg; ac_word=$2
9883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9884$as_echo_n "checking for $ac_word... " >&6; }
9885if test "${ac_cv_path_HG+set}" = set; then :
9886  $as_echo_n "(cached) " >&6
9887else
9888  case $HG in
9889  [\\/]* | ?:[\\/]*)
9890  ac_cv_path_HG="$HG" # Let the user override the test with a path.
9891  ;;
9892  *)
9893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9894for as_dir in $PATH
9895do
9896  IFS=$as_save_IFS
9897  test -z "$as_dir" && as_dir=.
9898    for ac_exec_ext in '' $ac_executable_extensions; do
9899  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9900    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
9901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9902    break 2
9903  fi
9904done
9905  done
9906IFS=$as_save_IFS
9907
9908  ;;
9909esac
9910fi
9911HG=$ac_cv_path_HG
9912if test -n "$HG"; then
9913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
9914$as_echo "$HG" >&6; }
9915else
9916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9917$as_echo "no" >&6; }
9918fi
9919
9920
9921# Extract the first word of "stat", so it can be a program name with args.
9922set dummy stat; ac_word=$2
9923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9924$as_echo_n "checking for $ac_word... " >&6; }
9925if test "${ac_cv_path_STAT+set}" = set; then :
9926  $as_echo_n "(cached) " >&6
9927else
9928  case $STAT in
9929  [\\/]* | ?:[\\/]*)
9930  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
9931  ;;
9932  *)
9933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9934for as_dir in $PATH
9935do
9936  IFS=$as_save_IFS
9937  test -z "$as_dir" && as_dir=.
9938    for ac_exec_ext in '' $ac_executable_extensions; do
9939  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9940    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
9941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9942    break 2
9943  fi
9944done
9945  done
9946IFS=$as_save_IFS
9947
9948  ;;
9949esac
9950fi
9951STAT=$ac_cv_path_STAT
9952if test -n "$STAT"; then
9953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
9954$as_echo "$STAT" >&6; }
9955else
9956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9957$as_echo "no" >&6; }
9958fi
9959
9960
9961# Extract the first word of "time", so it can be a program name with args.
9962set dummy time; ac_word=$2
9963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9964$as_echo_n "checking for $ac_word... " >&6; }
9965if test "${ac_cv_path_TIME+set}" = set; then :
9966  $as_echo_n "(cached) " >&6
9967else
9968  case $TIME in
9969  [\\/]* | ?:[\\/]*)
9970  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
9971  ;;
9972  *)
9973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9974for as_dir in $PATH
9975do
9976  IFS=$as_save_IFS
9977  test -z "$as_dir" && as_dir=.
9978    for ac_exec_ext in '' $ac_executable_extensions; do
9979  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9980    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
9981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9982    break 2
9983  fi
9984done
9985  done
9986IFS=$as_save_IFS
9987
9988  ;;
9989esac
9990fi
9991TIME=$ac_cv_path_TIME
9992if test -n "$TIME"; then
9993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
9994$as_echo "$TIME" >&6; }
9995else
9996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9997$as_echo "no" >&6; }
9998fi
9999
10000
10001
10002if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10003
10004    for ac_prog in comm
10005do
10006  # Extract the first word of "$ac_prog", so it can be a program name with args.
10007set dummy $ac_prog; ac_word=$2
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10009$as_echo_n "checking for $ac_word... " >&6; }
10010if test "${ac_cv_path_COMM+set}" = set; then :
10011  $as_echo_n "(cached) " >&6
10012else
10013  case $COMM in
10014  [\\/]* | ?:[\\/]*)
10015  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10016  ;;
10017  *)
10018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10019for as_dir in $PATH
10020do
10021  IFS=$as_save_IFS
10022  test -z "$as_dir" && as_dir=.
10023    for ac_exec_ext in '' $ac_executable_extensions; do
10024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10025    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10027    break 2
10028  fi
10029done
10030  done
10031IFS=$as_save_IFS
10032
10033  ;;
10034esac
10035fi
10036COMM=$ac_cv_path_COMM
10037if test -n "$COMM"; then
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10039$as_echo "$COMM" >&6; }
10040else
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043fi
10044
10045
10046  test -n "$COMM" && break
10047done
10048
10049
10050    if test "x$COMM" = x; then
10051        if test "xcomm" = x; then
10052          PROG_NAME=comm
10053        else
10054          PROG_NAME=comm
10055        fi
10056        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10057$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10058        as_fn_error $? "Cannot continue" "$LINENO" 5
10059    fi
10060
10061
10062fi
10063
10064
10065# Check if pkg-config is available.
10066
10067
10068if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10069	if test -n "$ac_tool_prefix"; then
10070  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10071set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10073$as_echo_n "checking for $ac_word... " >&6; }
10074if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10075  $as_echo_n "(cached) " >&6
10076else
10077  case $PKG_CONFIG in
10078  [\\/]* | ?:[\\/]*)
10079  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10080  ;;
10081  *)
10082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10083for as_dir in $PATH
10084do
10085  IFS=$as_save_IFS
10086  test -z "$as_dir" && as_dir=.
10087    for ac_exec_ext in '' $ac_executable_extensions; do
10088  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10089    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10091    break 2
10092  fi
10093done
10094  done
10095IFS=$as_save_IFS
10096
10097  ;;
10098esac
10099fi
10100PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10101if test -n "$PKG_CONFIG"; then
10102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10103$as_echo "$PKG_CONFIG" >&6; }
10104else
10105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10106$as_echo "no" >&6; }
10107fi
10108
10109
10110fi
10111if test -z "$ac_cv_path_PKG_CONFIG"; then
10112  ac_pt_PKG_CONFIG=$PKG_CONFIG
10113  # Extract the first word of "pkg-config", so it can be a program name with args.
10114set dummy pkg-config; ac_word=$2
10115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10116$as_echo_n "checking for $ac_word... " >&6; }
10117if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10118  $as_echo_n "(cached) " >&6
10119else
10120  case $ac_pt_PKG_CONFIG in
10121  [\\/]* | ?:[\\/]*)
10122  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10123  ;;
10124  *)
10125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10126for as_dir in $PATH
10127do
10128  IFS=$as_save_IFS
10129  test -z "$as_dir" && as_dir=.
10130    for ac_exec_ext in '' $ac_executable_extensions; do
10131  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10132    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10134    break 2
10135  fi
10136done
10137  done
10138IFS=$as_save_IFS
10139
10140  ;;
10141esac
10142fi
10143ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10144if test -n "$ac_pt_PKG_CONFIG"; then
10145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10146$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10147else
10148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10149$as_echo "no" >&6; }
10150fi
10151
10152  if test "x$ac_pt_PKG_CONFIG" = x; then
10153    PKG_CONFIG=""
10154  else
10155    case $cross_compiling:$ac_tool_warned in
10156yes:)
10157{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10158$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10159ac_tool_warned=yes ;;
10160esac
10161    PKG_CONFIG=$ac_pt_PKG_CONFIG
10162  fi
10163else
10164  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10165fi
10166
10167fi
10168if test -n "$PKG_CONFIG"; then
10169	_pkg_min_version=0.9.0
10170	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10171$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10172	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10173		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10174$as_echo "yes" >&6; }
10175	else
10176		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10177$as_echo "no" >&6; }
10178		PKG_CONFIG=""
10179	fi
10180
10181fi
10182
10183# After basic tools have been setup, we can check build os specific details.
10184
10185###############################################################################
10186
10187# Note that this is the build platform OS version!
10188
10189OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10190OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10191OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10192OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10193
10194
10195
10196
10197
10198# Setup builddeps, for automatic downloading of tools we need.
10199# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10200# boot-jdk setup, but we need to have basic tools setup first.
10201
10202
10203# Check whether --with-builddeps-conf was given.
10204if test "${with_builddeps_conf+set}" = set; then :
10205  withval=$with_builddeps_conf;
10206fi
10207
10208
10209
10210# Check whether --with-builddeps-server was given.
10211if test "${with_builddeps_server+set}" = set; then :
10212  withval=$with_builddeps_server;
10213fi
10214
10215
10216
10217# Check whether --with-builddeps-dir was given.
10218if test "${with_builddeps_dir+set}" = set; then :
10219  withval=$with_builddeps_dir;
10220else
10221  with_builddeps_dir=/localhome/builddeps
10222fi
10223
10224
10225
10226# Check whether --with-builddeps-group was given.
10227if test "${with_builddeps_group+set}" = set; then :
10228  withval=$with_builddeps_group;
10229fi
10230
10231
10232
10233
10234    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10235        if test "x$with_builddeps_conf" != x; then
10236            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10237$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10238            builddepsfile=$with_builddeps_conf
10239            if test -s $builddepsfile; then
10240                . $builddepsfile
10241                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10242$as_echo "loaded!" >&6; }
10243            else
10244               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10245           fi
10246        else
10247            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10248$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10249            builddepsfile=`mktemp`
10250            touch $builddepsfile
10251            # Put all found confs into a single file.
10252            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10253            # Source the file to acquire the variables
10254            if test -s $builddepsfile; then
10255                . $builddepsfile
10256                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10257$as_echo "found at least one!" >&6; }
10258            else
10259               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10260           fi
10261        fi
10262        # Create build and target names that use _ instead of "-" and ".".
10263        # This is necessary to use them in variable names.
10264        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10265        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10266        # Extract rewrite information for build and target
10267        eval rewritten_build=\${REWRITE_${build_var}}
10268        if test "x$rewritten_build" = x; then
10269            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10270            echo Build stays the same $rewritten_build
10271        else
10272            echo Rewriting build for builddeps into $rewritten_build
10273        fi
10274        eval rewritten_target=\${REWRITE_${target_var}}
10275        if test "x$rewritten_target" = x; then
10276            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10277            echo Target stays the same $rewritten_target
10278        else
10279            echo Rewriting target for builddeps into $rewritten_target
10280        fi
10281        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10282        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10283    fi
10284    for ac_prog in 7z unzip
10285do
10286  # Extract the first word of "$ac_prog", so it can be a program name with args.
10287set dummy $ac_prog; ac_word=$2
10288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10289$as_echo_n "checking for $ac_word... " >&6; }
10290if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10291  $as_echo_n "(cached) " >&6
10292else
10293  if test -n "$BDEPS_UNZIP"; then
10294  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10295else
10296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10297for as_dir in $PATH
10298do
10299  IFS=$as_save_IFS
10300  test -z "$as_dir" && as_dir=.
10301    for ac_exec_ext in '' $ac_executable_extensions; do
10302  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10303    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10305    break 2
10306  fi
10307done
10308  done
10309IFS=$as_save_IFS
10310
10311fi
10312fi
10313BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10314if test -n "$BDEPS_UNZIP"; then
10315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10316$as_echo "$BDEPS_UNZIP" >&6; }
10317else
10318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10319$as_echo "no" >&6; }
10320fi
10321
10322
10323  test -n "$BDEPS_UNZIP" && break
10324done
10325
10326    if test "x$BDEPS_UNZIP" = x7z; then
10327        BDEPS_UNZIP="7z x"
10328    fi
10329
10330    for ac_prog in wget lftp ftp
10331do
10332  # Extract the first word of "$ac_prog", so it can be a program name with args.
10333set dummy $ac_prog; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  if test -n "$BDEPS_FTP"; then
10340  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10341else
10342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10343for as_dir in $PATH
10344do
10345  IFS=$as_save_IFS
10346  test -z "$as_dir" && as_dir=.
10347    for ac_exec_ext in '' $ac_executable_extensions; do
10348  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10349    ac_cv_prog_BDEPS_FTP="$ac_prog"
10350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10351    break 2
10352  fi
10353done
10354  done
10355IFS=$as_save_IFS
10356
10357fi
10358fi
10359BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10360if test -n "$BDEPS_FTP"; then
10361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10362$as_echo "$BDEPS_FTP" >&6; }
10363else
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
10366fi
10367
10368
10369  test -n "$BDEPS_FTP" && break
10370done
10371
10372
10373
10374###############################################################################
10375#
10376# Determine OpenJDK variants, options and version numbers.
10377#
10378###############################################################################
10379
10380# We need build & target for this.
10381
10382
10383###############################################################################
10384#
10385# Should we build only OpenJDK even if closed sources are present?
10386#
10387# Check whether --enable-openjdk-only was given.
10388if test "${enable_openjdk_only+set}" = set; then :
10389  enableval=$enable_openjdk_only;
10390else
10391  enable_openjdk_only="no"
10392fi
10393
10394
10395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
10396$as_echo_n "checking for presence of closed sources... " >&6; }
10397if test -d "$SRC_ROOT/jdk/src/closed"; then
10398    CLOSED_SOURCE_PRESENT=yes
10399else
10400    CLOSED_SOURCE_PRESENT=no
10401fi
10402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
10403$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
10404
10405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is supressed (openjdk-only)" >&5
10406$as_echo_n "checking if closed source is supressed (openjdk-only)... " >&6; }
10407SUPRESS_CLOSED_SOURCE="$enable_openjdk_only"
10408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPRESS_CLOSED_SOURCE" >&5
10409$as_echo "$SUPRESS_CLOSED_SOURCE" >&6; }
10410
10411if test "x$CLOSED_SOURCE_PRESENT" = xno; then
10412  OPENJDK=true
10413  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10414    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
10415$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
10416  fi
10417else
10418  if test "x$SUPRESS_CLOSED_SOURCE" = "xyes"; then
10419    OPENJDK=true
10420  else
10421    OPENJDK=false
10422  fi
10423fi
10424
10425if test "x$OPENJDK" = "xtrue"; then
10426    SET_OPENJDK="OPENJDK=true"
10427fi
10428
10429
10430
10431###############################################################################
10432#
10433# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10434# We always build headless support.
10435#
10436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10437$as_echo_n "checking headful support... " >&6; }
10438# Check whether --enable-headful was given.
10439if test "${enable_headful+set}" = set; then :
10440  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10441else
10442  SUPPORT_HEADFUL=yes
10443fi
10444
10445
10446SUPPORT_HEADLESS=yes
10447BUILD_HEADLESS="BUILD_HEADLESS:=true"
10448
10449if test "x$SUPPORT_HEADFUL" = xyes; then
10450    # We are building both headful and headless.
10451    headful_msg="inlude support for both headful and headless"
10452fi
10453
10454if test "x$SUPPORT_HEADFUL" = xno; then
10455    # Thus we are building headless only.
10456    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10457    headful_msg="headless only"
10458fi
10459
10460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10461$as_echo "$headful_msg" >&6; }
10462
10463
10464
10465
10466
10467# Control wether Hotspot runs Queens test after build.
10468# Check whether --enable-hotspot-test-in-build was given.
10469if test "${enable_hotspot_test_in_build+set}" = set; then :
10470  enableval=$enable_hotspot_test_in_build;
10471else
10472  enable_hotspot_test_in_build=no
10473fi
10474
10475if test "x$enable_hotspot_test_in_build" = "xyes"; then
10476    TEST_IN_BUILD=true
10477else
10478    TEST_IN_BUILD=false
10479fi
10480
10481
10482###############################################################################
10483#
10484# Choose cacerts source file
10485#
10486
10487# Check whether --with-cacerts-file was given.
10488if test "${with_cacerts_file+set}" = set; then :
10489  withval=$with_cacerts_file;
10490fi
10491
10492if test "x$with_cacerts_file" != x; then
10493    CACERTS_FILE=$with_cacerts_file
10494else
10495    if test "x$OPENJDK" = "xtrue"; then
10496        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10497    else
10498        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10499    fi
10500fi
10501
10502
10503###############################################################################
10504#
10505# Enable or disable unlimited crypto
10506#
10507# Check whether --enable-unlimited-crypto was given.
10508if test "${enable_unlimited_crypto+set}" = set; then :
10509  enableval=$enable_unlimited_crypto;
10510else
10511  enable_unlimited_crypto=no
10512fi
10513
10514if test "x$enable_unlimited_crypto" = "xyes"; then
10515    UNLIMITED_CRYPTO=true
10516else
10517    UNLIMITED_CRYPTO=false
10518fi
10519
10520
10521###############################################################################
10522#
10523# Compress jars
10524#
10525COMPRESS_JARS=false
10526
10527
10528
10529
10530# Source the version numbers
10531. $AUTOCONF_DIR/version.numbers
10532if test "x$OPENJDK" = "xfalse"; then
10533    . $AUTOCONF_DIR/closed.version.numbers
10534fi
10535# Now set the JDK version, milestone, build number etc.
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550COPYRIGHT_YEAR=`date +'%Y'`
10551
10552
10553RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX"
10554
10555
10556if test "x$JDK_UPDATE_VERSION" != x; then
10557    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10558else
10559    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10560fi
10561
10562
10563if test "x$MILESTONE" != x; then
10564    RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}"
10565else
10566    RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}"
10567fi
10568
10569
10570if test "x$JDK_BUILD_NUMBER" != x; then
10571    FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}"
10572else
10573    JDK_BUILD_NUMBER=b00
10574    BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10575    # Avoid [:alnum:] since it depends on the locale.
10576    CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10577    USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10578    FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}"
10579fi
10580
10581COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10582
10583
10584
10585###############################################################################
10586#
10587# Setup BootJDK, used to bootstrap the build.
10588#
10589###############################################################################
10590
10591
10592BOOT_JDK_FOUND=no
10593
10594# Check whether --with-boot-jdk was given.
10595if test "${with_boot_jdk+set}" = set; then :
10596  withval=$with_boot_jdk;
10597fi
10598
10599
10600# We look for the Boot JDK through various means, going from more certain to
10601# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10602# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10603# must check if this is indeed valid; otherwise we'll continue looking.
10604
10605# Test: Is bootjdk explicitely set by command line arguments?
10606
10607  if test "x$BOOT_JDK_FOUND" = xno; then
10608    # Now execute the test
10609
10610if test "x$with_boot_jdk" != x; then
10611    BOOT_JDK=$with_boot_jdk
10612    BOOT_JDK_FOUND=maybe
10613    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10614$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10615fi
10616
10617
10618    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10619    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10620      # Do we have a bin/java?
10621      if test ! -x "$BOOT_JDK/bin/java"; then
10622        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10624        BOOT_JDK_FOUND=no
10625      else
10626        # Do we have a bin/javac?
10627        if test ! -x "$BOOT_JDK/bin/javac"; then
10628          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10630          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10631$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10632          BOOT_JDK_FOUND=no
10633        else
10634          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10635          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10636            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10638            BOOT_JDK_FOUND=no
10639          else
10640            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10641            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10642
10643            # Extra M4 quote needed to protect [] in grep expression.
10644            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10645            if test "x$FOUND_VERSION_78" = x; then
10646              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10647$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10648              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10649$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10650              BOOT_JDK_FOUND=no
10651            else
10652              # We're done! :-)
10653              BOOT_JDK_FOUND=yes
10654
10655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10656
10657  # Input might be given as Windows format, start by converting to
10658  # unix format.
10659  path="$BOOT_JDK"
10660  new_path=`$CYGPATH -u "$path"`
10661
10662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10665  # "foo.exe" is OK but "foo" is an error.
10666  #
10667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10668  # It is also a way to make sure we got the proper file name for the real test later on.
10669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10670  if test "x$test_shortpath" = x; then
10671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10672$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10673    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10674  fi
10675
10676  # Call helper function which possibly converts this using DOS-style short mode.
10677  # If so, the updated path is stored in $new_path.
10678
10679  input_path="$new_path"
10680  # Check if we need to convert this using DOS-style short mode. If the path
10681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10682  # take no chances and rewrite it.
10683  # Note: m4 eats our [], so we need to use [ and ] instead.
10684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10685  if test "x$has_forbidden_chars" != x; then
10686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10690      # Going to short mode and back again did indeed matter. Since short mode is
10691      # case insensitive, let's make it lowercase to improve readability.
10692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10693      # Now convert it back to Unix-stile (cygpath)
10694      input_path=`$CYGPATH -u "$shortmode_path"`
10695      new_path="$input_path"
10696    fi
10697  fi
10698
10699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10700  if test "x$test_cygdrive_prefix" = x; then
10701    # As a simple fix, exclude /usr/bin since it's not a real path.
10702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10704      # a path prefixed by /cygdrive for fixpath to work.
10705      new_path="$CYGWIN_ROOT_PATH$input_path"
10706    fi
10707  fi
10708
10709
10710  if test "x$path" != "x$new_path"; then
10711    BOOT_JDK="$new_path"
10712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10713$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10714  fi
10715
10716  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10717
10718  path="$BOOT_JDK"
10719  has_colon=`$ECHO $path | $GREP ^.:`
10720  new_path="$path"
10721  if test "x$has_colon" = x; then
10722    # Not in mixed or Windows style, start by that.
10723    new_path=`cmd //c echo $path`
10724  fi
10725
10726
10727  input_path="$new_path"
10728  # Check if we need to convert this using DOS-style short mode. If the path
10729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10730  # take no chances and rewrite it.
10731  # Note: m4 eats our [], so we need to use [ and ] instead.
10732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10733  if test "x$has_forbidden_chars" != x; then
10734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10736  fi
10737
10738
10739  windows_path="$new_path"
10740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10741    unix_path=`$CYGPATH -u "$windows_path"`
10742    new_path="$unix_path"
10743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10745    new_path="$unix_path"
10746  fi
10747
10748  if test "x$path" != "x$new_path"; then
10749    BOOT_JDK="$new_path"
10750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10751$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10752  fi
10753
10754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10756
10757  else
10758    # We're on a posix platform. Hooray! :)
10759    path="$BOOT_JDK"
10760
10761    if test ! -f "$path" && test ! -d "$path"; then
10762      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10763    fi
10764
10765    has_space=`$ECHO "$path" | $GREP " "`
10766    if test "x$has_space" != x; then
10767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10769      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
10770    fi
10771  fi
10772
10773              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
10774$as_echo_n "checking for Boot JDK... " >&6; }
10775              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
10776$as_echo "$BOOT_JDK" >&6; }
10777              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
10778$as_echo_n "checking Boot JDK version... " >&6; }
10779              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
10780              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
10781$as_echo "$BOOT_JDK_VERSION" >&6; }
10782            fi # end check jdk version
10783          fi # end check rt.jar
10784        fi # end check javac
10785      fi # end check java
10786    fi # end check boot jdk found
10787  fi
10788
10789if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
10790  # Having specified an argument which is incorrect will produce an instant failure;
10791  # we should not go on looking
10792  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
10793fi
10794
10795# Test: Is bootjdk available from builddeps?
10796
10797  if test "x$BOOT_JDK_FOUND" = xno; then
10798    # Now execute the test
10799
10800
10801
10802    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10803        # Source the builddeps file again, to make sure it uses the latest variables!
10804        . $builddepsfile
10805        # Look for a target and build machine specific resource!
10806        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
10807        if test "x$resource" = x; then
10808            # Ok, lets instead look for a target specific resource
10809            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
10810        fi
10811        if test "x$resource" = x; then
10812            # Ok, lets instead look for a build specific resource
10813            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
10814        fi
10815        if test "x$resource" = x; then
10816            # Ok, lets instead look for a generic resource
10817            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
10818            resource=${builddep_bootjdk}
10819        fi
10820        if test "x$resource" != x; then
10821            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
10822$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
10823	    # If the resource in the builddeps.conf file is an existing directory,
10824	    # for example /java/linux/cups
10825	    if test -d ${resource}; then
10826	       depdir=${resource}
10827	    else
10828
10829# bootjdk is for example mymodule
10830# $resource is for example libs/general/libmymod_1_2_3.zip
10831# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
10832# $with_builddeps_dir is for example /localhome/builddeps
10833# depdir is the name of the variable into which we store the depdir, eg MYMOD
10834# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
10835# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
10836    filename=`basename $resource`
10837    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
10838    filebase=${filename%%.*}
10839    extension=${filename#*.}
10840    installdir=$with_builddeps_dir/$filebase
10841    if test ! -f $installdir/$filename.unpacked; then
10842        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
10843$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
10844        if test ! -d $installdir; then
10845            mkdir -p $installdir
10846        fi
10847        if test ! -d $installdir; then
10848            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
10849        fi
10850        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
10851        touch $tmpfile
10852        if test ! -f $tmpfile; then
10853            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
10854        fi
10855
10856    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
10857    # $tmpfile is the local file name for the downloaded file.
10858    VALID_TOOL=no
10859    if test "x$BDEPS_FTP" = xwget; then
10860       VALID_TOOL=yes
10861       wget -O $tmpfile $with_builddeps_server/$resource
10862    fi
10863    if test "x$BDEPS_FTP" = xlftp; then
10864       VALID_TOOL=yes
10865       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
10866    fi
10867    if test "x$BDEPS_FTP" = xftp; then
10868        VALID_TOOL=yes
10869        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
10870        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
10871        FTPUSERPWD=${FTPSERVER%%@*}
10872        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
10873            FTPUSER=${userpwd%%:*}
10874            FTPPWD=${userpwd#*@}
10875            FTPSERVER=${FTPSERVER#*@}
10876        else
10877            FTPUSER=ftp
10878            FTPPWD=ftp
10879        fi
10880        # the "pass" command does not work on some
10881        # ftp clients (read ftp.exe) but if it works,
10882        # passive mode is better!
10883        (\
10884            echo "user $FTPUSER $FTPPWD"        ;\
10885            echo "pass"                         ;\
10886            echo "bin"                          ;\
10887            echo "get $FTPPATH $tmpfile"              ;\
10888        ) | ftp -in $FTPSERVER
10889    fi
10890    if test "x$VALID_TOOL" != xyes; then
10891       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
10892    fi
10893
10894        mv $tmpfile $installdir/$filename
10895        if test ! -s $installdir/$filename; then
10896            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
10897        fi
10898        case "$extension" in
10899            zip)  echo "Unzipping $installdir/$filename..."
10900               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
10901            ;;
10902            tar.gz) echo "Untaring $installdir/$filename..."
10903               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10904            ;;
10905            tgz) echo "Untaring $installdir/$filename..."
10906               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
10907            ;;
10908            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
10909            ;;
10910        esac
10911    fi
10912    if test -f $installdir/$filename.unpacked; then
10913        depdir=$installdir
10914    fi
10915
10916	    fi
10917            # Source the builddeps file again, because in the previous command, the depdir
10918            # was updated to point at the current build dependency install directory.
10919            . $builddepsfile
10920            # Now extract variables from the builddeps.conf files.
10921            theroot=${builddep_bootjdk_ROOT}
10922            thecflags=${builddep_bootjdk_CFLAGS}
10923            thelibs=${builddep_bootjdk_LIBS}
10924            if test "x$depdir" = x; then
10925                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
10926            fi
10927            BOOT_JDK=$depdir
10928            if test "x$theroot" != x; then
10929               BOOT_JDK="$theroot"
10930            fi
10931            if test "x$thecflags" != x; then
10932               BOOT_JDK_CFLAGS="$thecflags"
10933            fi
10934            if test "x$thelibs" != x; then
10935               BOOT_JDK_LIBS="$thelibs"
10936            fi
10937            BOOT_JDK_FOUND=maybe
10938            else BOOT_JDK_FOUND=no
10939
10940        fi
10941        else BOOT_JDK_FOUND=no
10942
10943    fi
10944
10945
10946
10947    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10948    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10949      # Do we have a bin/java?
10950      if test ! -x "$BOOT_JDK/bin/java"; then
10951        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10952$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10953        BOOT_JDK_FOUND=no
10954      else
10955        # Do we have a bin/javac?
10956        if test ! -x "$BOOT_JDK/bin/javac"; then
10957          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10958$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10959          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10960$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10961          BOOT_JDK_FOUND=no
10962        else
10963          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10964          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10965            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10966$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10967            BOOT_JDK_FOUND=no
10968          else
10969            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10970            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10971
10972            # Extra M4 quote needed to protect [] in grep expression.
10973            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10974            if test "x$FOUND_VERSION_78" = x; then
10975              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10977              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10978$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10979              BOOT_JDK_FOUND=no
10980            else
10981              # We're done! :-)
10982              BOOT_JDK_FOUND=yes
10983
10984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10985
10986  # Input might be given as Windows format, start by converting to
10987  # unix format.
10988  path="$BOOT_JDK"
10989  new_path=`$CYGPATH -u "$path"`
10990
10991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10994  # "foo.exe" is OK but "foo" is an error.
10995  #
10996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10997  # It is also a way to make sure we got the proper file name for the real test later on.
10998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10999  if test "x$test_shortpath" = x; then
11000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11001$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11002    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11003  fi
11004
11005  # Call helper function which possibly converts this using DOS-style short mode.
11006  # If so, the updated path is stored in $new_path.
11007
11008  input_path="$new_path"
11009  # Check if we need to convert this using DOS-style short mode. If the path
11010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11011  # take no chances and rewrite it.
11012  # Note: m4 eats our [], so we need to use [ and ] instead.
11013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11014  if test "x$has_forbidden_chars" != x; then
11015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11019      # Going to short mode and back again did indeed matter. Since short mode is
11020      # case insensitive, let's make it lowercase to improve readability.
11021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11022      # Now convert it back to Unix-stile (cygpath)
11023      input_path=`$CYGPATH -u "$shortmode_path"`
11024      new_path="$input_path"
11025    fi
11026  fi
11027
11028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11029  if test "x$test_cygdrive_prefix" = x; then
11030    # As a simple fix, exclude /usr/bin since it's not a real path.
11031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11033      # a path prefixed by /cygdrive for fixpath to work.
11034      new_path="$CYGWIN_ROOT_PATH$input_path"
11035    fi
11036  fi
11037
11038
11039  if test "x$path" != "x$new_path"; then
11040    BOOT_JDK="$new_path"
11041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11042$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11043  fi
11044
11045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11046
11047  path="$BOOT_JDK"
11048  has_colon=`$ECHO $path | $GREP ^.:`
11049  new_path="$path"
11050  if test "x$has_colon" = x; then
11051    # Not in mixed or Windows style, start by that.
11052    new_path=`cmd //c echo $path`
11053  fi
11054
11055
11056  input_path="$new_path"
11057  # Check if we need to convert this using DOS-style short mode. If the path
11058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11059  # take no chances and rewrite it.
11060  # Note: m4 eats our [], so we need to use [ and ] instead.
11061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11062  if test "x$has_forbidden_chars" != x; then
11063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11065  fi
11066
11067
11068  windows_path="$new_path"
11069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11070    unix_path=`$CYGPATH -u "$windows_path"`
11071    new_path="$unix_path"
11072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11074    new_path="$unix_path"
11075  fi
11076
11077  if test "x$path" != "x$new_path"; then
11078    BOOT_JDK="$new_path"
11079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11081  fi
11082
11083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11085
11086  else
11087    # We're on a posix platform. Hooray! :)
11088    path="$BOOT_JDK"
11089
11090    if test ! -f "$path" && test ! -d "$path"; then
11091      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11092    fi
11093
11094    has_space=`$ECHO "$path" | $GREP " "`
11095    if test "x$has_space" != x; then
11096      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11098      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11099    fi
11100  fi
11101
11102              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11103$as_echo_n "checking for Boot JDK... " >&6; }
11104              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11105$as_echo "$BOOT_JDK" >&6; }
11106              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11107$as_echo_n "checking Boot JDK version... " >&6; }
11108              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11109              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11110$as_echo "$BOOT_JDK_VERSION" >&6; }
11111            fi # end check jdk version
11112          fi # end check rt.jar
11113        fi # end check javac
11114      fi # end check java
11115    fi # end check boot jdk found
11116  fi
11117
11118
11119# Test: Is $JAVA_HOME set?
11120
11121  if test "x$BOOT_JDK_FOUND" = xno; then
11122    # Now execute the test
11123
11124    if test "x$JAVA_HOME" != x; then
11125        JAVA_HOME_PROCESSED="$JAVA_HOME"
11126
11127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11128
11129  # Input might be given as Windows format, start by converting to
11130  # unix format.
11131  path="$JAVA_HOME_PROCESSED"
11132  new_path=`$CYGPATH -u "$path"`
11133
11134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11137  # "foo.exe" is OK but "foo" is an error.
11138  #
11139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11140  # It is also a way to make sure we got the proper file name for the real test later on.
11141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11142  if test "x$test_shortpath" = x; then
11143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11144$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11145    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11146  fi
11147
11148  # Call helper function which possibly converts this using DOS-style short mode.
11149  # If so, the updated path is stored in $new_path.
11150
11151  input_path="$new_path"
11152  # Check if we need to convert this using DOS-style short mode. If the path
11153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11154  # take no chances and rewrite it.
11155  # Note: m4 eats our [], so we need to use [ and ] instead.
11156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11157  if test "x$has_forbidden_chars" != x; then
11158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11162      # Going to short mode and back again did indeed matter. Since short mode is
11163      # case insensitive, let's make it lowercase to improve readability.
11164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11165      # Now convert it back to Unix-stile (cygpath)
11166      input_path=`$CYGPATH -u "$shortmode_path"`
11167      new_path="$input_path"
11168    fi
11169  fi
11170
11171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11172  if test "x$test_cygdrive_prefix" = x; then
11173    # As a simple fix, exclude /usr/bin since it's not a real path.
11174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11176      # a path prefixed by /cygdrive for fixpath to work.
11177      new_path="$CYGWIN_ROOT_PATH$input_path"
11178    fi
11179  fi
11180
11181
11182  if test "x$path" != "x$new_path"; then
11183    JAVA_HOME_PROCESSED="$new_path"
11184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11185$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11186  fi
11187
11188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11189
11190  path="$JAVA_HOME_PROCESSED"
11191  has_colon=`$ECHO $path | $GREP ^.:`
11192  new_path="$path"
11193  if test "x$has_colon" = x; then
11194    # Not in mixed or Windows style, start by that.
11195    new_path=`cmd //c echo $path`
11196  fi
11197
11198
11199  input_path="$new_path"
11200  # Check if we need to convert this using DOS-style short mode. If the path
11201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11202  # take no chances and rewrite it.
11203  # Note: m4 eats our [], so we need to use [ and ] instead.
11204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11205  if test "x$has_forbidden_chars" != x; then
11206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11208  fi
11209
11210
11211  windows_path="$new_path"
11212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11213    unix_path=`$CYGPATH -u "$windows_path"`
11214    new_path="$unix_path"
11215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11217    new_path="$unix_path"
11218  fi
11219
11220  if test "x$path" != "x$new_path"; then
11221    JAVA_HOME_PROCESSED="$new_path"
11222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11223$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11224  fi
11225
11226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11228
11229  else
11230    # We're on a posix platform. Hooray! :)
11231    path="$JAVA_HOME_PROCESSED"
11232
11233    if test ! -f "$path" && test ! -d "$path"; then
11234      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11235    fi
11236
11237    has_space=`$ECHO "$path" | $GREP " "`
11238    if test "x$has_space" != x; then
11239      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11240$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11241      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11242    fi
11243  fi
11244
11245        if test ! -d "$JAVA_HOME_PROCESSED"; then
11246            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11247$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11248        else
11249          # Aha, the user has set a JAVA_HOME
11250          # let us use that as the Boot JDK.
11251          BOOT_JDK="$JAVA_HOME_PROCESSED"
11252          BOOT_JDK_FOUND=maybe
11253          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11254$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11255        fi
11256    fi
11257
11258
11259    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11260    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11261      # Do we have a bin/java?
11262      if test ! -x "$BOOT_JDK/bin/java"; then
11263        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11264$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11265        BOOT_JDK_FOUND=no
11266      else
11267        # Do we have a bin/javac?
11268        if test ! -x "$BOOT_JDK/bin/javac"; then
11269          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11271          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11272$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11273          BOOT_JDK_FOUND=no
11274        else
11275          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11276          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11277            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11279            BOOT_JDK_FOUND=no
11280          else
11281            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11282            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11283
11284            # Extra M4 quote needed to protect [] in grep expression.
11285            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11286            if test "x$FOUND_VERSION_78" = x; then
11287              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11289              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11290$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11291              BOOT_JDK_FOUND=no
11292            else
11293              # We're done! :-)
11294              BOOT_JDK_FOUND=yes
11295
11296  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11297
11298  # Input might be given as Windows format, start by converting to
11299  # unix format.
11300  path="$BOOT_JDK"
11301  new_path=`$CYGPATH -u "$path"`
11302
11303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11306  # "foo.exe" is OK but "foo" is an error.
11307  #
11308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11309  # It is also a way to make sure we got the proper file name for the real test later on.
11310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11311  if test "x$test_shortpath" = x; then
11312    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11313$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11314    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11315  fi
11316
11317  # Call helper function which possibly converts this using DOS-style short mode.
11318  # If so, the updated path is stored in $new_path.
11319
11320  input_path="$new_path"
11321  # Check if we need to convert this using DOS-style short mode. If the path
11322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11323  # take no chances and rewrite it.
11324  # Note: m4 eats our [], so we need to use [ and ] instead.
11325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11326  if test "x$has_forbidden_chars" != x; then
11327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11331      # Going to short mode and back again did indeed matter. Since short mode is
11332      # case insensitive, let's make it lowercase to improve readability.
11333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11334      # Now convert it back to Unix-stile (cygpath)
11335      input_path=`$CYGPATH -u "$shortmode_path"`
11336      new_path="$input_path"
11337    fi
11338  fi
11339
11340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11341  if test "x$test_cygdrive_prefix" = x; then
11342    # As a simple fix, exclude /usr/bin since it's not a real path.
11343    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11345      # a path prefixed by /cygdrive for fixpath to work.
11346      new_path="$CYGWIN_ROOT_PATH$input_path"
11347    fi
11348  fi
11349
11350
11351  if test "x$path" != "x$new_path"; then
11352    BOOT_JDK="$new_path"
11353    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11354$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11355  fi
11356
11357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11358
11359  path="$BOOT_JDK"
11360  has_colon=`$ECHO $path | $GREP ^.:`
11361  new_path="$path"
11362  if test "x$has_colon" = x; then
11363    # Not in mixed or Windows style, start by that.
11364    new_path=`cmd //c echo $path`
11365  fi
11366
11367
11368  input_path="$new_path"
11369  # Check if we need to convert this using DOS-style short mode. If the path
11370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11371  # take no chances and rewrite it.
11372  # Note: m4 eats our [], so we need to use [ and ] instead.
11373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11374  if test "x$has_forbidden_chars" != x; then
11375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11376    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11377  fi
11378
11379
11380  windows_path="$new_path"
11381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11382    unix_path=`$CYGPATH -u "$windows_path"`
11383    new_path="$unix_path"
11384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11386    new_path="$unix_path"
11387  fi
11388
11389  if test "x$path" != "x$new_path"; then
11390    BOOT_JDK="$new_path"
11391    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11392$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11393  fi
11394
11395  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11396  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11397
11398  else
11399    # We're on a posix platform. Hooray! :)
11400    path="$BOOT_JDK"
11401
11402    if test ! -f "$path" && test ! -d "$path"; then
11403      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11404    fi
11405
11406    has_space=`$ECHO "$path" | $GREP " "`
11407    if test "x$has_space" != x; then
11408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11409$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11410      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11411    fi
11412  fi
11413
11414              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11415$as_echo_n "checking for Boot JDK... " >&6; }
11416              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11417$as_echo "$BOOT_JDK" >&6; }
11418              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11419$as_echo_n "checking Boot JDK version... " >&6; }
11420              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11421              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11422$as_echo "$BOOT_JDK_VERSION" >&6; }
11423            fi # end check jdk version
11424          fi # end check rt.jar
11425        fi # end check javac
11426      fi # end check java
11427    fi # end check boot jdk found
11428  fi
11429
11430
11431# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11432
11433  if test "x$BOOT_JDK_FOUND" = xno; then
11434    # Now execute the test
11435
11436    if test -x /usr/libexec/java_home; then
11437        BOOT_JDK=`/usr/libexec/java_home`
11438        BOOT_JDK_FOUND=maybe
11439        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11440$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11441    fi
11442
11443
11444    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11445    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11446      # Do we have a bin/java?
11447      if test ! -x "$BOOT_JDK/bin/java"; then
11448        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11450        BOOT_JDK_FOUND=no
11451      else
11452        # Do we have a bin/javac?
11453        if test ! -x "$BOOT_JDK/bin/javac"; then
11454          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11456          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11457$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11458          BOOT_JDK_FOUND=no
11459        else
11460          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11461          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11462            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11464            BOOT_JDK_FOUND=no
11465          else
11466            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11467            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11468
11469            # Extra M4 quote needed to protect [] in grep expression.
11470            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11471            if test "x$FOUND_VERSION_78" = x; then
11472              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11474              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11475$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11476              BOOT_JDK_FOUND=no
11477            else
11478              # We're done! :-)
11479              BOOT_JDK_FOUND=yes
11480
11481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11482
11483  # Input might be given as Windows format, start by converting to
11484  # unix format.
11485  path="$BOOT_JDK"
11486  new_path=`$CYGPATH -u "$path"`
11487
11488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11491  # "foo.exe" is OK but "foo" is an error.
11492  #
11493  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11494  # It is also a way to make sure we got the proper file name for the real test later on.
11495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11496  if test "x$test_shortpath" = x; then
11497    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11498$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11499    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11500  fi
11501
11502  # Call helper function which possibly converts this using DOS-style short mode.
11503  # If so, the updated path is stored in $new_path.
11504
11505  input_path="$new_path"
11506  # Check if we need to convert this using DOS-style short mode. If the path
11507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11508  # take no chances and rewrite it.
11509  # Note: m4 eats our [], so we need to use [ and ] instead.
11510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11511  if test "x$has_forbidden_chars" != x; then
11512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11513    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11514    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11515    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11516      # Going to short mode and back again did indeed matter. Since short mode is
11517      # case insensitive, let's make it lowercase to improve readability.
11518      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11519      # Now convert it back to Unix-stile (cygpath)
11520      input_path=`$CYGPATH -u "$shortmode_path"`
11521      new_path="$input_path"
11522    fi
11523  fi
11524
11525  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11526  if test "x$test_cygdrive_prefix" = x; then
11527    # As a simple fix, exclude /usr/bin since it's not a real path.
11528    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11529      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11530      # a path prefixed by /cygdrive for fixpath to work.
11531      new_path="$CYGWIN_ROOT_PATH$input_path"
11532    fi
11533  fi
11534
11535
11536  if test "x$path" != "x$new_path"; then
11537    BOOT_JDK="$new_path"
11538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11540  fi
11541
11542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11543
11544  path="$BOOT_JDK"
11545  has_colon=`$ECHO $path | $GREP ^.:`
11546  new_path="$path"
11547  if test "x$has_colon" = x; then
11548    # Not in mixed or Windows style, start by that.
11549    new_path=`cmd //c echo $path`
11550  fi
11551
11552
11553  input_path="$new_path"
11554  # Check if we need to convert this using DOS-style short mode. If the path
11555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11556  # take no chances and rewrite it.
11557  # Note: m4 eats our [], so we need to use [ and ] instead.
11558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11559  if test "x$has_forbidden_chars" != x; then
11560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11561    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11562  fi
11563
11564
11565  windows_path="$new_path"
11566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11567    unix_path=`$CYGPATH -u "$windows_path"`
11568    new_path="$unix_path"
11569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11571    new_path="$unix_path"
11572  fi
11573
11574  if test "x$path" != "x$new_path"; then
11575    BOOT_JDK="$new_path"
11576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11577$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11578  fi
11579
11580  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11581  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11582
11583  else
11584    # We're on a posix platform. Hooray! :)
11585    path="$BOOT_JDK"
11586
11587    if test ! -f "$path" && test ! -d "$path"; then
11588      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11589    fi
11590
11591    has_space=`$ECHO "$path" | $GREP " "`
11592    if test "x$has_space" != x; then
11593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11595      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11596    fi
11597  fi
11598
11599              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11600$as_echo_n "checking for Boot JDK... " >&6; }
11601              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11602$as_echo "$BOOT_JDK" >&6; }
11603              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11604$as_echo_n "checking Boot JDK version... " >&6; }
11605              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11606              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11607$as_echo "$BOOT_JDK_VERSION" >&6; }
11608            fi # end check jdk version
11609          fi # end check rt.jar
11610        fi # end check javac
11611      fi # end check java
11612    fi # end check boot jdk found
11613  fi
11614
11615
11616# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11617
11618  if test "x$BOOT_JDK_FOUND" = xno; then
11619    # Now execute the test
11620
11621    # Extract the first word of "javac", so it can be a program name with args.
11622set dummy javac; ac_word=$2
11623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11624$as_echo_n "checking for $ac_word... " >&6; }
11625if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11626  $as_echo_n "(cached) " >&6
11627else
11628  case $JAVAC_CHECK in
11629  [\\/]* | ?:[\\/]*)
11630  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11631  ;;
11632  *)
11633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11634for as_dir in $PATH
11635do
11636  IFS=$as_save_IFS
11637  test -z "$as_dir" && as_dir=.
11638    for ac_exec_ext in '' $ac_executable_extensions; do
11639  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11640    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11642    break 2
11643  fi
11644done
11645  done
11646IFS=$as_save_IFS
11647
11648  ;;
11649esac
11650fi
11651JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11652if test -n "$JAVAC_CHECK"; then
11653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11654$as_echo "$JAVAC_CHECK" >&6; }
11655else
11656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11657$as_echo "no" >&6; }
11658fi
11659
11660
11661    # Extract the first word of "java", so it can be a program name with args.
11662set dummy java; ac_word=$2
11663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11664$as_echo_n "checking for $ac_word... " >&6; }
11665if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11666  $as_echo_n "(cached) " >&6
11667else
11668  case $JAVA_CHECK in
11669  [\\/]* | ?:[\\/]*)
11670  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11671  ;;
11672  *)
11673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11674for as_dir in $PATH
11675do
11676  IFS=$as_save_IFS
11677  test -z "$as_dir" && as_dir=.
11678    for ac_exec_ext in '' $ac_executable_extensions; do
11679  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11680    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11682    break 2
11683  fi
11684done
11685  done
11686IFS=$as_save_IFS
11687
11688  ;;
11689esac
11690fi
11691JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11692if test -n "$JAVA_CHECK"; then
11693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11694$as_echo "$JAVA_CHECK" >&6; }
11695else
11696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11697$as_echo "no" >&6; }
11698fi
11699
11700
11701    BINARY="$JAVAC_CHECK"
11702    if test "x$JAVAC_CHECK" = x; then
11703        BINARY="$JAVA_CHECK"
11704    fi
11705    if test "x$BINARY" != x; then
11706        # So there is a java(c) binary, it might be part of a JDK.
11707        # Lets find the JDK/JRE directory by following symbolic links.
11708        # Linux/GNU systems often have links from /usr/bin/java to
11709        # /etc/alternatives/java to the real JDK binary.
11710
11711    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11712        # Follow a chain of symbolic links. Use readlink
11713        # where it exists, else fall back to horribly
11714        # complicated shell code.
11715        if test "x$READLINK_TESTED" != yes; then
11716            # On MacOSX there is a readlink tool with a different
11717            # purpose than the GNU readlink tool. Check the found readlink.
11718            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11719            if test "x$ISGNU" = x; then
11720                 # A readlink that we do not know how to use.
11721                 # Are there other non-GNU readlinks out there?
11722                 READLINK_TESTED=yes
11723                 READLINK=
11724            fi
11725        fi
11726
11727        if test "x$READLINK" != x; then
11728            BINARY=`$READLINK -f $BINARY`
11729        else
11730            # Save the current directory for restoring afterwards
11731            STARTDIR=$PWD
11732            COUNTER=0
11733            sym_link_dir=`$DIRNAME $BINARY`
11734            sym_link_file=`$BASENAME $BINARY`
11735            # Use the system pwd and not the shell builtin to resolve directory symlinks
11736            cd $sym_link_dir
11737            cd `$THEPWDCMD`
11738            sym_link_dir=`$THEPWDCMD`
11739            # Resolve file symlinks
11740            while test $COUNTER -lt 20; do
11741                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11742                if test "x$ISLINK" == x; then
11743                    # This is not a symbolic link! We are done!
11744                    break
11745                fi
11746                # Again resolve directory symlinks since the target of the just found
11747                # link could be in a different directory
11748                cd `$DIRNAME $ISLINK`
11749                sym_link_dir=`$THEPWDCMD`
11750                sym_link_file=`$BASENAME $ISLINK`
11751                let COUNTER=COUNTER+1
11752            done
11753            cd $STARTDIR
11754            BINARY=$sym_link_dir/$sym_link_file
11755        fi
11756    fi
11757
11758        BOOT_JDK=`dirname "$BINARY"`
11759        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11760        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11761            # Looks like we found ourselves an JDK
11762            BOOT_JDK_FOUND=maybe
11763            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
11764$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
11765        fi
11766    fi
11767
11768
11769    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11770    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11771      # Do we have a bin/java?
11772      if test ! -x "$BOOT_JDK/bin/java"; then
11773        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11775        BOOT_JDK_FOUND=no
11776      else
11777        # Do we have a bin/javac?
11778        if test ! -x "$BOOT_JDK/bin/javac"; then
11779          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11781          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11782$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11783          BOOT_JDK_FOUND=no
11784        else
11785          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11786          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11789            BOOT_JDK_FOUND=no
11790          else
11791            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11792            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11793
11794            # Extra M4 quote needed to protect [] in grep expression.
11795            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11796            if test "x$FOUND_VERSION_78" = x; then
11797              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11799              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11800$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11801              BOOT_JDK_FOUND=no
11802            else
11803              # We're done! :-)
11804              BOOT_JDK_FOUND=yes
11805
11806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11807
11808  # Input might be given as Windows format, start by converting to
11809  # unix format.
11810  path="$BOOT_JDK"
11811  new_path=`$CYGPATH -u "$path"`
11812
11813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11816  # "foo.exe" is OK but "foo" is an error.
11817  #
11818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11819  # It is also a way to make sure we got the proper file name for the real test later on.
11820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11821  if test "x$test_shortpath" = x; then
11822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11823$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11824    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11825  fi
11826
11827  # Call helper function which possibly converts this using DOS-style short mode.
11828  # If so, the updated path is stored in $new_path.
11829
11830  input_path="$new_path"
11831  # Check if we need to convert this using DOS-style short mode. If the path
11832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11833  # take no chances and rewrite it.
11834  # Note: m4 eats our [], so we need to use [ and ] instead.
11835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11836  if test "x$has_forbidden_chars" != x; then
11837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11841      # Going to short mode and back again did indeed matter. Since short mode is
11842      # case insensitive, let's make it lowercase to improve readability.
11843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11844      # Now convert it back to Unix-stile (cygpath)
11845      input_path=`$CYGPATH -u "$shortmode_path"`
11846      new_path="$input_path"
11847    fi
11848  fi
11849
11850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11851  if test "x$test_cygdrive_prefix" = x; then
11852    # As a simple fix, exclude /usr/bin since it's not a real path.
11853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11855      # a path prefixed by /cygdrive for fixpath to work.
11856      new_path="$CYGWIN_ROOT_PATH$input_path"
11857    fi
11858  fi
11859
11860
11861  if test "x$path" != "x$new_path"; then
11862    BOOT_JDK="$new_path"
11863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11864$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11865  fi
11866
11867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11868
11869  path="$BOOT_JDK"
11870  has_colon=`$ECHO $path | $GREP ^.:`
11871  new_path="$path"
11872  if test "x$has_colon" = x; then
11873    # Not in mixed or Windows style, start by that.
11874    new_path=`cmd //c echo $path`
11875  fi
11876
11877
11878  input_path="$new_path"
11879  # Check if we need to convert this using DOS-style short mode. If the path
11880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11881  # take no chances and rewrite it.
11882  # Note: m4 eats our [], so we need to use [ and ] instead.
11883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11884  if test "x$has_forbidden_chars" != x; then
11885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11887  fi
11888
11889
11890  windows_path="$new_path"
11891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11892    unix_path=`$CYGPATH -u "$windows_path"`
11893    new_path="$unix_path"
11894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11896    new_path="$unix_path"
11897  fi
11898
11899  if test "x$path" != "x$new_path"; then
11900    BOOT_JDK="$new_path"
11901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11902$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11903  fi
11904
11905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11907
11908  else
11909    # We're on a posix platform. Hooray! :)
11910    path="$BOOT_JDK"
11911
11912    if test ! -f "$path" && test ! -d "$path"; then
11913      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11914    fi
11915
11916    has_space=`$ECHO "$path" | $GREP " "`
11917    if test "x$has_space" != x; then
11918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11919$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11920      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11921    fi
11922  fi
11923
11924              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11925$as_echo_n "checking for Boot JDK... " >&6; }
11926              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11927$as_echo "$BOOT_JDK" >&6; }
11928              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11929$as_echo_n "checking Boot JDK version... " >&6; }
11930              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11931              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11932$as_echo "$BOOT_JDK_VERSION" >&6; }
11933            fi # end check jdk version
11934          fi # end check rt.jar
11935        fi # end check javac
11936      fi # end check java
11937    fi # end check boot jdk found
11938  fi
11939
11940
11941# Test: Is there a JDK installed in default, well-known locations?
11942
11943  if test "x$BOOT_JDK_FOUND" = xno; then
11944    # Now execute the test
11945
11946  if test "x$OPENJDK_TARGET_OS" = xwindows; then
11947
11948  if test "x$BOOT_JDK_FOUND" = xno; then
11949    # Now execute the test
11950
11951  if test "x$ProgramW6432" != x; then
11952    VIRTUAL_DIR="$ProgramW6432/Java"
11953
11954  windows_path="$VIRTUAL_DIR"
11955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11956    unix_path=`$CYGPATH -u "$windows_path"`
11957    VIRTUAL_DIR="$unix_path"
11958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11960    VIRTUAL_DIR="$unix_path"
11961  fi
11962
11963
11964  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
11965  BOOT_JDK_SUFFIX=""
11966  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
11967  if test "x$ALL_JDKS_FOUND" != x; then
11968    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
11969
11970  if test "x$BOOT_JDK_FOUND" = xno; then
11971    # Now execute the test
11972
11973        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
11974        if test -d "$BOOT_JDK"; then
11975          BOOT_JDK_FOUND=maybe
11976          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
11977$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
11978        fi
11979
11980
11981    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11982    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11983      # Do we have a bin/java?
11984      if test ! -x "$BOOT_JDK/bin/java"; then
11985        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11987        BOOT_JDK_FOUND=no
11988      else
11989        # Do we have a bin/javac?
11990        if test ! -x "$BOOT_JDK/bin/javac"; then
11991          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11993          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11994$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11995          BOOT_JDK_FOUND=no
11996        else
11997          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11998          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11999            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12001            BOOT_JDK_FOUND=no
12002          else
12003            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12004            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12005
12006            # Extra M4 quote needed to protect [] in grep expression.
12007            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12008            if test "x$FOUND_VERSION_78" = x; then
12009              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12011              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12012$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12013              BOOT_JDK_FOUND=no
12014            else
12015              # We're done! :-)
12016              BOOT_JDK_FOUND=yes
12017
12018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12019
12020  # Input might be given as Windows format, start by converting to
12021  # unix format.
12022  path="$BOOT_JDK"
12023  new_path=`$CYGPATH -u "$path"`
12024
12025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12028  # "foo.exe" is OK but "foo" is an error.
12029  #
12030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12031  # It is also a way to make sure we got the proper file name for the real test later on.
12032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12033  if test "x$test_shortpath" = x; then
12034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12036    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12037  fi
12038
12039  # Call helper function which possibly converts this using DOS-style short mode.
12040  # If so, the updated path is stored in $new_path.
12041
12042  input_path="$new_path"
12043  # Check if we need to convert this using DOS-style short mode. If the path
12044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12045  # take no chances and rewrite it.
12046  # Note: m4 eats our [], so we need to use [ and ] instead.
12047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12048  if test "x$has_forbidden_chars" != x; then
12049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12053      # Going to short mode and back again did indeed matter. Since short mode is
12054      # case insensitive, let's make it lowercase to improve readability.
12055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12056      # Now convert it back to Unix-stile (cygpath)
12057      input_path=`$CYGPATH -u "$shortmode_path"`
12058      new_path="$input_path"
12059    fi
12060  fi
12061
12062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12063  if test "x$test_cygdrive_prefix" = x; then
12064    # As a simple fix, exclude /usr/bin since it's not a real path.
12065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12067      # a path prefixed by /cygdrive for fixpath to work.
12068      new_path="$CYGWIN_ROOT_PATH$input_path"
12069    fi
12070  fi
12071
12072
12073  if test "x$path" != "x$new_path"; then
12074    BOOT_JDK="$new_path"
12075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12077  fi
12078
12079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12080
12081  path="$BOOT_JDK"
12082  has_colon=`$ECHO $path | $GREP ^.:`
12083  new_path="$path"
12084  if test "x$has_colon" = x; then
12085    # Not in mixed or Windows style, start by that.
12086    new_path=`cmd //c echo $path`
12087  fi
12088
12089
12090  input_path="$new_path"
12091  # Check if we need to convert this using DOS-style short mode. If the path
12092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12093  # take no chances and rewrite it.
12094  # Note: m4 eats our [], so we need to use [ and ] instead.
12095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12096  if test "x$has_forbidden_chars" != x; then
12097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12099  fi
12100
12101
12102  windows_path="$new_path"
12103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12104    unix_path=`$CYGPATH -u "$windows_path"`
12105    new_path="$unix_path"
12106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12108    new_path="$unix_path"
12109  fi
12110
12111  if test "x$path" != "x$new_path"; then
12112    BOOT_JDK="$new_path"
12113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12115  fi
12116
12117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12119
12120  else
12121    # We're on a posix platform. Hooray! :)
12122    path="$BOOT_JDK"
12123
12124    if test ! -f "$path" && test ! -d "$path"; then
12125      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12126    fi
12127
12128    has_space=`$ECHO "$path" | $GREP " "`
12129    if test "x$has_space" != x; then
12130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12132      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12133    fi
12134  fi
12135
12136              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12137$as_echo_n "checking for Boot JDK... " >&6; }
12138              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12139$as_echo "$BOOT_JDK" >&6; }
12140              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12141$as_echo_n "checking Boot JDK version... " >&6; }
12142              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12143              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12144$as_echo "$BOOT_JDK_VERSION" >&6; }
12145            fi # end check jdk version
12146          fi # end check rt.jar
12147        fi # end check javac
12148      fi # end check java
12149    fi # end check boot jdk found
12150  fi
12151
12152    done
12153  fi
12154
12155  fi
12156
12157
12158    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12159    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12160      # Do we have a bin/java?
12161      if test ! -x "$BOOT_JDK/bin/java"; then
12162        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12164        BOOT_JDK_FOUND=no
12165      else
12166        # Do we have a bin/javac?
12167        if test ! -x "$BOOT_JDK/bin/javac"; then
12168          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12170          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12171$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12172          BOOT_JDK_FOUND=no
12173        else
12174          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12175          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12176            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12178            BOOT_JDK_FOUND=no
12179          else
12180            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12181            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12182
12183            # Extra M4 quote needed to protect [] in grep expression.
12184            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12185            if test "x$FOUND_VERSION_78" = x; then
12186              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12188              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12189$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12190              BOOT_JDK_FOUND=no
12191            else
12192              # We're done! :-)
12193              BOOT_JDK_FOUND=yes
12194
12195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12196
12197  # Input might be given as Windows format, start by converting to
12198  # unix format.
12199  path="$BOOT_JDK"
12200  new_path=`$CYGPATH -u "$path"`
12201
12202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12205  # "foo.exe" is OK but "foo" is an error.
12206  #
12207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12208  # It is also a way to make sure we got the proper file name for the real test later on.
12209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12210  if test "x$test_shortpath" = x; then
12211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12214  fi
12215
12216  # Call helper function which possibly converts this using DOS-style short mode.
12217  # If so, the updated path is stored in $new_path.
12218
12219  input_path="$new_path"
12220  # Check if we need to convert this using DOS-style short mode. If the path
12221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12222  # take no chances and rewrite it.
12223  # Note: m4 eats our [], so we need to use [ and ] instead.
12224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12225  if test "x$has_forbidden_chars" != x; then
12226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12230      # Going to short mode and back again did indeed matter. Since short mode is
12231      # case insensitive, let's make it lowercase to improve readability.
12232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12233      # Now convert it back to Unix-stile (cygpath)
12234      input_path=`$CYGPATH -u "$shortmode_path"`
12235      new_path="$input_path"
12236    fi
12237  fi
12238
12239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12240  if test "x$test_cygdrive_prefix" = x; then
12241    # As a simple fix, exclude /usr/bin since it's not a real path.
12242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12244      # a path prefixed by /cygdrive for fixpath to work.
12245      new_path="$CYGWIN_ROOT_PATH$input_path"
12246    fi
12247  fi
12248
12249
12250  if test "x$path" != "x$new_path"; then
12251    BOOT_JDK="$new_path"
12252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12254  fi
12255
12256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12257
12258  path="$BOOT_JDK"
12259  has_colon=`$ECHO $path | $GREP ^.:`
12260  new_path="$path"
12261  if test "x$has_colon" = x; then
12262    # Not in mixed or Windows style, start by that.
12263    new_path=`cmd //c echo $path`
12264  fi
12265
12266
12267  input_path="$new_path"
12268  # Check if we need to convert this using DOS-style short mode. If the path
12269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12270  # take no chances and rewrite it.
12271  # Note: m4 eats our [], so we need to use [ and ] instead.
12272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12273  if test "x$has_forbidden_chars" != x; then
12274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12276  fi
12277
12278
12279  windows_path="$new_path"
12280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12281    unix_path=`$CYGPATH -u "$windows_path"`
12282    new_path="$unix_path"
12283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12285    new_path="$unix_path"
12286  fi
12287
12288  if test "x$path" != "x$new_path"; then
12289    BOOT_JDK="$new_path"
12290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12292  fi
12293
12294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12296
12297  else
12298    # We're on a posix platform. Hooray! :)
12299    path="$BOOT_JDK"
12300
12301    if test ! -f "$path" && test ! -d "$path"; then
12302      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12303    fi
12304
12305    has_space=`$ECHO "$path" | $GREP " "`
12306    if test "x$has_space" != x; then
12307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12309      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12310    fi
12311  fi
12312
12313              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12314$as_echo_n "checking for Boot JDK... " >&6; }
12315              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12316$as_echo "$BOOT_JDK" >&6; }
12317              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12318$as_echo_n "checking Boot JDK version... " >&6; }
12319              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12320              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12321$as_echo "$BOOT_JDK_VERSION" >&6; }
12322            fi # end check jdk version
12323          fi # end check rt.jar
12324        fi # end check javac
12325      fi # end check java
12326    fi # end check boot jdk found
12327  fi
12328
12329
12330  if test "x$BOOT_JDK_FOUND" = xno; then
12331    # Now execute the test
12332
12333  if test "x$PROGRAMW6432" != x; then
12334    VIRTUAL_DIR="$PROGRAMW6432/Java"
12335
12336  windows_path="$VIRTUAL_DIR"
12337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12338    unix_path=`$CYGPATH -u "$windows_path"`
12339    VIRTUAL_DIR="$unix_path"
12340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12342    VIRTUAL_DIR="$unix_path"
12343  fi
12344
12345
12346  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12347  BOOT_JDK_SUFFIX=""
12348  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12349  if test "x$ALL_JDKS_FOUND" != x; then
12350    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12351
12352  if test "x$BOOT_JDK_FOUND" = xno; then
12353    # Now execute the test
12354
12355        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12356        if test -d "$BOOT_JDK"; then
12357          BOOT_JDK_FOUND=maybe
12358          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12359$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12360        fi
12361
12362
12363    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12364    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12365      # Do we have a bin/java?
12366      if test ! -x "$BOOT_JDK/bin/java"; then
12367        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12369        BOOT_JDK_FOUND=no
12370      else
12371        # Do we have a bin/javac?
12372        if test ! -x "$BOOT_JDK/bin/javac"; then
12373          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12375          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12376$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12377          BOOT_JDK_FOUND=no
12378        else
12379          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12380          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12381            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12383            BOOT_JDK_FOUND=no
12384          else
12385            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12386            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12387
12388            # Extra M4 quote needed to protect [] in grep expression.
12389            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12390            if test "x$FOUND_VERSION_78" = x; then
12391              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12393              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12394$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12395              BOOT_JDK_FOUND=no
12396            else
12397              # We're done! :-)
12398              BOOT_JDK_FOUND=yes
12399
12400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12401
12402  # Input might be given as Windows format, start by converting to
12403  # unix format.
12404  path="$BOOT_JDK"
12405  new_path=`$CYGPATH -u "$path"`
12406
12407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12410  # "foo.exe" is OK but "foo" is an error.
12411  #
12412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12413  # It is also a way to make sure we got the proper file name for the real test later on.
12414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12415  if test "x$test_shortpath" = x; then
12416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12419  fi
12420
12421  # Call helper function which possibly converts this using DOS-style short mode.
12422  # If so, the updated path is stored in $new_path.
12423
12424  input_path="$new_path"
12425  # Check if we need to convert this using DOS-style short mode. If the path
12426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12427  # take no chances and rewrite it.
12428  # Note: m4 eats our [], so we need to use [ and ] instead.
12429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12430  if test "x$has_forbidden_chars" != x; then
12431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12435      # Going to short mode and back again did indeed matter. Since short mode is
12436      # case insensitive, let's make it lowercase to improve readability.
12437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12438      # Now convert it back to Unix-stile (cygpath)
12439      input_path=`$CYGPATH -u "$shortmode_path"`
12440      new_path="$input_path"
12441    fi
12442  fi
12443
12444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12445  if test "x$test_cygdrive_prefix" = x; then
12446    # As a simple fix, exclude /usr/bin since it's not a real path.
12447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12449      # a path prefixed by /cygdrive for fixpath to work.
12450      new_path="$CYGWIN_ROOT_PATH$input_path"
12451    fi
12452  fi
12453
12454
12455  if test "x$path" != "x$new_path"; then
12456    BOOT_JDK="$new_path"
12457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12459  fi
12460
12461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12462
12463  path="$BOOT_JDK"
12464  has_colon=`$ECHO $path | $GREP ^.:`
12465  new_path="$path"
12466  if test "x$has_colon" = x; then
12467    # Not in mixed or Windows style, start by that.
12468    new_path=`cmd //c echo $path`
12469  fi
12470
12471
12472  input_path="$new_path"
12473  # Check if we need to convert this using DOS-style short mode. If the path
12474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12475  # take no chances and rewrite it.
12476  # Note: m4 eats our [], so we need to use [ and ] instead.
12477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12478  if test "x$has_forbidden_chars" != x; then
12479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12481  fi
12482
12483
12484  windows_path="$new_path"
12485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12486    unix_path=`$CYGPATH -u "$windows_path"`
12487    new_path="$unix_path"
12488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12490    new_path="$unix_path"
12491  fi
12492
12493  if test "x$path" != "x$new_path"; then
12494    BOOT_JDK="$new_path"
12495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12497  fi
12498
12499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12501
12502  else
12503    # We're on a posix platform. Hooray! :)
12504    path="$BOOT_JDK"
12505
12506    if test ! -f "$path" && test ! -d "$path"; then
12507      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12508    fi
12509
12510    has_space=`$ECHO "$path" | $GREP " "`
12511    if test "x$has_space" != x; then
12512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12513$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12514      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12515    fi
12516  fi
12517
12518              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12519$as_echo_n "checking for Boot JDK... " >&6; }
12520              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12521$as_echo "$BOOT_JDK" >&6; }
12522              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12523$as_echo_n "checking Boot JDK version... " >&6; }
12524              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12525              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12526$as_echo "$BOOT_JDK_VERSION" >&6; }
12527            fi # end check jdk version
12528          fi # end check rt.jar
12529        fi # end check javac
12530      fi # end check java
12531    fi # end check boot jdk found
12532  fi
12533
12534    done
12535  fi
12536
12537  fi
12538
12539
12540    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12541    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12542      # Do we have a bin/java?
12543      if test ! -x "$BOOT_JDK/bin/java"; then
12544        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12546        BOOT_JDK_FOUND=no
12547      else
12548        # Do we have a bin/javac?
12549        if test ! -x "$BOOT_JDK/bin/javac"; then
12550          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12552          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12553$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12554          BOOT_JDK_FOUND=no
12555        else
12556          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12557          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12558            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12560            BOOT_JDK_FOUND=no
12561          else
12562            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12563            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12564
12565            # Extra M4 quote needed to protect [] in grep expression.
12566            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12567            if test "x$FOUND_VERSION_78" = x; then
12568              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12570              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12571$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12572              BOOT_JDK_FOUND=no
12573            else
12574              # We're done! :-)
12575              BOOT_JDK_FOUND=yes
12576
12577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12578
12579  # Input might be given as Windows format, start by converting to
12580  # unix format.
12581  path="$BOOT_JDK"
12582  new_path=`$CYGPATH -u "$path"`
12583
12584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12587  # "foo.exe" is OK but "foo" is an error.
12588  #
12589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12590  # It is also a way to make sure we got the proper file name for the real test later on.
12591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12592  if test "x$test_shortpath" = x; then
12593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12596  fi
12597
12598  # Call helper function which possibly converts this using DOS-style short mode.
12599  # If so, the updated path is stored in $new_path.
12600
12601  input_path="$new_path"
12602  # Check if we need to convert this using DOS-style short mode. If the path
12603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12604  # take no chances and rewrite it.
12605  # Note: m4 eats our [], so we need to use [ and ] instead.
12606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12607  if test "x$has_forbidden_chars" != x; then
12608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12612      # Going to short mode and back again did indeed matter. Since short mode is
12613      # case insensitive, let's make it lowercase to improve readability.
12614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12615      # Now convert it back to Unix-stile (cygpath)
12616      input_path=`$CYGPATH -u "$shortmode_path"`
12617      new_path="$input_path"
12618    fi
12619  fi
12620
12621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12622  if test "x$test_cygdrive_prefix" = x; then
12623    # As a simple fix, exclude /usr/bin since it's not a real path.
12624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12626      # a path prefixed by /cygdrive for fixpath to work.
12627      new_path="$CYGWIN_ROOT_PATH$input_path"
12628    fi
12629  fi
12630
12631
12632  if test "x$path" != "x$new_path"; then
12633    BOOT_JDK="$new_path"
12634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12636  fi
12637
12638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12639
12640  path="$BOOT_JDK"
12641  has_colon=`$ECHO $path | $GREP ^.:`
12642  new_path="$path"
12643  if test "x$has_colon" = x; then
12644    # Not in mixed or Windows style, start by that.
12645    new_path=`cmd //c echo $path`
12646  fi
12647
12648
12649  input_path="$new_path"
12650  # Check if we need to convert this using DOS-style short mode. If the path
12651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12652  # take no chances and rewrite it.
12653  # Note: m4 eats our [], so we need to use [ and ] instead.
12654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12655  if test "x$has_forbidden_chars" != x; then
12656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12658  fi
12659
12660
12661  windows_path="$new_path"
12662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12663    unix_path=`$CYGPATH -u "$windows_path"`
12664    new_path="$unix_path"
12665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12667    new_path="$unix_path"
12668  fi
12669
12670  if test "x$path" != "x$new_path"; then
12671    BOOT_JDK="$new_path"
12672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12674  fi
12675
12676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12678
12679  else
12680    # We're on a posix platform. Hooray! :)
12681    path="$BOOT_JDK"
12682
12683    if test ! -f "$path" && test ! -d "$path"; then
12684      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12685    fi
12686
12687    has_space=`$ECHO "$path" | $GREP " "`
12688    if test "x$has_space" != x; then
12689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12690$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12691      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12692    fi
12693  fi
12694
12695              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12696$as_echo_n "checking for Boot JDK... " >&6; }
12697              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12698$as_echo "$BOOT_JDK" >&6; }
12699              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12700$as_echo_n "checking Boot JDK version... " >&6; }
12701              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12702              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12703$as_echo "$BOOT_JDK_VERSION" >&6; }
12704            fi # end check jdk version
12705          fi # end check rt.jar
12706        fi # end check javac
12707      fi # end check java
12708    fi # end check boot jdk found
12709  fi
12710
12711
12712  if test "x$BOOT_JDK_FOUND" = xno; then
12713    # Now execute the test
12714
12715  if test "x$PROGRAMFILES" != x; then
12716    VIRTUAL_DIR="$PROGRAMFILES/Java"
12717
12718  windows_path="$VIRTUAL_DIR"
12719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12720    unix_path=`$CYGPATH -u "$windows_path"`
12721    VIRTUAL_DIR="$unix_path"
12722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12724    VIRTUAL_DIR="$unix_path"
12725  fi
12726
12727
12728  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12729  BOOT_JDK_SUFFIX=""
12730  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12731  if test "x$ALL_JDKS_FOUND" != x; then
12732    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12733
12734  if test "x$BOOT_JDK_FOUND" = xno; then
12735    # Now execute the test
12736
12737        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12738        if test -d "$BOOT_JDK"; then
12739          BOOT_JDK_FOUND=maybe
12740          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12741$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12742        fi
12743
12744
12745    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12746    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12747      # Do we have a bin/java?
12748      if test ! -x "$BOOT_JDK/bin/java"; then
12749        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12751        BOOT_JDK_FOUND=no
12752      else
12753        # Do we have a bin/javac?
12754        if test ! -x "$BOOT_JDK/bin/javac"; then
12755          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12757          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12758$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12759          BOOT_JDK_FOUND=no
12760        else
12761          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12762          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12763            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12765            BOOT_JDK_FOUND=no
12766          else
12767            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12768            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12769
12770            # Extra M4 quote needed to protect [] in grep expression.
12771            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12772            if test "x$FOUND_VERSION_78" = x; then
12773              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12775              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12776$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12777              BOOT_JDK_FOUND=no
12778            else
12779              # We're done! :-)
12780              BOOT_JDK_FOUND=yes
12781
12782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12783
12784  # Input might be given as Windows format, start by converting to
12785  # unix format.
12786  path="$BOOT_JDK"
12787  new_path=`$CYGPATH -u "$path"`
12788
12789  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12790  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12791  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12792  # "foo.exe" is OK but "foo" is an error.
12793  #
12794  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12795  # It is also a way to make sure we got the proper file name for the real test later on.
12796  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12797  if test "x$test_shortpath" = x; then
12798    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12800    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12801  fi
12802
12803  # Call helper function which possibly converts this using DOS-style short mode.
12804  # If so, the updated path is stored in $new_path.
12805
12806  input_path="$new_path"
12807  # Check if we need to convert this using DOS-style short mode. If the path
12808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12809  # take no chances and rewrite it.
12810  # Note: m4 eats our [], so we need to use [ and ] instead.
12811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12812  if test "x$has_forbidden_chars" != x; then
12813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12814    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12815    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12816    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12817      # Going to short mode and back again did indeed matter. Since short mode is
12818      # case insensitive, let's make it lowercase to improve readability.
12819      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12820      # Now convert it back to Unix-stile (cygpath)
12821      input_path=`$CYGPATH -u "$shortmode_path"`
12822      new_path="$input_path"
12823    fi
12824  fi
12825
12826  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12827  if test "x$test_cygdrive_prefix" = x; then
12828    # As a simple fix, exclude /usr/bin since it's not a real path.
12829    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12830      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12831      # a path prefixed by /cygdrive for fixpath to work.
12832      new_path="$CYGWIN_ROOT_PATH$input_path"
12833    fi
12834  fi
12835
12836
12837  if test "x$path" != "x$new_path"; then
12838    BOOT_JDK="$new_path"
12839    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12840$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12841  fi
12842
12843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12844
12845  path="$BOOT_JDK"
12846  has_colon=`$ECHO $path | $GREP ^.:`
12847  new_path="$path"
12848  if test "x$has_colon" = x; then
12849    # Not in mixed or Windows style, start by that.
12850    new_path=`cmd //c echo $path`
12851  fi
12852
12853
12854  input_path="$new_path"
12855  # Check if we need to convert this using DOS-style short mode. If the path
12856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12857  # take no chances and rewrite it.
12858  # Note: m4 eats our [], so we need to use [ and ] instead.
12859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12860  if test "x$has_forbidden_chars" != x; then
12861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12863  fi
12864
12865
12866  windows_path="$new_path"
12867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12868    unix_path=`$CYGPATH -u "$windows_path"`
12869    new_path="$unix_path"
12870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12872    new_path="$unix_path"
12873  fi
12874
12875  if test "x$path" != "x$new_path"; then
12876    BOOT_JDK="$new_path"
12877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12878$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12879  fi
12880
12881  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12882  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12883
12884  else
12885    # We're on a posix platform. Hooray! :)
12886    path="$BOOT_JDK"
12887
12888    if test ! -f "$path" && test ! -d "$path"; then
12889      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12890    fi
12891
12892    has_space=`$ECHO "$path" | $GREP " "`
12893    if test "x$has_space" != x; then
12894      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12895$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12896      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12897    fi
12898  fi
12899
12900              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12901$as_echo_n "checking for Boot JDK... " >&6; }
12902              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12903$as_echo "$BOOT_JDK" >&6; }
12904              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12905$as_echo_n "checking Boot JDK version... " >&6; }
12906              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12907              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12908$as_echo "$BOOT_JDK_VERSION" >&6; }
12909            fi # end check jdk version
12910          fi # end check rt.jar
12911        fi # end check javac
12912      fi # end check java
12913    fi # end check boot jdk found
12914  fi
12915
12916    done
12917  fi
12918
12919  fi
12920
12921
12922    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12923    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12924      # Do we have a bin/java?
12925      if test ! -x "$BOOT_JDK/bin/java"; then
12926        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12928        BOOT_JDK_FOUND=no
12929      else
12930        # Do we have a bin/javac?
12931        if test ! -x "$BOOT_JDK/bin/javac"; then
12932          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12934          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12935$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12936          BOOT_JDK_FOUND=no
12937        else
12938          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12939          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12940            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12942            BOOT_JDK_FOUND=no
12943          else
12944            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12946
12947            # Extra M4 quote needed to protect [] in grep expression.
12948            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12949            if test "x$FOUND_VERSION_78" = x; then
12950              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12952              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12953$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12954              BOOT_JDK_FOUND=no
12955            else
12956              # We're done! :-)
12957              BOOT_JDK_FOUND=yes
12958
12959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12960
12961  # Input might be given as Windows format, start by converting to
12962  # unix format.
12963  path="$BOOT_JDK"
12964  new_path=`$CYGPATH -u "$path"`
12965
12966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12969  # "foo.exe" is OK but "foo" is an error.
12970  #
12971  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12972  # It is also a way to make sure we got the proper file name for the real test later on.
12973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12974  if test "x$test_shortpath" = x; then
12975    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12976$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12977    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12978  fi
12979
12980  # Call helper function which possibly converts this using DOS-style short mode.
12981  # If so, the updated path is stored in $new_path.
12982
12983  input_path="$new_path"
12984  # Check if we need to convert this using DOS-style short mode. If the path
12985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12986  # take no chances and rewrite it.
12987  # Note: m4 eats our [], so we need to use [ and ] instead.
12988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12989  if test "x$has_forbidden_chars" != x; then
12990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12991    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12992    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12993    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12994      # Going to short mode and back again did indeed matter. Since short mode is
12995      # case insensitive, let's make it lowercase to improve readability.
12996      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12997      # Now convert it back to Unix-stile (cygpath)
12998      input_path=`$CYGPATH -u "$shortmode_path"`
12999      new_path="$input_path"
13000    fi
13001  fi
13002
13003  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13004  if test "x$test_cygdrive_prefix" = x; then
13005    # As a simple fix, exclude /usr/bin since it's not a real path.
13006    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13007      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13008      # a path prefixed by /cygdrive for fixpath to work.
13009      new_path="$CYGWIN_ROOT_PATH$input_path"
13010    fi
13011  fi
13012
13013
13014  if test "x$path" != "x$new_path"; then
13015    BOOT_JDK="$new_path"
13016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13017$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13018  fi
13019
13020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13021
13022  path="$BOOT_JDK"
13023  has_colon=`$ECHO $path | $GREP ^.:`
13024  new_path="$path"
13025  if test "x$has_colon" = x; then
13026    # Not in mixed or Windows style, start by that.
13027    new_path=`cmd //c echo $path`
13028  fi
13029
13030
13031  input_path="$new_path"
13032  # Check if we need to convert this using DOS-style short mode. If the path
13033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13034  # take no chances and rewrite it.
13035  # Note: m4 eats our [], so we need to use [ and ] instead.
13036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13037  if test "x$has_forbidden_chars" != x; then
13038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13040  fi
13041
13042
13043  windows_path="$new_path"
13044  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13045    unix_path=`$CYGPATH -u "$windows_path"`
13046    new_path="$unix_path"
13047  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13048    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13049    new_path="$unix_path"
13050  fi
13051
13052  if test "x$path" != "x$new_path"; then
13053    BOOT_JDK="$new_path"
13054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13056  fi
13057
13058  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13059  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13060
13061  else
13062    # We're on a posix platform. Hooray! :)
13063    path="$BOOT_JDK"
13064
13065    if test ! -f "$path" && test ! -d "$path"; then
13066      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13067    fi
13068
13069    has_space=`$ECHO "$path" | $GREP " "`
13070    if test "x$has_space" != x; then
13071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13073      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13074    fi
13075  fi
13076
13077              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13078$as_echo_n "checking for Boot JDK... " >&6; }
13079              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13080$as_echo "$BOOT_JDK" >&6; }
13081              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13082$as_echo_n "checking Boot JDK version... " >&6; }
13083              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13084              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13085$as_echo "$BOOT_JDK_VERSION" >&6; }
13086            fi # end check jdk version
13087          fi # end check rt.jar
13088        fi # end check javac
13089      fi # end check java
13090    fi # end check boot jdk found
13091  fi
13092
13093
13094  if test "x$BOOT_JDK_FOUND" = xno; then
13095    # Now execute the test
13096
13097  if test "x$ProgramFiles" != x; then
13098    VIRTUAL_DIR="$ProgramFiles/Java"
13099
13100  windows_path="$VIRTUAL_DIR"
13101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13102    unix_path=`$CYGPATH -u "$windows_path"`
13103    VIRTUAL_DIR="$unix_path"
13104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13106    VIRTUAL_DIR="$unix_path"
13107  fi
13108
13109
13110  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13111  BOOT_JDK_SUFFIX=""
13112  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13113  if test "x$ALL_JDKS_FOUND" != x; then
13114    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13115
13116  if test "x$BOOT_JDK_FOUND" = xno; then
13117    # Now execute the test
13118
13119        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13120        if test -d "$BOOT_JDK"; then
13121          BOOT_JDK_FOUND=maybe
13122          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13123$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13124        fi
13125
13126
13127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13129      # Do we have a bin/java?
13130      if test ! -x "$BOOT_JDK/bin/java"; then
13131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13133        BOOT_JDK_FOUND=no
13134      else
13135        # Do we have a bin/javac?
13136        if test ! -x "$BOOT_JDK/bin/javac"; then
13137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13141          BOOT_JDK_FOUND=no
13142        else
13143          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13144          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13145            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13146$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13147            BOOT_JDK_FOUND=no
13148          else
13149            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13151
13152            # Extra M4 quote needed to protect [] in grep expression.
13153            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13154            if test "x$FOUND_VERSION_78" = x; then
13155              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13157              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13158$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13159              BOOT_JDK_FOUND=no
13160            else
13161              # We're done! :-)
13162              BOOT_JDK_FOUND=yes
13163
13164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13165
13166  # Input might be given as Windows format, start by converting to
13167  # unix format.
13168  path="$BOOT_JDK"
13169  new_path=`$CYGPATH -u "$path"`
13170
13171  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13172  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13173  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13174  # "foo.exe" is OK but "foo" is an error.
13175  #
13176  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13177  # It is also a way to make sure we got the proper file name for the real test later on.
13178  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13179  if test "x$test_shortpath" = x; then
13180    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13182    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13183  fi
13184
13185  # Call helper function which possibly converts this using DOS-style short mode.
13186  # If so, the updated path is stored in $new_path.
13187
13188  input_path="$new_path"
13189  # Check if we need to convert this using DOS-style short mode. If the path
13190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13191  # take no chances and rewrite it.
13192  # Note: m4 eats our [], so we need to use [ and ] instead.
13193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13194  if test "x$has_forbidden_chars" != x; then
13195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13196    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13197    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13198    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13199      # Going to short mode and back again did indeed matter. Since short mode is
13200      # case insensitive, let's make it lowercase to improve readability.
13201      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13202      # Now convert it back to Unix-stile (cygpath)
13203      input_path=`$CYGPATH -u "$shortmode_path"`
13204      new_path="$input_path"
13205    fi
13206  fi
13207
13208  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13209  if test "x$test_cygdrive_prefix" = x; then
13210    # As a simple fix, exclude /usr/bin since it's not a real path.
13211    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13212      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13213      # a path prefixed by /cygdrive for fixpath to work.
13214      new_path="$CYGWIN_ROOT_PATH$input_path"
13215    fi
13216  fi
13217
13218
13219  if test "x$path" != "x$new_path"; then
13220    BOOT_JDK="$new_path"
13221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13223  fi
13224
13225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13226
13227  path="$BOOT_JDK"
13228  has_colon=`$ECHO $path | $GREP ^.:`
13229  new_path="$path"
13230  if test "x$has_colon" = x; then
13231    # Not in mixed or Windows style, start by that.
13232    new_path=`cmd //c echo $path`
13233  fi
13234
13235
13236  input_path="$new_path"
13237  # Check if we need to convert this using DOS-style short mode. If the path
13238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13239  # take no chances and rewrite it.
13240  # Note: m4 eats our [], so we need to use [ and ] instead.
13241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13242  if test "x$has_forbidden_chars" != x; then
13243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13245  fi
13246
13247
13248  windows_path="$new_path"
13249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13250    unix_path=`$CYGPATH -u "$windows_path"`
13251    new_path="$unix_path"
13252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13254    new_path="$unix_path"
13255  fi
13256
13257  if test "x$path" != "x$new_path"; then
13258    BOOT_JDK="$new_path"
13259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13260$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13261  fi
13262
13263  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13264  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13265
13266  else
13267    # We're on a posix platform. Hooray! :)
13268    path="$BOOT_JDK"
13269
13270    if test ! -f "$path" && test ! -d "$path"; then
13271      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13272    fi
13273
13274    has_space=`$ECHO "$path" | $GREP " "`
13275    if test "x$has_space" != x; then
13276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13277$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13278      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13279    fi
13280  fi
13281
13282              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13283$as_echo_n "checking for Boot JDK... " >&6; }
13284              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13285$as_echo "$BOOT_JDK" >&6; }
13286              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13287$as_echo_n "checking Boot JDK version... " >&6; }
13288              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13289              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13290$as_echo "$BOOT_JDK_VERSION" >&6; }
13291            fi # end check jdk version
13292          fi # end check rt.jar
13293        fi # end check javac
13294      fi # end check java
13295    fi # end check boot jdk found
13296  fi
13297
13298    done
13299  fi
13300
13301  fi
13302
13303
13304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13306      # Do we have a bin/java?
13307      if test ! -x "$BOOT_JDK/bin/java"; then
13308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13310        BOOT_JDK_FOUND=no
13311      else
13312        # Do we have a bin/javac?
13313        if test ! -x "$BOOT_JDK/bin/javac"; then
13314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13318          BOOT_JDK_FOUND=no
13319        else
13320          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13321          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13324            BOOT_JDK_FOUND=no
13325          else
13326            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13328
13329            # Extra M4 quote needed to protect [] in grep expression.
13330            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13331            if test "x$FOUND_VERSION_78" = x; then
13332              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13334              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13335$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13336              BOOT_JDK_FOUND=no
13337            else
13338              # We're done! :-)
13339              BOOT_JDK_FOUND=yes
13340
13341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13342
13343  # Input might be given as Windows format, start by converting to
13344  # unix format.
13345  path="$BOOT_JDK"
13346  new_path=`$CYGPATH -u "$path"`
13347
13348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13351  # "foo.exe" is OK but "foo" is an error.
13352  #
13353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13354  # It is also a way to make sure we got the proper file name for the real test later on.
13355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13356  if test "x$test_shortpath" = x; then
13357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13360  fi
13361
13362  # Call helper function which possibly converts this using DOS-style short mode.
13363  # If so, the updated path is stored in $new_path.
13364
13365  input_path="$new_path"
13366  # Check if we need to convert this using DOS-style short mode. If the path
13367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13368  # take no chances and rewrite it.
13369  # Note: m4 eats our [], so we need to use [ and ] instead.
13370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13371  if test "x$has_forbidden_chars" != x; then
13372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13376      # Going to short mode and back again did indeed matter. Since short mode is
13377      # case insensitive, let's make it lowercase to improve readability.
13378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13379      # Now convert it back to Unix-stile (cygpath)
13380      input_path=`$CYGPATH -u "$shortmode_path"`
13381      new_path="$input_path"
13382    fi
13383  fi
13384
13385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13386  if test "x$test_cygdrive_prefix" = x; then
13387    # As a simple fix, exclude /usr/bin since it's not a real path.
13388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13390      # a path prefixed by /cygdrive for fixpath to work.
13391      new_path="$CYGWIN_ROOT_PATH$input_path"
13392    fi
13393  fi
13394
13395
13396  if test "x$path" != "x$new_path"; then
13397    BOOT_JDK="$new_path"
13398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13400  fi
13401
13402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13403
13404  path="$BOOT_JDK"
13405  has_colon=`$ECHO $path | $GREP ^.:`
13406  new_path="$path"
13407  if test "x$has_colon" = x; then
13408    # Not in mixed or Windows style, start by that.
13409    new_path=`cmd //c echo $path`
13410  fi
13411
13412
13413  input_path="$new_path"
13414  # Check if we need to convert this using DOS-style short mode. If the path
13415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13416  # take no chances and rewrite it.
13417  # Note: m4 eats our [], so we need to use [ and ] instead.
13418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13419  if test "x$has_forbidden_chars" != x; then
13420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13422  fi
13423
13424
13425  windows_path="$new_path"
13426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13427    unix_path=`$CYGPATH -u "$windows_path"`
13428    new_path="$unix_path"
13429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13431    new_path="$unix_path"
13432  fi
13433
13434  if test "x$path" != "x$new_path"; then
13435    BOOT_JDK="$new_path"
13436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13438  fi
13439
13440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13442
13443  else
13444    # We're on a posix platform. Hooray! :)
13445    path="$BOOT_JDK"
13446
13447    if test ! -f "$path" && test ! -d "$path"; then
13448      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13449    fi
13450
13451    has_space=`$ECHO "$path" | $GREP " "`
13452    if test "x$has_space" != x; then
13453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13455      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13456    fi
13457  fi
13458
13459              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13460$as_echo_n "checking for Boot JDK... " >&6; }
13461              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13462$as_echo "$BOOT_JDK" >&6; }
13463              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13464$as_echo_n "checking Boot JDK version... " >&6; }
13465              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13467$as_echo "$BOOT_JDK_VERSION" >&6; }
13468            fi # end check jdk version
13469          fi # end check rt.jar
13470        fi # end check javac
13471      fi # end check java
13472    fi # end check boot jdk found
13473  fi
13474
13475
13476  if test "x$BOOT_JDK_FOUND" = xno; then
13477    # Now execute the test
13478
13479  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13480  BOOT_JDK_SUFFIX=""
13481  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13482  if test "x$ALL_JDKS_FOUND" != x; then
13483    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13484
13485  if test "x$BOOT_JDK_FOUND" = xno; then
13486    # Now execute the test
13487
13488        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13489        if test -d "$BOOT_JDK"; then
13490          BOOT_JDK_FOUND=maybe
13491          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13492$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13493        fi
13494
13495
13496    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13497    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13498      # Do we have a bin/java?
13499      if test ! -x "$BOOT_JDK/bin/java"; then
13500        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13502        BOOT_JDK_FOUND=no
13503      else
13504        # Do we have a bin/javac?
13505        if test ! -x "$BOOT_JDK/bin/javac"; then
13506          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13508          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13509$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13510          BOOT_JDK_FOUND=no
13511        else
13512          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13513          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13514            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13516            BOOT_JDK_FOUND=no
13517          else
13518            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13519            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13520
13521            # Extra M4 quote needed to protect [] in grep expression.
13522            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13523            if test "x$FOUND_VERSION_78" = x; then
13524              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13526              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13527$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13528              BOOT_JDK_FOUND=no
13529            else
13530              # We're done! :-)
13531              BOOT_JDK_FOUND=yes
13532
13533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13534
13535  # Input might be given as Windows format, start by converting to
13536  # unix format.
13537  path="$BOOT_JDK"
13538  new_path=`$CYGPATH -u "$path"`
13539
13540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13543  # "foo.exe" is OK but "foo" is an error.
13544  #
13545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13546  # It is also a way to make sure we got the proper file name for the real test later on.
13547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13548  if test "x$test_shortpath" = x; then
13549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13551    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13552  fi
13553
13554  # Call helper function which possibly converts this using DOS-style short mode.
13555  # If so, the updated path is stored in $new_path.
13556
13557  input_path="$new_path"
13558  # Check if we need to convert this using DOS-style short mode. If the path
13559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13560  # take no chances and rewrite it.
13561  # Note: m4 eats our [], so we need to use [ and ] instead.
13562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13563  if test "x$has_forbidden_chars" != x; then
13564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13568      # Going to short mode and back again did indeed matter. Since short mode is
13569      # case insensitive, let's make it lowercase to improve readability.
13570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13571      # Now convert it back to Unix-stile (cygpath)
13572      input_path=`$CYGPATH -u "$shortmode_path"`
13573      new_path="$input_path"
13574    fi
13575  fi
13576
13577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13578  if test "x$test_cygdrive_prefix" = x; then
13579    # As a simple fix, exclude /usr/bin since it's not a real path.
13580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13582      # a path prefixed by /cygdrive for fixpath to work.
13583      new_path="$CYGWIN_ROOT_PATH$input_path"
13584    fi
13585  fi
13586
13587
13588  if test "x$path" != "x$new_path"; then
13589    BOOT_JDK="$new_path"
13590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13592  fi
13593
13594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13595
13596  path="$BOOT_JDK"
13597  has_colon=`$ECHO $path | $GREP ^.:`
13598  new_path="$path"
13599  if test "x$has_colon" = x; then
13600    # Not in mixed or Windows style, start by that.
13601    new_path=`cmd //c echo $path`
13602  fi
13603
13604
13605  input_path="$new_path"
13606  # Check if we need to convert this using DOS-style short mode. If the path
13607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13608  # take no chances and rewrite it.
13609  # Note: m4 eats our [], so we need to use [ and ] instead.
13610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13611  if test "x$has_forbidden_chars" != x; then
13612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13614  fi
13615
13616
13617  windows_path="$new_path"
13618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13619    unix_path=`$CYGPATH -u "$windows_path"`
13620    new_path="$unix_path"
13621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13623    new_path="$unix_path"
13624  fi
13625
13626  if test "x$path" != "x$new_path"; then
13627    BOOT_JDK="$new_path"
13628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13630  fi
13631
13632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13634
13635  else
13636    # We're on a posix platform. Hooray! :)
13637    path="$BOOT_JDK"
13638
13639    if test ! -f "$path" && test ! -d "$path"; then
13640      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13641    fi
13642
13643    has_space=`$ECHO "$path" | $GREP " "`
13644    if test "x$has_space" != x; then
13645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13647      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13648    fi
13649  fi
13650
13651              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13652$as_echo_n "checking for Boot JDK... " >&6; }
13653              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13654$as_echo "$BOOT_JDK" >&6; }
13655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13656$as_echo_n "checking Boot JDK version... " >&6; }
13657              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13659$as_echo "$BOOT_JDK_VERSION" >&6; }
13660            fi # end check jdk version
13661          fi # end check rt.jar
13662        fi # end check javac
13663      fi # end check java
13664    fi # end check boot jdk found
13665  fi
13666
13667    done
13668  fi
13669
13670
13671    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13672    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13673      # Do we have a bin/java?
13674      if test ! -x "$BOOT_JDK/bin/java"; then
13675        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13677        BOOT_JDK_FOUND=no
13678      else
13679        # Do we have a bin/javac?
13680        if test ! -x "$BOOT_JDK/bin/javac"; then
13681          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13683          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13684$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13685          BOOT_JDK_FOUND=no
13686        else
13687          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13688          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13689            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13691            BOOT_JDK_FOUND=no
13692          else
13693            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13694            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13695
13696            # Extra M4 quote needed to protect [] in grep expression.
13697            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13698            if test "x$FOUND_VERSION_78" = x; then
13699              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13701              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13702$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13703              BOOT_JDK_FOUND=no
13704            else
13705              # We're done! :-)
13706              BOOT_JDK_FOUND=yes
13707
13708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13709
13710  # Input might be given as Windows format, start by converting to
13711  # unix format.
13712  path="$BOOT_JDK"
13713  new_path=`$CYGPATH -u "$path"`
13714
13715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13718  # "foo.exe" is OK but "foo" is an error.
13719  #
13720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13721  # It is also a way to make sure we got the proper file name for the real test later on.
13722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13723  if test "x$test_shortpath" = x; then
13724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13726    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13727  fi
13728
13729  # Call helper function which possibly converts this using DOS-style short mode.
13730  # If so, the updated path is stored in $new_path.
13731
13732  input_path="$new_path"
13733  # Check if we need to convert this using DOS-style short mode. If the path
13734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13735  # take no chances and rewrite it.
13736  # Note: m4 eats our [], so we need to use [ and ] instead.
13737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13738  if test "x$has_forbidden_chars" != x; then
13739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13743      # Going to short mode and back again did indeed matter. Since short mode is
13744      # case insensitive, let's make it lowercase to improve readability.
13745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13746      # Now convert it back to Unix-stile (cygpath)
13747      input_path=`$CYGPATH -u "$shortmode_path"`
13748      new_path="$input_path"
13749    fi
13750  fi
13751
13752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13753  if test "x$test_cygdrive_prefix" = x; then
13754    # As a simple fix, exclude /usr/bin since it's not a real path.
13755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13757      # a path prefixed by /cygdrive for fixpath to work.
13758      new_path="$CYGWIN_ROOT_PATH$input_path"
13759    fi
13760  fi
13761
13762
13763  if test "x$path" != "x$new_path"; then
13764    BOOT_JDK="$new_path"
13765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13767  fi
13768
13769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13770
13771  path="$BOOT_JDK"
13772  has_colon=`$ECHO $path | $GREP ^.:`
13773  new_path="$path"
13774  if test "x$has_colon" = x; then
13775    # Not in mixed or Windows style, start by that.
13776    new_path=`cmd //c echo $path`
13777  fi
13778
13779
13780  input_path="$new_path"
13781  # Check if we need to convert this using DOS-style short mode. If the path
13782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13783  # take no chances and rewrite it.
13784  # Note: m4 eats our [], so we need to use [ and ] instead.
13785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13786  if test "x$has_forbidden_chars" != x; then
13787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13789  fi
13790
13791
13792  windows_path="$new_path"
13793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13794    unix_path=`$CYGPATH -u "$windows_path"`
13795    new_path="$unix_path"
13796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13798    new_path="$unix_path"
13799  fi
13800
13801  if test "x$path" != "x$new_path"; then
13802    BOOT_JDK="$new_path"
13803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13805  fi
13806
13807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13809
13810  else
13811    # We're on a posix platform. Hooray! :)
13812    path="$BOOT_JDK"
13813
13814    if test ! -f "$path" && test ! -d "$path"; then
13815      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13816    fi
13817
13818    has_space=`$ECHO "$path" | $GREP " "`
13819    if test "x$has_space" != x; then
13820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13822      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13823    fi
13824  fi
13825
13826              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13827$as_echo_n "checking for Boot JDK... " >&6; }
13828              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13829$as_echo "$BOOT_JDK" >&6; }
13830              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13831$as_echo_n "checking Boot JDK version... " >&6; }
13832              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13833              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13834$as_echo "$BOOT_JDK_VERSION" >&6; }
13835            fi # end check jdk version
13836          fi # end check rt.jar
13837        fi # end check javac
13838      fi # end check java
13839    fi # end check boot jdk found
13840  fi
13841
13842  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
13843
13844  if test "x$BOOT_JDK_FOUND" = xno; then
13845    # Now execute the test
13846
13847  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
13848  BOOT_JDK_SUFFIX="/Contents/Home"
13849  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13850  if test "x$ALL_JDKS_FOUND" != x; then
13851    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13852
13853  if test "x$BOOT_JDK_FOUND" = xno; then
13854    # Now execute the test
13855
13856        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13857        if test -d "$BOOT_JDK"; then
13858          BOOT_JDK_FOUND=maybe
13859          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13860$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13861        fi
13862
13863
13864    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13865    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13866      # Do we have a bin/java?
13867      if test ! -x "$BOOT_JDK/bin/java"; then
13868        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13870        BOOT_JDK_FOUND=no
13871      else
13872        # Do we have a bin/javac?
13873        if test ! -x "$BOOT_JDK/bin/javac"; then
13874          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13876          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13877$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13878          BOOT_JDK_FOUND=no
13879        else
13880          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13881          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13882            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13884            BOOT_JDK_FOUND=no
13885          else
13886            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13887            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13888
13889            # Extra M4 quote needed to protect [] in grep expression.
13890            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13891            if test "x$FOUND_VERSION_78" = x; then
13892              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13894              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13895$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13896              BOOT_JDK_FOUND=no
13897            else
13898              # We're done! :-)
13899              BOOT_JDK_FOUND=yes
13900
13901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13902
13903  # Input might be given as Windows format, start by converting to
13904  # unix format.
13905  path="$BOOT_JDK"
13906  new_path=`$CYGPATH -u "$path"`
13907
13908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13911  # "foo.exe" is OK but "foo" is an error.
13912  #
13913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13914  # It is also a way to make sure we got the proper file name for the real test later on.
13915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13916  if test "x$test_shortpath" = x; then
13917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13919    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13920  fi
13921
13922  # Call helper function which possibly converts this using DOS-style short mode.
13923  # If so, the updated path is stored in $new_path.
13924
13925  input_path="$new_path"
13926  # Check if we need to convert this using DOS-style short mode. If the path
13927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13928  # take no chances and rewrite it.
13929  # Note: m4 eats our [], so we need to use [ and ] instead.
13930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13931  if test "x$has_forbidden_chars" != x; then
13932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13936      # Going to short mode and back again did indeed matter. Since short mode is
13937      # case insensitive, let's make it lowercase to improve readability.
13938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13939      # Now convert it back to Unix-stile (cygpath)
13940      input_path=`$CYGPATH -u "$shortmode_path"`
13941      new_path="$input_path"
13942    fi
13943  fi
13944
13945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13946  if test "x$test_cygdrive_prefix" = x; then
13947    # As a simple fix, exclude /usr/bin since it's not a real path.
13948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13950      # a path prefixed by /cygdrive for fixpath to work.
13951      new_path="$CYGWIN_ROOT_PATH$input_path"
13952    fi
13953  fi
13954
13955
13956  if test "x$path" != "x$new_path"; then
13957    BOOT_JDK="$new_path"
13958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13959$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13960  fi
13961
13962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13963
13964  path="$BOOT_JDK"
13965  has_colon=`$ECHO $path | $GREP ^.:`
13966  new_path="$path"
13967  if test "x$has_colon" = x; then
13968    # Not in mixed or Windows style, start by that.
13969    new_path=`cmd //c echo $path`
13970  fi
13971
13972
13973  input_path="$new_path"
13974  # Check if we need to convert this using DOS-style short mode. If the path
13975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13976  # take no chances and rewrite it.
13977  # Note: m4 eats our [], so we need to use [ and ] instead.
13978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13979  if test "x$has_forbidden_chars" != x; then
13980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13982  fi
13983
13984
13985  windows_path="$new_path"
13986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13987    unix_path=`$CYGPATH -u "$windows_path"`
13988    new_path="$unix_path"
13989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13991    new_path="$unix_path"
13992  fi
13993
13994  if test "x$path" != "x$new_path"; then
13995    BOOT_JDK="$new_path"
13996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13998  fi
13999
14000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14002
14003  else
14004    # We're on a posix platform. Hooray! :)
14005    path="$BOOT_JDK"
14006
14007    if test ! -f "$path" && test ! -d "$path"; then
14008      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14009    fi
14010
14011    has_space=`$ECHO "$path" | $GREP " "`
14012    if test "x$has_space" != x; then
14013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14015      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14016    fi
14017  fi
14018
14019              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14020$as_echo_n "checking for Boot JDK... " >&6; }
14021              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14022$as_echo "$BOOT_JDK" >&6; }
14023              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14024$as_echo_n "checking Boot JDK version... " >&6; }
14025              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14026              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14027$as_echo "$BOOT_JDK_VERSION" >&6; }
14028            fi # end check jdk version
14029          fi # end check rt.jar
14030        fi # end check javac
14031      fi # end check java
14032    fi # end check boot jdk found
14033  fi
14034
14035    done
14036  fi
14037
14038
14039    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14040    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14041      # Do we have a bin/java?
14042      if test ! -x "$BOOT_JDK/bin/java"; then
14043        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14045        BOOT_JDK_FOUND=no
14046      else
14047        # Do we have a bin/javac?
14048        if test ! -x "$BOOT_JDK/bin/javac"; then
14049          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14051          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14052$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14053          BOOT_JDK_FOUND=no
14054        else
14055          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14056          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14059            BOOT_JDK_FOUND=no
14060          else
14061            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14063
14064            # Extra M4 quote needed to protect [] in grep expression.
14065            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14066            if test "x$FOUND_VERSION_78" = x; then
14067              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14069              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14070$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14071              BOOT_JDK_FOUND=no
14072            else
14073              # We're done! :-)
14074              BOOT_JDK_FOUND=yes
14075
14076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14077
14078  # Input might be given as Windows format, start by converting to
14079  # unix format.
14080  path="$BOOT_JDK"
14081  new_path=`$CYGPATH -u "$path"`
14082
14083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14086  # "foo.exe" is OK but "foo" is an error.
14087  #
14088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14089  # It is also a way to make sure we got the proper file name for the real test later on.
14090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14091  if test "x$test_shortpath" = x; then
14092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14094    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14095  fi
14096
14097  # Call helper function which possibly converts this using DOS-style short mode.
14098  # If so, the updated path is stored in $new_path.
14099
14100  input_path="$new_path"
14101  # Check if we need to convert this using DOS-style short mode. If the path
14102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14103  # take no chances and rewrite it.
14104  # Note: m4 eats our [], so we need to use [ and ] instead.
14105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14106  if test "x$has_forbidden_chars" != x; then
14107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14111      # Going to short mode and back again did indeed matter. Since short mode is
14112      # case insensitive, let's make it lowercase to improve readability.
14113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14114      # Now convert it back to Unix-stile (cygpath)
14115      input_path=`$CYGPATH -u "$shortmode_path"`
14116      new_path="$input_path"
14117    fi
14118  fi
14119
14120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14121  if test "x$test_cygdrive_prefix" = x; then
14122    # As a simple fix, exclude /usr/bin since it's not a real path.
14123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14125      # a path prefixed by /cygdrive for fixpath to work.
14126      new_path="$CYGWIN_ROOT_PATH$input_path"
14127    fi
14128  fi
14129
14130
14131  if test "x$path" != "x$new_path"; then
14132    BOOT_JDK="$new_path"
14133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14135  fi
14136
14137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14138
14139  path="$BOOT_JDK"
14140  has_colon=`$ECHO $path | $GREP ^.:`
14141  new_path="$path"
14142  if test "x$has_colon" = x; then
14143    # Not in mixed or Windows style, start by that.
14144    new_path=`cmd //c echo $path`
14145  fi
14146
14147
14148  input_path="$new_path"
14149  # Check if we need to convert this using DOS-style short mode. If the path
14150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14151  # take no chances and rewrite it.
14152  # Note: m4 eats our [], so we need to use [ and ] instead.
14153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14154  if test "x$has_forbidden_chars" != x; then
14155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14157  fi
14158
14159
14160  windows_path="$new_path"
14161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14162    unix_path=`$CYGPATH -u "$windows_path"`
14163    new_path="$unix_path"
14164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14166    new_path="$unix_path"
14167  fi
14168
14169  if test "x$path" != "x$new_path"; then
14170    BOOT_JDK="$new_path"
14171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14173  fi
14174
14175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14177
14178  else
14179    # We're on a posix platform. Hooray! :)
14180    path="$BOOT_JDK"
14181
14182    if test ! -f "$path" && test ! -d "$path"; then
14183      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14184    fi
14185
14186    has_space=`$ECHO "$path" | $GREP " "`
14187    if test "x$has_space" != x; then
14188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14191    fi
14192  fi
14193
14194              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14195$as_echo_n "checking for Boot JDK... " >&6; }
14196              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14197$as_echo "$BOOT_JDK" >&6; }
14198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14199$as_echo_n "checking Boot JDK version... " >&6; }
14200              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14202$as_echo "$BOOT_JDK_VERSION" >&6; }
14203            fi # end check jdk version
14204          fi # end check rt.jar
14205        fi # end check javac
14206      fi # end check java
14207    fi # end check boot jdk found
14208  fi
14209
14210
14211  if test "x$BOOT_JDK_FOUND" = xno; then
14212    # Now execute the test
14213
14214  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14215  BOOT_JDK_SUFFIX="/Contents/Home"
14216  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14217  if test "x$ALL_JDKS_FOUND" != x; then
14218    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14219
14220  if test "x$BOOT_JDK_FOUND" = xno; then
14221    # Now execute the test
14222
14223        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14224        if test -d "$BOOT_JDK"; then
14225          BOOT_JDK_FOUND=maybe
14226          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14227$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14228        fi
14229
14230
14231    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14232    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14233      # Do we have a bin/java?
14234      if test ! -x "$BOOT_JDK/bin/java"; then
14235        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14237        BOOT_JDK_FOUND=no
14238      else
14239        # Do we have a bin/javac?
14240        if test ! -x "$BOOT_JDK/bin/javac"; then
14241          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14243          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14244$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14245          BOOT_JDK_FOUND=no
14246        else
14247          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14248          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14249            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14251            BOOT_JDK_FOUND=no
14252          else
14253            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14254            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14255
14256            # Extra M4 quote needed to protect [] in grep expression.
14257            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14258            if test "x$FOUND_VERSION_78" = x; then
14259              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14261              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14262$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14263              BOOT_JDK_FOUND=no
14264            else
14265              # We're done! :-)
14266              BOOT_JDK_FOUND=yes
14267
14268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14269
14270  # Input might be given as Windows format, start by converting to
14271  # unix format.
14272  path="$BOOT_JDK"
14273  new_path=`$CYGPATH -u "$path"`
14274
14275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14278  # "foo.exe" is OK but "foo" is an error.
14279  #
14280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14281  # It is also a way to make sure we got the proper file name for the real test later on.
14282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14283  if test "x$test_shortpath" = x; then
14284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14285$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14286    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14287  fi
14288
14289  # Call helper function which possibly converts this using DOS-style short mode.
14290  # If so, the updated path is stored in $new_path.
14291
14292  input_path="$new_path"
14293  # Check if we need to convert this using DOS-style short mode. If the path
14294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14295  # take no chances and rewrite it.
14296  # Note: m4 eats our [], so we need to use [ and ] instead.
14297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14298  if test "x$has_forbidden_chars" != x; then
14299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14303      # Going to short mode and back again did indeed matter. Since short mode is
14304      # case insensitive, let's make it lowercase to improve readability.
14305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14306      # Now convert it back to Unix-stile (cygpath)
14307      input_path=`$CYGPATH -u "$shortmode_path"`
14308      new_path="$input_path"
14309    fi
14310  fi
14311
14312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14313  if test "x$test_cygdrive_prefix" = x; then
14314    # As a simple fix, exclude /usr/bin since it's not a real path.
14315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14317      # a path prefixed by /cygdrive for fixpath to work.
14318      new_path="$CYGWIN_ROOT_PATH$input_path"
14319    fi
14320  fi
14321
14322
14323  if test "x$path" != "x$new_path"; then
14324    BOOT_JDK="$new_path"
14325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14327  fi
14328
14329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14330
14331  path="$BOOT_JDK"
14332  has_colon=`$ECHO $path | $GREP ^.:`
14333  new_path="$path"
14334  if test "x$has_colon" = x; then
14335    # Not in mixed or Windows style, start by that.
14336    new_path=`cmd //c echo $path`
14337  fi
14338
14339
14340  input_path="$new_path"
14341  # Check if we need to convert this using DOS-style short mode. If the path
14342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14343  # take no chances and rewrite it.
14344  # Note: m4 eats our [], so we need to use [ and ] instead.
14345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14346  if test "x$has_forbidden_chars" != x; then
14347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14349  fi
14350
14351
14352  windows_path="$new_path"
14353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14354    unix_path=`$CYGPATH -u "$windows_path"`
14355    new_path="$unix_path"
14356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14358    new_path="$unix_path"
14359  fi
14360
14361  if test "x$path" != "x$new_path"; then
14362    BOOT_JDK="$new_path"
14363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14365  fi
14366
14367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14369
14370  else
14371    # We're on a posix platform. Hooray! :)
14372    path="$BOOT_JDK"
14373
14374    if test ! -f "$path" && test ! -d "$path"; then
14375      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14376    fi
14377
14378    has_space=`$ECHO "$path" | $GREP " "`
14379    if test "x$has_space" != x; then
14380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14382      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14383    fi
14384  fi
14385
14386              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14387$as_echo_n "checking for Boot JDK... " >&6; }
14388              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14389$as_echo "$BOOT_JDK" >&6; }
14390              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14391$as_echo_n "checking Boot JDK version... " >&6; }
14392              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14393              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14394$as_echo "$BOOT_JDK_VERSION" >&6; }
14395            fi # end check jdk version
14396          fi # end check rt.jar
14397        fi # end check javac
14398      fi # end check java
14399    fi # end check boot jdk found
14400  fi
14401
14402    done
14403  fi
14404
14405
14406    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14407    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14408      # Do we have a bin/java?
14409      if test ! -x "$BOOT_JDK/bin/java"; then
14410        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14412        BOOT_JDK_FOUND=no
14413      else
14414        # Do we have a bin/javac?
14415        if test ! -x "$BOOT_JDK/bin/javac"; then
14416          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14417$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14418          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14419$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14420          BOOT_JDK_FOUND=no
14421        else
14422          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14423          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14424            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14426            BOOT_JDK_FOUND=no
14427          else
14428            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14429            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14430
14431            # Extra M4 quote needed to protect [] in grep expression.
14432            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14433            if test "x$FOUND_VERSION_78" = x; then
14434              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14436              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14437$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14438              BOOT_JDK_FOUND=no
14439            else
14440              # We're done! :-)
14441              BOOT_JDK_FOUND=yes
14442
14443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14444
14445  # Input might be given as Windows format, start by converting to
14446  # unix format.
14447  path="$BOOT_JDK"
14448  new_path=`$CYGPATH -u "$path"`
14449
14450  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14451  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14452  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14453  # "foo.exe" is OK but "foo" is an error.
14454  #
14455  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14456  # It is also a way to make sure we got the proper file name for the real test later on.
14457  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14458  if test "x$test_shortpath" = x; then
14459    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14460$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14461    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14462  fi
14463
14464  # Call helper function which possibly converts this using DOS-style short mode.
14465  # If so, the updated path is stored in $new_path.
14466
14467  input_path="$new_path"
14468  # Check if we need to convert this using DOS-style short mode. If the path
14469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14470  # take no chances and rewrite it.
14471  # Note: m4 eats our [], so we need to use [ and ] instead.
14472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14473  if test "x$has_forbidden_chars" != x; then
14474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14475    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14476    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14477    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14478      # Going to short mode and back again did indeed matter. Since short mode is
14479      # case insensitive, let's make it lowercase to improve readability.
14480      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14481      # Now convert it back to Unix-stile (cygpath)
14482      input_path=`$CYGPATH -u "$shortmode_path"`
14483      new_path="$input_path"
14484    fi
14485  fi
14486
14487  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14488  if test "x$test_cygdrive_prefix" = x; then
14489    # As a simple fix, exclude /usr/bin since it's not a real path.
14490    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14491      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14492      # a path prefixed by /cygdrive for fixpath to work.
14493      new_path="$CYGWIN_ROOT_PATH$input_path"
14494    fi
14495  fi
14496
14497
14498  if test "x$path" != "x$new_path"; then
14499    BOOT_JDK="$new_path"
14500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14501$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14502  fi
14503
14504  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14505
14506  path="$BOOT_JDK"
14507  has_colon=`$ECHO $path | $GREP ^.:`
14508  new_path="$path"
14509  if test "x$has_colon" = x; then
14510    # Not in mixed or Windows style, start by that.
14511    new_path=`cmd //c echo $path`
14512  fi
14513
14514
14515  input_path="$new_path"
14516  # Check if we need to convert this using DOS-style short mode. If the path
14517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14518  # take no chances and rewrite it.
14519  # Note: m4 eats our [], so we need to use [ and ] instead.
14520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14521  if test "x$has_forbidden_chars" != x; then
14522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14524  fi
14525
14526
14527  windows_path="$new_path"
14528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14529    unix_path=`$CYGPATH -u "$windows_path"`
14530    new_path="$unix_path"
14531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14533    new_path="$unix_path"
14534  fi
14535
14536  if test "x$path" != "x$new_path"; then
14537    BOOT_JDK="$new_path"
14538    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14539$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14540  fi
14541
14542  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14543  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14544
14545  else
14546    # We're on a posix platform. Hooray! :)
14547    path="$BOOT_JDK"
14548
14549    if test ! -f "$path" && test ! -d "$path"; then
14550      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14551    fi
14552
14553    has_space=`$ECHO "$path" | $GREP " "`
14554    if test "x$has_space" != x; then
14555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14556$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14557      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14558    fi
14559  fi
14560
14561              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14562$as_echo_n "checking for Boot JDK... " >&6; }
14563              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14564$as_echo "$BOOT_JDK" >&6; }
14565              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14566$as_echo_n "checking Boot JDK version... " >&6; }
14567              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14568              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14569$as_echo "$BOOT_JDK_VERSION" >&6; }
14570            fi # end check jdk version
14571          fi # end check rt.jar
14572        fi # end check javac
14573      fi # end check java
14574    fi # end check boot jdk found
14575  fi
14576
14577  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14578
14579  if test "x$BOOT_JDK_FOUND" = xno; then
14580    # Now execute the test
14581
14582  BOOT_JDK_PREFIX="/usr/lib/jvm"
14583  BOOT_JDK_SUFFIX=""
14584  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14585  if test "x$ALL_JDKS_FOUND" != x; then
14586    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14587
14588  if test "x$BOOT_JDK_FOUND" = xno; then
14589    # Now execute the test
14590
14591        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14592        if test -d "$BOOT_JDK"; then
14593          BOOT_JDK_FOUND=maybe
14594          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14595$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14596        fi
14597
14598
14599    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14600    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14601      # Do we have a bin/java?
14602      if test ! -x "$BOOT_JDK/bin/java"; then
14603        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14605        BOOT_JDK_FOUND=no
14606      else
14607        # Do we have a bin/javac?
14608        if test ! -x "$BOOT_JDK/bin/javac"; then
14609          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14611          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14612$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14613          BOOT_JDK_FOUND=no
14614        else
14615          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14616          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14617            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14619            BOOT_JDK_FOUND=no
14620          else
14621            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14622            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14623
14624            # Extra M4 quote needed to protect [] in grep expression.
14625            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14626            if test "x$FOUND_VERSION_78" = x; then
14627              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14629              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14630$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14631              BOOT_JDK_FOUND=no
14632            else
14633              # We're done! :-)
14634              BOOT_JDK_FOUND=yes
14635
14636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14637
14638  # Input might be given as Windows format, start by converting to
14639  # unix format.
14640  path="$BOOT_JDK"
14641  new_path=`$CYGPATH -u "$path"`
14642
14643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14646  # "foo.exe" is OK but "foo" is an error.
14647  #
14648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14649  # It is also a way to make sure we got the proper file name for the real test later on.
14650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14651  if test "x$test_shortpath" = x; then
14652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14654    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14655  fi
14656
14657  # Call helper function which possibly converts this using DOS-style short mode.
14658  # If so, the updated path is stored in $new_path.
14659
14660  input_path="$new_path"
14661  # Check if we need to convert this using DOS-style short mode. If the path
14662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14663  # take no chances and rewrite it.
14664  # Note: m4 eats our [], so we need to use [ and ] instead.
14665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14666  if test "x$has_forbidden_chars" != x; then
14667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14671      # Going to short mode and back again did indeed matter. Since short mode is
14672      # case insensitive, let's make it lowercase to improve readability.
14673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14674      # Now convert it back to Unix-stile (cygpath)
14675      input_path=`$CYGPATH -u "$shortmode_path"`
14676      new_path="$input_path"
14677    fi
14678  fi
14679
14680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14681  if test "x$test_cygdrive_prefix" = x; then
14682    # As a simple fix, exclude /usr/bin since it's not a real path.
14683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14685      # a path prefixed by /cygdrive for fixpath to work.
14686      new_path="$CYGWIN_ROOT_PATH$input_path"
14687    fi
14688  fi
14689
14690
14691  if test "x$path" != "x$new_path"; then
14692    BOOT_JDK="$new_path"
14693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14695  fi
14696
14697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14698
14699  path="$BOOT_JDK"
14700  has_colon=`$ECHO $path | $GREP ^.:`
14701  new_path="$path"
14702  if test "x$has_colon" = x; then
14703    # Not in mixed or Windows style, start by that.
14704    new_path=`cmd //c echo $path`
14705  fi
14706
14707
14708  input_path="$new_path"
14709  # Check if we need to convert this using DOS-style short mode. If the path
14710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14711  # take no chances and rewrite it.
14712  # Note: m4 eats our [], so we need to use [ and ] instead.
14713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14714  if test "x$has_forbidden_chars" != x; then
14715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14717  fi
14718
14719
14720  windows_path="$new_path"
14721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14722    unix_path=`$CYGPATH -u "$windows_path"`
14723    new_path="$unix_path"
14724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14726    new_path="$unix_path"
14727  fi
14728
14729  if test "x$path" != "x$new_path"; then
14730    BOOT_JDK="$new_path"
14731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14733  fi
14734
14735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14737
14738  else
14739    # We're on a posix platform. Hooray! :)
14740    path="$BOOT_JDK"
14741
14742    if test ! -f "$path" && test ! -d "$path"; then
14743      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14744    fi
14745
14746    has_space=`$ECHO "$path" | $GREP " "`
14747    if test "x$has_space" != x; then
14748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14749$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14750      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14751    fi
14752  fi
14753
14754              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14755$as_echo_n "checking for Boot JDK... " >&6; }
14756              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14757$as_echo "$BOOT_JDK" >&6; }
14758              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14759$as_echo_n "checking Boot JDK version... " >&6; }
14760              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14761              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14762$as_echo "$BOOT_JDK_VERSION" >&6; }
14763            fi # end check jdk version
14764          fi # end check rt.jar
14765        fi # end check javac
14766      fi # end check java
14767    fi # end check boot jdk found
14768  fi
14769
14770    done
14771  fi
14772
14773
14774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14776      # Do we have a bin/java?
14777      if test ! -x "$BOOT_JDK/bin/java"; then
14778        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14780        BOOT_JDK_FOUND=no
14781      else
14782        # Do we have a bin/javac?
14783        if test ! -x "$BOOT_JDK/bin/javac"; then
14784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14786          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14788          BOOT_JDK_FOUND=no
14789        else
14790          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14791          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14792            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14794            BOOT_JDK_FOUND=no
14795          else
14796            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14797            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14798
14799            # Extra M4 quote needed to protect [] in grep expression.
14800            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14801            if test "x$FOUND_VERSION_78" = x; then
14802              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14804              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14805$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14806              BOOT_JDK_FOUND=no
14807            else
14808              # We're done! :-)
14809              BOOT_JDK_FOUND=yes
14810
14811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14812
14813  # Input might be given as Windows format, start by converting to
14814  # unix format.
14815  path="$BOOT_JDK"
14816  new_path=`$CYGPATH -u "$path"`
14817
14818  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14819  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14820  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14821  # "foo.exe" is OK but "foo" is an error.
14822  #
14823  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14824  # It is also a way to make sure we got the proper file name for the real test later on.
14825  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14826  if test "x$test_shortpath" = x; then
14827    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14829    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14830  fi
14831
14832  # Call helper function which possibly converts this using DOS-style short mode.
14833  # If so, the updated path is stored in $new_path.
14834
14835  input_path="$new_path"
14836  # Check if we need to convert this using DOS-style short mode. If the path
14837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14838  # take no chances and rewrite it.
14839  # Note: m4 eats our [], so we need to use [ and ] instead.
14840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14841  if test "x$has_forbidden_chars" != x; then
14842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14843    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14844    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14845    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14846      # Going to short mode and back again did indeed matter. Since short mode is
14847      # case insensitive, let's make it lowercase to improve readability.
14848      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14849      # Now convert it back to Unix-stile (cygpath)
14850      input_path=`$CYGPATH -u "$shortmode_path"`
14851      new_path="$input_path"
14852    fi
14853  fi
14854
14855  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14856  if test "x$test_cygdrive_prefix" = x; then
14857    # As a simple fix, exclude /usr/bin since it's not a real path.
14858    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14859      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14860      # a path prefixed by /cygdrive for fixpath to work.
14861      new_path="$CYGWIN_ROOT_PATH$input_path"
14862    fi
14863  fi
14864
14865
14866  if test "x$path" != "x$new_path"; then
14867    BOOT_JDK="$new_path"
14868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14869$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14870  fi
14871
14872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14873
14874  path="$BOOT_JDK"
14875  has_colon=`$ECHO $path | $GREP ^.:`
14876  new_path="$path"
14877  if test "x$has_colon" = x; then
14878    # Not in mixed or Windows style, start by that.
14879    new_path=`cmd //c echo $path`
14880  fi
14881
14882
14883  input_path="$new_path"
14884  # Check if we need to convert this using DOS-style short mode. If the path
14885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14886  # take no chances and rewrite it.
14887  # Note: m4 eats our [], so we need to use [ and ] instead.
14888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14889  if test "x$has_forbidden_chars" != x; then
14890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14891    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14892  fi
14893
14894
14895  windows_path="$new_path"
14896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14897    unix_path=`$CYGPATH -u "$windows_path"`
14898    new_path="$unix_path"
14899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14901    new_path="$unix_path"
14902  fi
14903
14904  if test "x$path" != "x$new_path"; then
14905    BOOT_JDK="$new_path"
14906    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14907$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14908  fi
14909
14910  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14911  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14912
14913  else
14914    # We're on a posix platform. Hooray! :)
14915    path="$BOOT_JDK"
14916
14917    if test ! -f "$path" && test ! -d "$path"; then
14918      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14919    fi
14920
14921    has_space=`$ECHO "$path" | $GREP " "`
14922    if test "x$has_space" != x; then
14923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14925      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14926    fi
14927  fi
14928
14929              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14930$as_echo_n "checking for Boot JDK... " >&6; }
14931              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14932$as_echo "$BOOT_JDK" >&6; }
14933              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14934$as_echo_n "checking Boot JDK version... " >&6; }
14935              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14936              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14937$as_echo "$BOOT_JDK_VERSION" >&6; }
14938            fi # end check jdk version
14939          fi # end check rt.jar
14940        fi # end check javac
14941      fi # end check java
14942    fi # end check boot jdk found
14943  fi
14944
14945  fi
14946
14947
14948    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14949    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14950      # Do we have a bin/java?
14951      if test ! -x "$BOOT_JDK/bin/java"; then
14952        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14953$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14954        BOOT_JDK_FOUND=no
14955      else
14956        # Do we have a bin/javac?
14957        if test ! -x "$BOOT_JDK/bin/javac"; then
14958          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14960          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14961$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14962          BOOT_JDK_FOUND=no
14963        else
14964          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14965          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14966            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14968            BOOT_JDK_FOUND=no
14969          else
14970            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14971            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14972
14973            # Extra M4 quote needed to protect [] in grep expression.
14974            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14975            if test "x$FOUND_VERSION_78" = x; then
14976              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14977$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14978              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14979$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14980              BOOT_JDK_FOUND=no
14981            else
14982              # We're done! :-)
14983              BOOT_JDK_FOUND=yes
14984
14985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14986
14987  # Input might be given as Windows format, start by converting to
14988  # unix format.
14989  path="$BOOT_JDK"
14990  new_path=`$CYGPATH -u "$path"`
14991
14992  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14993  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14994  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14995  # "foo.exe" is OK but "foo" is an error.
14996  #
14997  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14998  # It is also a way to make sure we got the proper file name for the real test later on.
14999  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15000  if test "x$test_shortpath" = x; then
15001    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15002$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15003    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15004  fi
15005
15006  # Call helper function which possibly converts this using DOS-style short mode.
15007  # If so, the updated path is stored in $new_path.
15008
15009  input_path="$new_path"
15010  # Check if we need to convert this using DOS-style short mode. If the path
15011  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15012  # take no chances and rewrite it.
15013  # Note: m4 eats our [], so we need to use [ and ] instead.
15014  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15015  if test "x$has_forbidden_chars" != x; then
15016    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15017    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15018    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15019    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15020      # Going to short mode and back again did indeed matter. Since short mode is
15021      # case insensitive, let's make it lowercase to improve readability.
15022      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15023      # Now convert it back to Unix-stile (cygpath)
15024      input_path=`$CYGPATH -u "$shortmode_path"`
15025      new_path="$input_path"
15026    fi
15027  fi
15028
15029  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15030  if test "x$test_cygdrive_prefix" = x; then
15031    # As a simple fix, exclude /usr/bin since it's not a real path.
15032    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15033      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15034      # a path prefixed by /cygdrive for fixpath to work.
15035      new_path="$CYGWIN_ROOT_PATH$input_path"
15036    fi
15037  fi
15038
15039
15040  if test "x$path" != "x$new_path"; then
15041    BOOT_JDK="$new_path"
15042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15043$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15044  fi
15045
15046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15047
15048  path="$BOOT_JDK"
15049  has_colon=`$ECHO $path | $GREP ^.:`
15050  new_path="$path"
15051  if test "x$has_colon" = x; then
15052    # Not in mixed or Windows style, start by that.
15053    new_path=`cmd //c echo $path`
15054  fi
15055
15056
15057  input_path="$new_path"
15058  # Check if we need to convert this using DOS-style short mode. If the path
15059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15060  # take no chances and rewrite it.
15061  # Note: m4 eats our [], so we need to use [ and ] instead.
15062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15063  if test "x$has_forbidden_chars" != x; then
15064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15065    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15066  fi
15067
15068
15069  windows_path="$new_path"
15070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15071    unix_path=`$CYGPATH -u "$windows_path"`
15072    new_path="$unix_path"
15073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15074    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15075    new_path="$unix_path"
15076  fi
15077
15078  if test "x$path" != "x$new_path"; then
15079    BOOT_JDK="$new_path"
15080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15081$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15082  fi
15083
15084  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15085  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15086
15087  else
15088    # We're on a posix platform. Hooray! :)
15089    path="$BOOT_JDK"
15090
15091    if test ! -f "$path" && test ! -d "$path"; then
15092      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15093    fi
15094
15095    has_space=`$ECHO "$path" | $GREP " "`
15096    if test "x$has_space" != x; then
15097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15098$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15099      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15100    fi
15101  fi
15102
15103              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15104$as_echo_n "checking for Boot JDK... " >&6; }
15105              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15106$as_echo "$BOOT_JDK" >&6; }
15107              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15108$as_echo_n "checking Boot JDK version... " >&6; }
15109              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15110              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15111$as_echo "$BOOT_JDK_VERSION" >&6; }
15112            fi # end check jdk version
15113          fi # end check rt.jar
15114        fi # end check javac
15115      fi # end check java
15116    fi # end check boot jdk found
15117  fi
15118
15119
15120# If we haven't found anything yet, we've truly lost. Give up.
15121if test "x$BOOT_JDK_FOUND" = xno; then
15122
15123    # Print a helpful message on how to acquire the necessary build dependency.
15124    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15125    MISSING_DEPENDENCY=openjdk
15126    PKGHANDLER_COMMAND=
15127
15128    case $PKGHANDLER in
15129	apt-get)
15130                apt_help     $MISSING_DEPENDENCY ;;
15131    yum)
15132                yum_help     $MISSING_DEPENDENCY ;;
15133	port)
15134                port_help    $MISSING_DEPENDENCY ;;
15135	pkgutil)
15136                pkgutil_help $MISSING_DEPENDENCY ;;
15137	pkgadd)
15138                pkgadd_help  $MISSING_DEPENDENCY ;;
15139    * )
15140      break ;;
15141    esac
15142
15143    if test "x$PKGHANDLER_COMMAND" != x; then
15144        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15145    fi
15146
15147  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15148$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15149  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15150$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15151  as_fn_error $? "Cannot continue" "$LINENO" 5
15152fi
15153
15154# Setup proper paths for what we found
15155BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15156if test ! -f "$BOOT_RTJAR"; then
15157    # On MacOSX it is called classes.jar
15158    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15159    if test -f "$BOOT_RTJAR"; then
15160      # Remove the ..
15161      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15162    fi
15163fi
15164BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15165BOOT_JDK="$BOOT_JDK"
15166
15167
15168
15169
15170# Setup tools from the Boot JDK.
15171
15172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15173$as_echo_n "checking for java in Boot JDK... " >&6; }
15174  JAVA=$BOOT_JDK/bin/java
15175  if test ! -x $JAVA; then
15176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15177$as_echo "not found" >&6; }
15178      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15179$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15180      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15181  fi
15182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15183$as_echo "ok" >&6; }
15184
15185
15186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15187$as_echo_n "checking for javac in Boot JDK... " >&6; }
15188  JAVAC=$BOOT_JDK/bin/javac
15189  if test ! -x $JAVAC; then
15190      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15191$as_echo "not found" >&6; }
15192      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15193$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15194      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15195  fi
15196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15197$as_echo "ok" >&6; }
15198
15199
15200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15201$as_echo_n "checking for javah in Boot JDK... " >&6; }
15202  JAVAH=$BOOT_JDK/bin/javah
15203  if test ! -x $JAVAH; then
15204      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15205$as_echo "not found" >&6; }
15206      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15207$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15208      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15209  fi
15210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15211$as_echo "ok" >&6; }
15212
15213
15214  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15215$as_echo_n "checking for javap in Boot JDK... " >&6; }
15216  JAVAP=$BOOT_JDK/bin/javap
15217  if test ! -x $JAVAP; then
15218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15219$as_echo "not found" >&6; }
15220      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15221$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15222      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15223  fi
15224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15225$as_echo "ok" >&6; }
15226
15227
15228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15229$as_echo_n "checking for jar in Boot JDK... " >&6; }
15230  JAR=$BOOT_JDK/bin/jar
15231  if test ! -x $JAR; then
15232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15233$as_echo "not found" >&6; }
15234      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15235$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15236      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15237  fi
15238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15239$as_echo "ok" >&6; }
15240
15241
15242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15243$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15244  RMIC=$BOOT_JDK/bin/rmic
15245  if test ! -x $RMIC; then
15246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15247$as_echo "not found" >&6; }
15248      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15249$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15250      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15251  fi
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15253$as_echo "ok" >&6; }
15254
15255
15256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15257$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15258  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15259  if test ! -x $NATIVE2ASCII; then
15260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15261$as_echo "not found" >&6; }
15262      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15263$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15264      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15265  fi
15266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15267$as_echo "ok" >&6; }
15268
15269
15270# Finally, set some other options...
15271
15272# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15273BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15274
15275
15276
15277
15278##############################################################################
15279#
15280# Specify options for anything that is run with the Boot JDK.
15281#
15282
15283# Check whether --with-boot-jdk-jvmargs was given.
15284if test "${with_boot_jdk_jvmargs+set}" = set; then :
15285  withval=$with_boot_jdk_jvmargs;
15286fi
15287
15288
15289if test "x$with_boot_jdk_jvmargs" = x; then
15290    # Not all JVM:s accept the same arguments on the command line.
15291    # OpenJDK specific increase in thread stack for JDK build,
15292    # well more specifically, when running javac.
15293    if test "x$BUILD_NUM_BITS" = x32; then
15294       STACK_SIZE=768
15295    else
15296       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15297       # since 64-bit pointers are pushed on the stach. Apparently, we need
15298       # to increase the stack space when javacing the JDK....
15299       STACK_SIZE=1536
15300    fi
15301
15302    # Minimum amount of heap memory.
15303
15304    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15305    # If so, then append -Xms64M to boot_jdk_jvmargs
15306    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15307    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15308    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15309        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15310    fi
15311
15312    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15313        # Why does macosx need more heap? Its the huge JDK batch.
15314
15315    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15316    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15317    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15318    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15319    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15320        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15321    fi
15322
15323    else
15324
15325    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15326    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15327    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15328    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15329    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15330        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15331    fi
15332
15333    fi
15334    # When is adding -client something that speeds up the JVM?
15335    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15336
15337    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15338    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15339    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15340    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15341    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15342        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15343    fi
15344
15345
15346    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15347    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15348    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15349    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15350    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15351        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15352    fi
15353
15354
15355    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15356    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15357    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15358    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15359    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15360        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15361    fi
15362
15363    # Disable special log output when a debug build is used as Boot JDK...
15364
15365    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15366    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15367    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15368    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15369    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15370        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15371    fi
15372
15373fi
15374
15375BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15376
15377
15378
15379###############################################################################
15380#
15381# Configure the sources to use. We can add or override individual directories.
15382#
15383###############################################################################
15384
15385
15386
15387# Where are the sources. Any of these can be overridden
15388# using --with-override-corba and the likes.
15389LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15390CORBA_TOPDIR="$SRC_ROOT/corba"
15391JAXP_TOPDIR="$SRC_ROOT/jaxp"
15392JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15393HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15394JDK_TOPDIR="$SRC_ROOT/jdk"
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404###############################################################################
15405#
15406# Pickup additional source for a component from outside of the source root
15407# or override source for a component.
15408#
15409
15410# Check whether --with-add-source-root was given.
15411if test "${with_add_source_root+set}" = set; then :
15412  withval=$with_add_source_root;
15413fi
15414
15415
15416
15417# Check whether --with-override-source-root was given.
15418if test "${with_override_source_root+set}" = set; then :
15419  withval=$with_override_source_root;
15420fi
15421
15422
15423
15424# Check whether --with-adds-and-overrides was given.
15425if test "${with_adds_and_overrides+set}" = set; then :
15426  withval=$with_adds_and_overrides;
15427fi
15428
15429
15430if test "x$with_adds_and_overrides" != x; then
15431    with_add_source_root="$with_adds_and_overrides/adds"
15432    with_override_source_root="$with_adds_and_overrides/overrides"
15433fi
15434
15435if test "x$with_add_source_root" != x; then
15436    if ! test -d $with_add_source_root; then
15437       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15438    fi
15439    CURDIR="$PWD"
15440    cd "$with_add_source_root"
15441    ADD_SRC_ROOT="`pwd`"
15442    cd "$CURDIR"
15443    # Verify that the addon source root does not have any root makefiles.
15444    # If it does, then it is usually an error, prevent this.
15445    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15446       test -f $with_add_source_root/langtools/make/Makefile; then
15447        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
15448    fi
15449    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15450       test -f $with_add_source_root/corba/make/Makefile; then
15451        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
15452    fi
15453    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15454       test -f $with_add_source_root/jaxp/make/Makefile; then
15455        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
15456    fi
15457    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15458       test -f $with_add_source_root/jaxws/make/Makefile; then
15459        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
15460    fi
15461    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15462       test -f $with_add_source_root/hotspot/make/Makefile; then
15463        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
15464    fi
15465    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15466       test -f $with_add_source_root/jdk/make/Makefile; then
15467        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
15468    fi
15469fi
15470
15471
15472if test "x$with_override_source_root" != x; then
15473    if ! test -d $with_override_source_root; then
15474       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15475    fi
15476    CURDIR="$PWD"
15477    cd "$with_override_source_root"
15478    OVERRIDE_SRC_ROOT="`pwd`"
15479    cd "$CURDIR"
15480    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15481       test -f $with_override_source_root/langtools/make/Makefile; then
15482        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
15483    fi
15484    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15485       test -f $with_override_source_root/corba/make/Makefile; then
15486        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
15487    fi
15488    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15489       test -f $with_override_source_root/jaxp/make/Makefile; then
15490        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
15491    fi
15492    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15493       test -f $with_override_source_root/jaxws/make/Makefile; then
15494        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
15495    fi
15496    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15497       test -f $with_override_source_root/hotspot/make/Makefile; then
15498        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
15499    fi
15500    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15501       test -f $with_override_source_root/jdk/make/Makefile; then
15502        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
15503    fi
15504fi
15505
15506
15507###############################################################################
15508#
15509# Override a repo completely, this is used for example when you have 3 small
15510# development sandboxes of the langtools sources and want to avoid having 3 full
15511# OpenJDK sources checked out on disk.
15512#
15513# Assuming that the 3 langtools sandboxes are located here:
15514# /home/fredrik/sandbox1/langtools
15515# /home/fredrik/sandbox2/langtools
15516# /home/fredrik/sandbox3/langtools
15517#
15518# From the source root you create build subdirs manually:
15519#     mkdir -p build1 build2 build3
15520# in each build directory run:
15521#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15522#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15523#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15524#
15525
15526
15527# Check whether --with-override-langtools was given.
15528if test "${with_override_langtools+set}" = set; then :
15529  withval=$with_override_langtools;
15530fi
15531
15532
15533
15534# Check whether --with-override-corba was given.
15535if test "${with_override_corba+set}" = set; then :
15536  withval=$with_override_corba;
15537fi
15538
15539
15540
15541# Check whether --with-override-jaxp was given.
15542if test "${with_override_jaxp+set}" = set; then :
15543  withval=$with_override_jaxp;
15544fi
15545
15546
15547
15548# Check whether --with-override-jaxws was given.
15549if test "${with_override_jaxws+set}" = set; then :
15550  withval=$with_override_jaxws;
15551fi
15552
15553
15554
15555# Check whether --with-override-hotspot was given.
15556if test "${with_override_hotspot+set}" = set; then :
15557  withval=$with_override_hotspot;
15558fi
15559
15560
15561
15562# Check whether --with-override-jdk was given.
15563if test "${with_override_jdk+set}" = set; then :
15564  withval=$with_override_jdk;
15565fi
15566
15567
15568if test "x$with_override_langtools" != x; then
15569    CURDIR="$PWD"
15570    cd "$with_override_langtools"
15571    LANGTOOLS_TOPDIR="`pwd`"
15572    cd "$CURDIR"
15573    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15574        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15575    fi
15576    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15577$as_echo_n "checking if langtools should be overridden... " >&6; }
15578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15579$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15580fi
15581if test "x$with_override_corba" != x; then
15582    CURDIR="$PWD"
15583    cd "$with_override_corba"
15584    CORBA_TOPDIR="`pwd`"
15585    cd "$CURDIR"
15586    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15587        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15588    fi
15589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15590$as_echo_n "checking if corba should be overridden... " >&6; }
15591    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15592$as_echo "yes with $CORBA_TOPDIR" >&6; }
15593fi
15594if test "x$with_override_jaxp" != x; then
15595    CURDIR="$PWD"
15596    cd "$with_override_jaxp"
15597    JAXP_TOPDIR="`pwd`"
15598    cd "$CURDIR"
15599    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15600        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15601    fi
15602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15603$as_echo_n "checking if jaxp should be overridden... " >&6; }
15604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15605$as_echo "yes with $JAXP_TOPDIR" >&6; }
15606fi
15607if test "x$with_override_jaxws" != x; then
15608    CURDIR="$PWD"
15609    cd "$with_override_jaxws"
15610    JAXWS_TOPDIR="`pwd`"
15611    cd "$CURDIR"
15612    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15613        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15614    fi
15615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15616$as_echo_n "checking if jaxws should be overridden... " >&6; }
15617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15618$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15619fi
15620if test "x$with_override_hotspot" != x; then
15621    CURDIR="$PWD"
15622    cd "$with_override_hotspot"
15623    HOTSPOT_TOPDIR="`pwd`"
15624    cd "$CURDIR"
15625    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15626       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15627        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15628    fi
15629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15630$as_echo_n "checking if hotspot should be overridden... " >&6; }
15631    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15632$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15633fi
15634if test "x$with_override_jdk" != x; then
15635    CURDIR="$PWD"
15636    cd "$with_override_jdk"
15637    JDK_TOPDIR="`pwd`"
15638    cd "$CURDIR"
15639    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15640        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15641    fi
15642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15643$as_echo_n "checking if JDK should be overridden... " >&6; }
15644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15645$as_echo "yes with $JDK_TOPDIR" >&6; }
15646fi
15647
15648
15649
15650BUILD_OUTPUT="$OUTPUT_ROOT"
15651
15652
15653HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15654BUILD_HOTSPOT=true
15655
15656
15657
15658# Check whether --with-import-hotspot was given.
15659if test "${with_import_hotspot+set}" = set; then :
15660  withval=$with_import_hotspot;
15661fi
15662
15663if test "x$with_import_hotspot" != x; then
15664    CURDIR="$PWD"
15665    cd "$with_import_hotspot"
15666    HOTSPOT_DIST="`pwd`"
15667    cd "$CURDIR"
15668    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15669        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15670    fi
15671    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15672$as_echo_n "checking if hotspot should be imported... " >&6; }
15673    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15674$as_echo "yes from $HOTSPOT_DIST" >&6; }
15675    BUILD_HOTSPOT=false
15676fi
15677
15678JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15679
15680
15681###############################################################################
15682#
15683# Setup the toolchain (compilers etc), i.e. the tools that need to be
15684# cross-compilation aware.
15685#
15686###############################################################################
15687
15688
15689###############################################################################
15690#
15691# Configure the development tool paths and potential sysroot.
15692#
15693ac_ext=cpp
15694ac_cpp='$CXXCPP $CPPFLAGS'
15695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15698
15699
15700# The option used to specify the target .o,.a or .so file.
15701# When compiling, how to specify the to be created object file.
15702CC_OUT_OPTION='-o$(SPACE)'
15703# When linking, how to specify the to be created executable.
15704EXE_OUT_OPTION='-o$(SPACE)'
15705# When linking, how to specify the to be created dynamically linkable library.
15706LD_OUT_OPTION='-o$(SPACE)'
15707# When archiving, how to specify the to be create static archive for object files.
15708AR_OUT_OPTION='rcs$(SPACE)'
15709
15710
15711
15712
15713
15714# Locate the actual tools
15715
15716if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15717
15718  # Store path to cygwin link.exe to help excluding it when searching for
15719  # VS linker. This must be done before changing the PATH when looking for VS.
15720  # Extract the first word of "link", so it can be a program name with args.
15721set dummy link; ac_word=$2
15722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15723$as_echo_n "checking for $ac_word... " >&6; }
15724if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15725  $as_echo_n "(cached) " >&6
15726else
15727  case $CYGWIN_LINK in
15728  [\\/]* | ?:[\\/]*)
15729  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15730  ;;
15731  *)
15732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15733for as_dir in $PATH
15734do
15735  IFS=$as_save_IFS
15736  test -z "$as_dir" && as_dir=.
15737    for ac_exec_ext in '' $ac_executable_extensions; do
15738  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15739    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15741    break 2
15742  fi
15743done
15744  done
15745IFS=$as_save_IFS
15746
15747  ;;
15748esac
15749fi
15750CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15751if test -n "$CYGWIN_LINK"; then
15752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15753$as_echo "$CYGWIN_LINK" >&6; }
15754else
15755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15756$as_echo "no" >&6; }
15757fi
15758
15759
15760  if test "x$CYGWIN_LINK" != x; then
15761    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15762$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15763    "$CYGWIN_LINK" --version > /dev/null
15764    if test $? -eq 0 ; then
15765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15766$as_echo "yes" >&6; }
15767    else
15768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15769$as_echo "no" >&6; }
15770      # This might be the VS linker. Don't exclude it later on.
15771      CYGWIN_LINK=""
15772    fi
15773  fi
15774
15775  # First-hand choice is to locate and run the vsvars bat file.
15776
15777  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15778    VCVARSFILE="vc/bin/vcvars32.bat"
15779  else
15780    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
15781  fi
15782
15783  VS_ENV_CMD=""
15784  VS_ENV_ARGS=""
15785  if test "x$with_toolsdir" != x; then
15786
15787  if test "x$VS_ENV_CMD" = x; then
15788    VS100BASE="$with_toolsdir/../.."
15789    METHOD="--with-tools-dir"
15790
15791  windows_path="$VS100BASE"
15792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15793    unix_path=`$CYGPATH -u "$windows_path"`
15794    VS100BASE="$unix_path"
15795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15797    VS100BASE="$unix_path"
15798  fi
15799
15800    if test -d "$VS100BASE"; then
15801      if test -f "$VS100BASE/$VCVARSFILE"; then
15802        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15803$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15804        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
15805      else
15806        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
15807$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
15808        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
15809$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
15810      fi
15811    fi
15812  fi
15813
15814  fi
15815
15816  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
15817    # Having specified an argument which is incorrect will produce an instant failure;
15818    # we should not go on looking
15819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
15820$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
15821    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
15822$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
15823    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
15824  fi
15825
15826  if test "x$ProgramW6432" != x; then
15827
15828  if test "x$VS_ENV_CMD" = x; then
15829    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
15830    METHOD="well-known name"
15831
15832  windows_path="$WIN_SDK_BASE"
15833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15834    unix_path=`$CYGPATH -u "$windows_path"`
15835    WIN_SDK_BASE="$unix_path"
15836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15838    WIN_SDK_BASE="$unix_path"
15839  fi
15840
15841    if test -d "$WIN_SDK_BASE"; then
15842      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15843        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15844$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15845        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15846        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15847          VS_ENV_ARGS="/x86"
15848        else
15849          VS_ENV_ARGS="/x64"
15850        fi
15851      else
15852        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15853$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15854        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15855$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15856      fi
15857    fi
15858  fi
15859
15860  fi
15861  if test "x$PROGRAMW6432" != x; then
15862
15863  if test "x$VS_ENV_CMD" = x; then
15864    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
15865    METHOD="well-known name"
15866
15867  windows_path="$WIN_SDK_BASE"
15868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15869    unix_path=`$CYGPATH -u "$windows_path"`
15870    WIN_SDK_BASE="$unix_path"
15871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15873    WIN_SDK_BASE="$unix_path"
15874  fi
15875
15876    if test -d "$WIN_SDK_BASE"; then
15877      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15878        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15879$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15880        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15881        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15882          VS_ENV_ARGS="/x86"
15883        else
15884          VS_ENV_ARGS="/x64"
15885        fi
15886      else
15887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15888$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15889        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15890$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15891      fi
15892    fi
15893  fi
15894
15895  fi
15896  if test "x$PROGRAMFILES" != x; then
15897
15898  if test "x$VS_ENV_CMD" = x; then
15899    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
15900    METHOD="well-known name"
15901
15902  windows_path="$WIN_SDK_BASE"
15903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15904    unix_path=`$CYGPATH -u "$windows_path"`
15905    WIN_SDK_BASE="$unix_path"
15906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15908    WIN_SDK_BASE="$unix_path"
15909  fi
15910
15911    if test -d "$WIN_SDK_BASE"; then
15912      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15913        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15914$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15915        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15916        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15917          VS_ENV_ARGS="/x86"
15918        else
15919          VS_ENV_ARGS="/x64"
15920        fi
15921      else
15922        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15923$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15924        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15925$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15926      fi
15927    fi
15928  fi
15929
15930  fi
15931
15932  if test "x$VS_ENV_CMD" = x; then
15933    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
15934    METHOD="well-known name"
15935
15936  windows_path="$WIN_SDK_BASE"
15937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15938    unix_path=`$CYGPATH -u "$windows_path"`
15939    WIN_SDK_BASE="$unix_path"
15940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15942    WIN_SDK_BASE="$unix_path"
15943  fi
15944
15945    if test -d "$WIN_SDK_BASE"; then
15946      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15947        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15948$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15949        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15950        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15951          VS_ENV_ARGS="/x86"
15952        else
15953          VS_ENV_ARGS="/x64"
15954        fi
15955      else
15956        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15957$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15958        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15959$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15960      fi
15961    fi
15962  fi
15963
15964
15965  if test "x$VS_ENV_CMD" = x; then
15966    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
15967    METHOD="well-known name"
15968
15969  windows_path="$WIN_SDK_BASE"
15970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15971    unix_path=`$CYGPATH -u "$windows_path"`
15972    WIN_SDK_BASE="$unix_path"
15973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15975    WIN_SDK_BASE="$unix_path"
15976  fi
15977
15978    if test -d "$WIN_SDK_BASE"; then
15979      if test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
15980        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15981$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15982        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
15983        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15984          VS_ENV_ARGS="/x86"
15985        else
15986          VS_ENV_ARGS="/x64"
15987        fi
15988      else
15989        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
15990$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
15991        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
15992$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
15993      fi
15994    fi
15995  fi
15996
15997
15998  if test "x$VS100COMNTOOLS" != x; then
15999
16000  if test "x$VS_ENV_CMD" = x; then
16001    VS100BASE="$VS100COMNTOOLS/../.."
16002    METHOD="VS100COMNTOOLS variable"
16003
16004  windows_path="$VS100BASE"
16005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16006    unix_path=`$CYGPATH -u "$windows_path"`
16007    VS100BASE="$unix_path"
16008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16010    VS100BASE="$unix_path"
16011  fi
16012
16013    if test -d "$VS100BASE"; then
16014      if test -f "$VS100BASE/$VCVARSFILE"; then
16015        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16016$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16017        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16018      else
16019        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16020$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16021        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16022$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16023      fi
16024    fi
16025  fi
16026
16027  fi
16028  if test "x$PROGRAMFILES" != x; then
16029
16030  if test "x$VS_ENV_CMD" = x; then
16031    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16032    METHOD="well-known name"
16033
16034  windows_path="$VS100BASE"
16035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16036    unix_path=`$CYGPATH -u "$windows_path"`
16037    VS100BASE="$unix_path"
16038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16040    VS100BASE="$unix_path"
16041  fi
16042
16043    if test -d "$VS100BASE"; then
16044      if test -f "$VS100BASE/$VCVARSFILE"; then
16045        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16046$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16047        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16048      else
16049        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16050$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16051        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16052$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16053      fi
16054    fi
16055  fi
16056
16057  fi
16058
16059  if test "x$VS_ENV_CMD" = x; then
16060    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16061    METHOD="well-known name"
16062
16063  windows_path="$VS100BASE"
16064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16065    unix_path=`$CYGPATH -u "$windows_path"`
16066    VS100BASE="$unix_path"
16067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16069    VS100BASE="$unix_path"
16070  fi
16071
16072    if test -d "$VS100BASE"; then
16073      if test -f "$VS100BASE/$VCVARSFILE"; then
16074        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16075$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16076        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16077      else
16078        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16079$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16080        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16081$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16082      fi
16083    fi
16084  fi
16085
16086
16087  if test "x$VS_ENV_CMD" = x; then
16088    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16089    METHOD="well-known name"
16090
16091  windows_path="$VS100BASE"
16092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16093    unix_path=`$CYGPATH -u "$windows_path"`
16094    VS100BASE="$unix_path"
16095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16097    VS100BASE="$unix_path"
16098  fi
16099
16100    if test -d "$VS100BASE"; then
16101      if test -f "$VS100BASE/$VCVARSFILE"; then
16102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16103$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16104        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16105      else
16106        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16107$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16108        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16109$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16110      fi
16111    fi
16112  fi
16113
16114
16115  if test "x$VS_ENV_CMD" != x; then
16116    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16117
16118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16119
16120  # First separate the path from the arguments. This will split at the first
16121  # space.
16122  complete="$VS_ENV_CMD"
16123  path="${complete%% *}"
16124  tmp="$complete EOL"
16125  arguments="${tmp#* }"
16126
16127  # Input might be given as Windows format, start by converting to
16128  # unix format.
16129  new_path=`$CYGPATH -u "$path"`
16130
16131  # Now try to locate executable using which
16132  new_path=`$WHICH "$new_path" 2> /dev/null`
16133  # bat and cmd files are not always considered executable in cygwin causing which
16134  # to not find them
16135  if test "x$new_path" = x \
16136           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16137           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16138    new_path=`$CYGPATH -u "$path"`
16139  fi
16140  if test "x$new_path" = x; then
16141    # Oops. Which didn't find the executable.
16142    # The splitting of arguments from the executable at a space might have been incorrect,
16143    # since paths with space are more likely in Windows. Give it another try with the whole
16144    # argument.
16145    path="$complete"
16146    arguments="EOL"
16147    new_path=`$CYGPATH -u "$path"`
16148    new_path=`$WHICH "$new_path" 2> /dev/null`
16149    # bat and cmd files are not always considered executable in cygwin causing which
16150    # to not find them
16151    if test "x$new_path" = x \
16152             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16153             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16154      new_path=`$CYGPATH -u "$path"`
16155    fi
16156    if test "x$new_path" = x; then
16157      # It's still not found. Now this is an unrecoverable error.
16158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16159$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16160      has_space=`$ECHO "$complete" | $GREP " "`
16161      if test "x$has_space" != x; then
16162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16164      fi
16165      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16166    fi
16167  fi
16168
16169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16172  # "foo.exe" is OK but "foo" is an error.
16173  #
16174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16175  # It is also a way to make sure we got the proper file name for the real test later on.
16176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16177  if test "x$test_shortpath" = x; then
16178    # Short path failed, file does not exist as specified.
16179    # Try adding .exe or .cmd
16180    if test -f "${new_path}.exe"; then
16181       input_to_shortpath="${new_path}.exe"
16182    elif test -f "${new_path}.cmd"; then
16183       input_to_shortpath="${new_path}.cmd"
16184    else
16185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16186$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16187      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16188$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16189      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16190    fi
16191  else
16192    input_to_shortpath="$new_path"
16193  fi
16194
16195  # Call helper function which possibly converts this using DOS-style short mode.
16196  # If so, the updated path is stored in $new_path.
16197  new_path="$input_to_shortpath"
16198
16199  input_path="$input_to_shortpath"
16200  # Check if we need to convert this using DOS-style short mode. If the path
16201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16202  # take no chances and rewrite it.
16203  # Note: m4 eats our [], so we need to use [ and ] instead.
16204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16205  if test "x$has_forbidden_chars" != x; then
16206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16210      # Going to short mode and back again did indeed matter. Since short mode is
16211      # case insensitive, let's make it lowercase to improve readability.
16212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16213      # Now convert it back to Unix-stile (cygpath)
16214      input_path=`$CYGPATH -u "$shortmode_path"`
16215      new_path="$input_path"
16216    fi
16217  fi
16218
16219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16220  if test "x$test_cygdrive_prefix" = x; then
16221    # As a simple fix, exclude /usr/bin since it's not a real path.
16222    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16224      # a path prefixed by /cygdrive for fixpath to work.
16225      new_path="$CYGWIN_ROOT_PATH$input_path"
16226    fi
16227  fi
16228
16229  # remove trailing .exe if any
16230  new_path="${new_path/%.exe/}"
16231
16232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16233
16234  # First separate the path from the arguments. This will split at the first
16235  # space.
16236  complete="$VS_ENV_CMD"
16237  path="${complete%% *}"
16238  tmp="$complete EOL"
16239  arguments="${tmp#* }"
16240
16241  # Input might be given as Windows format, start by converting to
16242  # unix format.
16243  new_path="$path"
16244
16245  windows_path="$new_path"
16246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16247    unix_path=`$CYGPATH -u "$windows_path"`
16248    new_path="$unix_path"
16249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16251    new_path="$unix_path"
16252  fi
16253
16254
16255  # Now try to locate executable using which
16256  new_path=`$WHICH "$new_path" 2> /dev/null`
16257
16258  if test "x$new_path" = x; then
16259    # Oops. Which didn't find the executable.
16260    # The splitting of arguments from the executable at a space might have been incorrect,
16261    # since paths with space are more likely in Windows. Give it another try with the whole
16262    # argument.
16263    path="$complete"
16264    arguments="EOL"
16265    new_path="$path"
16266
16267  windows_path="$new_path"
16268  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16269    unix_path=`$CYGPATH -u "$windows_path"`
16270    new_path="$unix_path"
16271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16272    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16273    new_path="$unix_path"
16274  fi
16275
16276
16277    new_path=`$WHICH "$new_path" 2> /dev/null`
16278
16279    if test "x$new_path" = x; then
16280      # It's still not found. Now this is an unrecoverable error.
16281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16282$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16283      has_space=`$ECHO "$complete" | $GREP " "`
16284      if test "x$has_space" != x; then
16285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16287      fi
16288      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16289    fi
16290  fi
16291
16292  # Now new_path has a complete unix path to the binary
16293  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16294    # Keep paths in /bin as-is, but remove trailing .exe if any
16295    new_path="${new_path/%.exe/}"
16296    # Do not save /bin paths to all_fixpath_prefixes!
16297  else
16298    # Not in mixed or Windows style, start by that.
16299    new_path=`cmd //c echo $new_path`
16300
16301  input_path="$new_path"
16302  # Check if we need to convert this using DOS-style short mode. If the path
16303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16304  # take no chances and rewrite it.
16305  # Note: m4 eats our [], so we need to use [ and ] instead.
16306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16307  if test "x$has_forbidden_chars" != x; then
16308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16310  fi
16311
16312    # Output is in $new_path
16313
16314  windows_path="$new_path"
16315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16316    unix_path=`$CYGPATH -u "$windows_path"`
16317    new_path="$unix_path"
16318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16320    new_path="$unix_path"
16321  fi
16322
16323    # remove trailing .exe if any
16324    new_path="${new_path/%.exe/}"
16325
16326    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16327    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16328  fi
16329
16330  else
16331    # We're on a posix platform. Hooray! :)
16332    # First separate the path from the arguments. This will split at the first
16333    # space.
16334    complete="$VS_ENV_CMD"
16335    path="${complete%% *}"
16336    tmp="$complete EOL"
16337    arguments="${tmp#* }"
16338
16339    new_path=`$WHICH $path 2> /dev/null`
16340    if test "x$new_path" = x; then
16341      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16342      if test "x$is_absolute_path" != x; then
16343        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&5
16344$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) with 'which' failed, using $path directly." >&6;}
16345        new_path="$path"
16346      else
16347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16348$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16349        has_space=`$ECHO "$complete" | $GREP " "`
16350        if test "x$has_space" != x; then
16351          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16352$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16353        fi
16354        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16355      fi
16356    fi
16357  fi
16358
16359  # Now join together the path and the arguments once again
16360  if test "x$arguments" != xEOL; then
16361      new_complete="$new_path ${arguments% *}"
16362  else
16363      new_complete="$new_path"
16364  fi
16365
16366  if test "x$complete" != "x$new_complete"; then
16367    VS_ENV_CMD="$new_complete"
16368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16369$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16370  fi
16371
16372
16373    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16374    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16375$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16376    cd $OUTPUT_ROOT
16377    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16378    # to autoconf standards.
16379
16380    #----
16381
16382    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16383    # but calculate the difference in Cygwin environment before/after running it and then
16384    # apply the diff.
16385
16386    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16387      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16388      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16389      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16390    else
16391      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16392      _dosbash=`cmd //c echo \`which bash\``
16393    fi
16394
16395    # generate the set of exported vars before/after the vs10 setup
16396    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16397    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16398    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16399    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16400
16401    # Now execute the newly created bat file.
16402    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16403    cmd /c localdevenvtmp.bat | cat
16404
16405    # apply the diff (less some non-vs10 vars named by "!")
16406    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16407    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16408    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16409
16410    # cleanup
16411    $RM localdevenvtmp*
16412    #----
16413    cd $CURDIR
16414    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16416$as_echo "no" >&6; }
16417      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16418$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16419      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16420$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16421      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16422$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16423      as_fn_error $? "Cannot continue" "$LINENO" 5
16424    fi
16425
16426    # Now set all paths and other env variables. This will allow the rest of
16427    # the configure script to find and run the compiler in the proper way.
16428    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16429$as_echo "$as_me: Setting extracted environment variables" >&6;}
16430    . $OUTPUT_ROOT/localdevenv.sh
16431  else
16432    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16433    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16434$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16435  fi
16436
16437  # At this point, we should have corrent variables in the environment, or we can't continue.
16438  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16439$as_echo_n "checking for Visual Studio variables... " >&6; }
16440
16441  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16442    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16444$as_echo "present but broken" >&6; }
16445      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16446    else
16447      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16448$as_echo "ok" >&6; }
16449      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16450      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16451      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16452      VS_PATH="$PATH"
16453
16454
16455
16456    fi
16457  else
16458    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16459$as_echo "not found" >&6; }
16460
16461    if test "x$VS_ENV_CMD" = x; then
16462      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16463$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16464      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16465$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16466    else
16467      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16468$as_echo "$as_me: Running the extraction script failed." >&6;}
16469    fi
16470    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16471$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16472    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16473$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16474    as_fn_error $? "Cannot continue" "$LINENO" 5
16475  fi
16476
16477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16478$as_echo_n "checking for msvcr100.dll... " >&6; }
16479
16480# Check whether --with-msvcr-dll was given.
16481if test "${with_msvcr_dll+set}" = set; then :
16482  withval=$with_msvcr_dll;
16483fi
16484
16485  if test "x$with_msvcr_dll" != x; then
16486    MSVCR_DLL="$with_msvcr_dll"
16487  else
16488    if test "x$VCINSTALLDIR" != x; then
16489      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16490        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16491      else
16492        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16493        if test "x$MSVCR_DLL" = x; then
16494          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16495        fi
16496      fi
16497      if test "x$MSVCR_DLL" != x; then
16498        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16499$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16500      else
16501        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16502$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16503      fi
16504    fi
16505    if test "x$MSVCR_DLL" = x; then
16506      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16507        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16508$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16509        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16510      fi
16511    fi
16512  fi
16513  if test "x$MSVCR_DLL" = x; then
16514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16515$as_echo "no" >&6; }
16516    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16517  fi
16518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16519$as_echo "$MSVCR_DLL" >&6; }
16520
16521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16522
16523  # Input might be given as Windows format, start by converting to
16524  # unix format.
16525  path="$MSVCR_DLL"
16526  new_path=`$CYGPATH -u "$path"`
16527
16528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16531  # "foo.exe" is OK but "foo" is an error.
16532  #
16533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16534  # It is also a way to make sure we got the proper file name for the real test later on.
16535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16536  if test "x$test_shortpath" = x; then
16537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16538$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16539    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16540  fi
16541
16542  # Call helper function which possibly converts this using DOS-style short mode.
16543  # If so, the updated path is stored in $new_path.
16544
16545  input_path="$new_path"
16546  # Check if we need to convert this using DOS-style short mode. If the path
16547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16548  # take no chances and rewrite it.
16549  # Note: m4 eats our [], so we need to use [ and ] instead.
16550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16551  if test "x$has_forbidden_chars" != x; then
16552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16556      # Going to short mode and back again did indeed matter. Since short mode is
16557      # case insensitive, let's make it lowercase to improve readability.
16558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16559      # Now convert it back to Unix-stile (cygpath)
16560      input_path=`$CYGPATH -u "$shortmode_path"`
16561      new_path="$input_path"
16562    fi
16563  fi
16564
16565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16566  if test "x$test_cygdrive_prefix" = x; then
16567    # As a simple fix, exclude /usr/bin since it's not a real path.
16568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16570      # a path prefixed by /cygdrive for fixpath to work.
16571      new_path="$CYGWIN_ROOT_PATH$input_path"
16572    fi
16573  fi
16574
16575
16576  if test "x$path" != "x$new_path"; then
16577    MSVCR_DLL="$new_path"
16578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16579$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16580  fi
16581
16582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16583
16584  path="$MSVCR_DLL"
16585  has_colon=`$ECHO $path | $GREP ^.:`
16586  new_path="$path"
16587  if test "x$has_colon" = x; then
16588    # Not in mixed or Windows style, start by that.
16589    new_path=`cmd //c echo $path`
16590  fi
16591
16592
16593  input_path="$new_path"
16594  # Check if we need to convert this using DOS-style short mode. If the path
16595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16596  # take no chances and rewrite it.
16597  # Note: m4 eats our [], so we need to use [ and ] instead.
16598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16599  if test "x$has_forbidden_chars" != x; then
16600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16602  fi
16603
16604
16605  windows_path="$new_path"
16606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16607    unix_path=`$CYGPATH -u "$windows_path"`
16608    new_path="$unix_path"
16609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16611    new_path="$unix_path"
16612  fi
16613
16614  if test "x$path" != "x$new_path"; then
16615    MSVCR_DLL="$new_path"
16616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16617$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16618  fi
16619
16620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16622
16623  else
16624    # We're on a posix platform. Hooray! :)
16625    path="$MSVCR_DLL"
16626
16627    if test ! -f "$path" && test ! -d "$path"; then
16628      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16629    fi
16630
16631    has_space=`$ECHO "$path" | $GREP " "`
16632    if test "x$has_space" != x; then
16633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16634$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16635      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16636    fi
16637  fi
16638
16639
16640fi
16641
16642
16643
16644# If --build AND --host is set, then the configure script will find any
16645# cross compilation tools in the PATH. Cross compilation tools
16646# follows the cross compilation standard where they are prefixed with ${host}.
16647# For example the binary i686-sun-solaris2.10-gcc
16648# will cross compile for i686-sun-solaris2.10
16649# If neither of build and host is not set, then build=host and the
16650# default compiler found in the path will be used.
16651# Setting only --host, does not seem to be really supported.
16652# Please set both --build and --host if you want to cross compile.
16653
16654if test "x$COMPILE_TYPE" = "xcross"; then
16655    # Now we to find a C/C++ compiler that can build executables for the build
16656    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16657    # once. Also, we need to do this before adding a tools dir to the path,
16658    # otherwise we might pick up cross-compilers which don't use standard naming.
16659    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16660    # to wait until they are properly discovered.
16661    for ac_prog in cl cc gcc
16662do
16663  # Extract the first word of "$ac_prog", so it can be a program name with args.
16664set dummy $ac_prog; ac_word=$2
16665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16666$as_echo_n "checking for $ac_word... " >&6; }
16667if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16668  $as_echo_n "(cached) " >&6
16669else
16670  case $BUILD_CC in
16671  [\\/]* | ?:[\\/]*)
16672  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16673  ;;
16674  *)
16675  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16676for as_dir in $PATH
16677do
16678  IFS=$as_save_IFS
16679  test -z "$as_dir" && as_dir=.
16680    for ac_exec_ext in '' $ac_executable_extensions; do
16681  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16682    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16684    break 2
16685  fi
16686done
16687  done
16688IFS=$as_save_IFS
16689
16690  ;;
16691esac
16692fi
16693BUILD_CC=$ac_cv_path_BUILD_CC
16694if test -n "$BUILD_CC"; then
16695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16696$as_echo "$BUILD_CC" >&6; }
16697else
16698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16699$as_echo "no" >&6; }
16700fi
16701
16702
16703  test -n "$BUILD_CC" && break
16704done
16705
16706
16707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16708
16709  # First separate the path from the arguments. This will split at the first
16710  # space.
16711  complete="$BUILD_CC"
16712  path="${complete%% *}"
16713  tmp="$complete EOL"
16714  arguments="${tmp#* }"
16715
16716  # Input might be given as Windows format, start by converting to
16717  # unix format.
16718  new_path=`$CYGPATH -u "$path"`
16719
16720  # Now try to locate executable using which
16721  new_path=`$WHICH "$new_path" 2> /dev/null`
16722  # bat and cmd files are not always considered executable in cygwin causing which
16723  # to not find them
16724  if test "x$new_path" = x \
16725           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16726           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16727    new_path=`$CYGPATH -u "$path"`
16728  fi
16729  if test "x$new_path" = x; then
16730    # Oops. Which didn't find the executable.
16731    # The splitting of arguments from the executable at a space might have been incorrect,
16732    # since paths with space are more likely in Windows. Give it another try with the whole
16733    # argument.
16734    path="$complete"
16735    arguments="EOL"
16736    new_path=`$CYGPATH -u "$path"`
16737    new_path=`$WHICH "$new_path" 2> /dev/null`
16738    # bat and cmd files are not always considered executable in cygwin causing which
16739    # to not find them
16740    if test "x$new_path" = x \
16741             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16742             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16743      new_path=`$CYGPATH -u "$path"`
16744    fi
16745    if test "x$new_path" = x; then
16746      # It's still not found. Now this is an unrecoverable error.
16747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16748$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16749      has_space=`$ECHO "$complete" | $GREP " "`
16750      if test "x$has_space" != x; then
16751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16753      fi
16754      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16755    fi
16756  fi
16757
16758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16761  # "foo.exe" is OK but "foo" is an error.
16762  #
16763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16764  # It is also a way to make sure we got the proper file name for the real test later on.
16765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16766  if test "x$test_shortpath" = x; then
16767    # Short path failed, file does not exist as specified.
16768    # Try adding .exe or .cmd
16769    if test -f "${new_path}.exe"; then
16770       input_to_shortpath="${new_path}.exe"
16771    elif test -f "${new_path}.cmd"; then
16772       input_to_shortpath="${new_path}.cmd"
16773    else
16774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
16775$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
16776      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16777$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16778      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16779    fi
16780  else
16781    input_to_shortpath="$new_path"
16782  fi
16783
16784  # Call helper function which possibly converts this using DOS-style short mode.
16785  # If so, the updated path is stored in $new_path.
16786  new_path="$input_to_shortpath"
16787
16788  input_path="$input_to_shortpath"
16789  # Check if we need to convert this using DOS-style short mode. If the path
16790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16791  # take no chances and rewrite it.
16792  # Note: m4 eats our [], so we need to use [ and ] instead.
16793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16794  if test "x$has_forbidden_chars" != x; then
16795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16799      # Going to short mode and back again did indeed matter. Since short mode is
16800      # case insensitive, let's make it lowercase to improve readability.
16801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16802      # Now convert it back to Unix-stile (cygpath)
16803      input_path=`$CYGPATH -u "$shortmode_path"`
16804      new_path="$input_path"
16805    fi
16806  fi
16807
16808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16809  if test "x$test_cygdrive_prefix" = x; then
16810    # As a simple fix, exclude /usr/bin since it's not a real path.
16811    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16813      # a path prefixed by /cygdrive for fixpath to work.
16814      new_path="$CYGWIN_ROOT_PATH$input_path"
16815    fi
16816  fi
16817
16818  # remove trailing .exe if any
16819  new_path="${new_path/%.exe/}"
16820
16821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16822
16823  # First separate the path from the arguments. This will split at the first
16824  # space.
16825  complete="$BUILD_CC"
16826  path="${complete%% *}"
16827  tmp="$complete EOL"
16828  arguments="${tmp#* }"
16829
16830  # Input might be given as Windows format, start by converting to
16831  # unix format.
16832  new_path="$path"
16833
16834  windows_path="$new_path"
16835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16836    unix_path=`$CYGPATH -u "$windows_path"`
16837    new_path="$unix_path"
16838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16840    new_path="$unix_path"
16841  fi
16842
16843
16844  # Now try to locate executable using which
16845  new_path=`$WHICH "$new_path" 2> /dev/null`
16846
16847  if test "x$new_path" = x; then
16848    # Oops. Which didn't find the executable.
16849    # The splitting of arguments from the executable at a space might have been incorrect,
16850    # since paths with space are more likely in Windows. Give it another try with the whole
16851    # argument.
16852    path="$complete"
16853    arguments="EOL"
16854    new_path="$path"
16855
16856  windows_path="$new_path"
16857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16858    unix_path=`$CYGPATH -u "$windows_path"`
16859    new_path="$unix_path"
16860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16862    new_path="$unix_path"
16863  fi
16864
16865
16866    new_path=`$WHICH "$new_path" 2> /dev/null`
16867
16868    if test "x$new_path" = x; then
16869      # It's still not found. Now this is an unrecoverable error.
16870      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16871$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16872      has_space=`$ECHO "$complete" | $GREP " "`
16873      if test "x$has_space" != x; then
16874        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16875$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16876      fi
16877      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16878    fi
16879  fi
16880
16881  # Now new_path has a complete unix path to the binary
16882  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16883    # Keep paths in /bin as-is, but remove trailing .exe if any
16884    new_path="${new_path/%.exe/}"
16885    # Do not save /bin paths to all_fixpath_prefixes!
16886  else
16887    # Not in mixed or Windows style, start by that.
16888    new_path=`cmd //c echo $new_path`
16889
16890  input_path="$new_path"
16891  # Check if we need to convert this using DOS-style short mode. If the path
16892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16893  # take no chances and rewrite it.
16894  # Note: m4 eats our [], so we need to use [ and ] instead.
16895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16896  if test "x$has_forbidden_chars" != x; then
16897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16899  fi
16900
16901    # Output is in $new_path
16902
16903  windows_path="$new_path"
16904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16905    unix_path=`$CYGPATH -u "$windows_path"`
16906    new_path="$unix_path"
16907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16909    new_path="$unix_path"
16910  fi
16911
16912    # remove trailing .exe if any
16913    new_path="${new_path/%.exe/}"
16914
16915    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16916    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16917  fi
16918
16919  else
16920    # We're on a posix platform. Hooray! :)
16921    # First separate the path from the arguments. This will split at the first
16922    # space.
16923    complete="$BUILD_CC"
16924    path="${complete%% *}"
16925    tmp="$complete EOL"
16926    arguments="${tmp#* }"
16927
16928    new_path=`$WHICH $path 2> /dev/null`
16929    if test "x$new_path" = x; then
16930      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16931      if test "x$is_absolute_path" != x; then
16932        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&5
16933$as_echo "$as_me: Resolving BUILD_CC (as $path) with 'which' failed, using $path directly." >&6;}
16934        new_path="$path"
16935      else
16936        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
16937$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
16938        has_space=`$ECHO "$complete" | $GREP " "`
16939        if test "x$has_space" != x; then
16940          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16941$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16942        fi
16943        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
16944      fi
16945    fi
16946  fi
16947
16948  # Now join together the path and the arguments once again
16949  if test "x$arguments" != xEOL; then
16950      new_complete="$new_path ${arguments% *}"
16951  else
16952      new_complete="$new_path"
16953  fi
16954
16955  if test "x$complete" != "x$new_complete"; then
16956    BUILD_CC="$new_complete"
16957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
16958$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
16959  fi
16960
16961    for ac_prog in cl CC g++
16962do
16963  # Extract the first word of "$ac_prog", so it can be a program name with args.
16964set dummy $ac_prog; ac_word=$2
16965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16966$as_echo_n "checking for $ac_word... " >&6; }
16967if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
16968  $as_echo_n "(cached) " >&6
16969else
16970  case $BUILD_CXX in
16971  [\\/]* | ?:[\\/]*)
16972  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
16973  ;;
16974  *)
16975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16976for as_dir in $PATH
16977do
16978  IFS=$as_save_IFS
16979  test -z "$as_dir" && as_dir=.
16980    for ac_exec_ext in '' $ac_executable_extensions; do
16981  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16982    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
16983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16984    break 2
16985  fi
16986done
16987  done
16988IFS=$as_save_IFS
16989
16990  ;;
16991esac
16992fi
16993BUILD_CXX=$ac_cv_path_BUILD_CXX
16994if test -n "$BUILD_CXX"; then
16995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
16996$as_echo "$BUILD_CXX" >&6; }
16997else
16998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16999$as_echo "no" >&6; }
17000fi
17001
17002
17003  test -n "$BUILD_CXX" && break
17004done
17005
17006
17007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17008
17009  # First separate the path from the arguments. This will split at the first
17010  # space.
17011  complete="$BUILD_CXX"
17012  path="${complete%% *}"
17013  tmp="$complete EOL"
17014  arguments="${tmp#* }"
17015
17016  # Input might be given as Windows format, start by converting to
17017  # unix format.
17018  new_path=`$CYGPATH -u "$path"`
17019
17020  # Now try to locate executable using which
17021  new_path=`$WHICH "$new_path" 2> /dev/null`
17022  # bat and cmd files are not always considered executable in cygwin causing which
17023  # to not find them
17024  if test "x$new_path" = x \
17025           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17026           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17027    new_path=`$CYGPATH -u "$path"`
17028  fi
17029  if test "x$new_path" = x; then
17030    # Oops. Which didn't find the executable.
17031    # The splitting of arguments from the executable at a space might have been incorrect,
17032    # since paths with space are more likely in Windows. Give it another try with the whole
17033    # argument.
17034    path="$complete"
17035    arguments="EOL"
17036    new_path=`$CYGPATH -u "$path"`
17037    new_path=`$WHICH "$new_path" 2> /dev/null`
17038    # bat and cmd files are not always considered executable in cygwin causing which
17039    # to not find them
17040    if test "x$new_path" = x \
17041             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17042             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17043      new_path=`$CYGPATH -u "$path"`
17044    fi
17045    if test "x$new_path" = x; then
17046      # It's still not found. Now this is an unrecoverable error.
17047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17048$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17049      has_space=`$ECHO "$complete" | $GREP " "`
17050      if test "x$has_space" != x; then
17051        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17052$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17053      fi
17054      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17055    fi
17056  fi
17057
17058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17061  # "foo.exe" is OK but "foo" is an error.
17062  #
17063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17064  # It is also a way to make sure we got the proper file name for the real test later on.
17065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17066  if test "x$test_shortpath" = x; then
17067    # Short path failed, file does not exist as specified.
17068    # Try adding .exe or .cmd
17069    if test -f "${new_path}.exe"; then
17070       input_to_shortpath="${new_path}.exe"
17071    elif test -f "${new_path}.cmd"; then
17072       input_to_shortpath="${new_path}.cmd"
17073    else
17074      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17075$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17076      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17077$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17078      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17079    fi
17080  else
17081    input_to_shortpath="$new_path"
17082  fi
17083
17084  # Call helper function which possibly converts this using DOS-style short mode.
17085  # If so, the updated path is stored in $new_path.
17086  new_path="$input_to_shortpath"
17087
17088  input_path="$input_to_shortpath"
17089  # Check if we need to convert this using DOS-style short mode. If the path
17090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17091  # take no chances and rewrite it.
17092  # Note: m4 eats our [], so we need to use [ and ] instead.
17093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17094  if test "x$has_forbidden_chars" != x; then
17095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17096    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17097    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17098    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17099      # Going to short mode and back again did indeed matter. Since short mode is
17100      # case insensitive, let's make it lowercase to improve readability.
17101      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17102      # Now convert it back to Unix-stile (cygpath)
17103      input_path=`$CYGPATH -u "$shortmode_path"`
17104      new_path="$input_path"
17105    fi
17106  fi
17107
17108  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17109  if test "x$test_cygdrive_prefix" = x; then
17110    # As a simple fix, exclude /usr/bin since it's not a real path.
17111    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17112      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17113      # a path prefixed by /cygdrive for fixpath to work.
17114      new_path="$CYGWIN_ROOT_PATH$input_path"
17115    fi
17116  fi
17117
17118  # remove trailing .exe if any
17119  new_path="${new_path/%.exe/}"
17120
17121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17122
17123  # First separate the path from the arguments. This will split at the first
17124  # space.
17125  complete="$BUILD_CXX"
17126  path="${complete%% *}"
17127  tmp="$complete EOL"
17128  arguments="${tmp#* }"
17129
17130  # Input might be given as Windows format, start by converting to
17131  # unix format.
17132  new_path="$path"
17133
17134  windows_path="$new_path"
17135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17136    unix_path=`$CYGPATH -u "$windows_path"`
17137    new_path="$unix_path"
17138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17140    new_path="$unix_path"
17141  fi
17142
17143
17144  # Now try to locate executable using which
17145  new_path=`$WHICH "$new_path" 2> /dev/null`
17146
17147  if test "x$new_path" = x; then
17148    # Oops. Which didn't find the executable.
17149    # The splitting of arguments from the executable at a space might have been incorrect,
17150    # since paths with space are more likely in Windows. Give it another try with the whole
17151    # argument.
17152    path="$complete"
17153    arguments="EOL"
17154    new_path="$path"
17155
17156  windows_path="$new_path"
17157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17158    unix_path=`$CYGPATH -u "$windows_path"`
17159    new_path="$unix_path"
17160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17162    new_path="$unix_path"
17163  fi
17164
17165
17166    new_path=`$WHICH "$new_path" 2> /dev/null`
17167
17168    if test "x$new_path" = x; then
17169      # It's still not found. Now this is an unrecoverable error.
17170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17171$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17172      has_space=`$ECHO "$complete" | $GREP " "`
17173      if test "x$has_space" != x; then
17174        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17175$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17176      fi
17177      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17178    fi
17179  fi
17180
17181  # Now new_path has a complete unix path to the binary
17182  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17183    # Keep paths in /bin as-is, but remove trailing .exe if any
17184    new_path="${new_path/%.exe/}"
17185    # Do not save /bin paths to all_fixpath_prefixes!
17186  else
17187    # Not in mixed or Windows style, start by that.
17188    new_path=`cmd //c echo $new_path`
17189
17190  input_path="$new_path"
17191  # Check if we need to convert this using DOS-style short mode. If the path
17192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17193  # take no chances and rewrite it.
17194  # Note: m4 eats our [], so we need to use [ and ] instead.
17195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17196  if test "x$has_forbidden_chars" != x; then
17197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17199  fi
17200
17201    # Output is in $new_path
17202
17203  windows_path="$new_path"
17204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17205    unix_path=`$CYGPATH -u "$windows_path"`
17206    new_path="$unix_path"
17207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17209    new_path="$unix_path"
17210  fi
17211
17212    # remove trailing .exe if any
17213    new_path="${new_path/%.exe/}"
17214
17215    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17216    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17217  fi
17218
17219  else
17220    # We're on a posix platform. Hooray! :)
17221    # First separate the path from the arguments. This will split at the first
17222    # space.
17223    complete="$BUILD_CXX"
17224    path="${complete%% *}"
17225    tmp="$complete EOL"
17226    arguments="${tmp#* }"
17227
17228    new_path=`$WHICH $path 2> /dev/null`
17229    if test "x$new_path" = x; then
17230      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17231      if test "x$is_absolute_path" != x; then
17232        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&5
17233$as_echo "$as_me: Resolving BUILD_CXX (as $path) with 'which' failed, using $path directly." >&6;}
17234        new_path="$path"
17235      else
17236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17237$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17238        has_space=`$ECHO "$complete" | $GREP " "`
17239        if test "x$has_space" != x; then
17240          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17242        fi
17243        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17244      fi
17245    fi
17246  fi
17247
17248  # Now join together the path and the arguments once again
17249  if test "x$arguments" != xEOL; then
17250      new_complete="$new_path ${arguments% *}"
17251  else
17252      new_complete="$new_path"
17253  fi
17254
17255  if test "x$complete" != "x$new_complete"; then
17256    BUILD_CXX="$new_complete"
17257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17258$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17259  fi
17260
17261    # Extract the first word of "ld", so it can be a program name with args.
17262set dummy ld; ac_word=$2
17263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17264$as_echo_n "checking for $ac_word... " >&6; }
17265if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17266  $as_echo_n "(cached) " >&6
17267else
17268  case $BUILD_LD in
17269  [\\/]* | ?:[\\/]*)
17270  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17271  ;;
17272  *)
17273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17274for as_dir in $PATH
17275do
17276  IFS=$as_save_IFS
17277  test -z "$as_dir" && as_dir=.
17278    for ac_exec_ext in '' $ac_executable_extensions; do
17279  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17280    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17282    break 2
17283  fi
17284done
17285  done
17286IFS=$as_save_IFS
17287
17288  ;;
17289esac
17290fi
17291BUILD_LD=$ac_cv_path_BUILD_LD
17292if test -n "$BUILD_LD"; then
17293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17294$as_echo "$BUILD_LD" >&6; }
17295else
17296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17297$as_echo "no" >&6; }
17298fi
17299
17300
17301
17302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17303
17304  # First separate the path from the arguments. This will split at the first
17305  # space.
17306  complete="$BUILD_LD"
17307  path="${complete%% *}"
17308  tmp="$complete EOL"
17309  arguments="${tmp#* }"
17310
17311  # Input might be given as Windows format, start by converting to
17312  # unix format.
17313  new_path=`$CYGPATH -u "$path"`
17314
17315  # Now try to locate executable using which
17316  new_path=`$WHICH "$new_path" 2> /dev/null`
17317  # bat and cmd files are not always considered executable in cygwin causing which
17318  # to not find them
17319  if test "x$new_path" = x \
17320           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17321           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17322    new_path=`$CYGPATH -u "$path"`
17323  fi
17324  if test "x$new_path" = x; then
17325    # Oops. Which didn't find the executable.
17326    # The splitting of arguments from the executable at a space might have been incorrect,
17327    # since paths with space are more likely in Windows. Give it another try with the whole
17328    # argument.
17329    path="$complete"
17330    arguments="EOL"
17331    new_path=`$CYGPATH -u "$path"`
17332    new_path=`$WHICH "$new_path" 2> /dev/null`
17333    # bat and cmd files are not always considered executable in cygwin causing which
17334    # to not find them
17335    if test "x$new_path" = x \
17336             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17337             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17338      new_path=`$CYGPATH -u "$path"`
17339    fi
17340    if test "x$new_path" = x; then
17341      # It's still not found. Now this is an unrecoverable error.
17342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17343$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17344      has_space=`$ECHO "$complete" | $GREP " "`
17345      if test "x$has_space" != x; then
17346        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17347$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17348      fi
17349      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17350    fi
17351  fi
17352
17353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17356  # "foo.exe" is OK but "foo" is an error.
17357  #
17358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17359  # It is also a way to make sure we got the proper file name for the real test later on.
17360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17361  if test "x$test_shortpath" = x; then
17362    # Short path failed, file does not exist as specified.
17363    # Try adding .exe or .cmd
17364    if test -f "${new_path}.exe"; then
17365       input_to_shortpath="${new_path}.exe"
17366    elif test -f "${new_path}.cmd"; then
17367       input_to_shortpath="${new_path}.cmd"
17368    else
17369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17370$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17371      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17372$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17373      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17374    fi
17375  else
17376    input_to_shortpath="$new_path"
17377  fi
17378
17379  # Call helper function which possibly converts this using DOS-style short mode.
17380  # If so, the updated path is stored in $new_path.
17381  new_path="$input_to_shortpath"
17382
17383  input_path="$input_to_shortpath"
17384  # Check if we need to convert this using DOS-style short mode. If the path
17385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17386  # take no chances and rewrite it.
17387  # Note: m4 eats our [], so we need to use [ and ] instead.
17388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17389  if test "x$has_forbidden_chars" != x; then
17390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17394      # Going to short mode and back again did indeed matter. Since short mode is
17395      # case insensitive, let's make it lowercase to improve readability.
17396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17397      # Now convert it back to Unix-stile (cygpath)
17398      input_path=`$CYGPATH -u "$shortmode_path"`
17399      new_path="$input_path"
17400    fi
17401  fi
17402
17403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17404  if test "x$test_cygdrive_prefix" = x; then
17405    # As a simple fix, exclude /usr/bin since it's not a real path.
17406    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17408      # a path prefixed by /cygdrive for fixpath to work.
17409      new_path="$CYGWIN_ROOT_PATH$input_path"
17410    fi
17411  fi
17412
17413  # remove trailing .exe if any
17414  new_path="${new_path/%.exe/}"
17415
17416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17417
17418  # First separate the path from the arguments. This will split at the first
17419  # space.
17420  complete="$BUILD_LD"
17421  path="${complete%% *}"
17422  tmp="$complete EOL"
17423  arguments="${tmp#* }"
17424
17425  # Input might be given as Windows format, start by converting to
17426  # unix format.
17427  new_path="$path"
17428
17429  windows_path="$new_path"
17430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17431    unix_path=`$CYGPATH -u "$windows_path"`
17432    new_path="$unix_path"
17433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17435    new_path="$unix_path"
17436  fi
17437
17438
17439  # Now try to locate executable using which
17440  new_path=`$WHICH "$new_path" 2> /dev/null`
17441
17442  if test "x$new_path" = x; then
17443    # Oops. Which didn't find the executable.
17444    # The splitting of arguments from the executable at a space might have been incorrect,
17445    # since paths with space are more likely in Windows. Give it another try with the whole
17446    # argument.
17447    path="$complete"
17448    arguments="EOL"
17449    new_path="$path"
17450
17451  windows_path="$new_path"
17452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17453    unix_path=`$CYGPATH -u "$windows_path"`
17454    new_path="$unix_path"
17455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17457    new_path="$unix_path"
17458  fi
17459
17460
17461    new_path=`$WHICH "$new_path" 2> /dev/null`
17462
17463    if test "x$new_path" = x; then
17464      # It's still not found. Now this is an unrecoverable error.
17465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17466$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17467      has_space=`$ECHO "$complete" | $GREP " "`
17468      if test "x$has_space" != x; then
17469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17471      fi
17472      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17473    fi
17474  fi
17475
17476  # Now new_path has a complete unix path to the binary
17477  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17478    # Keep paths in /bin as-is, but remove trailing .exe if any
17479    new_path="${new_path/%.exe/}"
17480    # Do not save /bin paths to all_fixpath_prefixes!
17481  else
17482    # Not in mixed or Windows style, start by that.
17483    new_path=`cmd //c echo $new_path`
17484
17485  input_path="$new_path"
17486  # Check if we need to convert this using DOS-style short mode. If the path
17487  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17488  # take no chances and rewrite it.
17489  # Note: m4 eats our [], so we need to use [ and ] instead.
17490  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17491  if test "x$has_forbidden_chars" != x; then
17492    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17493    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17494  fi
17495
17496    # Output is in $new_path
17497
17498  windows_path="$new_path"
17499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17500    unix_path=`$CYGPATH -u "$windows_path"`
17501    new_path="$unix_path"
17502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17504    new_path="$unix_path"
17505  fi
17506
17507    # remove trailing .exe if any
17508    new_path="${new_path/%.exe/}"
17509
17510    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17511    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17512  fi
17513
17514  else
17515    # We're on a posix platform. Hooray! :)
17516    # First separate the path from the arguments. This will split at the first
17517    # space.
17518    complete="$BUILD_LD"
17519    path="${complete%% *}"
17520    tmp="$complete EOL"
17521    arguments="${tmp#* }"
17522
17523    new_path=`$WHICH $path 2> /dev/null`
17524    if test "x$new_path" = x; then
17525      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17526      if test "x$is_absolute_path" != x; then
17527        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&5
17528$as_echo "$as_me: Resolving BUILD_LD (as $path) with 'which' failed, using $path directly." >&6;}
17529        new_path="$path"
17530      else
17531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17532$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17533        has_space=`$ECHO "$complete" | $GREP " "`
17534        if test "x$has_space" != x; then
17535          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17536$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17537        fi
17538        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17539      fi
17540    fi
17541  fi
17542
17543  # Now join together the path and the arguments once again
17544  if test "x$arguments" != xEOL; then
17545      new_complete="$new_path ${arguments% *}"
17546  else
17547      new_complete="$new_path"
17548  fi
17549
17550  if test "x$complete" != "x$new_complete"; then
17551    BUILD_LD="$new_complete"
17552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17553$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17554  fi
17555
17556fi
17557
17558
17559
17560
17561# If a devkit is found on the builddeps server, then prepend its path to the
17562# PATH variable. If there are cross compilers available in the devkit, these
17563# will be found by AC_PROG_CC et al.
17564DEVKIT=
17565
17566
17567    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17568        # Source the builddeps file again, to make sure it uses the latest variables!
17569        . $builddepsfile
17570        # Look for a target and build machine specific resource!
17571        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17572        if test "x$resource" = x; then
17573            # Ok, lets instead look for a target specific resource
17574            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17575        fi
17576        if test "x$resource" = x; then
17577            # Ok, lets instead look for a build specific resource
17578            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17579        fi
17580        if test "x$resource" = x; then
17581            # Ok, lets instead look for a generic resource
17582            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17583            resource=${builddep_devkit}
17584        fi
17585        if test "x$resource" != x; then
17586            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17587$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17588	    # If the resource in the builddeps.conf file is an existing directory,
17589	    # for example /java/linux/cups
17590	    if test -d ${resource}; then
17591	       depdir=${resource}
17592	    else
17593
17594# devkit is for example mymodule
17595# $resource is for example libs/general/libmymod_1_2_3.zip
17596# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17597# $with_builddeps_dir is for example /localhome/builddeps
17598# depdir is the name of the variable into which we store the depdir, eg MYMOD
17599# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17600# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17601    filename=`basename $resource`
17602    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17603    filebase=${filename%%.*}
17604    extension=${filename#*.}
17605    installdir=$with_builddeps_dir/$filebase
17606    if test ! -f $installdir/$filename.unpacked; then
17607        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17608$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17609        if test ! -d $installdir; then
17610            mkdir -p $installdir
17611        fi
17612        if test ! -d $installdir; then
17613            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17614        fi
17615        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17616        touch $tmpfile
17617        if test ! -f $tmpfile; then
17618            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17619        fi
17620
17621    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17622    # $tmpfile is the local file name for the downloaded file.
17623    VALID_TOOL=no
17624    if test "x$BDEPS_FTP" = xwget; then
17625       VALID_TOOL=yes
17626       wget -O $tmpfile $with_builddeps_server/$resource
17627    fi
17628    if test "x$BDEPS_FTP" = xlftp; then
17629       VALID_TOOL=yes
17630       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17631    fi
17632    if test "x$BDEPS_FTP" = xftp; then
17633        VALID_TOOL=yes
17634        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17635        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17636        FTPUSERPWD=${FTPSERVER%%@*}
17637        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17638            FTPUSER=${userpwd%%:*}
17639            FTPPWD=${userpwd#*@}
17640            FTPSERVER=${FTPSERVER#*@}
17641        else
17642            FTPUSER=ftp
17643            FTPPWD=ftp
17644        fi
17645        # the "pass" command does not work on some
17646        # ftp clients (read ftp.exe) but if it works,
17647        # passive mode is better!
17648        (\
17649            echo "user $FTPUSER $FTPPWD"        ;\
17650            echo "pass"                         ;\
17651            echo "bin"                          ;\
17652            echo "get $FTPPATH $tmpfile"              ;\
17653        ) | ftp -in $FTPSERVER
17654    fi
17655    if test "x$VALID_TOOL" != xyes; then
17656       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17657    fi
17658
17659        mv $tmpfile $installdir/$filename
17660        if test ! -s $installdir/$filename; then
17661            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17662        fi
17663        case "$extension" in
17664            zip)  echo "Unzipping $installdir/$filename..."
17665               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17666            ;;
17667            tar.gz) echo "Untaring $installdir/$filename..."
17668               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17669            ;;
17670            tgz) echo "Untaring $installdir/$filename..."
17671               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17672            ;;
17673            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17674            ;;
17675        esac
17676    fi
17677    if test -f $installdir/$filename.unpacked; then
17678        depdir=$installdir
17679    fi
17680
17681	    fi
17682            # Source the builddeps file again, because in the previous command, the depdir
17683            # was updated to point at the current build dependency install directory.
17684            . $builddepsfile
17685            # Now extract variables from the builddeps.conf files.
17686            theroot=${builddep_devkit_ROOT}
17687            thecflags=${builddep_devkit_CFLAGS}
17688            thelibs=${builddep_devkit_LIBS}
17689            if test "x$depdir" = x; then
17690                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
17691            fi
17692            DEVKIT=$depdir
17693            if test "x$theroot" != x; then
17694               DEVKIT="$theroot"
17695            fi
17696            if test "x$thecflags" != x; then
17697               DEVKIT_CFLAGS="$thecflags"
17698            fi
17699            if test "x$thelibs" != x; then
17700               DEVKIT_LIBS="$thelibs"
17701            fi
17702            # Found devkit
17703                     PATH="$DEVKIT/bin:$PATH"
17704                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
17705                     if test "x$x_includes" = "xNONE"; then
17706                         x_includes="$SYS_ROOT/usr/include/X11"
17707                     fi
17708                     if test "x$x_libraries" = "xNONE"; then
17709                         x_libraries="$SYS_ROOT/usr/lib"
17710                     fi
17711
17712
17713        fi
17714
17715    fi
17716
17717
17718if test "x$SYS_ROOT" != "x/" ; then
17719    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
17720    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
17721    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17722    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
17723    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
17724    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
17725fi
17726
17727# Store the CFLAGS etal passed to the configure script.
17728ORG_CFLAGS="$CFLAGS"
17729ORG_CXXFLAGS="$CXXFLAGS"
17730ORG_OBJCFLAGS="$OBJCFLAGS"
17731
17732# autoconf magic only relies on PATH, so update it if tools dir is specified
17733OLD_PATH="$PATH"
17734if test "x$TOOLS_DIR" != x; then
17735  PATH=$TOOLS_DIR:$PATH
17736fi
17737
17738
17739### Locate C compiler (CC)
17740
17741# gcc is almost always present, but on Windows we
17742# prefer cl.exe and on Solaris we prefer CC.
17743# Thus test for them in this order.
17744if test "x$OPENJDK_TARGET_OS" = xmacosx; then
17745  # Do not probe for cc on MacOSX.
17746  COMPILER_CHECK_LIST="cl gcc"
17747else
17748  COMPILER_CHECK_LIST="cl cc gcc"
17749fi
17750
17751
17752  COMPILER_NAME=C
17753
17754  # Do a first initial attempt at searching the list of compiler names.
17755  # AC_PATH_PROGS can't be run multiple times with the same variable,
17756  # so create a new name for this run.
17757  for ac_prog in $COMPILER_CHECK_LIST
17758do
17759  # Extract the first word of "$ac_prog", so it can be a program name with args.
17760set dummy $ac_prog; ac_word=$2
17761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17762$as_echo_n "checking for $ac_word... " >&6; }
17763if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
17764  $as_echo_n "(cached) " >&6
17765else
17766  case $POTENTIAL_CC in
17767  [\\/]* | ?:[\\/]*)
17768  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
17769  ;;
17770  *)
17771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17772for as_dir in $PATH
17773do
17774  IFS=$as_save_IFS
17775  test -z "$as_dir" && as_dir=.
17776    for ac_exec_ext in '' $ac_executable_extensions; do
17777  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17778    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
17779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17780    break 2
17781  fi
17782done
17783  done
17784IFS=$as_save_IFS
17785
17786  ;;
17787esac
17788fi
17789POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
17790if test -n "$POTENTIAL_CC"; then
17791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
17792$as_echo "$POTENTIAL_CC" >&6; }
17793else
17794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17795$as_echo "no" >&6; }
17796fi
17797
17798
17799  test -n "$POTENTIAL_CC" && break
17800done
17801
17802  CC=$POTENTIAL_CC
17803
17804  if test "x$$CC" = x; then
17805
17806    # Print a helpful message on how to acquire the necessary build dependency.
17807    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
17808    MISSING_DEPENDENCY=devkit
17809    PKGHANDLER_COMMAND=
17810
17811    case $PKGHANDLER in
17812	apt-get)
17813                apt_help     $MISSING_DEPENDENCY ;;
17814    yum)
17815                yum_help     $MISSING_DEPENDENCY ;;
17816	port)
17817                port_help    $MISSING_DEPENDENCY ;;
17818	pkgutil)
17819                pkgutil_help $MISSING_DEPENDENCY ;;
17820	pkgadd)
17821                pkgadd_help  $MISSING_DEPENDENCY ;;
17822    * )
17823      break ;;
17824    esac
17825
17826    if test "x$PKGHANDLER_COMMAND" != x; then
17827        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
17828    fi
17829
17830      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
17831  fi
17832
17833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17834
17835  # First separate the path from the arguments. This will split at the first
17836  # space.
17837  complete="$CC"
17838  path="${complete%% *}"
17839  tmp="$complete EOL"
17840  arguments="${tmp#* }"
17841
17842  # Input might be given as Windows format, start by converting to
17843  # unix format.
17844  new_path=`$CYGPATH -u "$path"`
17845
17846  # Now try to locate executable using which
17847  new_path=`$WHICH "$new_path" 2> /dev/null`
17848  # bat and cmd files are not always considered executable in cygwin causing which
17849  # to not find them
17850  if test "x$new_path" = x \
17851           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17852           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17853    new_path=`$CYGPATH -u "$path"`
17854  fi
17855  if test "x$new_path" = x; then
17856    # Oops. Which didn't find the executable.
17857    # The splitting of arguments from the executable at a space might have been incorrect,
17858    # since paths with space are more likely in Windows. Give it another try with the whole
17859    # argument.
17860    path="$complete"
17861    arguments="EOL"
17862    new_path=`$CYGPATH -u "$path"`
17863    new_path=`$WHICH "$new_path" 2> /dev/null`
17864    # bat and cmd files are not always considered executable in cygwin causing which
17865    # to not find them
17866    if test "x$new_path" = x \
17867             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17868             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17869      new_path=`$CYGPATH -u "$path"`
17870    fi
17871    if test "x$new_path" = x; then
17872      # It's still not found. Now this is an unrecoverable error.
17873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17874$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17875      has_space=`$ECHO "$complete" | $GREP " "`
17876      if test "x$has_space" != x; then
17877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17879      fi
17880      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17881    fi
17882  fi
17883
17884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17887  # "foo.exe" is OK but "foo" is an error.
17888  #
17889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17890  # It is also a way to make sure we got the proper file name for the real test later on.
17891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17892  if test "x$test_shortpath" = x; then
17893    # Short path failed, file does not exist as specified.
17894    # Try adding .exe or .cmd
17895    if test -f "${new_path}.exe"; then
17896       input_to_shortpath="${new_path}.exe"
17897    elif test -f "${new_path}.cmd"; then
17898       input_to_shortpath="${new_path}.cmd"
17899    else
17900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
17901$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
17902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17904      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
17905    fi
17906  else
17907    input_to_shortpath="$new_path"
17908  fi
17909
17910  # Call helper function which possibly converts this using DOS-style short mode.
17911  # If so, the updated path is stored in $new_path.
17912  new_path="$input_to_shortpath"
17913
17914  input_path="$input_to_shortpath"
17915  # Check if we need to convert this using DOS-style short mode. If the path
17916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17917  # take no chances and rewrite it.
17918  # Note: m4 eats our [], so we need to use [ and ] instead.
17919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17920  if test "x$has_forbidden_chars" != x; then
17921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17925      # Going to short mode and back again did indeed matter. Since short mode is
17926      # case insensitive, let's make it lowercase to improve readability.
17927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17928      # Now convert it back to Unix-stile (cygpath)
17929      input_path=`$CYGPATH -u "$shortmode_path"`
17930      new_path="$input_path"
17931    fi
17932  fi
17933
17934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17935  if test "x$test_cygdrive_prefix" = x; then
17936    # As a simple fix, exclude /usr/bin since it's not a real path.
17937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17939      # a path prefixed by /cygdrive for fixpath to work.
17940      new_path="$CYGWIN_ROOT_PATH$input_path"
17941    fi
17942  fi
17943
17944  # remove trailing .exe if any
17945  new_path="${new_path/%.exe/}"
17946
17947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17948
17949  # First separate the path from the arguments. This will split at the first
17950  # space.
17951  complete="$CC"
17952  path="${complete%% *}"
17953  tmp="$complete EOL"
17954  arguments="${tmp#* }"
17955
17956  # Input might be given as Windows format, start by converting to
17957  # unix format.
17958  new_path="$path"
17959
17960  windows_path="$new_path"
17961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17962    unix_path=`$CYGPATH -u "$windows_path"`
17963    new_path="$unix_path"
17964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17966    new_path="$unix_path"
17967  fi
17968
17969
17970  # Now try to locate executable using which
17971  new_path=`$WHICH "$new_path" 2> /dev/null`
17972
17973  if test "x$new_path" = x; then
17974    # Oops. Which didn't find the executable.
17975    # The splitting of arguments from the executable at a space might have been incorrect,
17976    # since paths with space are more likely in Windows. Give it another try with the whole
17977    # argument.
17978    path="$complete"
17979    arguments="EOL"
17980    new_path="$path"
17981
17982  windows_path="$new_path"
17983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17984    unix_path=`$CYGPATH -u "$windows_path"`
17985    new_path="$unix_path"
17986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17988    new_path="$unix_path"
17989  fi
17990
17991
17992    new_path=`$WHICH "$new_path" 2> /dev/null`
17993
17994    if test "x$new_path" = x; then
17995      # It's still not found. Now this is an unrecoverable error.
17996      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
17997$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
17998      has_space=`$ECHO "$complete" | $GREP " "`
17999      if test "x$has_space" != x; then
18000        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18001$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18002      fi
18003      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18004    fi
18005  fi
18006
18007  # Now new_path has a complete unix path to the binary
18008  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18009    # Keep paths in /bin as-is, but remove trailing .exe if any
18010    new_path="${new_path/%.exe/}"
18011    # Do not save /bin paths to all_fixpath_prefixes!
18012  else
18013    # Not in mixed or Windows style, start by that.
18014    new_path=`cmd //c echo $new_path`
18015
18016  input_path="$new_path"
18017  # Check if we need to convert this using DOS-style short mode. If the path
18018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18019  # take no chances and rewrite it.
18020  # Note: m4 eats our [], so we need to use [ and ] instead.
18021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18022  if test "x$has_forbidden_chars" != x; then
18023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18025  fi
18026
18027    # Output is in $new_path
18028
18029  windows_path="$new_path"
18030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18031    unix_path=`$CYGPATH -u "$windows_path"`
18032    new_path="$unix_path"
18033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18035    new_path="$unix_path"
18036  fi
18037
18038    # remove trailing .exe if any
18039    new_path="${new_path/%.exe/}"
18040
18041    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18042    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18043  fi
18044
18045  else
18046    # We're on a posix platform. Hooray! :)
18047    # First separate the path from the arguments. This will split at the first
18048    # space.
18049    complete="$CC"
18050    path="${complete%% *}"
18051    tmp="$complete EOL"
18052    arguments="${tmp#* }"
18053
18054    new_path=`$WHICH $path 2> /dev/null`
18055    if test "x$new_path" = x; then
18056      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18057      if test "x$is_absolute_path" != x; then
18058        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) with 'which' failed, using $path directly." >&5
18059$as_echo "$as_me: Resolving CC (as $path) with 'which' failed, using $path directly." >&6;}
18060        new_path="$path"
18061      else
18062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18063$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18064        has_space=`$ECHO "$complete" | $GREP " "`
18065        if test "x$has_space" != x; then
18066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18068        fi
18069        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18070      fi
18071    fi
18072  fi
18073
18074  # Now join together the path and the arguments once again
18075  if test "x$arguments" != xEOL; then
18076      new_complete="$new_path ${arguments% *}"
18077  else
18078      new_complete="$new_path"
18079  fi
18080
18081  if test "x$complete" != "x$new_complete"; then
18082    CC="$new_complete"
18083    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18084$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18085  fi
18086
18087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18088$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18089  TEST_COMPILER="$CC"
18090
18091    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18092        # Follow a chain of symbolic links. Use readlink
18093        # where it exists, else fall back to horribly
18094        # complicated shell code.
18095        if test "x$READLINK_TESTED" != yes; then
18096            # On MacOSX there is a readlink tool with a different
18097            # purpose than the GNU readlink tool. Check the found readlink.
18098            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18099            if test "x$ISGNU" = x; then
18100                 # A readlink that we do not know how to use.
18101                 # Are there other non-GNU readlinks out there?
18102                 READLINK_TESTED=yes
18103                 READLINK=
18104            fi
18105        fi
18106
18107        if test "x$READLINK" != x; then
18108            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18109        else
18110            # Save the current directory for restoring afterwards
18111            STARTDIR=$PWD
18112            COUNTER=0
18113            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18114            sym_link_file=`$BASENAME $TEST_COMPILER`
18115            # Use the system pwd and not the shell builtin to resolve directory symlinks
18116            cd $sym_link_dir
18117            cd `$THEPWDCMD`
18118            sym_link_dir=`$THEPWDCMD`
18119            # Resolve file symlinks
18120            while test $COUNTER -lt 20; do
18121                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18122                if test "x$ISLINK" == x; then
18123                    # This is not a symbolic link! We are done!
18124                    break
18125                fi
18126                # Again resolve directory symlinks since the target of the just found
18127                # link could be in a different directory
18128                cd `$DIRNAME $ISLINK`
18129                sym_link_dir=`$THEPWDCMD`
18130                sym_link_file=`$BASENAME $ISLINK`
18131                let COUNTER=COUNTER+1
18132            done
18133            cd $STARTDIR
18134            TEST_COMPILER=$sym_link_dir/$sym_link_file
18135        fi
18136    fi
18137
18138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18139$as_echo "$TEST_COMPILER" >&6; }
18140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18141$as_echo_n "checking if CC is disguised ccache... " >&6; }
18142
18143  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18144  if test "x$COMPILER_BASENAME" = "xccache"; then
18145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18146$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18147    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18148    # We want to control ccache invocation ourselves, so ignore this cc and try
18149    # searching again.
18150
18151    # Remove the path to the fake ccache cc from the PATH
18152    RETRY_COMPILER_SAVED_PATH="$PATH"
18153    COMPILER_DIRNAME=`$DIRNAME $CC`
18154    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18155
18156    # Try again looking for our compiler
18157    if test -n "$ac_tool_prefix"; then
18158  for ac_prog in $COMPILER_CHECK_LIST
18159  do
18160    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18161set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18163$as_echo_n "checking for $ac_word... " >&6; }
18164if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18165  $as_echo_n "(cached) " >&6
18166else
18167  if test -n "$PROPER_COMPILER_CC"; then
18168  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18169else
18170as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18171for as_dir in $PATH
18172do
18173  IFS=$as_save_IFS
18174  test -z "$as_dir" && as_dir=.
18175    for ac_exec_ext in '' $ac_executable_extensions; do
18176  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18177    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18179    break 2
18180  fi
18181done
18182  done
18183IFS=$as_save_IFS
18184
18185fi
18186fi
18187PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18188if test -n "$PROPER_COMPILER_CC"; then
18189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18190$as_echo "$PROPER_COMPILER_CC" >&6; }
18191else
18192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18193$as_echo "no" >&6; }
18194fi
18195
18196
18197    test -n "$PROPER_COMPILER_CC" && break
18198  done
18199fi
18200if test -z "$PROPER_COMPILER_CC"; then
18201  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18202  for ac_prog in $COMPILER_CHECK_LIST
18203do
18204  # Extract the first word of "$ac_prog", so it can be a program name with args.
18205set dummy $ac_prog; ac_word=$2
18206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18207$as_echo_n "checking for $ac_word... " >&6; }
18208if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18209  $as_echo_n "(cached) " >&6
18210else
18211  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18212  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18213else
18214as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18215for as_dir in $PATH
18216do
18217  IFS=$as_save_IFS
18218  test -z "$as_dir" && as_dir=.
18219    for ac_exec_ext in '' $ac_executable_extensions; do
18220  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18221    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18223    break 2
18224  fi
18225done
18226  done
18227IFS=$as_save_IFS
18228
18229fi
18230fi
18231ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18232if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18234$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18235else
18236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18237$as_echo "no" >&6; }
18238fi
18239
18240
18241  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18242done
18243
18244  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18245    PROPER_COMPILER_CC=""
18246  else
18247    case $cross_compiling:$ac_tool_warned in
18248yes:)
18249{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18250$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18251ac_tool_warned=yes ;;
18252esac
18253    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18254  fi
18255fi
18256
18257
18258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18259
18260  # First separate the path from the arguments. This will split at the first
18261  # space.
18262  complete="$PROPER_COMPILER_CC"
18263  path="${complete%% *}"
18264  tmp="$complete EOL"
18265  arguments="${tmp#* }"
18266
18267  # Input might be given as Windows format, start by converting to
18268  # unix format.
18269  new_path=`$CYGPATH -u "$path"`
18270
18271  # Now try to locate executable using which
18272  new_path=`$WHICH "$new_path" 2> /dev/null`
18273  # bat and cmd files are not always considered executable in cygwin causing which
18274  # to not find them
18275  if test "x$new_path" = x \
18276           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18277           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18278    new_path=`$CYGPATH -u "$path"`
18279  fi
18280  if test "x$new_path" = x; then
18281    # Oops. Which didn't find the executable.
18282    # The splitting of arguments from the executable at a space might have been incorrect,
18283    # since paths with space are more likely in Windows. Give it another try with the whole
18284    # argument.
18285    path="$complete"
18286    arguments="EOL"
18287    new_path=`$CYGPATH -u "$path"`
18288    new_path=`$WHICH "$new_path" 2> /dev/null`
18289    # bat and cmd files are not always considered executable in cygwin causing which
18290    # to not find them
18291    if test "x$new_path" = x \
18292             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18293             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18294      new_path=`$CYGPATH -u "$path"`
18295    fi
18296    if test "x$new_path" = x; then
18297      # It's still not found. Now this is an unrecoverable error.
18298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18299$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18300      has_space=`$ECHO "$complete" | $GREP " "`
18301      if test "x$has_space" != x; then
18302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18304      fi
18305      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18306    fi
18307  fi
18308
18309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18312  # "foo.exe" is OK but "foo" is an error.
18313  #
18314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18315  # It is also a way to make sure we got the proper file name for the real test later on.
18316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18317  if test "x$test_shortpath" = x; then
18318    # Short path failed, file does not exist as specified.
18319    # Try adding .exe or .cmd
18320    if test -f "${new_path}.exe"; then
18321       input_to_shortpath="${new_path}.exe"
18322    elif test -f "${new_path}.cmd"; then
18323       input_to_shortpath="${new_path}.cmd"
18324    else
18325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18326$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18327      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18328$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18329      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18330    fi
18331  else
18332    input_to_shortpath="$new_path"
18333  fi
18334
18335  # Call helper function which possibly converts this using DOS-style short mode.
18336  # If so, the updated path is stored in $new_path.
18337  new_path="$input_to_shortpath"
18338
18339  input_path="$input_to_shortpath"
18340  # Check if we need to convert this using DOS-style short mode. If the path
18341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18342  # take no chances and rewrite it.
18343  # Note: m4 eats our [], so we need to use [ and ] instead.
18344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18345  if test "x$has_forbidden_chars" != x; then
18346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18350      # Going to short mode and back again did indeed matter. Since short mode is
18351      # case insensitive, let's make it lowercase to improve readability.
18352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18353      # Now convert it back to Unix-stile (cygpath)
18354      input_path=`$CYGPATH -u "$shortmode_path"`
18355      new_path="$input_path"
18356    fi
18357  fi
18358
18359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18360  if test "x$test_cygdrive_prefix" = x; then
18361    # As a simple fix, exclude /usr/bin since it's not a real path.
18362    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18364      # a path prefixed by /cygdrive for fixpath to work.
18365      new_path="$CYGWIN_ROOT_PATH$input_path"
18366    fi
18367  fi
18368
18369  # remove trailing .exe if any
18370  new_path="${new_path/%.exe/}"
18371
18372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18373
18374  # First separate the path from the arguments. This will split at the first
18375  # space.
18376  complete="$PROPER_COMPILER_CC"
18377  path="${complete%% *}"
18378  tmp="$complete EOL"
18379  arguments="${tmp#* }"
18380
18381  # Input might be given as Windows format, start by converting to
18382  # unix format.
18383  new_path="$path"
18384
18385  windows_path="$new_path"
18386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18387    unix_path=`$CYGPATH -u "$windows_path"`
18388    new_path="$unix_path"
18389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18391    new_path="$unix_path"
18392  fi
18393
18394
18395  # Now try to locate executable using which
18396  new_path=`$WHICH "$new_path" 2> /dev/null`
18397
18398  if test "x$new_path" = x; then
18399    # Oops. Which didn't find the executable.
18400    # The splitting of arguments from the executable at a space might have been incorrect,
18401    # since paths with space are more likely in Windows. Give it another try with the whole
18402    # argument.
18403    path="$complete"
18404    arguments="EOL"
18405    new_path="$path"
18406
18407  windows_path="$new_path"
18408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18409    unix_path=`$CYGPATH -u "$windows_path"`
18410    new_path="$unix_path"
18411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18413    new_path="$unix_path"
18414  fi
18415
18416
18417    new_path=`$WHICH "$new_path" 2> /dev/null`
18418
18419    if test "x$new_path" = x; then
18420      # It's still not found. Now this is an unrecoverable error.
18421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18422$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18423      has_space=`$ECHO "$complete" | $GREP " "`
18424      if test "x$has_space" != x; then
18425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18427      fi
18428      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18429    fi
18430  fi
18431
18432  # Now new_path has a complete unix path to the binary
18433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18434    # Keep paths in /bin as-is, but remove trailing .exe if any
18435    new_path="${new_path/%.exe/}"
18436    # Do not save /bin paths to all_fixpath_prefixes!
18437  else
18438    # Not in mixed or Windows style, start by that.
18439    new_path=`cmd //c echo $new_path`
18440
18441  input_path="$new_path"
18442  # Check if we need to convert this using DOS-style short mode. If the path
18443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18444  # take no chances and rewrite it.
18445  # Note: m4 eats our [], so we need to use [ and ] instead.
18446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18447  if test "x$has_forbidden_chars" != x; then
18448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18450  fi
18451
18452    # Output is in $new_path
18453
18454  windows_path="$new_path"
18455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18456    unix_path=`$CYGPATH -u "$windows_path"`
18457    new_path="$unix_path"
18458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18460    new_path="$unix_path"
18461  fi
18462
18463    # remove trailing .exe if any
18464    new_path="${new_path/%.exe/}"
18465
18466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18468  fi
18469
18470  else
18471    # We're on a posix platform. Hooray! :)
18472    # First separate the path from the arguments. This will split at the first
18473    # space.
18474    complete="$PROPER_COMPILER_CC"
18475    path="${complete%% *}"
18476    tmp="$complete EOL"
18477    arguments="${tmp#* }"
18478
18479    new_path=`$WHICH $path 2> /dev/null`
18480    if test "x$new_path" = x; then
18481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18482      if test "x$is_absolute_path" != x; then
18483        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&5
18484$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) with 'which' failed, using $path directly." >&6;}
18485        new_path="$path"
18486      else
18487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18488$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18489        has_space=`$ECHO "$complete" | $GREP " "`
18490        if test "x$has_space" != x; then
18491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18493        fi
18494        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18495      fi
18496    fi
18497  fi
18498
18499  # Now join together the path and the arguments once again
18500  if test "x$arguments" != xEOL; then
18501      new_complete="$new_path ${arguments% *}"
18502  else
18503      new_complete="$new_path"
18504  fi
18505
18506  if test "x$complete" != "x$new_complete"; then
18507    PROPER_COMPILER_CC="$new_complete"
18508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18509$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18510  fi
18511
18512    PATH="$RETRY_COMPILER_SAVED_PATH"
18513
18514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18515$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18516
18517    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18518        # Follow a chain of symbolic links. Use readlink
18519        # where it exists, else fall back to horribly
18520        # complicated shell code.
18521        if test "x$READLINK_TESTED" != yes; then
18522            # On MacOSX there is a readlink tool with a different
18523            # purpose than the GNU readlink tool. Check the found readlink.
18524            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18525            if test "x$ISGNU" = x; then
18526                 # A readlink that we do not know how to use.
18527                 # Are there other non-GNU readlinks out there?
18528                 READLINK_TESTED=yes
18529                 READLINK=
18530            fi
18531        fi
18532
18533        if test "x$READLINK" != x; then
18534            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18535        else
18536            # Save the current directory for restoring afterwards
18537            STARTDIR=$PWD
18538            COUNTER=0
18539            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18540            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18541            # Use the system pwd and not the shell builtin to resolve directory symlinks
18542            cd $sym_link_dir
18543            cd `$THEPWDCMD`
18544            sym_link_dir=`$THEPWDCMD`
18545            # Resolve file symlinks
18546            while test $COUNTER -lt 20; do
18547                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18548                if test "x$ISLINK" == x; then
18549                    # This is not a symbolic link! We are done!
18550                    break
18551                fi
18552                # Again resolve directory symlinks since the target of the just found
18553                # link could be in a different directory
18554                cd `$DIRNAME $ISLINK`
18555                sym_link_dir=`$THEPWDCMD`
18556                sym_link_file=`$BASENAME $ISLINK`
18557                let COUNTER=COUNTER+1
18558            done
18559            cd $STARTDIR
18560            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18561        fi
18562    fi
18563
18564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18565$as_echo "$PROPER_COMPILER_CC" >&6; }
18566    CC="$PROPER_COMPILER_CC"
18567  else
18568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18569$as_echo "no, keeping CC" >&6; }
18570    CC="$TEST_COMPILER"
18571  fi
18572
18573  COMPILER=$CC
18574  COMPILER_NAME=$COMPILER_NAME
18575
18576  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18577    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18578    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18579    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18580    if test $? -ne 0; then
18581      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18582
18583      { $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
18584$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18585      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18586$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18587      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18588    else
18589      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18590      COMPILER_VENDOR="Sun Studio"
18591    fi
18592  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18593    # First line typically looks something like:
18594    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18595    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18596    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18597    COMPILER_VENDOR="Microsoft CL.EXE"
18598    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18599    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18600      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18601        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18602      fi
18603    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18604      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18605        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18606      fi
18607    fi
18608  else
18609    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18610    # Check that this is likely to be GCC.
18611    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
18612    if test $? -ne 0; then
18613      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
18614$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
18615      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
18616$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
18617      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18618    fi
18619
18620    # First line typically looks something like:
18621    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
18622    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
18623    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
18624  fi
18625  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
18626  CC_VERSION="$COMPILER_VERSION"
18627  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
18628  CC_VENDOR="$COMPILER_VENDOR"
18629
18630  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
18631$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
18632
18633
18634# Now that we have resolved CC ourself, let autoconf have it's go at it
18635ac_ext=c
18636ac_cpp='$CPP $CPPFLAGS'
18637ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18638ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18639ac_compiler_gnu=$ac_cv_c_compiler_gnu
18640if test -n "$ac_tool_prefix"; then
18641  for ac_prog in $CC
18642  do
18643    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18644set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18646$as_echo_n "checking for $ac_word... " >&6; }
18647if test "${ac_cv_prog_CC+set}" = set; then :
18648  $as_echo_n "(cached) " >&6
18649else
18650  if test -n "$CC"; then
18651  ac_cv_prog_CC="$CC" # Let the user override the test.
18652else
18653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18654for as_dir in $PATH
18655do
18656  IFS=$as_save_IFS
18657  test -z "$as_dir" && as_dir=.
18658    for ac_exec_ext in '' $ac_executable_extensions; do
18659  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18660    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
18661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18662    break 2
18663  fi
18664done
18665  done
18666IFS=$as_save_IFS
18667
18668fi
18669fi
18670CC=$ac_cv_prog_CC
18671if test -n "$CC"; then
18672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
18673$as_echo "$CC" >&6; }
18674else
18675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18676$as_echo "no" >&6; }
18677fi
18678
18679
18680    test -n "$CC" && break
18681  done
18682fi
18683if test -z "$CC"; then
18684  ac_ct_CC=$CC
18685  for ac_prog in $CC
18686do
18687  # Extract the first word of "$ac_prog", so it can be a program name with args.
18688set dummy $ac_prog; ac_word=$2
18689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18690$as_echo_n "checking for $ac_word... " >&6; }
18691if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
18692  $as_echo_n "(cached) " >&6
18693else
18694  if test -n "$ac_ct_CC"; then
18695  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
18696else
18697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18698for as_dir in $PATH
18699do
18700  IFS=$as_save_IFS
18701  test -z "$as_dir" && as_dir=.
18702    for ac_exec_ext in '' $ac_executable_extensions; do
18703  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18704    ac_cv_prog_ac_ct_CC="$ac_prog"
18705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18706    break 2
18707  fi
18708done
18709  done
18710IFS=$as_save_IFS
18711
18712fi
18713fi
18714ac_ct_CC=$ac_cv_prog_ac_ct_CC
18715if test -n "$ac_ct_CC"; then
18716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
18717$as_echo "$ac_ct_CC" >&6; }
18718else
18719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18720$as_echo "no" >&6; }
18721fi
18722
18723
18724  test -n "$ac_ct_CC" && break
18725done
18726
18727  if test "x$ac_ct_CC" = x; then
18728    CC=""
18729  else
18730    case $cross_compiling:$ac_tool_warned in
18731yes:)
18732{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18733$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18734ac_tool_warned=yes ;;
18735esac
18736    CC=$ac_ct_CC
18737  fi
18738fi
18739
18740
18741test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18743as_fn_error $? "no acceptable C compiler found in \$PATH
18744See \`config.log' for more details" "$LINENO" 5 ; }
18745
18746# Provide some information about the compiler.
18747$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
18748set X $ac_compile
18749ac_compiler=$2
18750for ac_option in --version -v -V -qversion; do
18751  { { ac_try="$ac_compiler $ac_option >&5"
18752case "(($ac_try" in
18753  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18754  *) ac_try_echo=$ac_try;;
18755esac
18756eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18757$as_echo "$ac_try_echo"; } >&5
18758  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
18759  ac_status=$?
18760  if test -s conftest.err; then
18761    sed '10a\
18762... rest of stderr output deleted ...
18763         10q' conftest.err >conftest.er1
18764    cat conftest.er1 >&5
18765  fi
18766  rm -f conftest.er1 conftest.err
18767  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18768  test $ac_status = 0; }
18769done
18770
18771cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18772/* end confdefs.h.  */
18773
18774int
18775main ()
18776{
18777
18778  ;
18779  return 0;
18780}
18781_ACEOF
18782ac_clean_files_save=$ac_clean_files
18783ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
18784# Try to create an executable without -o first, disregard a.out.
18785# It will help us diagnose broken compilers, and finding out an intuition
18786# of exeext.
18787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
18788$as_echo_n "checking whether the C compiler works... " >&6; }
18789ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
18790
18791# The possible output files:
18792ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
18793
18794ac_rmfiles=
18795for ac_file in $ac_files
18796do
18797  case $ac_file in
18798    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18799    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
18800  esac
18801done
18802rm -f $ac_rmfiles
18803
18804if { { ac_try="$ac_link_default"
18805case "(($ac_try" in
18806  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18807  *) ac_try_echo=$ac_try;;
18808esac
18809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18810$as_echo "$ac_try_echo"; } >&5
18811  (eval "$ac_link_default") 2>&5
18812  ac_status=$?
18813  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18814  test $ac_status = 0; }; then :
18815  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
18816# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
18817# in a Makefile.  We should not override ac_cv_exeext if it was cached,
18818# so that the user can short-circuit this test for compilers unknown to
18819# Autoconf.
18820for ac_file in $ac_files ''
18821do
18822  test -f "$ac_file" || continue
18823  case $ac_file in
18824    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
18825	;;
18826    [ab].out )
18827	# We found the default executable, but exeext='' is most
18828	# certainly right.
18829	break;;
18830    *.* )
18831	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
18832	then :; else
18833	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18834	fi
18835	# We set ac_cv_exeext here because the later test for it is not
18836	# safe: cross compilers may not add the suffix if given an `-o'
18837	# argument, so we may need to know it at that point already.
18838	# Even if this section looks crufty: it has the advantage of
18839	# actually working.
18840	break;;
18841    * )
18842	break;;
18843  esac
18844done
18845test "$ac_cv_exeext" = no && ac_cv_exeext=
18846
18847else
18848  ac_file=''
18849fi
18850if test -z "$ac_file"; then :
18851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18852$as_echo "no" >&6; }
18853$as_echo "$as_me: failed program was:" >&5
18854sed 's/^/| /' conftest.$ac_ext >&5
18855
18856{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18858as_fn_error 77 "C compiler cannot create executables
18859See \`config.log' for more details" "$LINENO" 5 ; }
18860else
18861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18862$as_echo "yes" >&6; }
18863fi
18864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
18865$as_echo_n "checking for C compiler default output file name... " >&6; }
18866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
18867$as_echo "$ac_file" >&6; }
18868ac_exeext=$ac_cv_exeext
18869
18870rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
18871ac_clean_files=$ac_clean_files_save
18872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
18873$as_echo_n "checking for suffix of executables... " >&6; }
18874if { { ac_try="$ac_link"
18875case "(($ac_try" in
18876  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18877  *) ac_try_echo=$ac_try;;
18878esac
18879eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18880$as_echo "$ac_try_echo"; } >&5
18881  (eval "$ac_link") 2>&5
18882  ac_status=$?
18883  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18884  test $ac_status = 0; }; then :
18885  # If both `conftest.exe' and `conftest' are `present' (well, observable)
18886# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
18887# work properly (i.e., refer to `conftest.exe'), while it won't with
18888# `rm'.
18889for ac_file in conftest.exe conftest conftest.*; do
18890  test -f "$ac_file" || continue
18891  case $ac_file in
18892    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
18893    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
18894	  break;;
18895    * ) break;;
18896  esac
18897done
18898else
18899  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18901as_fn_error $? "cannot compute suffix of executables: cannot compile and link
18902See \`config.log' for more details" "$LINENO" 5 ; }
18903fi
18904rm -f conftest conftest$ac_cv_exeext
18905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
18906$as_echo "$ac_cv_exeext" >&6; }
18907
18908rm -f conftest.$ac_ext
18909EXEEXT=$ac_cv_exeext
18910ac_exeext=$EXEEXT
18911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18912/* end confdefs.h.  */
18913#include <stdio.h>
18914int
18915main ()
18916{
18917FILE *f = fopen ("conftest.out", "w");
18918 return ferror (f) || fclose (f) != 0;
18919
18920  ;
18921  return 0;
18922}
18923_ACEOF
18924ac_clean_files="$ac_clean_files conftest.out"
18925# Check that the compiler produces executables we can run.  If not, either
18926# the compiler is broken, or we cross compile.
18927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
18928$as_echo_n "checking whether we are cross compiling... " >&6; }
18929if test "$cross_compiling" != yes; then
18930  { { ac_try="$ac_link"
18931case "(($ac_try" in
18932  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18933  *) ac_try_echo=$ac_try;;
18934esac
18935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18936$as_echo "$ac_try_echo"; } >&5
18937  (eval "$ac_link") 2>&5
18938  ac_status=$?
18939  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18940  test $ac_status = 0; }
18941  if { ac_try='./conftest$ac_cv_exeext'
18942  { { case "(($ac_try" in
18943  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18944  *) ac_try_echo=$ac_try;;
18945esac
18946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18947$as_echo "$ac_try_echo"; } >&5
18948  (eval "$ac_try") 2>&5
18949  ac_status=$?
18950  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18951  test $ac_status = 0; }; }; then
18952    cross_compiling=no
18953  else
18954    if test "$cross_compiling" = maybe; then
18955	cross_compiling=yes
18956    else
18957	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18958$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18959as_fn_error $? "cannot run C compiled programs.
18960If you meant to cross compile, use \`--host'.
18961See \`config.log' for more details" "$LINENO" 5 ; }
18962    fi
18963  fi
18964fi
18965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
18966$as_echo "$cross_compiling" >&6; }
18967
18968rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
18969ac_clean_files=$ac_clean_files_save
18970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
18971$as_echo_n "checking for suffix of object files... " >&6; }
18972if test "${ac_cv_objext+set}" = set; then :
18973  $as_echo_n "(cached) " >&6
18974else
18975  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18976/* end confdefs.h.  */
18977
18978int
18979main ()
18980{
18981
18982  ;
18983  return 0;
18984}
18985_ACEOF
18986rm -f conftest.o conftest.obj
18987if { { ac_try="$ac_compile"
18988case "(($ac_try" in
18989  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18990  *) ac_try_echo=$ac_try;;
18991esac
18992eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
18993$as_echo "$ac_try_echo"; } >&5
18994  (eval "$ac_compile") 2>&5
18995  ac_status=$?
18996  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
18997  test $ac_status = 0; }; then :
18998  for ac_file in conftest.o conftest.obj conftest.*; do
18999  test -f "$ac_file" || continue;
19000  case $ac_file in
19001    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19002    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19003       break;;
19004  esac
19005done
19006else
19007  $as_echo "$as_me: failed program was:" >&5
19008sed 's/^/| /' conftest.$ac_ext >&5
19009
19010{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19012as_fn_error $? "cannot compute suffix of object files: cannot compile
19013See \`config.log' for more details" "$LINENO" 5 ; }
19014fi
19015rm -f conftest.$ac_cv_objext conftest.$ac_ext
19016fi
19017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19018$as_echo "$ac_cv_objext" >&6; }
19019OBJEXT=$ac_cv_objext
19020ac_objext=$OBJEXT
19021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19022$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19023if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19024  $as_echo_n "(cached) " >&6
19025else
19026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19027/* end confdefs.h.  */
19028
19029int
19030main ()
19031{
19032#ifndef __GNUC__
19033       choke me
19034#endif
19035
19036  ;
19037  return 0;
19038}
19039_ACEOF
19040if ac_fn_c_try_compile "$LINENO"; then :
19041  ac_compiler_gnu=yes
19042else
19043  ac_compiler_gnu=no
19044fi
19045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19046ac_cv_c_compiler_gnu=$ac_compiler_gnu
19047
19048fi
19049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19050$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19051if test $ac_compiler_gnu = yes; then
19052  GCC=yes
19053else
19054  GCC=
19055fi
19056ac_test_CFLAGS=${CFLAGS+set}
19057ac_save_CFLAGS=$CFLAGS
19058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19059$as_echo_n "checking whether $CC accepts -g... " >&6; }
19060if test "${ac_cv_prog_cc_g+set}" = set; then :
19061  $as_echo_n "(cached) " >&6
19062else
19063  ac_save_c_werror_flag=$ac_c_werror_flag
19064   ac_c_werror_flag=yes
19065   ac_cv_prog_cc_g=no
19066   CFLAGS="-g"
19067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19068/* end confdefs.h.  */
19069
19070int
19071main ()
19072{
19073
19074  ;
19075  return 0;
19076}
19077_ACEOF
19078if ac_fn_c_try_compile "$LINENO"; then :
19079  ac_cv_prog_cc_g=yes
19080else
19081  CFLAGS=""
19082      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19083/* end confdefs.h.  */
19084
19085int
19086main ()
19087{
19088
19089  ;
19090  return 0;
19091}
19092_ACEOF
19093if ac_fn_c_try_compile "$LINENO"; then :
19094
19095else
19096  ac_c_werror_flag=$ac_save_c_werror_flag
19097	 CFLAGS="-g"
19098	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19099/* end confdefs.h.  */
19100
19101int
19102main ()
19103{
19104
19105  ;
19106  return 0;
19107}
19108_ACEOF
19109if ac_fn_c_try_compile "$LINENO"; then :
19110  ac_cv_prog_cc_g=yes
19111fi
19112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19113fi
19114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19115fi
19116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19117   ac_c_werror_flag=$ac_save_c_werror_flag
19118fi
19119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19120$as_echo "$ac_cv_prog_cc_g" >&6; }
19121if test "$ac_test_CFLAGS" = set; then
19122  CFLAGS=$ac_save_CFLAGS
19123elif test $ac_cv_prog_cc_g = yes; then
19124  if test "$GCC" = yes; then
19125    CFLAGS="-g -O2"
19126  else
19127    CFLAGS="-g"
19128  fi
19129else
19130  if test "$GCC" = yes; then
19131    CFLAGS="-O2"
19132  else
19133    CFLAGS=
19134  fi
19135fi
19136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19137$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19138if test "${ac_cv_prog_cc_c89+set}" = set; then :
19139  $as_echo_n "(cached) " >&6
19140else
19141  ac_cv_prog_cc_c89=no
19142ac_save_CC=$CC
19143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19144/* end confdefs.h.  */
19145#include <stdarg.h>
19146#include <stdio.h>
19147#include <sys/types.h>
19148#include <sys/stat.h>
19149/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19150struct buf { int x; };
19151FILE * (*rcsopen) (struct buf *, struct stat *, int);
19152static char *e (p, i)
19153     char **p;
19154     int i;
19155{
19156  return p[i];
19157}
19158static char *f (char * (*g) (char **, int), char **p, ...)
19159{
19160  char *s;
19161  va_list v;
19162  va_start (v,p);
19163  s = g (p, va_arg (v,int));
19164  va_end (v);
19165  return s;
19166}
19167
19168/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19169   function prototypes and stuff, but not '\xHH' hex character constants.
19170   These don't provoke an error unfortunately, instead are silently treated
19171   as 'x'.  The following induces an error, until -std is added to get
19172   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19173   array size at least.  It's necessary to write '\x00'==0 to get something
19174   that's true only with -std.  */
19175int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19176
19177/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19178   inside strings and character constants.  */
19179#define FOO(x) 'x'
19180int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19181
19182int test (int i, double x);
19183struct s1 {int (*f) (int a);};
19184struct s2 {int (*f) (double a);};
19185int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19186int argc;
19187char **argv;
19188int
19189main ()
19190{
19191return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19192  ;
19193  return 0;
19194}
19195_ACEOF
19196for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19197	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19198do
19199  CC="$ac_save_CC $ac_arg"
19200  if ac_fn_c_try_compile "$LINENO"; then :
19201  ac_cv_prog_cc_c89=$ac_arg
19202fi
19203rm -f core conftest.err conftest.$ac_objext
19204  test "x$ac_cv_prog_cc_c89" != "xno" && break
19205done
19206rm -f conftest.$ac_ext
19207CC=$ac_save_CC
19208
19209fi
19210# AC_CACHE_VAL
19211case "x$ac_cv_prog_cc_c89" in
19212  x)
19213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19214$as_echo "none needed" >&6; } ;;
19215  xno)
19216    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19217$as_echo "unsupported" >&6; } ;;
19218  *)
19219    CC="$CC $ac_cv_prog_cc_c89"
19220    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19221$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19222esac
19223if test "x$ac_cv_prog_cc_c89" != xno; then :
19224
19225fi
19226
19227ac_ext=cpp
19228ac_cpp='$CXXCPP $CPPFLAGS'
19229ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19230ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19231ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19232
19233
19234### Locate C++ compiler (CXX)
19235
19236if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19237  # Do not probe for CC on MacOSX.
19238  COMPILER_CHECK_LIST="cl g++"
19239else
19240  COMPILER_CHECK_LIST="cl CC g++"
19241fi
19242
19243  COMPILER_NAME=C++
19244
19245  # Do a first initial attempt at searching the list of compiler names.
19246  # AC_PATH_PROGS can't be run multiple times with the same variable,
19247  # so create a new name for this run.
19248  for ac_prog in $COMPILER_CHECK_LIST
19249do
19250  # Extract the first word of "$ac_prog", so it can be a program name with args.
19251set dummy $ac_prog; ac_word=$2
19252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19253$as_echo_n "checking for $ac_word... " >&6; }
19254if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19255  $as_echo_n "(cached) " >&6
19256else
19257  case $POTENTIAL_CXX in
19258  [\\/]* | ?:[\\/]*)
19259  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19260  ;;
19261  *)
19262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19263for as_dir in $PATH
19264do
19265  IFS=$as_save_IFS
19266  test -z "$as_dir" && as_dir=.
19267    for ac_exec_ext in '' $ac_executable_extensions; do
19268  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19269    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19271    break 2
19272  fi
19273done
19274  done
19275IFS=$as_save_IFS
19276
19277  ;;
19278esac
19279fi
19280POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19281if test -n "$POTENTIAL_CXX"; then
19282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19283$as_echo "$POTENTIAL_CXX" >&6; }
19284else
19285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19286$as_echo "no" >&6; }
19287fi
19288
19289
19290  test -n "$POTENTIAL_CXX" && break
19291done
19292
19293  CXX=$POTENTIAL_CXX
19294
19295  if test "x$$CXX" = x; then
19296
19297    # Print a helpful message on how to acquire the necessary build dependency.
19298    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19299    MISSING_DEPENDENCY=devkit
19300    PKGHANDLER_COMMAND=
19301
19302    case $PKGHANDLER in
19303	apt-get)
19304                apt_help     $MISSING_DEPENDENCY ;;
19305    yum)
19306                yum_help     $MISSING_DEPENDENCY ;;
19307	port)
19308                port_help    $MISSING_DEPENDENCY ;;
19309	pkgutil)
19310                pkgutil_help $MISSING_DEPENDENCY ;;
19311	pkgadd)
19312                pkgadd_help  $MISSING_DEPENDENCY ;;
19313    * )
19314      break ;;
19315    esac
19316
19317    if test "x$PKGHANDLER_COMMAND" != x; then
19318        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19319    fi
19320
19321      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19322  fi
19323
19324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19325
19326  # First separate the path from the arguments. This will split at the first
19327  # space.
19328  complete="$CXX"
19329  path="${complete%% *}"
19330  tmp="$complete EOL"
19331  arguments="${tmp#* }"
19332
19333  # Input might be given as Windows format, start by converting to
19334  # unix format.
19335  new_path=`$CYGPATH -u "$path"`
19336
19337  # Now try to locate executable using which
19338  new_path=`$WHICH "$new_path" 2> /dev/null`
19339  # bat and cmd files are not always considered executable in cygwin causing which
19340  # to not find them
19341  if test "x$new_path" = x \
19342           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19343           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19344    new_path=`$CYGPATH -u "$path"`
19345  fi
19346  if test "x$new_path" = x; then
19347    # Oops. Which didn't find the executable.
19348    # The splitting of arguments from the executable at a space might have been incorrect,
19349    # since paths with space are more likely in Windows. Give it another try with the whole
19350    # argument.
19351    path="$complete"
19352    arguments="EOL"
19353    new_path=`$CYGPATH -u "$path"`
19354    new_path=`$WHICH "$new_path" 2> /dev/null`
19355    # bat and cmd files are not always considered executable in cygwin causing which
19356    # to not find them
19357    if test "x$new_path" = x \
19358             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19359             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19360      new_path=`$CYGPATH -u "$path"`
19361    fi
19362    if test "x$new_path" = x; then
19363      # It's still not found. Now this is an unrecoverable error.
19364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19365$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19366      has_space=`$ECHO "$complete" | $GREP " "`
19367      if test "x$has_space" != x; then
19368        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19369$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19370      fi
19371      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19372    fi
19373  fi
19374
19375  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19376  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19377  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19378  # "foo.exe" is OK but "foo" is an error.
19379  #
19380  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19381  # It is also a way to make sure we got the proper file name for the real test later on.
19382  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19383  if test "x$test_shortpath" = x; then
19384    # Short path failed, file does not exist as specified.
19385    # Try adding .exe or .cmd
19386    if test -f "${new_path}.exe"; then
19387       input_to_shortpath="${new_path}.exe"
19388    elif test -f "${new_path}.cmd"; then
19389       input_to_shortpath="${new_path}.cmd"
19390    else
19391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19392$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19393      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19394$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19395      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19396    fi
19397  else
19398    input_to_shortpath="$new_path"
19399  fi
19400
19401  # Call helper function which possibly converts this using DOS-style short mode.
19402  # If so, the updated path is stored in $new_path.
19403  new_path="$input_to_shortpath"
19404
19405  input_path="$input_to_shortpath"
19406  # Check if we need to convert this using DOS-style short mode. If the path
19407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19408  # take no chances and rewrite it.
19409  # Note: m4 eats our [], so we need to use [ and ] instead.
19410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19411  if test "x$has_forbidden_chars" != x; then
19412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19416      # Going to short mode and back again did indeed matter. Since short mode is
19417      # case insensitive, let's make it lowercase to improve readability.
19418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19419      # Now convert it back to Unix-stile (cygpath)
19420      input_path=`$CYGPATH -u "$shortmode_path"`
19421      new_path="$input_path"
19422    fi
19423  fi
19424
19425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19426  if test "x$test_cygdrive_prefix" = x; then
19427    # As a simple fix, exclude /usr/bin since it's not a real path.
19428    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19430      # a path prefixed by /cygdrive for fixpath to work.
19431      new_path="$CYGWIN_ROOT_PATH$input_path"
19432    fi
19433  fi
19434
19435  # remove trailing .exe if any
19436  new_path="${new_path/%.exe/}"
19437
19438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19439
19440  # First separate the path from the arguments. This will split at the first
19441  # space.
19442  complete="$CXX"
19443  path="${complete%% *}"
19444  tmp="$complete EOL"
19445  arguments="${tmp#* }"
19446
19447  # Input might be given as Windows format, start by converting to
19448  # unix format.
19449  new_path="$path"
19450
19451  windows_path="$new_path"
19452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19453    unix_path=`$CYGPATH -u "$windows_path"`
19454    new_path="$unix_path"
19455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19457    new_path="$unix_path"
19458  fi
19459
19460
19461  # Now try to locate executable using which
19462  new_path=`$WHICH "$new_path" 2> /dev/null`
19463
19464  if test "x$new_path" = x; then
19465    # Oops. Which didn't find the executable.
19466    # The splitting of arguments from the executable at a space might have been incorrect,
19467    # since paths with space are more likely in Windows. Give it another try with the whole
19468    # argument.
19469    path="$complete"
19470    arguments="EOL"
19471    new_path="$path"
19472
19473  windows_path="$new_path"
19474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19475    unix_path=`$CYGPATH -u "$windows_path"`
19476    new_path="$unix_path"
19477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19479    new_path="$unix_path"
19480  fi
19481
19482
19483    new_path=`$WHICH "$new_path" 2> /dev/null`
19484
19485    if test "x$new_path" = x; then
19486      # It's still not found. Now this is an unrecoverable error.
19487      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19488$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19489      has_space=`$ECHO "$complete" | $GREP " "`
19490      if test "x$has_space" != x; then
19491        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19492$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19493      fi
19494      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19495    fi
19496  fi
19497
19498  # Now new_path has a complete unix path to the binary
19499  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19500    # Keep paths in /bin as-is, but remove trailing .exe if any
19501    new_path="${new_path/%.exe/}"
19502    # Do not save /bin paths to all_fixpath_prefixes!
19503  else
19504    # Not in mixed or Windows style, start by that.
19505    new_path=`cmd //c echo $new_path`
19506
19507  input_path="$new_path"
19508  # Check if we need to convert this using DOS-style short mode. If the path
19509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19510  # take no chances and rewrite it.
19511  # Note: m4 eats our [], so we need to use [ and ] instead.
19512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19513  if test "x$has_forbidden_chars" != x; then
19514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19516  fi
19517
19518    # Output is in $new_path
19519
19520  windows_path="$new_path"
19521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19522    unix_path=`$CYGPATH -u "$windows_path"`
19523    new_path="$unix_path"
19524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19526    new_path="$unix_path"
19527  fi
19528
19529    # remove trailing .exe if any
19530    new_path="${new_path/%.exe/}"
19531
19532    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19533    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19534  fi
19535
19536  else
19537    # We're on a posix platform. Hooray! :)
19538    # First separate the path from the arguments. This will split at the first
19539    # space.
19540    complete="$CXX"
19541    path="${complete%% *}"
19542    tmp="$complete EOL"
19543    arguments="${tmp#* }"
19544
19545    new_path=`$WHICH $path 2> /dev/null`
19546    if test "x$new_path" = x; then
19547      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19548      if test "x$is_absolute_path" != x; then
19549        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) with 'which' failed, using $path directly." >&5
19550$as_echo "$as_me: Resolving CXX (as $path) with 'which' failed, using $path directly." >&6;}
19551        new_path="$path"
19552      else
19553        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19554$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19555        has_space=`$ECHO "$complete" | $GREP " "`
19556        if test "x$has_space" != x; then
19557          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19558$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19559        fi
19560        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19561      fi
19562    fi
19563  fi
19564
19565  # Now join together the path and the arguments once again
19566  if test "x$arguments" != xEOL; then
19567      new_complete="$new_path ${arguments% *}"
19568  else
19569      new_complete="$new_path"
19570  fi
19571
19572  if test "x$complete" != "x$new_complete"; then
19573    CXX="$new_complete"
19574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
19575$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
19576  fi
19577
19578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
19579$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
19580  TEST_COMPILER="$CXX"
19581
19582    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19583        # Follow a chain of symbolic links. Use readlink
19584        # where it exists, else fall back to horribly
19585        # complicated shell code.
19586        if test "x$READLINK_TESTED" != yes; then
19587            # On MacOSX there is a readlink tool with a different
19588            # purpose than the GNU readlink tool. Check the found readlink.
19589            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19590            if test "x$ISGNU" = x; then
19591                 # A readlink that we do not know how to use.
19592                 # Are there other non-GNU readlinks out there?
19593                 READLINK_TESTED=yes
19594                 READLINK=
19595            fi
19596        fi
19597
19598        if test "x$READLINK" != x; then
19599            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19600        else
19601            # Save the current directory for restoring afterwards
19602            STARTDIR=$PWD
19603            COUNTER=0
19604            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19605            sym_link_file=`$BASENAME $TEST_COMPILER`
19606            # Use the system pwd and not the shell builtin to resolve directory symlinks
19607            cd $sym_link_dir
19608            cd `$THEPWDCMD`
19609            sym_link_dir=`$THEPWDCMD`
19610            # Resolve file symlinks
19611            while test $COUNTER -lt 20; do
19612                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19613                if test "x$ISLINK" == x; then
19614                    # This is not a symbolic link! We are done!
19615                    break
19616                fi
19617                # Again resolve directory symlinks since the target of the just found
19618                # link could be in a different directory
19619                cd `$DIRNAME $ISLINK`
19620                sym_link_dir=`$THEPWDCMD`
19621                sym_link_file=`$BASENAME $ISLINK`
19622                let COUNTER=COUNTER+1
19623            done
19624            cd $STARTDIR
19625            TEST_COMPILER=$sym_link_dir/$sym_link_file
19626        fi
19627    fi
19628
19629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19630$as_echo "$TEST_COMPILER" >&6; }
19631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
19632$as_echo_n "checking if CXX is disguised ccache... " >&6; }
19633
19634  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19635  if test "x$COMPILER_BASENAME" = "xccache"; then
19636    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19637$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19638    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19639    # We want to control ccache invocation ourselves, so ignore this cc and try
19640    # searching again.
19641
19642    # Remove the path to the fake ccache cc from the PATH
19643    RETRY_COMPILER_SAVED_PATH="$PATH"
19644    COMPILER_DIRNAME=`$DIRNAME $CXX`
19645    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19646
19647    # Try again looking for our compiler
19648    if test -n "$ac_tool_prefix"; then
19649  for ac_prog in $COMPILER_CHECK_LIST
19650  do
19651    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19652set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19654$as_echo_n "checking for $ac_word... " >&6; }
19655if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
19656  $as_echo_n "(cached) " >&6
19657else
19658  if test -n "$PROPER_COMPILER_CXX"; then
19659  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
19660else
19661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19662for as_dir in $PATH
19663do
19664  IFS=$as_save_IFS
19665  test -z "$as_dir" && as_dir=.
19666    for ac_exec_ext in '' $ac_executable_extensions; do
19667  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19668    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
19669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19670    break 2
19671  fi
19672done
19673  done
19674IFS=$as_save_IFS
19675
19676fi
19677fi
19678PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
19679if test -n "$PROPER_COMPILER_CXX"; then
19680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
19681$as_echo "$PROPER_COMPILER_CXX" >&6; }
19682else
19683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19684$as_echo "no" >&6; }
19685fi
19686
19687
19688    test -n "$PROPER_COMPILER_CXX" && break
19689  done
19690fi
19691if test -z "$PROPER_COMPILER_CXX"; then
19692  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
19693  for ac_prog in $COMPILER_CHECK_LIST
19694do
19695  # Extract the first word of "$ac_prog", so it can be a program name with args.
19696set dummy $ac_prog; ac_word=$2
19697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19698$as_echo_n "checking for $ac_word... " >&6; }
19699if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
19700  $as_echo_n "(cached) " >&6
19701else
19702  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19703  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
19704else
19705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19706for as_dir in $PATH
19707do
19708  IFS=$as_save_IFS
19709  test -z "$as_dir" && as_dir=.
19710    for ac_exec_ext in '' $ac_executable_extensions; do
19711  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19712    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
19713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19714    break 2
19715  fi
19716done
19717  done
19718IFS=$as_save_IFS
19719
19720fi
19721fi
19722ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
19723if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
19724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
19725$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
19726else
19727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19728$as_echo "no" >&6; }
19729fi
19730
19731
19732  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
19733done
19734
19735  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
19736    PROPER_COMPILER_CXX=""
19737  else
19738    case $cross_compiling:$ac_tool_warned in
19739yes:)
19740{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19741$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19742ac_tool_warned=yes ;;
19743esac
19744    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
19745  fi
19746fi
19747
19748
19749  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19750
19751  # First separate the path from the arguments. This will split at the first
19752  # space.
19753  complete="$PROPER_COMPILER_CXX"
19754  path="${complete%% *}"
19755  tmp="$complete EOL"
19756  arguments="${tmp#* }"
19757
19758  # Input might be given as Windows format, start by converting to
19759  # unix format.
19760  new_path=`$CYGPATH -u "$path"`
19761
19762  # Now try to locate executable using which
19763  new_path=`$WHICH "$new_path" 2> /dev/null`
19764  # bat and cmd files are not always considered executable in cygwin causing which
19765  # to not find them
19766  if test "x$new_path" = x \
19767           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19768           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19769    new_path=`$CYGPATH -u "$path"`
19770  fi
19771  if test "x$new_path" = x; then
19772    # Oops. Which didn't find the executable.
19773    # The splitting of arguments from the executable at a space might have been incorrect,
19774    # since paths with space are more likely in Windows. Give it another try with the whole
19775    # argument.
19776    path="$complete"
19777    arguments="EOL"
19778    new_path=`$CYGPATH -u "$path"`
19779    new_path=`$WHICH "$new_path" 2> /dev/null`
19780    # bat and cmd files are not always considered executable in cygwin causing which
19781    # to not find them
19782    if test "x$new_path" = x \
19783             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19784             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19785      new_path=`$CYGPATH -u "$path"`
19786    fi
19787    if test "x$new_path" = x; then
19788      # It's still not found. Now this is an unrecoverable error.
19789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19790$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19791      has_space=`$ECHO "$complete" | $GREP " "`
19792      if test "x$has_space" != x; then
19793        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19794$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19795      fi
19796      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19797    fi
19798  fi
19799
19800  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19801  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19802  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19803  # "foo.exe" is OK but "foo" is an error.
19804  #
19805  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19806  # It is also a way to make sure we got the proper file name for the real test later on.
19807  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19808  if test "x$test_shortpath" = x; then
19809    # Short path failed, file does not exist as specified.
19810    # Try adding .exe or .cmd
19811    if test -f "${new_path}.exe"; then
19812       input_to_shortpath="${new_path}.exe"
19813    elif test -f "${new_path}.cmd"; then
19814       input_to_shortpath="${new_path}.cmd"
19815    else
19816      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
19817$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
19818      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19819$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19820      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19821    fi
19822  else
19823    input_to_shortpath="$new_path"
19824  fi
19825
19826  # Call helper function which possibly converts this using DOS-style short mode.
19827  # If so, the updated path is stored in $new_path.
19828  new_path="$input_to_shortpath"
19829
19830  input_path="$input_to_shortpath"
19831  # Check if we need to convert this using DOS-style short mode. If the path
19832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19833  # take no chances and rewrite it.
19834  # Note: m4 eats our [], so we need to use [ and ] instead.
19835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19836  if test "x$has_forbidden_chars" != x; then
19837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19841      # Going to short mode and back again did indeed matter. Since short mode is
19842      # case insensitive, let's make it lowercase to improve readability.
19843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19844      # Now convert it back to Unix-stile (cygpath)
19845      input_path=`$CYGPATH -u "$shortmode_path"`
19846      new_path="$input_path"
19847    fi
19848  fi
19849
19850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19851  if test "x$test_cygdrive_prefix" = x; then
19852    # As a simple fix, exclude /usr/bin since it's not a real path.
19853    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19855      # a path prefixed by /cygdrive for fixpath to work.
19856      new_path="$CYGWIN_ROOT_PATH$input_path"
19857    fi
19858  fi
19859
19860  # remove trailing .exe if any
19861  new_path="${new_path/%.exe/}"
19862
19863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19864
19865  # First separate the path from the arguments. This will split at the first
19866  # space.
19867  complete="$PROPER_COMPILER_CXX"
19868  path="${complete%% *}"
19869  tmp="$complete EOL"
19870  arguments="${tmp#* }"
19871
19872  # Input might be given as Windows format, start by converting to
19873  # unix format.
19874  new_path="$path"
19875
19876  windows_path="$new_path"
19877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19878    unix_path=`$CYGPATH -u "$windows_path"`
19879    new_path="$unix_path"
19880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19882    new_path="$unix_path"
19883  fi
19884
19885
19886  # Now try to locate executable using which
19887  new_path=`$WHICH "$new_path" 2> /dev/null`
19888
19889  if test "x$new_path" = x; then
19890    # Oops. Which didn't find the executable.
19891    # The splitting of arguments from the executable at a space might have been incorrect,
19892    # since paths with space are more likely in Windows. Give it another try with the whole
19893    # argument.
19894    path="$complete"
19895    arguments="EOL"
19896    new_path="$path"
19897
19898  windows_path="$new_path"
19899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19900    unix_path=`$CYGPATH -u "$windows_path"`
19901    new_path="$unix_path"
19902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19904    new_path="$unix_path"
19905  fi
19906
19907
19908    new_path=`$WHICH "$new_path" 2> /dev/null`
19909
19910    if test "x$new_path" = x; then
19911      # It's still not found. Now this is an unrecoverable error.
19912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19913$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19914      has_space=`$ECHO "$complete" | $GREP " "`
19915      if test "x$has_space" != x; then
19916        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19917$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19918      fi
19919      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19920    fi
19921  fi
19922
19923  # Now new_path has a complete unix path to the binary
19924  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19925    # Keep paths in /bin as-is, but remove trailing .exe if any
19926    new_path="${new_path/%.exe/}"
19927    # Do not save /bin paths to all_fixpath_prefixes!
19928  else
19929    # Not in mixed or Windows style, start by that.
19930    new_path=`cmd //c echo $new_path`
19931
19932  input_path="$new_path"
19933  # Check if we need to convert this using DOS-style short mode. If the path
19934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19935  # take no chances and rewrite it.
19936  # Note: m4 eats our [], so we need to use [ and ] instead.
19937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19938  if test "x$has_forbidden_chars" != x; then
19939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19941  fi
19942
19943    # Output is in $new_path
19944
19945  windows_path="$new_path"
19946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19947    unix_path=`$CYGPATH -u "$windows_path"`
19948    new_path="$unix_path"
19949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19951    new_path="$unix_path"
19952  fi
19953
19954    # remove trailing .exe if any
19955    new_path="${new_path/%.exe/}"
19956
19957    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19958    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19959  fi
19960
19961  else
19962    # We're on a posix platform. Hooray! :)
19963    # First separate the path from the arguments. This will split at the first
19964    # space.
19965    complete="$PROPER_COMPILER_CXX"
19966    path="${complete%% *}"
19967    tmp="$complete EOL"
19968    arguments="${tmp#* }"
19969
19970    new_path=`$WHICH $path 2> /dev/null`
19971    if test "x$new_path" = x; then
19972      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19973      if test "x$is_absolute_path" != x; then
19974        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&5
19975$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) with 'which' failed, using $path directly." >&6;}
19976        new_path="$path"
19977      else
19978        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
19979$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
19980        has_space=`$ECHO "$complete" | $GREP " "`
19981        if test "x$has_space" != x; then
19982          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19983$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19984        fi
19985        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
19986      fi
19987    fi
19988  fi
19989
19990  # Now join together the path and the arguments once again
19991  if test "x$arguments" != xEOL; then
19992      new_complete="$new_path ${arguments% *}"
19993  else
19994      new_complete="$new_path"
19995  fi
19996
19997  if test "x$complete" != "x$new_complete"; then
19998    PROPER_COMPILER_CXX="$new_complete"
19999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20000$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20001  fi
20002
20003    PATH="$RETRY_COMPILER_SAVED_PATH"
20004
20005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20006$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20007
20008    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20009        # Follow a chain of symbolic links. Use readlink
20010        # where it exists, else fall back to horribly
20011        # complicated shell code.
20012        if test "x$READLINK_TESTED" != yes; then
20013            # On MacOSX there is a readlink tool with a different
20014            # purpose than the GNU readlink tool. Check the found readlink.
20015            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20016            if test "x$ISGNU" = x; then
20017                 # A readlink that we do not know how to use.
20018                 # Are there other non-GNU readlinks out there?
20019                 READLINK_TESTED=yes
20020                 READLINK=
20021            fi
20022        fi
20023
20024        if test "x$READLINK" != x; then
20025            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20026        else
20027            # Save the current directory for restoring afterwards
20028            STARTDIR=$PWD
20029            COUNTER=0
20030            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20031            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20032            # Use the system pwd and not the shell builtin to resolve directory symlinks
20033            cd $sym_link_dir
20034            cd `$THEPWDCMD`
20035            sym_link_dir=`$THEPWDCMD`
20036            # Resolve file symlinks
20037            while test $COUNTER -lt 20; do
20038                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20039                if test "x$ISLINK" == x; then
20040                    # This is not a symbolic link! We are done!
20041                    break
20042                fi
20043                # Again resolve directory symlinks since the target of the just found
20044                # link could be in a different directory
20045                cd `$DIRNAME $ISLINK`
20046                sym_link_dir=`$THEPWDCMD`
20047                sym_link_file=`$BASENAME $ISLINK`
20048                let COUNTER=COUNTER+1
20049            done
20050            cd $STARTDIR
20051            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20052        fi
20053    fi
20054
20055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20056$as_echo "$PROPER_COMPILER_CXX" >&6; }
20057    CXX="$PROPER_COMPILER_CXX"
20058  else
20059    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20060$as_echo "no, keeping CXX" >&6; }
20061    CXX="$TEST_COMPILER"
20062  fi
20063
20064  COMPILER=$CXX
20065  COMPILER_NAME=$COMPILER_NAME
20066
20067  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20068    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20069    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20070    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20071    if test $? -ne 0; then
20072      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20073
20074      { $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
20075$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20076      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20077$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20078      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20079    else
20080      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20081      COMPILER_VENDOR="Sun Studio"
20082    fi
20083  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20084    # First line typically looks something like:
20085    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20086    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20087    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20088    COMPILER_VENDOR="Microsoft CL.EXE"
20089    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20090    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20091      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20092        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20093      fi
20094    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20095      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20096        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20097      fi
20098    fi
20099  else
20100    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20101    # Check that this is likely to be GCC.
20102    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20103    if test $? -ne 0; then
20104      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20105$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20106      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20107$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20108      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20109    fi
20110
20111    # First line typically looks something like:
20112    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20113    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20114    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20115  fi
20116  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20117  CXX_VERSION="$COMPILER_VERSION"
20118  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20119  CXX_VENDOR="$COMPILER_VENDOR"
20120
20121  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20122$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20123
20124
20125# Now that we have resolved CXX ourself, let autoconf have it's go at it
20126ac_ext=cpp
20127ac_cpp='$CXXCPP $CPPFLAGS'
20128ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20129ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20130ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20131if test -z "$CXX"; then
20132  if test -n "$CCC"; then
20133    CXX=$CCC
20134  else
20135    if test -n "$ac_tool_prefix"; then
20136  for ac_prog in $CXX
20137  do
20138    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20139set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20141$as_echo_n "checking for $ac_word... " >&6; }
20142if test "${ac_cv_prog_CXX+set}" = set; then :
20143  $as_echo_n "(cached) " >&6
20144else
20145  if test -n "$CXX"; then
20146  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20147else
20148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20149for as_dir in $PATH
20150do
20151  IFS=$as_save_IFS
20152  test -z "$as_dir" && as_dir=.
20153    for ac_exec_ext in '' $ac_executable_extensions; do
20154  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20155    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20157    break 2
20158  fi
20159done
20160  done
20161IFS=$as_save_IFS
20162
20163fi
20164fi
20165CXX=$ac_cv_prog_CXX
20166if test -n "$CXX"; then
20167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20168$as_echo "$CXX" >&6; }
20169else
20170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20171$as_echo "no" >&6; }
20172fi
20173
20174
20175    test -n "$CXX" && break
20176  done
20177fi
20178if test -z "$CXX"; then
20179  ac_ct_CXX=$CXX
20180  for ac_prog in $CXX
20181do
20182  # Extract the first word of "$ac_prog", so it can be a program name with args.
20183set dummy $ac_prog; ac_word=$2
20184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20185$as_echo_n "checking for $ac_word... " >&6; }
20186if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20187  $as_echo_n "(cached) " >&6
20188else
20189  if test -n "$ac_ct_CXX"; then
20190  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20191else
20192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20193for as_dir in $PATH
20194do
20195  IFS=$as_save_IFS
20196  test -z "$as_dir" && as_dir=.
20197    for ac_exec_ext in '' $ac_executable_extensions; do
20198  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20199    ac_cv_prog_ac_ct_CXX="$ac_prog"
20200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20201    break 2
20202  fi
20203done
20204  done
20205IFS=$as_save_IFS
20206
20207fi
20208fi
20209ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20210if test -n "$ac_ct_CXX"; then
20211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20212$as_echo "$ac_ct_CXX" >&6; }
20213else
20214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20215$as_echo "no" >&6; }
20216fi
20217
20218
20219  test -n "$ac_ct_CXX" && break
20220done
20221
20222  if test "x$ac_ct_CXX" = x; then
20223    CXX="g++"
20224  else
20225    case $cross_compiling:$ac_tool_warned in
20226yes:)
20227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20229ac_tool_warned=yes ;;
20230esac
20231    CXX=$ac_ct_CXX
20232  fi
20233fi
20234
20235  fi
20236fi
20237# Provide some information about the compiler.
20238$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20239set X $ac_compile
20240ac_compiler=$2
20241for ac_option in --version -v -V -qversion; do
20242  { { ac_try="$ac_compiler $ac_option >&5"
20243case "(($ac_try" in
20244  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20245  *) ac_try_echo=$ac_try;;
20246esac
20247eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20248$as_echo "$ac_try_echo"; } >&5
20249  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20250  ac_status=$?
20251  if test -s conftest.err; then
20252    sed '10a\
20253... rest of stderr output deleted ...
20254         10q' conftest.err >conftest.er1
20255    cat conftest.er1 >&5
20256  fi
20257  rm -f conftest.er1 conftest.err
20258  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20259  test $ac_status = 0; }
20260done
20261
20262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20263$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20264if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20265  $as_echo_n "(cached) " >&6
20266else
20267  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20268/* end confdefs.h.  */
20269
20270int
20271main ()
20272{
20273#ifndef __GNUC__
20274       choke me
20275#endif
20276
20277  ;
20278  return 0;
20279}
20280_ACEOF
20281if ac_fn_cxx_try_compile "$LINENO"; then :
20282  ac_compiler_gnu=yes
20283else
20284  ac_compiler_gnu=no
20285fi
20286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20287ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20288
20289fi
20290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20291$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20292if test $ac_compiler_gnu = yes; then
20293  GXX=yes
20294else
20295  GXX=
20296fi
20297ac_test_CXXFLAGS=${CXXFLAGS+set}
20298ac_save_CXXFLAGS=$CXXFLAGS
20299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20300$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20301if test "${ac_cv_prog_cxx_g+set}" = set; then :
20302  $as_echo_n "(cached) " >&6
20303else
20304  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20305   ac_cxx_werror_flag=yes
20306   ac_cv_prog_cxx_g=no
20307   CXXFLAGS="-g"
20308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20309/* end confdefs.h.  */
20310
20311int
20312main ()
20313{
20314
20315  ;
20316  return 0;
20317}
20318_ACEOF
20319if ac_fn_cxx_try_compile "$LINENO"; then :
20320  ac_cv_prog_cxx_g=yes
20321else
20322  CXXFLAGS=""
20323      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20324/* end confdefs.h.  */
20325
20326int
20327main ()
20328{
20329
20330  ;
20331  return 0;
20332}
20333_ACEOF
20334if ac_fn_cxx_try_compile "$LINENO"; then :
20335
20336else
20337  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20338	 CXXFLAGS="-g"
20339	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20340/* end confdefs.h.  */
20341
20342int
20343main ()
20344{
20345
20346  ;
20347  return 0;
20348}
20349_ACEOF
20350if ac_fn_cxx_try_compile "$LINENO"; then :
20351  ac_cv_prog_cxx_g=yes
20352fi
20353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20354fi
20355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20356fi
20357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20358   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20359fi
20360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20361$as_echo "$ac_cv_prog_cxx_g" >&6; }
20362if test "$ac_test_CXXFLAGS" = set; then
20363  CXXFLAGS=$ac_save_CXXFLAGS
20364elif test $ac_cv_prog_cxx_g = yes; then
20365  if test "$GXX" = yes; then
20366    CXXFLAGS="-g -O2"
20367  else
20368    CXXFLAGS="-g"
20369  fi
20370else
20371  if test "$GXX" = yes; then
20372    CXXFLAGS="-O2"
20373  else
20374    CXXFLAGS=
20375  fi
20376fi
20377ac_ext=cpp
20378ac_cpp='$CXXCPP $CPPFLAGS'
20379ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20380ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20381ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20382
20383
20384### Locate other tools
20385
20386if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20387    ac_ext=m
20388ac_cpp='$OBJCPP $CPPFLAGS'
20389ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20390ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20391ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20392if test -n "$ac_tool_prefix"; then
20393  for ac_prog in gcc objcc objc cc CC
20394  do
20395    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20396set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20398$as_echo_n "checking for $ac_word... " >&6; }
20399if test "${ac_cv_prog_OBJC+set}" = set; then :
20400  $as_echo_n "(cached) " >&6
20401else
20402  if test -n "$OBJC"; then
20403  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20404else
20405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20406for as_dir in $PATH
20407do
20408  IFS=$as_save_IFS
20409  test -z "$as_dir" && as_dir=.
20410    for ac_exec_ext in '' $ac_executable_extensions; do
20411  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20412    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20414    break 2
20415  fi
20416done
20417  done
20418IFS=$as_save_IFS
20419
20420fi
20421fi
20422OBJC=$ac_cv_prog_OBJC
20423if test -n "$OBJC"; then
20424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20425$as_echo "$OBJC" >&6; }
20426else
20427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20428$as_echo "no" >&6; }
20429fi
20430
20431
20432    test -n "$OBJC" && break
20433  done
20434fi
20435if test -z "$OBJC"; then
20436  ac_ct_OBJC=$OBJC
20437  for ac_prog in gcc objcc objc cc CC
20438do
20439  # Extract the first word of "$ac_prog", so it can be a program name with args.
20440set dummy $ac_prog; ac_word=$2
20441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20442$as_echo_n "checking for $ac_word... " >&6; }
20443if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20444  $as_echo_n "(cached) " >&6
20445else
20446  if test -n "$ac_ct_OBJC"; then
20447  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20448else
20449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20450for as_dir in $PATH
20451do
20452  IFS=$as_save_IFS
20453  test -z "$as_dir" && as_dir=.
20454    for ac_exec_ext in '' $ac_executable_extensions; do
20455  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20456    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20458    break 2
20459  fi
20460done
20461  done
20462IFS=$as_save_IFS
20463
20464fi
20465fi
20466ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20467if test -n "$ac_ct_OBJC"; then
20468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20469$as_echo "$ac_ct_OBJC" >&6; }
20470else
20471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20472$as_echo "no" >&6; }
20473fi
20474
20475
20476  test -n "$ac_ct_OBJC" && break
20477done
20478
20479  if test "x$ac_ct_OBJC" = x; then
20480    OBJC="gcc"
20481  else
20482    case $cross_compiling:$ac_tool_warned in
20483yes:)
20484{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20485$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20486ac_tool_warned=yes ;;
20487esac
20488    OBJC=$ac_ct_OBJC
20489  fi
20490fi
20491
20492# Provide some information about the compiler.
20493$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20494set X $ac_compile
20495ac_compiler=$2
20496for ac_option in --version -v -V -qversion; do
20497  { { ac_try="$ac_compiler $ac_option >&5"
20498case "(($ac_try" in
20499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20500  *) ac_try_echo=$ac_try;;
20501esac
20502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20503$as_echo "$ac_try_echo"; } >&5
20504  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20505  ac_status=$?
20506  if test -s conftest.err; then
20507    sed '10a\
20508... rest of stderr output deleted ...
20509         10q' conftest.err >conftest.er1
20510    cat conftest.er1 >&5
20511  fi
20512  rm -f conftest.er1 conftest.err
20513  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20514  test $ac_status = 0; }
20515done
20516
20517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20518$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20519if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20520  $as_echo_n "(cached) " >&6
20521else
20522  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20523/* end confdefs.h.  */
20524
20525int
20526main ()
20527{
20528#ifndef __GNUC__
20529       choke me
20530#endif
20531
20532  ;
20533  return 0;
20534}
20535_ACEOF
20536if ac_fn_objc_try_compile "$LINENO"; then :
20537  ac_compiler_gnu=yes
20538else
20539  ac_compiler_gnu=no
20540fi
20541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20542ac_cv_objc_compiler_gnu=$ac_compiler_gnu
20543
20544fi
20545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
20546$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
20547if test $ac_compiler_gnu = yes; then
20548  GOBJC=yes
20549else
20550  GOBJC=
20551fi
20552ac_test_OBJCFLAGS=${OBJCFLAGS+set}
20553ac_save_OBJCFLAGS=$OBJCFLAGS
20554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
20555$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
20556if test "${ac_cv_prog_objc_g+set}" = set; then :
20557  $as_echo_n "(cached) " >&6
20558else
20559  ac_save_objc_werror_flag=$ac_objc_werror_flag
20560   ac_objc_werror_flag=yes
20561   ac_cv_prog_objc_g=no
20562   OBJCFLAGS="-g"
20563   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20564/* end confdefs.h.  */
20565
20566int
20567main ()
20568{
20569
20570  ;
20571  return 0;
20572}
20573_ACEOF
20574if ac_fn_objc_try_compile "$LINENO"; then :
20575  ac_cv_prog_objc_g=yes
20576else
20577  OBJCFLAGS=""
20578      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20579/* end confdefs.h.  */
20580
20581int
20582main ()
20583{
20584
20585  ;
20586  return 0;
20587}
20588_ACEOF
20589if ac_fn_objc_try_compile "$LINENO"; then :
20590
20591else
20592  ac_objc_werror_flag=$ac_save_objc_werror_flag
20593	 OBJCFLAGS="-g"
20594	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20595/* end confdefs.h.  */
20596
20597int
20598main ()
20599{
20600
20601  ;
20602  return 0;
20603}
20604_ACEOF
20605if ac_fn_objc_try_compile "$LINENO"; then :
20606  ac_cv_prog_objc_g=yes
20607fi
20608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20609fi
20610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20611fi
20612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20613   ac_objc_werror_flag=$ac_save_objc_werror_flag
20614fi
20615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
20616$as_echo "$ac_cv_prog_objc_g" >&6; }
20617if test "$ac_test_OBJCFLAGS" = set; then
20618  OBJCFLAGS=$ac_save_OBJCFLAGS
20619elif test $ac_cv_prog_objc_g = yes; then
20620  if test "$GOBJC" = yes; then
20621    OBJCFLAGS="-g -O2"
20622  else
20623    OBJCFLAGS="-g"
20624  fi
20625else
20626  if test "$GOBJC" = yes; then
20627    OBJCFLAGS="-O2"
20628  else
20629    OBJCFLAGS=
20630  fi
20631fi
20632ac_ext=cpp
20633ac_cpp='$CXXCPP $CPPFLAGS'
20634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20637
20638
20639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20640
20641  # First separate the path from the arguments. This will split at the first
20642  # space.
20643  complete="$OBJC"
20644  path="${complete%% *}"
20645  tmp="$complete EOL"
20646  arguments="${tmp#* }"
20647
20648  # Input might be given as Windows format, start by converting to
20649  # unix format.
20650  new_path=`$CYGPATH -u "$path"`
20651
20652  # Now try to locate executable using which
20653  new_path=`$WHICH "$new_path" 2> /dev/null`
20654  # bat and cmd files are not always considered executable in cygwin causing which
20655  # to not find them
20656  if test "x$new_path" = x \
20657           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20658           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20659    new_path=`$CYGPATH -u "$path"`
20660  fi
20661  if test "x$new_path" = x; then
20662    # Oops. Which didn't find the executable.
20663    # The splitting of arguments from the executable at a space might have been incorrect,
20664    # since paths with space are more likely in Windows. Give it another try with the whole
20665    # argument.
20666    path="$complete"
20667    arguments="EOL"
20668    new_path=`$CYGPATH -u "$path"`
20669    new_path=`$WHICH "$new_path" 2> /dev/null`
20670    # bat and cmd files are not always considered executable in cygwin causing which
20671    # to not find them
20672    if test "x$new_path" = x \
20673             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20674             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20675      new_path=`$CYGPATH -u "$path"`
20676    fi
20677    if test "x$new_path" = x; then
20678      # It's still not found. Now this is an unrecoverable error.
20679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20680$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20681      has_space=`$ECHO "$complete" | $GREP " "`
20682      if test "x$has_space" != x; then
20683        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20684$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20685      fi
20686      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20687    fi
20688  fi
20689
20690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20693  # "foo.exe" is OK but "foo" is an error.
20694  #
20695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20696  # It is also a way to make sure we got the proper file name for the real test later on.
20697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20698  if test "x$test_shortpath" = x; then
20699    # Short path failed, file does not exist as specified.
20700    # Try adding .exe or .cmd
20701    if test -f "${new_path}.exe"; then
20702       input_to_shortpath="${new_path}.exe"
20703    elif test -f "${new_path}.cmd"; then
20704       input_to_shortpath="${new_path}.cmd"
20705    else
20706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
20707$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
20708      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20709$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20710      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20711    fi
20712  else
20713    input_to_shortpath="$new_path"
20714  fi
20715
20716  # Call helper function which possibly converts this using DOS-style short mode.
20717  # If so, the updated path is stored in $new_path.
20718  new_path="$input_to_shortpath"
20719
20720  input_path="$input_to_shortpath"
20721  # Check if we need to convert this using DOS-style short mode. If the path
20722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20723  # take no chances and rewrite it.
20724  # Note: m4 eats our [], so we need to use [ and ] instead.
20725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20726  if test "x$has_forbidden_chars" != x; then
20727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20731      # Going to short mode and back again did indeed matter. Since short mode is
20732      # case insensitive, let's make it lowercase to improve readability.
20733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20734      # Now convert it back to Unix-stile (cygpath)
20735      input_path=`$CYGPATH -u "$shortmode_path"`
20736      new_path="$input_path"
20737    fi
20738  fi
20739
20740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20741  if test "x$test_cygdrive_prefix" = x; then
20742    # As a simple fix, exclude /usr/bin since it's not a real path.
20743    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20745      # a path prefixed by /cygdrive for fixpath to work.
20746      new_path="$CYGWIN_ROOT_PATH$input_path"
20747    fi
20748  fi
20749
20750  # remove trailing .exe if any
20751  new_path="${new_path/%.exe/}"
20752
20753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20754
20755  # First separate the path from the arguments. This will split at the first
20756  # space.
20757  complete="$OBJC"
20758  path="${complete%% *}"
20759  tmp="$complete EOL"
20760  arguments="${tmp#* }"
20761
20762  # Input might be given as Windows format, start by converting to
20763  # unix format.
20764  new_path="$path"
20765
20766  windows_path="$new_path"
20767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20768    unix_path=`$CYGPATH -u "$windows_path"`
20769    new_path="$unix_path"
20770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20772    new_path="$unix_path"
20773  fi
20774
20775
20776  # Now try to locate executable using which
20777  new_path=`$WHICH "$new_path" 2> /dev/null`
20778
20779  if test "x$new_path" = x; then
20780    # Oops. Which didn't find the executable.
20781    # The splitting of arguments from the executable at a space might have been incorrect,
20782    # since paths with space are more likely in Windows. Give it another try with the whole
20783    # argument.
20784    path="$complete"
20785    arguments="EOL"
20786    new_path="$path"
20787
20788  windows_path="$new_path"
20789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20790    unix_path=`$CYGPATH -u "$windows_path"`
20791    new_path="$unix_path"
20792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20794    new_path="$unix_path"
20795  fi
20796
20797
20798    new_path=`$WHICH "$new_path" 2> /dev/null`
20799
20800    if test "x$new_path" = x; then
20801      # It's still not found. Now this is an unrecoverable error.
20802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20803$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20804      has_space=`$ECHO "$complete" | $GREP " "`
20805      if test "x$has_space" != x; then
20806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20808      fi
20809      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20810    fi
20811  fi
20812
20813  # Now new_path has a complete unix path to the binary
20814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20815    # Keep paths in /bin as-is, but remove trailing .exe if any
20816    new_path="${new_path/%.exe/}"
20817    # Do not save /bin paths to all_fixpath_prefixes!
20818  else
20819    # Not in mixed or Windows style, start by that.
20820    new_path=`cmd //c echo $new_path`
20821
20822  input_path="$new_path"
20823  # Check if we need to convert this using DOS-style short mode. If the path
20824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20825  # take no chances and rewrite it.
20826  # Note: m4 eats our [], so we need to use [ and ] instead.
20827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20828  if test "x$has_forbidden_chars" != x; then
20829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20831  fi
20832
20833    # Output is in $new_path
20834
20835  windows_path="$new_path"
20836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20837    unix_path=`$CYGPATH -u "$windows_path"`
20838    new_path="$unix_path"
20839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20841    new_path="$unix_path"
20842  fi
20843
20844    # remove trailing .exe if any
20845    new_path="${new_path/%.exe/}"
20846
20847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20849  fi
20850
20851  else
20852    # We're on a posix platform. Hooray! :)
20853    # First separate the path from the arguments. This will split at the first
20854    # space.
20855    complete="$OBJC"
20856    path="${complete%% *}"
20857    tmp="$complete EOL"
20858    arguments="${tmp#* }"
20859
20860    new_path=`$WHICH $path 2> /dev/null`
20861    if test "x$new_path" = x; then
20862      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20863      if test "x$is_absolute_path" != x; then
20864        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&5
20865$as_echo "$as_me: Resolving OBJC (as $path) with 'which' failed, using $path directly." >&6;}
20866        new_path="$path"
20867      else
20868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
20869$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
20870        has_space=`$ECHO "$complete" | $GREP " "`
20871        if test "x$has_space" != x; then
20872          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20873$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20874        fi
20875        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
20876      fi
20877    fi
20878  fi
20879
20880  # Now join together the path and the arguments once again
20881  if test "x$arguments" != xEOL; then
20882      new_complete="$new_path ${arguments% *}"
20883  else
20884      new_complete="$new_path"
20885  fi
20886
20887  if test "x$complete" != "x$new_complete"; then
20888    OBJC="$new_complete"
20889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
20890$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
20891  fi
20892
20893else
20894    OBJC=
20895fi
20896
20897# Restore the flags to the user specified values.
20898# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
20899CFLAGS="$ORG_CFLAGS"
20900CXXFLAGS="$ORG_CXXFLAGS"
20901OBJCFLAGS="$ORG_OBJCFLAGS"
20902
20903LD="$CC"
20904LDEXE="$CC"
20905LDCXX="$CXX"
20906LDEXECXX="$CXX"
20907
20908# LDEXE is the linker to use, when creating executables.
20909
20910# Linking C++ libraries.
20911
20912# Linking C++ executables.
20913
20914
20915if test "x$OPENJDK_TARGET_OS" != xwindows; then
20916    if test -n "$ac_tool_prefix"; then
20917  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
20918set dummy ${ac_tool_prefix}ar; ac_word=$2
20919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20920$as_echo_n "checking for $ac_word... " >&6; }
20921if test "${ac_cv_prog_AR+set}" = set; then :
20922  $as_echo_n "(cached) " >&6
20923else
20924  if test -n "$AR"; then
20925  ac_cv_prog_AR="$AR" # Let the user override the test.
20926else
20927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20928for as_dir in $PATH
20929do
20930  IFS=$as_save_IFS
20931  test -z "$as_dir" && as_dir=.
20932    for ac_exec_ext in '' $ac_executable_extensions; do
20933  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20934    ac_cv_prog_AR="${ac_tool_prefix}ar"
20935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20936    break 2
20937  fi
20938done
20939  done
20940IFS=$as_save_IFS
20941
20942fi
20943fi
20944AR=$ac_cv_prog_AR
20945if test -n "$AR"; then
20946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
20947$as_echo "$AR" >&6; }
20948else
20949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20950$as_echo "no" >&6; }
20951fi
20952
20953
20954fi
20955if test -z "$ac_cv_prog_AR"; then
20956  ac_ct_AR=$AR
20957  # Extract the first word of "ar", so it can be a program name with args.
20958set dummy ar; ac_word=$2
20959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20960$as_echo_n "checking for $ac_word... " >&6; }
20961if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
20962  $as_echo_n "(cached) " >&6
20963else
20964  if test -n "$ac_ct_AR"; then
20965  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
20966else
20967as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20968for as_dir in $PATH
20969do
20970  IFS=$as_save_IFS
20971  test -z "$as_dir" && as_dir=.
20972    for ac_exec_ext in '' $ac_executable_extensions; do
20973  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20974    ac_cv_prog_ac_ct_AR="ar"
20975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20976    break 2
20977  fi
20978done
20979  done
20980IFS=$as_save_IFS
20981
20982fi
20983fi
20984ac_ct_AR=$ac_cv_prog_ac_ct_AR
20985if test -n "$ac_ct_AR"; then
20986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
20987$as_echo "$ac_ct_AR" >&6; }
20988else
20989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20990$as_echo "no" >&6; }
20991fi
20992
20993  if test "x$ac_ct_AR" = x; then
20994    AR=""
20995  else
20996    case $cross_compiling:$ac_tool_warned in
20997yes:)
20998{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20999$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21000ac_tool_warned=yes ;;
21001esac
21002    AR=$ac_ct_AR
21003  fi
21004else
21005  AR="$ac_cv_prog_AR"
21006fi
21007
21008
21009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21010
21011  # First separate the path from the arguments. This will split at the first
21012  # space.
21013  complete="$AR"
21014  path="${complete%% *}"
21015  tmp="$complete EOL"
21016  arguments="${tmp#* }"
21017
21018  # Input might be given as Windows format, start by converting to
21019  # unix format.
21020  new_path=`$CYGPATH -u "$path"`
21021
21022  # Now try to locate executable using which
21023  new_path=`$WHICH "$new_path" 2> /dev/null`
21024  # bat and cmd files are not always considered executable in cygwin causing which
21025  # to not find them
21026  if test "x$new_path" = x \
21027           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21028           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21029    new_path=`$CYGPATH -u "$path"`
21030  fi
21031  if test "x$new_path" = x; then
21032    # Oops. Which didn't find the executable.
21033    # The splitting of arguments from the executable at a space might have been incorrect,
21034    # since paths with space are more likely in Windows. Give it another try with the whole
21035    # argument.
21036    path="$complete"
21037    arguments="EOL"
21038    new_path=`$CYGPATH -u "$path"`
21039    new_path=`$WHICH "$new_path" 2> /dev/null`
21040    # bat and cmd files are not always considered executable in cygwin causing which
21041    # to not find them
21042    if test "x$new_path" = x \
21043             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21044             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21045      new_path=`$CYGPATH -u "$path"`
21046    fi
21047    if test "x$new_path" = x; then
21048      # It's still not found. Now this is an unrecoverable error.
21049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21050$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21051      has_space=`$ECHO "$complete" | $GREP " "`
21052      if test "x$has_space" != x; then
21053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21055      fi
21056      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21057    fi
21058  fi
21059
21060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21063  # "foo.exe" is OK but "foo" is an error.
21064  #
21065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21066  # It is also a way to make sure we got the proper file name for the real test later on.
21067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21068  if test "x$test_shortpath" = x; then
21069    # Short path failed, file does not exist as specified.
21070    # Try adding .exe or .cmd
21071    if test -f "${new_path}.exe"; then
21072       input_to_shortpath="${new_path}.exe"
21073    elif test -f "${new_path}.cmd"; then
21074       input_to_shortpath="${new_path}.cmd"
21075    else
21076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21077$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21080      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21081    fi
21082  else
21083    input_to_shortpath="$new_path"
21084  fi
21085
21086  # Call helper function which possibly converts this using DOS-style short mode.
21087  # If so, the updated path is stored in $new_path.
21088  new_path="$input_to_shortpath"
21089
21090  input_path="$input_to_shortpath"
21091  # Check if we need to convert this using DOS-style short mode. If the path
21092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21093  # take no chances and rewrite it.
21094  # Note: m4 eats our [], so we need to use [ and ] instead.
21095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21096  if test "x$has_forbidden_chars" != x; then
21097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21101      # Going to short mode and back again did indeed matter. Since short mode is
21102      # case insensitive, let's make it lowercase to improve readability.
21103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21104      # Now convert it back to Unix-stile (cygpath)
21105      input_path=`$CYGPATH -u "$shortmode_path"`
21106      new_path="$input_path"
21107    fi
21108  fi
21109
21110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21111  if test "x$test_cygdrive_prefix" = x; then
21112    # As a simple fix, exclude /usr/bin since it's not a real path.
21113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21115      # a path prefixed by /cygdrive for fixpath to work.
21116      new_path="$CYGWIN_ROOT_PATH$input_path"
21117    fi
21118  fi
21119
21120  # remove trailing .exe if any
21121  new_path="${new_path/%.exe/}"
21122
21123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21124
21125  # First separate the path from the arguments. This will split at the first
21126  # space.
21127  complete="$AR"
21128  path="${complete%% *}"
21129  tmp="$complete EOL"
21130  arguments="${tmp#* }"
21131
21132  # Input might be given as Windows format, start by converting to
21133  # unix format.
21134  new_path="$path"
21135
21136  windows_path="$new_path"
21137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21138    unix_path=`$CYGPATH -u "$windows_path"`
21139    new_path="$unix_path"
21140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21142    new_path="$unix_path"
21143  fi
21144
21145
21146  # Now try to locate executable using which
21147  new_path=`$WHICH "$new_path" 2> /dev/null`
21148
21149  if test "x$new_path" = x; then
21150    # Oops. Which didn't find the executable.
21151    # The splitting of arguments from the executable at a space might have been incorrect,
21152    # since paths with space are more likely in Windows. Give it another try with the whole
21153    # argument.
21154    path="$complete"
21155    arguments="EOL"
21156    new_path="$path"
21157
21158  windows_path="$new_path"
21159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21160    unix_path=`$CYGPATH -u "$windows_path"`
21161    new_path="$unix_path"
21162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21164    new_path="$unix_path"
21165  fi
21166
21167
21168    new_path=`$WHICH "$new_path" 2> /dev/null`
21169
21170    if test "x$new_path" = x; then
21171      # It's still not found. Now this is an unrecoverable error.
21172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21173$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21174      has_space=`$ECHO "$complete" | $GREP " "`
21175      if test "x$has_space" != x; then
21176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21178      fi
21179      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21180    fi
21181  fi
21182
21183  # Now new_path has a complete unix path to the binary
21184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21185    # Keep paths in /bin as-is, but remove trailing .exe if any
21186    new_path="${new_path/%.exe/}"
21187    # Do not save /bin paths to all_fixpath_prefixes!
21188  else
21189    # Not in mixed or Windows style, start by that.
21190    new_path=`cmd //c echo $new_path`
21191
21192  input_path="$new_path"
21193  # Check if we need to convert this using DOS-style short mode. If the path
21194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21195  # take no chances and rewrite it.
21196  # Note: m4 eats our [], so we need to use [ and ] instead.
21197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21198  if test "x$has_forbidden_chars" != x; then
21199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21201  fi
21202
21203    # Output is in $new_path
21204
21205  windows_path="$new_path"
21206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21207    unix_path=`$CYGPATH -u "$windows_path"`
21208    new_path="$unix_path"
21209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21211    new_path="$unix_path"
21212  fi
21213
21214    # remove trailing .exe if any
21215    new_path="${new_path/%.exe/}"
21216
21217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21219  fi
21220
21221  else
21222    # We're on a posix platform. Hooray! :)
21223    # First separate the path from the arguments. This will split at the first
21224    # space.
21225    complete="$AR"
21226    path="${complete%% *}"
21227    tmp="$complete EOL"
21228    arguments="${tmp#* }"
21229
21230    new_path=`$WHICH $path 2> /dev/null`
21231    if test "x$new_path" = x; then
21232      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21233      if test "x$is_absolute_path" != x; then
21234        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) with 'which' failed, using $path directly." >&5
21235$as_echo "$as_me: Resolving AR (as $path) with 'which' failed, using $path directly." >&6;}
21236        new_path="$path"
21237      else
21238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21239$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21240        has_space=`$ECHO "$complete" | $GREP " "`
21241        if test "x$has_space" != x; then
21242          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21243$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21244        fi
21245        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21246      fi
21247    fi
21248  fi
21249
21250  # Now join together the path and the arguments once again
21251  if test "x$arguments" != xEOL; then
21252      new_complete="$new_path ${arguments% *}"
21253  else
21254      new_complete="$new_path"
21255  fi
21256
21257  if test "x$complete" != "x$new_complete"; then
21258    AR="$new_complete"
21259    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21260$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21261  fi
21262
21263fi
21264if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21265    ARFLAGS="-r"
21266else
21267    ARFLAGS=""
21268fi
21269
21270
21271# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21272HOTSPOT_CXX="$CXX"
21273HOTSPOT_LD="$LD"
21274
21275
21276
21277COMPILER_NAME=gcc
21278COMPILER_TYPE=CC
21279if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21280
21281    # For now, assume that we are always compiling using cl.exe.
21282    CC_OUT_OPTION=-Fo
21283    EXE_OUT_OPTION=-out:
21284    LD_OUT_OPTION=-out:
21285    AR_OUT_OPTION=-out:
21286    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21287    # program for something completely different.
21288    # Extract the first word of "link", so it can be a program name with args.
21289set dummy link; ac_word=$2
21290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21291$as_echo_n "checking for $ac_word... " >&6; }
21292if test "${ac_cv_prog_WINLD+set}" = set; then :
21293  $as_echo_n "(cached) " >&6
21294else
21295  if test -n "$WINLD"; then
21296  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21297else
21298  ac_prog_rejected=no
21299as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21300for as_dir in $PATH
21301do
21302  IFS=$as_save_IFS
21303  test -z "$as_dir" && as_dir=.
21304    for ac_exec_ext in '' $ac_executable_extensions; do
21305  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21306    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21307       ac_prog_rejected=yes
21308       continue
21309     fi
21310    ac_cv_prog_WINLD="link"
21311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21312    break 2
21313  fi
21314done
21315  done
21316IFS=$as_save_IFS
21317
21318if test $ac_prog_rejected = yes; then
21319  # We found a bogon in the path, so make sure we never use it.
21320  set dummy $ac_cv_prog_WINLD
21321  shift
21322  if test $# != 0; then
21323    # We chose a different compiler from the bogus one.
21324    # However, it has the same basename, so the bogon will be chosen
21325    # first if we set WINLD to just the basename; use the full file name.
21326    shift
21327    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21328  fi
21329fi
21330fi
21331fi
21332WINLD=$ac_cv_prog_WINLD
21333if test -n "$WINLD"; then
21334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21335$as_echo "$WINLD" >&6; }
21336else
21337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21338$as_echo "no" >&6; }
21339fi
21340
21341
21342    # Since we must ignore the first found link, WINLD will contain
21343    # the full path to the link.exe program.
21344
21345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21346
21347  # First separate the path from the arguments. This will split at the first
21348  # space.
21349  complete="$WINLD"
21350  path="${complete%% *}"
21351  tmp="$complete EOL"
21352  arguments="${tmp#* }"
21353
21354  # Input might be given as Windows format, start by converting to
21355  # unix format.
21356  new_path=`$CYGPATH -u "$path"`
21357
21358  # Now try to locate executable using which
21359  new_path=`$WHICH "$new_path" 2> /dev/null`
21360  # bat and cmd files are not always considered executable in cygwin causing which
21361  # to not find them
21362  if test "x$new_path" = x \
21363           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21364           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21365    new_path=`$CYGPATH -u "$path"`
21366  fi
21367  if test "x$new_path" = x; then
21368    # Oops. Which didn't find the executable.
21369    # The splitting of arguments from the executable at a space might have been incorrect,
21370    # since paths with space are more likely in Windows. Give it another try with the whole
21371    # argument.
21372    path="$complete"
21373    arguments="EOL"
21374    new_path=`$CYGPATH -u "$path"`
21375    new_path=`$WHICH "$new_path" 2> /dev/null`
21376    # bat and cmd files are not always considered executable in cygwin causing which
21377    # to not find them
21378    if test "x$new_path" = x \
21379             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21380             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21381      new_path=`$CYGPATH -u "$path"`
21382    fi
21383    if test "x$new_path" = x; then
21384      # It's still not found. Now this is an unrecoverable error.
21385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21386$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21387      has_space=`$ECHO "$complete" | $GREP " "`
21388      if test "x$has_space" != x; then
21389        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21390$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21391      fi
21392      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21393    fi
21394  fi
21395
21396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21399  # "foo.exe" is OK but "foo" is an error.
21400  #
21401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21402  # It is also a way to make sure we got the proper file name for the real test later on.
21403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21404  if test "x$test_shortpath" = x; then
21405    # Short path failed, file does not exist as specified.
21406    # Try adding .exe or .cmd
21407    if test -f "${new_path}.exe"; then
21408       input_to_shortpath="${new_path}.exe"
21409    elif test -f "${new_path}.cmd"; then
21410       input_to_shortpath="${new_path}.cmd"
21411    else
21412      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21413$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21414      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21415$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21416      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21417    fi
21418  else
21419    input_to_shortpath="$new_path"
21420  fi
21421
21422  # Call helper function which possibly converts this using DOS-style short mode.
21423  # If so, the updated path is stored in $new_path.
21424  new_path="$input_to_shortpath"
21425
21426  input_path="$input_to_shortpath"
21427  # Check if we need to convert this using DOS-style short mode. If the path
21428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21429  # take no chances and rewrite it.
21430  # Note: m4 eats our [], so we need to use [ and ] instead.
21431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21432  if test "x$has_forbidden_chars" != x; then
21433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21437      # Going to short mode and back again did indeed matter. Since short mode is
21438      # case insensitive, let's make it lowercase to improve readability.
21439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21440      # Now convert it back to Unix-stile (cygpath)
21441      input_path=`$CYGPATH -u "$shortmode_path"`
21442      new_path="$input_path"
21443    fi
21444  fi
21445
21446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21447  if test "x$test_cygdrive_prefix" = x; then
21448    # As a simple fix, exclude /usr/bin since it's not a real path.
21449    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21451      # a path prefixed by /cygdrive for fixpath to work.
21452      new_path="$CYGWIN_ROOT_PATH$input_path"
21453    fi
21454  fi
21455
21456  # remove trailing .exe if any
21457  new_path="${new_path/%.exe/}"
21458
21459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21460
21461  # First separate the path from the arguments. This will split at the first
21462  # space.
21463  complete="$WINLD"
21464  path="${complete%% *}"
21465  tmp="$complete EOL"
21466  arguments="${tmp#* }"
21467
21468  # Input might be given as Windows format, start by converting to
21469  # unix format.
21470  new_path="$path"
21471
21472  windows_path="$new_path"
21473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21474    unix_path=`$CYGPATH -u "$windows_path"`
21475    new_path="$unix_path"
21476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21478    new_path="$unix_path"
21479  fi
21480
21481
21482  # Now try to locate executable using which
21483  new_path=`$WHICH "$new_path" 2> /dev/null`
21484
21485  if test "x$new_path" = x; then
21486    # Oops. Which didn't find the executable.
21487    # The splitting of arguments from the executable at a space might have been incorrect,
21488    # since paths with space are more likely in Windows. Give it another try with the whole
21489    # argument.
21490    path="$complete"
21491    arguments="EOL"
21492    new_path="$path"
21493
21494  windows_path="$new_path"
21495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21496    unix_path=`$CYGPATH -u "$windows_path"`
21497    new_path="$unix_path"
21498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21500    new_path="$unix_path"
21501  fi
21502
21503
21504    new_path=`$WHICH "$new_path" 2> /dev/null`
21505
21506    if test "x$new_path" = x; then
21507      # It's still not found. Now this is an unrecoverable error.
21508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21509$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21510      has_space=`$ECHO "$complete" | $GREP " "`
21511      if test "x$has_space" != x; then
21512        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21513$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21514      fi
21515      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21516    fi
21517  fi
21518
21519  # Now new_path has a complete unix path to the binary
21520  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21521    # Keep paths in /bin as-is, but remove trailing .exe if any
21522    new_path="${new_path/%.exe/}"
21523    # Do not save /bin paths to all_fixpath_prefixes!
21524  else
21525    # Not in mixed or Windows style, start by that.
21526    new_path=`cmd //c echo $new_path`
21527
21528  input_path="$new_path"
21529  # Check if we need to convert this using DOS-style short mode. If the path
21530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21531  # take no chances and rewrite it.
21532  # Note: m4 eats our [], so we need to use [ and ] instead.
21533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21534  if test "x$has_forbidden_chars" != x; then
21535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21536    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21537  fi
21538
21539    # Output is in $new_path
21540
21541  windows_path="$new_path"
21542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21543    unix_path=`$CYGPATH -u "$windows_path"`
21544    new_path="$unix_path"
21545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21547    new_path="$unix_path"
21548  fi
21549
21550    # remove trailing .exe if any
21551    new_path="${new_path/%.exe/}"
21552
21553    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21554    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21555  fi
21556
21557  else
21558    # We're on a posix platform. Hooray! :)
21559    # First separate the path from the arguments. This will split at the first
21560    # space.
21561    complete="$WINLD"
21562    path="${complete%% *}"
21563    tmp="$complete EOL"
21564    arguments="${tmp#* }"
21565
21566    new_path=`$WHICH $path 2> /dev/null`
21567    if test "x$new_path" = x; then
21568      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21569      if test "x$is_absolute_path" != x; then
21570        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&5
21571$as_echo "$as_me: Resolving WINLD (as $path) with 'which' failed, using $path directly." >&6;}
21572        new_path="$path"
21573      else
21574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21575$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21576        has_space=`$ECHO "$complete" | $GREP " "`
21577        if test "x$has_space" != x; then
21578          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21580        fi
21581        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21582      fi
21583    fi
21584  fi
21585
21586  # Now join together the path and the arguments once again
21587  if test "x$arguments" != xEOL; then
21588      new_complete="$new_path ${arguments% *}"
21589  else
21590      new_complete="$new_path"
21591  fi
21592
21593  if test "x$complete" != "x$new_complete"; then
21594    WINLD="$new_complete"
21595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
21596$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
21597  fi
21598
21599    printf "Windows linker was found at $WINLD\n"
21600    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
21601$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
21602    "$WINLD" --version > /dev/null
21603    if test $? -eq 0 ; then
21604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21605$as_echo "no" >&6; }
21606      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
21607    else
21608      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21609$as_echo "yes" >&6; }
21610    fi
21611    LD="$WINLD"
21612    LDEXE="$WINLD"
21613    LDCXX="$WINLD"
21614    LDEXECXX="$WINLD"
21615
21616    # Extract the first word of "mt", so it can be a program name with args.
21617set dummy mt; ac_word=$2
21618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21619$as_echo_n "checking for $ac_word... " >&6; }
21620if test "${ac_cv_prog_MT+set}" = set; then :
21621  $as_echo_n "(cached) " >&6
21622else
21623  if test -n "$MT"; then
21624  ac_cv_prog_MT="$MT" # Let the user override the test.
21625else
21626  ac_prog_rejected=no
21627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21628for as_dir in $PATH
21629do
21630  IFS=$as_save_IFS
21631  test -z "$as_dir" && as_dir=.
21632    for ac_exec_ext in '' $ac_executable_extensions; do
21633  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21634    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
21635       ac_prog_rejected=yes
21636       continue
21637     fi
21638    ac_cv_prog_MT="mt"
21639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21640    break 2
21641  fi
21642done
21643  done
21644IFS=$as_save_IFS
21645
21646if test $ac_prog_rejected = yes; then
21647  # We found a bogon in the path, so make sure we never use it.
21648  set dummy $ac_cv_prog_MT
21649  shift
21650  if test $# != 0; then
21651    # We chose a different compiler from the bogus one.
21652    # However, it has the same basename, so the bogon will be chosen
21653    # first if we set MT to just the basename; use the full file name.
21654    shift
21655    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
21656  fi
21657fi
21658fi
21659fi
21660MT=$ac_cv_prog_MT
21661if test -n "$MT"; then
21662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
21663$as_echo "$MT" >&6; }
21664else
21665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21666$as_echo "no" >&6; }
21667fi
21668
21669
21670
21671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21672
21673  # First separate the path from the arguments. This will split at the first
21674  # space.
21675  complete="$MT"
21676  path="${complete%% *}"
21677  tmp="$complete EOL"
21678  arguments="${tmp#* }"
21679
21680  # Input might be given as Windows format, start by converting to
21681  # unix format.
21682  new_path=`$CYGPATH -u "$path"`
21683
21684  # Now try to locate executable using which
21685  new_path=`$WHICH "$new_path" 2> /dev/null`
21686  # bat and cmd files are not always considered executable in cygwin causing which
21687  # to not find them
21688  if test "x$new_path" = x \
21689           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21690           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21691    new_path=`$CYGPATH -u "$path"`
21692  fi
21693  if test "x$new_path" = x; then
21694    # Oops. Which didn't find the executable.
21695    # The splitting of arguments from the executable at a space might have been incorrect,
21696    # since paths with space are more likely in Windows. Give it another try with the whole
21697    # argument.
21698    path="$complete"
21699    arguments="EOL"
21700    new_path=`$CYGPATH -u "$path"`
21701    new_path=`$WHICH "$new_path" 2> /dev/null`
21702    # bat and cmd files are not always considered executable in cygwin causing which
21703    # to not find them
21704    if test "x$new_path" = x \
21705             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21706             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21707      new_path=`$CYGPATH -u "$path"`
21708    fi
21709    if test "x$new_path" = x; then
21710      # It's still not found. Now this is an unrecoverable error.
21711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21712$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21713      has_space=`$ECHO "$complete" | $GREP " "`
21714      if test "x$has_space" != x; then
21715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21717      fi
21718      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21719    fi
21720  fi
21721
21722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21725  # "foo.exe" is OK but "foo" is an error.
21726  #
21727  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21728  # It is also a way to make sure we got the proper file name for the real test later on.
21729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21730  if test "x$test_shortpath" = x; then
21731    # Short path failed, file does not exist as specified.
21732    # Try adding .exe or .cmd
21733    if test -f "${new_path}.exe"; then
21734       input_to_shortpath="${new_path}.exe"
21735    elif test -f "${new_path}.cmd"; then
21736       input_to_shortpath="${new_path}.cmd"
21737    else
21738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
21739$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
21740      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21741$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21742      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21743    fi
21744  else
21745    input_to_shortpath="$new_path"
21746  fi
21747
21748  # Call helper function which possibly converts this using DOS-style short mode.
21749  # If so, the updated path is stored in $new_path.
21750  new_path="$input_to_shortpath"
21751
21752  input_path="$input_to_shortpath"
21753  # Check if we need to convert this using DOS-style short mode. If the path
21754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21755  # take no chances and rewrite it.
21756  # Note: m4 eats our [], so we need to use [ and ] instead.
21757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21758  if test "x$has_forbidden_chars" != x; then
21759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21763      # Going to short mode and back again did indeed matter. Since short mode is
21764      # case insensitive, let's make it lowercase to improve readability.
21765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21766      # Now convert it back to Unix-stile (cygpath)
21767      input_path=`$CYGPATH -u "$shortmode_path"`
21768      new_path="$input_path"
21769    fi
21770  fi
21771
21772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21773  if test "x$test_cygdrive_prefix" = x; then
21774    # As a simple fix, exclude /usr/bin since it's not a real path.
21775    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21777      # a path prefixed by /cygdrive for fixpath to work.
21778      new_path="$CYGWIN_ROOT_PATH$input_path"
21779    fi
21780  fi
21781
21782  # remove trailing .exe if any
21783  new_path="${new_path/%.exe/}"
21784
21785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21786
21787  # First separate the path from the arguments. This will split at the first
21788  # space.
21789  complete="$MT"
21790  path="${complete%% *}"
21791  tmp="$complete EOL"
21792  arguments="${tmp#* }"
21793
21794  # Input might be given as Windows format, start by converting to
21795  # unix format.
21796  new_path="$path"
21797
21798  windows_path="$new_path"
21799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21800    unix_path=`$CYGPATH -u "$windows_path"`
21801    new_path="$unix_path"
21802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21804    new_path="$unix_path"
21805  fi
21806
21807
21808  # Now try to locate executable using which
21809  new_path=`$WHICH "$new_path" 2> /dev/null`
21810
21811  if test "x$new_path" = x; then
21812    # Oops. Which didn't find the executable.
21813    # The splitting of arguments from the executable at a space might have been incorrect,
21814    # since paths with space are more likely in Windows. Give it another try with the whole
21815    # argument.
21816    path="$complete"
21817    arguments="EOL"
21818    new_path="$path"
21819
21820  windows_path="$new_path"
21821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21822    unix_path=`$CYGPATH -u "$windows_path"`
21823    new_path="$unix_path"
21824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21826    new_path="$unix_path"
21827  fi
21828
21829
21830    new_path=`$WHICH "$new_path" 2> /dev/null`
21831
21832    if test "x$new_path" = x; then
21833      # It's still not found. Now this is an unrecoverable error.
21834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21835$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21836      has_space=`$ECHO "$complete" | $GREP " "`
21837      if test "x$has_space" != x; then
21838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21840      fi
21841      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21842    fi
21843  fi
21844
21845  # Now new_path has a complete unix path to the binary
21846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21847    # Keep paths in /bin as-is, but remove trailing .exe if any
21848    new_path="${new_path/%.exe/}"
21849    # Do not save /bin paths to all_fixpath_prefixes!
21850  else
21851    # Not in mixed or Windows style, start by that.
21852    new_path=`cmd //c echo $new_path`
21853
21854  input_path="$new_path"
21855  # Check if we need to convert this using DOS-style short mode. If the path
21856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21857  # take no chances and rewrite it.
21858  # Note: m4 eats our [], so we need to use [ and ] instead.
21859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21860  if test "x$has_forbidden_chars" != x; then
21861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21863  fi
21864
21865    # Output is in $new_path
21866
21867  windows_path="$new_path"
21868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21869    unix_path=`$CYGPATH -u "$windows_path"`
21870    new_path="$unix_path"
21871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21873    new_path="$unix_path"
21874  fi
21875
21876    # remove trailing .exe if any
21877    new_path="${new_path/%.exe/}"
21878
21879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21881  fi
21882
21883  else
21884    # We're on a posix platform. Hooray! :)
21885    # First separate the path from the arguments. This will split at the first
21886    # space.
21887    complete="$MT"
21888    path="${complete%% *}"
21889    tmp="$complete EOL"
21890    arguments="${tmp#* }"
21891
21892    new_path=`$WHICH $path 2> /dev/null`
21893    if test "x$new_path" = x; then
21894      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21895      if test "x$is_absolute_path" != x; then
21896        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) with 'which' failed, using $path directly." >&5
21897$as_echo "$as_me: Resolving MT (as $path) with 'which' failed, using $path directly." >&6;}
21898        new_path="$path"
21899      else
21900        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
21901$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
21902        has_space=`$ECHO "$complete" | $GREP " "`
21903        if test "x$has_space" != x; then
21904          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21905$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21906        fi
21907        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
21908      fi
21909    fi
21910  fi
21911
21912  # Now join together the path and the arguments once again
21913  if test "x$arguments" != xEOL; then
21914      new_complete="$new_path ${arguments% *}"
21915  else
21916      new_complete="$new_path"
21917  fi
21918
21919  if test "x$complete" != "x$new_complete"; then
21920    MT="$new_complete"
21921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
21922$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
21923  fi
21924
21925    # The resource compiler
21926    # Extract the first word of "rc", so it can be a program name with args.
21927set dummy rc; ac_word=$2
21928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21929$as_echo_n "checking for $ac_word... " >&6; }
21930if test "${ac_cv_prog_RC+set}" = set; then :
21931  $as_echo_n "(cached) " >&6
21932else
21933  if test -n "$RC"; then
21934  ac_cv_prog_RC="$RC" # Let the user override the test.
21935else
21936  ac_prog_rejected=no
21937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21938for as_dir in $PATH
21939do
21940  IFS=$as_save_IFS
21941  test -z "$as_dir" && as_dir=.
21942    for ac_exec_ext in '' $ac_executable_extensions; do
21943  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21944    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
21945       ac_prog_rejected=yes
21946       continue
21947     fi
21948    ac_cv_prog_RC="rc"
21949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21950    break 2
21951  fi
21952done
21953  done
21954IFS=$as_save_IFS
21955
21956if test $ac_prog_rejected = yes; then
21957  # We found a bogon in the path, so make sure we never use it.
21958  set dummy $ac_cv_prog_RC
21959  shift
21960  if test $# != 0; then
21961    # We chose a different compiler from the bogus one.
21962    # However, it has the same basename, so the bogon will be chosen
21963    # first if we set RC to just the basename; use the full file name.
21964    shift
21965    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
21966  fi
21967fi
21968fi
21969fi
21970RC=$ac_cv_prog_RC
21971if test -n "$RC"; then
21972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
21973$as_echo "$RC" >&6; }
21974else
21975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21976$as_echo "no" >&6; }
21977fi
21978
21979
21980
21981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21982
21983  # First separate the path from the arguments. This will split at the first
21984  # space.
21985  complete="$RC"
21986  path="${complete%% *}"
21987  tmp="$complete EOL"
21988  arguments="${tmp#* }"
21989
21990  # Input might be given as Windows format, start by converting to
21991  # unix format.
21992  new_path=`$CYGPATH -u "$path"`
21993
21994  # Now try to locate executable using which
21995  new_path=`$WHICH "$new_path" 2> /dev/null`
21996  # bat and cmd files are not always considered executable in cygwin causing which
21997  # to not find them
21998  if test "x$new_path" = x \
21999           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22000           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22001    new_path=`$CYGPATH -u "$path"`
22002  fi
22003  if test "x$new_path" = x; then
22004    # Oops. Which didn't find the executable.
22005    # The splitting of arguments from the executable at a space might have been incorrect,
22006    # since paths with space are more likely in Windows. Give it another try with the whole
22007    # argument.
22008    path="$complete"
22009    arguments="EOL"
22010    new_path=`$CYGPATH -u "$path"`
22011    new_path=`$WHICH "$new_path" 2> /dev/null`
22012    # bat and cmd files are not always considered executable in cygwin causing which
22013    # to not find them
22014    if test "x$new_path" = x \
22015             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22016             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22017      new_path=`$CYGPATH -u "$path"`
22018    fi
22019    if test "x$new_path" = x; then
22020      # It's still not found. Now this is an unrecoverable error.
22021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22022$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22023      has_space=`$ECHO "$complete" | $GREP " "`
22024      if test "x$has_space" != x; then
22025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22027      fi
22028      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22029    fi
22030  fi
22031
22032  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22033  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22034  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22035  # "foo.exe" is OK but "foo" is an error.
22036  #
22037  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22038  # It is also a way to make sure we got the proper file name for the real test later on.
22039  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22040  if test "x$test_shortpath" = x; then
22041    # Short path failed, file does not exist as specified.
22042    # Try adding .exe or .cmd
22043    if test -f "${new_path}.exe"; then
22044       input_to_shortpath="${new_path}.exe"
22045    elif test -f "${new_path}.cmd"; then
22046       input_to_shortpath="${new_path}.cmd"
22047    else
22048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22049$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22050      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22051$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22052      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22053    fi
22054  else
22055    input_to_shortpath="$new_path"
22056  fi
22057
22058  # Call helper function which possibly converts this using DOS-style short mode.
22059  # If so, the updated path is stored in $new_path.
22060  new_path="$input_to_shortpath"
22061
22062  input_path="$input_to_shortpath"
22063  # Check if we need to convert this using DOS-style short mode. If the path
22064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22065  # take no chances and rewrite it.
22066  # Note: m4 eats our [], so we need to use [ and ] instead.
22067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22068  if test "x$has_forbidden_chars" != x; then
22069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22070    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22071    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22072    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22073      # Going to short mode and back again did indeed matter. Since short mode is
22074      # case insensitive, let's make it lowercase to improve readability.
22075      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22076      # Now convert it back to Unix-stile (cygpath)
22077      input_path=`$CYGPATH -u "$shortmode_path"`
22078      new_path="$input_path"
22079    fi
22080  fi
22081
22082  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22083  if test "x$test_cygdrive_prefix" = x; then
22084    # As a simple fix, exclude /usr/bin since it's not a real path.
22085    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22086      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22087      # a path prefixed by /cygdrive for fixpath to work.
22088      new_path="$CYGWIN_ROOT_PATH$input_path"
22089    fi
22090  fi
22091
22092  # remove trailing .exe if any
22093  new_path="${new_path/%.exe/}"
22094
22095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22096
22097  # First separate the path from the arguments. This will split at the first
22098  # space.
22099  complete="$RC"
22100  path="${complete%% *}"
22101  tmp="$complete EOL"
22102  arguments="${tmp#* }"
22103
22104  # Input might be given as Windows format, start by converting to
22105  # unix format.
22106  new_path="$path"
22107
22108  windows_path="$new_path"
22109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22110    unix_path=`$CYGPATH -u "$windows_path"`
22111    new_path="$unix_path"
22112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22114    new_path="$unix_path"
22115  fi
22116
22117
22118  # Now try to locate executable using which
22119  new_path=`$WHICH "$new_path" 2> /dev/null`
22120
22121  if test "x$new_path" = x; then
22122    # Oops. Which didn't find the executable.
22123    # The splitting of arguments from the executable at a space might have been incorrect,
22124    # since paths with space are more likely in Windows. Give it another try with the whole
22125    # argument.
22126    path="$complete"
22127    arguments="EOL"
22128    new_path="$path"
22129
22130  windows_path="$new_path"
22131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22132    unix_path=`$CYGPATH -u "$windows_path"`
22133    new_path="$unix_path"
22134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22136    new_path="$unix_path"
22137  fi
22138
22139
22140    new_path=`$WHICH "$new_path" 2> /dev/null`
22141
22142    if test "x$new_path" = x; then
22143      # It's still not found. Now this is an unrecoverable error.
22144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22145$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22146      has_space=`$ECHO "$complete" | $GREP " "`
22147      if test "x$has_space" != x; then
22148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22150      fi
22151      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22152    fi
22153  fi
22154
22155  # Now new_path has a complete unix path to the binary
22156  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22157    # Keep paths in /bin as-is, but remove trailing .exe if any
22158    new_path="${new_path/%.exe/}"
22159    # Do not save /bin paths to all_fixpath_prefixes!
22160  else
22161    # Not in mixed or Windows style, start by that.
22162    new_path=`cmd //c echo $new_path`
22163
22164  input_path="$new_path"
22165  # Check if we need to convert this using DOS-style short mode. If the path
22166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22167  # take no chances and rewrite it.
22168  # Note: m4 eats our [], so we need to use [ and ] instead.
22169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22170  if test "x$has_forbidden_chars" != x; then
22171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22173  fi
22174
22175    # Output is in $new_path
22176
22177  windows_path="$new_path"
22178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22179    unix_path=`$CYGPATH -u "$windows_path"`
22180    new_path="$unix_path"
22181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22183    new_path="$unix_path"
22184  fi
22185
22186    # remove trailing .exe if any
22187    new_path="${new_path/%.exe/}"
22188
22189    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22190    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22191  fi
22192
22193  else
22194    # We're on a posix platform. Hooray! :)
22195    # First separate the path from the arguments. This will split at the first
22196    # space.
22197    complete="$RC"
22198    path="${complete%% *}"
22199    tmp="$complete EOL"
22200    arguments="${tmp#* }"
22201
22202    new_path=`$WHICH $path 2> /dev/null`
22203    if test "x$new_path" = x; then
22204      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22205      if test "x$is_absolute_path" != x; then
22206        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) with 'which' failed, using $path directly." >&5
22207$as_echo "$as_me: Resolving RC (as $path) with 'which' failed, using $path directly." >&6;}
22208        new_path="$path"
22209      else
22210        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22211$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22212        has_space=`$ECHO "$complete" | $GREP " "`
22213        if test "x$has_space" != x; then
22214          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22215$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22216        fi
22217        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22218      fi
22219    fi
22220  fi
22221
22222  # Now join together the path and the arguments once again
22223  if test "x$arguments" != xEOL; then
22224      new_complete="$new_path ${arguments% *}"
22225  else
22226      new_complete="$new_path"
22227  fi
22228
22229  if test "x$complete" != "x$new_complete"; then
22230    RC="$new_complete"
22231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22232$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22233  fi
22234
22235
22236    # For hotspot, we need these in Windows mixed path,
22237    # so rewrite them all. Need added .exe suffix.
22238    HOTSPOT_CXX="$CXX.exe"
22239    HOTSPOT_LD="$LD.exe"
22240    HOTSPOT_MT="$MT.exe"
22241    HOTSPOT_RC="$RC.exe"
22242
22243  unix_path="$HOTSPOT_CXX"
22244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22245    windows_path=`$CYGPATH -m "$unix_path"`
22246    HOTSPOT_CXX="$windows_path"
22247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22248    windows_path=`cmd //c echo $unix_path`
22249    HOTSPOT_CXX="$windows_path"
22250  fi
22251
22252
22253  unix_path="$HOTSPOT_LD"
22254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22255    windows_path=`$CYGPATH -m "$unix_path"`
22256    HOTSPOT_LD="$windows_path"
22257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22258    windows_path=`cmd //c echo $unix_path`
22259    HOTSPOT_LD="$windows_path"
22260  fi
22261
22262
22263  unix_path="$HOTSPOT_MT"
22264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22265    windows_path=`$CYGPATH -m "$unix_path"`
22266    HOTSPOT_MT="$windows_path"
22267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22268    windows_path=`cmd //c echo $unix_path`
22269    HOTSPOT_MT="$windows_path"
22270  fi
22271
22272
22273  unix_path="$HOTSPOT_RC"
22274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22275    windows_path=`$CYGPATH -m "$unix_path"`
22276    HOTSPOT_RC="$windows_path"
22277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22278    windows_path=`cmd //c echo $unix_path`
22279    HOTSPOT_RC="$windows_path"
22280  fi
22281
22282
22283
22284
22285    RC_FLAGS="-nologo -l 0x409 -r"
22286    if test "x$VARIANT" = xOPT; then :
22287
22288        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22289
22290fi
22291    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22292    if test "x$JDK_UPDATE_VERSION" = x; then :
22293
22294        JDK_UPDATE_VERSION_NOTNULL=0
22295
22296fi
22297    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22298    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22299    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22300    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22301    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22302    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22303    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22304
22305    # lib.exe is used to create static libraries.
22306    # Extract the first word of "lib", so it can be a program name with args.
22307set dummy lib; ac_word=$2
22308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22309$as_echo_n "checking for $ac_word... " >&6; }
22310if test "${ac_cv_prog_WINAR+set}" = set; then :
22311  $as_echo_n "(cached) " >&6
22312else
22313  if test -n "$WINAR"; then
22314  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22315else
22316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22317for as_dir in $PATH
22318do
22319  IFS=$as_save_IFS
22320  test -z "$as_dir" && as_dir=.
22321    for ac_exec_ext in '' $ac_executable_extensions; do
22322  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22323    ac_cv_prog_WINAR="lib"
22324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22325    break 2
22326  fi
22327done
22328  done
22329IFS=$as_save_IFS
22330
22331fi
22332fi
22333WINAR=$ac_cv_prog_WINAR
22334if test -n "$WINAR"; then
22335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22336$as_echo "$WINAR" >&6; }
22337else
22338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22339$as_echo "no" >&6; }
22340fi
22341
22342
22343
22344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22345
22346  # First separate the path from the arguments. This will split at the first
22347  # space.
22348  complete="$WINAR"
22349  path="${complete%% *}"
22350  tmp="$complete EOL"
22351  arguments="${tmp#* }"
22352
22353  # Input might be given as Windows format, start by converting to
22354  # unix format.
22355  new_path=`$CYGPATH -u "$path"`
22356
22357  # Now try to locate executable using which
22358  new_path=`$WHICH "$new_path" 2> /dev/null`
22359  # bat and cmd files are not always considered executable in cygwin causing which
22360  # to not find them
22361  if test "x$new_path" = x \
22362           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22363           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22364    new_path=`$CYGPATH -u "$path"`
22365  fi
22366  if test "x$new_path" = x; then
22367    # Oops. Which didn't find the executable.
22368    # The splitting of arguments from the executable at a space might have been incorrect,
22369    # since paths with space are more likely in Windows. Give it another try with the whole
22370    # argument.
22371    path="$complete"
22372    arguments="EOL"
22373    new_path=`$CYGPATH -u "$path"`
22374    new_path=`$WHICH "$new_path" 2> /dev/null`
22375    # bat and cmd files are not always considered executable in cygwin causing which
22376    # to not find them
22377    if test "x$new_path" = x \
22378             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22379             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22380      new_path=`$CYGPATH -u "$path"`
22381    fi
22382    if test "x$new_path" = x; then
22383      # It's still not found. Now this is an unrecoverable error.
22384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22385$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22386      has_space=`$ECHO "$complete" | $GREP " "`
22387      if test "x$has_space" != x; then
22388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22390      fi
22391      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22392    fi
22393  fi
22394
22395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22398  # "foo.exe" is OK but "foo" is an error.
22399  #
22400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22401  # It is also a way to make sure we got the proper file name for the real test later on.
22402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22403  if test "x$test_shortpath" = x; then
22404    # Short path failed, file does not exist as specified.
22405    # Try adding .exe or .cmd
22406    if test -f "${new_path}.exe"; then
22407       input_to_shortpath="${new_path}.exe"
22408    elif test -f "${new_path}.cmd"; then
22409       input_to_shortpath="${new_path}.cmd"
22410    else
22411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22412$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22415      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22416    fi
22417  else
22418    input_to_shortpath="$new_path"
22419  fi
22420
22421  # Call helper function which possibly converts this using DOS-style short mode.
22422  # If so, the updated path is stored in $new_path.
22423  new_path="$input_to_shortpath"
22424
22425  input_path="$input_to_shortpath"
22426  # Check if we need to convert this using DOS-style short mode. If the path
22427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22428  # take no chances and rewrite it.
22429  # Note: m4 eats our [], so we need to use [ and ] instead.
22430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22431  if test "x$has_forbidden_chars" != x; then
22432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22436      # Going to short mode and back again did indeed matter. Since short mode is
22437      # case insensitive, let's make it lowercase to improve readability.
22438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22439      # Now convert it back to Unix-stile (cygpath)
22440      input_path=`$CYGPATH -u "$shortmode_path"`
22441      new_path="$input_path"
22442    fi
22443  fi
22444
22445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22446  if test "x$test_cygdrive_prefix" = x; then
22447    # As a simple fix, exclude /usr/bin since it's not a real path.
22448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22450      # a path prefixed by /cygdrive for fixpath to work.
22451      new_path="$CYGWIN_ROOT_PATH$input_path"
22452    fi
22453  fi
22454
22455  # remove trailing .exe if any
22456  new_path="${new_path/%.exe/}"
22457
22458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22459
22460  # First separate the path from the arguments. This will split at the first
22461  # space.
22462  complete="$WINAR"
22463  path="${complete%% *}"
22464  tmp="$complete EOL"
22465  arguments="${tmp#* }"
22466
22467  # Input might be given as Windows format, start by converting to
22468  # unix format.
22469  new_path="$path"
22470
22471  windows_path="$new_path"
22472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22473    unix_path=`$CYGPATH -u "$windows_path"`
22474    new_path="$unix_path"
22475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22477    new_path="$unix_path"
22478  fi
22479
22480
22481  # Now try to locate executable using which
22482  new_path=`$WHICH "$new_path" 2> /dev/null`
22483
22484  if test "x$new_path" = x; then
22485    # Oops. Which didn't find the executable.
22486    # The splitting of arguments from the executable at a space might have been incorrect,
22487    # since paths with space are more likely in Windows. Give it another try with the whole
22488    # argument.
22489    path="$complete"
22490    arguments="EOL"
22491    new_path="$path"
22492
22493  windows_path="$new_path"
22494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22495    unix_path=`$CYGPATH -u "$windows_path"`
22496    new_path="$unix_path"
22497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22499    new_path="$unix_path"
22500  fi
22501
22502
22503    new_path=`$WHICH "$new_path" 2> /dev/null`
22504
22505    if test "x$new_path" = x; then
22506      # It's still not found. Now this is an unrecoverable error.
22507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22508$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22509      has_space=`$ECHO "$complete" | $GREP " "`
22510      if test "x$has_space" != x; then
22511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22513      fi
22514      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22515    fi
22516  fi
22517
22518  # Now new_path has a complete unix path to the binary
22519  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22520    # Keep paths in /bin as-is, but remove trailing .exe if any
22521    new_path="${new_path/%.exe/}"
22522    # Do not save /bin paths to all_fixpath_prefixes!
22523  else
22524    # Not in mixed or Windows style, start by that.
22525    new_path=`cmd //c echo $new_path`
22526
22527  input_path="$new_path"
22528  # Check if we need to convert this using DOS-style short mode. If the path
22529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22530  # take no chances and rewrite it.
22531  # Note: m4 eats our [], so we need to use [ and ] instead.
22532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22533  if test "x$has_forbidden_chars" != x; then
22534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22536  fi
22537
22538    # Output is in $new_path
22539
22540  windows_path="$new_path"
22541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22542    unix_path=`$CYGPATH -u "$windows_path"`
22543    new_path="$unix_path"
22544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22546    new_path="$unix_path"
22547  fi
22548
22549    # remove trailing .exe if any
22550    new_path="${new_path/%.exe/}"
22551
22552    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22553    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22554  fi
22555
22556  else
22557    # We're on a posix platform. Hooray! :)
22558    # First separate the path from the arguments. This will split at the first
22559    # space.
22560    complete="$WINAR"
22561    path="${complete%% *}"
22562    tmp="$complete EOL"
22563    arguments="${tmp#* }"
22564
22565    new_path=`$WHICH $path 2> /dev/null`
22566    if test "x$new_path" = x; then
22567      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22568      if test "x$is_absolute_path" != x; then
22569        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&5
22570$as_echo "$as_me: Resolving WINAR (as $path) with 'which' failed, using $path directly." >&6;}
22571        new_path="$path"
22572      else
22573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22574$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22575        has_space=`$ECHO "$complete" | $GREP " "`
22576        if test "x$has_space" != x; then
22577          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22579        fi
22580        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22581      fi
22582    fi
22583  fi
22584
22585  # Now join together the path and the arguments once again
22586  if test "x$arguments" != xEOL; then
22587      new_complete="$new_path ${arguments% *}"
22588  else
22589      new_complete="$new_path"
22590  fi
22591
22592  if test "x$complete" != "x$new_complete"; then
22593    WINAR="$new_complete"
22594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
22595$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
22596  fi
22597
22598    AR="$WINAR"
22599    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
22600
22601    # Extract the first word of "dumpbin", so it can be a program name with args.
22602set dummy dumpbin; ac_word=$2
22603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22604$as_echo_n "checking for $ac_word... " >&6; }
22605if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
22606  $as_echo_n "(cached) " >&6
22607else
22608  if test -n "$DUMPBIN"; then
22609  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
22610else
22611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22612for as_dir in $PATH
22613do
22614  IFS=$as_save_IFS
22615  test -z "$as_dir" && as_dir=.
22616    for ac_exec_ext in '' $ac_executable_extensions; do
22617  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22618    ac_cv_prog_DUMPBIN="dumpbin"
22619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22620    break 2
22621  fi
22622done
22623  done
22624IFS=$as_save_IFS
22625
22626fi
22627fi
22628DUMPBIN=$ac_cv_prog_DUMPBIN
22629if test -n "$DUMPBIN"; then
22630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
22631$as_echo "$DUMPBIN" >&6; }
22632else
22633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22634$as_echo "no" >&6; }
22635fi
22636
22637
22638
22639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22640
22641  # First separate the path from the arguments. This will split at the first
22642  # space.
22643  complete="$DUMPBIN"
22644  path="${complete%% *}"
22645  tmp="$complete EOL"
22646  arguments="${tmp#* }"
22647
22648  # Input might be given as Windows format, start by converting to
22649  # unix format.
22650  new_path=`$CYGPATH -u "$path"`
22651
22652  # Now try to locate executable using which
22653  new_path=`$WHICH "$new_path" 2> /dev/null`
22654  # bat and cmd files are not always considered executable in cygwin causing which
22655  # to not find them
22656  if test "x$new_path" = x \
22657           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22658           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22659    new_path=`$CYGPATH -u "$path"`
22660  fi
22661  if test "x$new_path" = x; then
22662    # Oops. Which didn't find the executable.
22663    # The splitting of arguments from the executable at a space might have been incorrect,
22664    # since paths with space are more likely in Windows. Give it another try with the whole
22665    # argument.
22666    path="$complete"
22667    arguments="EOL"
22668    new_path=`$CYGPATH -u "$path"`
22669    new_path=`$WHICH "$new_path" 2> /dev/null`
22670    # bat and cmd files are not always considered executable in cygwin causing which
22671    # to not find them
22672    if test "x$new_path" = x \
22673             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22674             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22675      new_path=`$CYGPATH -u "$path"`
22676    fi
22677    if test "x$new_path" = x; then
22678      # It's still not found. Now this is an unrecoverable error.
22679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22680$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22681      has_space=`$ECHO "$complete" | $GREP " "`
22682      if test "x$has_space" != x; then
22683        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22684$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22685      fi
22686      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22687    fi
22688  fi
22689
22690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22693  # "foo.exe" is OK but "foo" is an error.
22694  #
22695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22696  # It is also a way to make sure we got the proper file name for the real test later on.
22697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22698  if test "x$test_shortpath" = x; then
22699    # Short path failed, file does not exist as specified.
22700    # Try adding .exe or .cmd
22701    if test -f "${new_path}.exe"; then
22702       input_to_shortpath="${new_path}.exe"
22703    elif test -f "${new_path}.cmd"; then
22704       input_to_shortpath="${new_path}.cmd"
22705    else
22706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
22707$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
22708      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22709$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22710      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22711    fi
22712  else
22713    input_to_shortpath="$new_path"
22714  fi
22715
22716  # Call helper function which possibly converts this using DOS-style short mode.
22717  # If so, the updated path is stored in $new_path.
22718  new_path="$input_to_shortpath"
22719
22720  input_path="$input_to_shortpath"
22721  # Check if we need to convert this using DOS-style short mode. If the path
22722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22723  # take no chances and rewrite it.
22724  # Note: m4 eats our [], so we need to use [ and ] instead.
22725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22726  if test "x$has_forbidden_chars" != x; then
22727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22731      # Going to short mode and back again did indeed matter. Since short mode is
22732      # case insensitive, let's make it lowercase to improve readability.
22733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22734      # Now convert it back to Unix-stile (cygpath)
22735      input_path=`$CYGPATH -u "$shortmode_path"`
22736      new_path="$input_path"
22737    fi
22738  fi
22739
22740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22741  if test "x$test_cygdrive_prefix" = x; then
22742    # As a simple fix, exclude /usr/bin since it's not a real path.
22743    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22745      # a path prefixed by /cygdrive for fixpath to work.
22746      new_path="$CYGWIN_ROOT_PATH$input_path"
22747    fi
22748  fi
22749
22750  # remove trailing .exe if any
22751  new_path="${new_path/%.exe/}"
22752
22753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22754
22755  # First separate the path from the arguments. This will split at the first
22756  # space.
22757  complete="$DUMPBIN"
22758  path="${complete%% *}"
22759  tmp="$complete EOL"
22760  arguments="${tmp#* }"
22761
22762  # Input might be given as Windows format, start by converting to
22763  # unix format.
22764  new_path="$path"
22765
22766  windows_path="$new_path"
22767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22768    unix_path=`$CYGPATH -u "$windows_path"`
22769    new_path="$unix_path"
22770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22772    new_path="$unix_path"
22773  fi
22774
22775
22776  # Now try to locate executable using which
22777  new_path=`$WHICH "$new_path" 2> /dev/null`
22778
22779  if test "x$new_path" = x; then
22780    # Oops. Which didn't find the executable.
22781    # The splitting of arguments from the executable at a space might have been incorrect,
22782    # since paths with space are more likely in Windows. Give it another try with the whole
22783    # argument.
22784    path="$complete"
22785    arguments="EOL"
22786    new_path="$path"
22787
22788  windows_path="$new_path"
22789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22790    unix_path=`$CYGPATH -u "$windows_path"`
22791    new_path="$unix_path"
22792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22794    new_path="$unix_path"
22795  fi
22796
22797
22798    new_path=`$WHICH "$new_path" 2> /dev/null`
22799
22800    if test "x$new_path" = x; then
22801      # It's still not found. Now this is an unrecoverable error.
22802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22803$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22804      has_space=`$ECHO "$complete" | $GREP " "`
22805      if test "x$has_space" != x; then
22806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22808      fi
22809      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22810    fi
22811  fi
22812
22813  # Now new_path has a complete unix path to the binary
22814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22815    # Keep paths in /bin as-is, but remove trailing .exe if any
22816    new_path="${new_path/%.exe/}"
22817    # Do not save /bin paths to all_fixpath_prefixes!
22818  else
22819    # Not in mixed or Windows style, start by that.
22820    new_path=`cmd //c echo $new_path`
22821
22822  input_path="$new_path"
22823  # Check if we need to convert this using DOS-style short mode. If the path
22824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22825  # take no chances and rewrite it.
22826  # Note: m4 eats our [], so we need to use [ and ] instead.
22827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22828  if test "x$has_forbidden_chars" != x; then
22829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22831  fi
22832
22833    # Output is in $new_path
22834
22835  windows_path="$new_path"
22836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22837    unix_path=`$CYGPATH -u "$windows_path"`
22838    new_path="$unix_path"
22839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22841    new_path="$unix_path"
22842  fi
22843
22844    # remove trailing .exe if any
22845    new_path="${new_path/%.exe/}"
22846
22847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22849  fi
22850
22851  else
22852    # We're on a posix platform. Hooray! :)
22853    # First separate the path from the arguments. This will split at the first
22854    # space.
22855    complete="$DUMPBIN"
22856    path="${complete%% *}"
22857    tmp="$complete EOL"
22858    arguments="${tmp#* }"
22859
22860    new_path=`$WHICH $path 2> /dev/null`
22861    if test "x$new_path" = x; then
22862      is_absolute_path=`$ECHO "$path" | $GREP ^/`
22863      if test "x$is_absolute_path" != x; then
22864        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&5
22865$as_echo "$as_me: Resolving DUMPBIN (as $path) with 'which' failed, using $path directly." >&6;}
22866        new_path="$path"
22867      else
22868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
22869$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
22870        has_space=`$ECHO "$complete" | $GREP " "`
22871        if test "x$has_space" != x; then
22872          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22873$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22874        fi
22875        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
22876      fi
22877    fi
22878  fi
22879
22880  # Now join together the path and the arguments once again
22881  if test "x$arguments" != xEOL; then
22882      new_complete="$new_path ${arguments% *}"
22883  else
22884      new_complete="$new_path"
22885  fi
22886
22887  if test "x$complete" != "x$new_complete"; then
22888    DUMPBIN="$new_complete"
22889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
22890$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
22891  fi
22892
22893
22894    COMPILER_TYPE=CL
22895    CCXXFLAGS="$CCXXFLAGS -nologo"
22896
22897fi
22898
22899
22900
22901ac_ext=c
22902ac_cpp='$CPP $CPPFLAGS'
22903ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22904ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22905ac_compiler_gnu=$ac_cv_c_compiler_gnu
22906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
22907$as_echo_n "checking how to run the C preprocessor... " >&6; }
22908# On Suns, sometimes $CPP names a directory.
22909if test -n "$CPP" && test -d "$CPP"; then
22910  CPP=
22911fi
22912if test -z "$CPP"; then
22913  if test "${ac_cv_prog_CPP+set}" = set; then :
22914  $as_echo_n "(cached) " >&6
22915else
22916      # Double quotes because CPP needs to be expanded
22917    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
22918    do
22919      ac_preproc_ok=false
22920for ac_c_preproc_warn_flag in '' yes
22921do
22922  # Use a header file that comes with gcc, so configuring glibc
22923  # with a fresh cross-compiler works.
22924  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22925  # <limits.h> exists even on freestanding compilers.
22926  # On the NeXT, cc -E runs the code through the compiler's parser,
22927  # not just through cpp. "Syntax error" is here to catch this case.
22928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22929/* end confdefs.h.  */
22930#ifdef __STDC__
22931# include <limits.h>
22932#else
22933# include <assert.h>
22934#endif
22935		     Syntax error
22936_ACEOF
22937if ac_fn_c_try_cpp "$LINENO"; then :
22938
22939else
22940  # Broken: fails on valid input.
22941continue
22942fi
22943rm -f conftest.err conftest.i conftest.$ac_ext
22944
22945  # OK, works on sane cases.  Now check whether nonexistent headers
22946  # can be detected and how.
22947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22948/* end confdefs.h.  */
22949#include <ac_nonexistent.h>
22950_ACEOF
22951if ac_fn_c_try_cpp "$LINENO"; then :
22952  # Broken: success on invalid input.
22953continue
22954else
22955  # Passes both tests.
22956ac_preproc_ok=:
22957break
22958fi
22959rm -f conftest.err conftest.i conftest.$ac_ext
22960
22961done
22962# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22963rm -f conftest.i conftest.err conftest.$ac_ext
22964if $ac_preproc_ok; then :
22965  break
22966fi
22967
22968    done
22969    ac_cv_prog_CPP=$CPP
22970
22971fi
22972  CPP=$ac_cv_prog_CPP
22973else
22974  ac_cv_prog_CPP=$CPP
22975fi
22976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
22977$as_echo "$CPP" >&6; }
22978ac_preproc_ok=false
22979for ac_c_preproc_warn_flag in '' yes
22980do
22981  # Use a header file that comes with gcc, so configuring glibc
22982  # with a fresh cross-compiler works.
22983  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22984  # <limits.h> exists even on freestanding compilers.
22985  # On the NeXT, cc -E runs the code through the compiler's parser,
22986  # not just through cpp. "Syntax error" is here to catch this case.
22987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22988/* end confdefs.h.  */
22989#ifdef __STDC__
22990# include <limits.h>
22991#else
22992# include <assert.h>
22993#endif
22994		     Syntax error
22995_ACEOF
22996if ac_fn_c_try_cpp "$LINENO"; then :
22997
22998else
22999  # Broken: fails on valid input.
23000continue
23001fi
23002rm -f conftest.err conftest.i conftest.$ac_ext
23003
23004  # OK, works on sane cases.  Now check whether nonexistent headers
23005  # can be detected and how.
23006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23007/* end confdefs.h.  */
23008#include <ac_nonexistent.h>
23009_ACEOF
23010if ac_fn_c_try_cpp "$LINENO"; then :
23011  # Broken: success on invalid input.
23012continue
23013else
23014  # Passes both tests.
23015ac_preproc_ok=:
23016break
23017fi
23018rm -f conftest.err conftest.i conftest.$ac_ext
23019
23020done
23021# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23022rm -f conftest.i conftest.err conftest.$ac_ext
23023if $ac_preproc_ok; then :
23024
23025else
23026  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23028as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23029See \`config.log' for more details" "$LINENO" 5 ; }
23030fi
23031
23032ac_ext=cpp
23033ac_cpp='$CXXCPP $CPPFLAGS'
23034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23037
23038
23039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23040
23041  # First separate the path from the arguments. This will split at the first
23042  # space.
23043  complete="$CPP"
23044  path="${complete%% *}"
23045  tmp="$complete EOL"
23046  arguments="${tmp#* }"
23047
23048  # Input might be given as Windows format, start by converting to
23049  # unix format.
23050  new_path=`$CYGPATH -u "$path"`
23051
23052  # Now try to locate executable using which
23053  new_path=`$WHICH "$new_path" 2> /dev/null`
23054  # bat and cmd files are not always considered executable in cygwin causing which
23055  # to not find them
23056  if test "x$new_path" = x \
23057           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23058           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23059    new_path=`$CYGPATH -u "$path"`
23060  fi
23061  if test "x$new_path" = x; then
23062    # Oops. Which didn't find the executable.
23063    # The splitting of arguments from the executable at a space might have been incorrect,
23064    # since paths with space are more likely in Windows. Give it another try with the whole
23065    # argument.
23066    path="$complete"
23067    arguments="EOL"
23068    new_path=`$CYGPATH -u "$path"`
23069    new_path=`$WHICH "$new_path" 2> /dev/null`
23070    # bat and cmd files are not always considered executable in cygwin causing which
23071    # to not find them
23072    if test "x$new_path" = x \
23073             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23074             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23075      new_path=`$CYGPATH -u "$path"`
23076    fi
23077    if test "x$new_path" = x; then
23078      # It's still not found. Now this is an unrecoverable error.
23079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23080$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23081      has_space=`$ECHO "$complete" | $GREP " "`
23082      if test "x$has_space" != x; then
23083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23085      fi
23086      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23087    fi
23088  fi
23089
23090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23093  # "foo.exe" is OK but "foo" is an error.
23094  #
23095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23096  # It is also a way to make sure we got the proper file name for the real test later on.
23097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23098  if test "x$test_shortpath" = x; then
23099    # Short path failed, file does not exist as specified.
23100    # Try adding .exe or .cmd
23101    if test -f "${new_path}.exe"; then
23102       input_to_shortpath="${new_path}.exe"
23103    elif test -f "${new_path}.cmd"; then
23104       input_to_shortpath="${new_path}.cmd"
23105    else
23106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23107$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23108      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23109$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23110      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23111    fi
23112  else
23113    input_to_shortpath="$new_path"
23114  fi
23115
23116  # Call helper function which possibly converts this using DOS-style short mode.
23117  # If so, the updated path is stored in $new_path.
23118  new_path="$input_to_shortpath"
23119
23120  input_path="$input_to_shortpath"
23121  # Check if we need to convert this using DOS-style short mode. If the path
23122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23123  # take no chances and rewrite it.
23124  # Note: m4 eats our [], so we need to use [ and ] instead.
23125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23126  if test "x$has_forbidden_chars" != x; then
23127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23131      # Going to short mode and back again did indeed matter. Since short mode is
23132      # case insensitive, let's make it lowercase to improve readability.
23133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23134      # Now convert it back to Unix-stile (cygpath)
23135      input_path=`$CYGPATH -u "$shortmode_path"`
23136      new_path="$input_path"
23137    fi
23138  fi
23139
23140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23141  if test "x$test_cygdrive_prefix" = x; then
23142    # As a simple fix, exclude /usr/bin since it's not a real path.
23143    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23145      # a path prefixed by /cygdrive for fixpath to work.
23146      new_path="$CYGWIN_ROOT_PATH$input_path"
23147    fi
23148  fi
23149
23150  # remove trailing .exe if any
23151  new_path="${new_path/%.exe/}"
23152
23153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23154
23155  # First separate the path from the arguments. This will split at the first
23156  # space.
23157  complete="$CPP"
23158  path="${complete%% *}"
23159  tmp="$complete EOL"
23160  arguments="${tmp#* }"
23161
23162  # Input might be given as Windows format, start by converting to
23163  # unix format.
23164  new_path="$path"
23165
23166  windows_path="$new_path"
23167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23168    unix_path=`$CYGPATH -u "$windows_path"`
23169    new_path="$unix_path"
23170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23172    new_path="$unix_path"
23173  fi
23174
23175
23176  # Now try to locate executable using which
23177  new_path=`$WHICH "$new_path" 2> /dev/null`
23178
23179  if test "x$new_path" = x; then
23180    # Oops. Which didn't find the executable.
23181    # The splitting of arguments from the executable at a space might have been incorrect,
23182    # since paths with space are more likely in Windows. Give it another try with the whole
23183    # argument.
23184    path="$complete"
23185    arguments="EOL"
23186    new_path="$path"
23187
23188  windows_path="$new_path"
23189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23190    unix_path=`$CYGPATH -u "$windows_path"`
23191    new_path="$unix_path"
23192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23194    new_path="$unix_path"
23195  fi
23196
23197
23198    new_path=`$WHICH "$new_path" 2> /dev/null`
23199
23200    if test "x$new_path" = x; then
23201      # It's still not found. Now this is an unrecoverable error.
23202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23203$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23204      has_space=`$ECHO "$complete" | $GREP " "`
23205      if test "x$has_space" != x; then
23206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23208      fi
23209      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23210    fi
23211  fi
23212
23213  # Now new_path has a complete unix path to the binary
23214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23215    # Keep paths in /bin as-is, but remove trailing .exe if any
23216    new_path="${new_path/%.exe/}"
23217    # Do not save /bin paths to all_fixpath_prefixes!
23218  else
23219    # Not in mixed or Windows style, start by that.
23220    new_path=`cmd //c echo $new_path`
23221
23222  input_path="$new_path"
23223  # Check if we need to convert this using DOS-style short mode. If the path
23224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23225  # take no chances and rewrite it.
23226  # Note: m4 eats our [], so we need to use [ and ] instead.
23227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23228  if test "x$has_forbidden_chars" != x; then
23229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23231  fi
23232
23233    # Output is in $new_path
23234
23235  windows_path="$new_path"
23236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23237    unix_path=`$CYGPATH -u "$windows_path"`
23238    new_path="$unix_path"
23239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23241    new_path="$unix_path"
23242  fi
23243
23244    # remove trailing .exe if any
23245    new_path="${new_path/%.exe/}"
23246
23247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23249  fi
23250
23251  else
23252    # We're on a posix platform. Hooray! :)
23253    # First separate the path from the arguments. This will split at the first
23254    # space.
23255    complete="$CPP"
23256    path="${complete%% *}"
23257    tmp="$complete EOL"
23258    arguments="${tmp#* }"
23259
23260    new_path=`$WHICH $path 2> /dev/null`
23261    if test "x$new_path" = x; then
23262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23263      if test "x$is_absolute_path" != x; then
23264        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) with 'which' failed, using $path directly." >&5
23265$as_echo "$as_me: Resolving CPP (as $path) with 'which' failed, using $path directly." >&6;}
23266        new_path="$path"
23267      else
23268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23269$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23270        has_space=`$ECHO "$complete" | $GREP " "`
23271        if test "x$has_space" != x; then
23272          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23273$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23274        fi
23275        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23276      fi
23277    fi
23278  fi
23279
23280  # Now join together the path and the arguments once again
23281  if test "x$arguments" != xEOL; then
23282      new_complete="$new_path ${arguments% *}"
23283  else
23284      new_complete="$new_path"
23285  fi
23286
23287  if test "x$complete" != "x$new_complete"; then
23288    CPP="$new_complete"
23289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23290$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23291  fi
23292
23293
23294ac_ext=cpp
23295ac_cpp='$CXXCPP $CPPFLAGS'
23296ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23297ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23298ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23300$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23301if test -z "$CXXCPP"; then
23302  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23303  $as_echo_n "(cached) " >&6
23304else
23305      # Double quotes because CXXCPP needs to be expanded
23306    for CXXCPP in "$CXX -E" "/lib/cpp"
23307    do
23308      ac_preproc_ok=false
23309for ac_cxx_preproc_warn_flag in '' yes
23310do
23311  # Use a header file that comes with gcc, so configuring glibc
23312  # with a fresh cross-compiler works.
23313  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23314  # <limits.h> exists even on freestanding compilers.
23315  # On the NeXT, cc -E runs the code through the compiler's parser,
23316  # not just through cpp. "Syntax error" is here to catch this case.
23317  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23318/* end confdefs.h.  */
23319#ifdef __STDC__
23320# include <limits.h>
23321#else
23322# include <assert.h>
23323#endif
23324		     Syntax error
23325_ACEOF
23326if ac_fn_cxx_try_cpp "$LINENO"; then :
23327
23328else
23329  # Broken: fails on valid input.
23330continue
23331fi
23332rm -f conftest.err conftest.i conftest.$ac_ext
23333
23334  # OK, works on sane cases.  Now check whether nonexistent headers
23335  # can be detected and how.
23336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23337/* end confdefs.h.  */
23338#include <ac_nonexistent.h>
23339_ACEOF
23340if ac_fn_cxx_try_cpp "$LINENO"; then :
23341  # Broken: success on invalid input.
23342continue
23343else
23344  # Passes both tests.
23345ac_preproc_ok=:
23346break
23347fi
23348rm -f conftest.err conftest.i conftest.$ac_ext
23349
23350done
23351# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23352rm -f conftest.i conftest.err conftest.$ac_ext
23353if $ac_preproc_ok; then :
23354  break
23355fi
23356
23357    done
23358    ac_cv_prog_CXXCPP=$CXXCPP
23359
23360fi
23361  CXXCPP=$ac_cv_prog_CXXCPP
23362else
23363  ac_cv_prog_CXXCPP=$CXXCPP
23364fi
23365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23366$as_echo "$CXXCPP" >&6; }
23367ac_preproc_ok=false
23368for ac_cxx_preproc_warn_flag in '' yes
23369do
23370  # Use a header file that comes with gcc, so configuring glibc
23371  # with a fresh cross-compiler works.
23372  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23373  # <limits.h> exists even on freestanding compilers.
23374  # On the NeXT, cc -E runs the code through the compiler's parser,
23375  # not just through cpp. "Syntax error" is here to catch this case.
23376  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23377/* end confdefs.h.  */
23378#ifdef __STDC__
23379# include <limits.h>
23380#else
23381# include <assert.h>
23382#endif
23383		     Syntax error
23384_ACEOF
23385if ac_fn_cxx_try_cpp "$LINENO"; then :
23386
23387else
23388  # Broken: fails on valid input.
23389continue
23390fi
23391rm -f conftest.err conftest.i conftest.$ac_ext
23392
23393  # OK, works on sane cases.  Now check whether nonexistent headers
23394  # can be detected and how.
23395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23396/* end confdefs.h.  */
23397#include <ac_nonexistent.h>
23398_ACEOF
23399if ac_fn_cxx_try_cpp "$LINENO"; then :
23400  # Broken: success on invalid input.
23401continue
23402else
23403  # Passes both tests.
23404ac_preproc_ok=:
23405break
23406fi
23407rm -f conftest.err conftest.i conftest.$ac_ext
23408
23409done
23410# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23411rm -f conftest.i conftest.err conftest.$ac_ext
23412if $ac_preproc_ok; then :
23413
23414else
23415  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23416$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23417as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23418See \`config.log' for more details" "$LINENO" 5 ; }
23419fi
23420
23421ac_ext=cpp
23422ac_cpp='$CXXCPP $CPPFLAGS'
23423ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23424ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23425ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23426
23427
23428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23429
23430  # First separate the path from the arguments. This will split at the first
23431  # space.
23432  complete="$CXXCPP"
23433  path="${complete%% *}"
23434  tmp="$complete EOL"
23435  arguments="${tmp#* }"
23436
23437  # Input might be given as Windows format, start by converting to
23438  # unix format.
23439  new_path=`$CYGPATH -u "$path"`
23440
23441  # Now try to locate executable using which
23442  new_path=`$WHICH "$new_path" 2> /dev/null`
23443  # bat and cmd files are not always considered executable in cygwin causing which
23444  # to not find them
23445  if test "x$new_path" = x \
23446           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23447           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23448    new_path=`$CYGPATH -u "$path"`
23449  fi
23450  if test "x$new_path" = x; then
23451    # Oops. Which didn't find the executable.
23452    # The splitting of arguments from the executable at a space might have been incorrect,
23453    # since paths with space are more likely in Windows. Give it another try with the whole
23454    # argument.
23455    path="$complete"
23456    arguments="EOL"
23457    new_path=`$CYGPATH -u "$path"`
23458    new_path=`$WHICH "$new_path" 2> /dev/null`
23459    # bat and cmd files are not always considered executable in cygwin causing which
23460    # to not find them
23461    if test "x$new_path" = x \
23462             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23463             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23464      new_path=`$CYGPATH -u "$path"`
23465    fi
23466    if test "x$new_path" = x; then
23467      # It's still not found. Now this is an unrecoverable error.
23468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23469$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23470      has_space=`$ECHO "$complete" | $GREP " "`
23471      if test "x$has_space" != x; then
23472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23474      fi
23475      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23476    fi
23477  fi
23478
23479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23482  # "foo.exe" is OK but "foo" is an error.
23483  #
23484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23485  # It is also a way to make sure we got the proper file name for the real test later on.
23486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23487  if test "x$test_shortpath" = x; then
23488    # Short path failed, file does not exist as specified.
23489    # Try adding .exe or .cmd
23490    if test -f "${new_path}.exe"; then
23491       input_to_shortpath="${new_path}.exe"
23492    elif test -f "${new_path}.cmd"; then
23493       input_to_shortpath="${new_path}.cmd"
23494    else
23495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
23496$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
23497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23499      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23500    fi
23501  else
23502    input_to_shortpath="$new_path"
23503  fi
23504
23505  # Call helper function which possibly converts this using DOS-style short mode.
23506  # If so, the updated path is stored in $new_path.
23507  new_path="$input_to_shortpath"
23508
23509  input_path="$input_to_shortpath"
23510  # Check if we need to convert this using DOS-style short mode. If the path
23511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23512  # take no chances and rewrite it.
23513  # Note: m4 eats our [], so we need to use [ and ] instead.
23514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23515  if test "x$has_forbidden_chars" != x; then
23516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23520      # Going to short mode and back again did indeed matter. Since short mode is
23521      # case insensitive, let's make it lowercase to improve readability.
23522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23523      # Now convert it back to Unix-stile (cygpath)
23524      input_path=`$CYGPATH -u "$shortmode_path"`
23525      new_path="$input_path"
23526    fi
23527  fi
23528
23529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23530  if test "x$test_cygdrive_prefix" = x; then
23531    # As a simple fix, exclude /usr/bin since it's not a real path.
23532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23534      # a path prefixed by /cygdrive for fixpath to work.
23535      new_path="$CYGWIN_ROOT_PATH$input_path"
23536    fi
23537  fi
23538
23539  # remove trailing .exe if any
23540  new_path="${new_path/%.exe/}"
23541
23542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23543
23544  # First separate the path from the arguments. This will split at the first
23545  # space.
23546  complete="$CXXCPP"
23547  path="${complete%% *}"
23548  tmp="$complete EOL"
23549  arguments="${tmp#* }"
23550
23551  # Input might be given as Windows format, start by converting to
23552  # unix format.
23553  new_path="$path"
23554
23555  windows_path="$new_path"
23556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23557    unix_path=`$CYGPATH -u "$windows_path"`
23558    new_path="$unix_path"
23559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23561    new_path="$unix_path"
23562  fi
23563
23564
23565  # Now try to locate executable using which
23566  new_path=`$WHICH "$new_path" 2> /dev/null`
23567
23568  if test "x$new_path" = x; then
23569    # Oops. Which didn't find the executable.
23570    # The splitting of arguments from the executable at a space might have been incorrect,
23571    # since paths with space are more likely in Windows. Give it another try with the whole
23572    # argument.
23573    path="$complete"
23574    arguments="EOL"
23575    new_path="$path"
23576
23577  windows_path="$new_path"
23578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23579    unix_path=`$CYGPATH -u "$windows_path"`
23580    new_path="$unix_path"
23581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23583    new_path="$unix_path"
23584  fi
23585
23586
23587    new_path=`$WHICH "$new_path" 2> /dev/null`
23588
23589    if test "x$new_path" = x; then
23590      # It's still not found. Now this is an unrecoverable error.
23591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23592$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23593      has_space=`$ECHO "$complete" | $GREP " "`
23594      if test "x$has_space" != x; then
23595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23597      fi
23598      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23599    fi
23600  fi
23601
23602  # Now new_path has a complete unix path to the binary
23603  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23604    # Keep paths in /bin as-is, but remove trailing .exe if any
23605    new_path="${new_path/%.exe/}"
23606    # Do not save /bin paths to all_fixpath_prefixes!
23607  else
23608    # Not in mixed or Windows style, start by that.
23609    new_path=`cmd //c echo $new_path`
23610
23611  input_path="$new_path"
23612  # Check if we need to convert this using DOS-style short mode. If the path
23613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23614  # take no chances and rewrite it.
23615  # Note: m4 eats our [], so we need to use [ and ] instead.
23616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23617  if test "x$has_forbidden_chars" != x; then
23618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23619    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23620  fi
23621
23622    # Output is in $new_path
23623
23624  windows_path="$new_path"
23625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23626    unix_path=`$CYGPATH -u "$windows_path"`
23627    new_path="$unix_path"
23628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23630    new_path="$unix_path"
23631  fi
23632
23633    # remove trailing .exe if any
23634    new_path="${new_path/%.exe/}"
23635
23636    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23637    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23638  fi
23639
23640  else
23641    # We're on a posix platform. Hooray! :)
23642    # First separate the path from the arguments. This will split at the first
23643    # space.
23644    complete="$CXXCPP"
23645    path="${complete%% *}"
23646    tmp="$complete EOL"
23647    arguments="${tmp#* }"
23648
23649    new_path=`$WHICH $path 2> /dev/null`
23650    if test "x$new_path" = x; then
23651      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23652      if test "x$is_absolute_path" != x; then
23653        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&5
23654$as_echo "$as_me: Resolving CXXCPP (as $path) with 'which' failed, using $path directly." >&6;}
23655        new_path="$path"
23656      else
23657        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
23658$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
23659        has_space=`$ECHO "$complete" | $GREP " "`
23660        if test "x$has_space" != x; then
23661          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23662$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23663        fi
23664        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
23665      fi
23666    fi
23667  fi
23668
23669  # Now join together the path and the arguments once again
23670  if test "x$arguments" != xEOL; then
23671      new_complete="$new_path ${arguments% *}"
23672  else
23673      new_complete="$new_path"
23674  fi
23675
23676  if test "x$complete" != "x$new_complete"; then
23677    CXXCPP="$new_complete"
23678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
23679$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
23680  fi
23681
23682
23683if test "x$COMPILE_TYPE" != "xcross"; then
23684    # If we are not cross compiling, use the same compilers for
23685    # building the build platform executables. The cross-compilation
23686    # case needed to be done earlier, but this can only be done after
23687    # the native tools have been localized.
23688    BUILD_CC="$CC"
23689    BUILD_CXX="$CXX"
23690    BUILD_LD="$LD"
23691fi
23692
23693# for solaris we really need solaris tools, and not gnu equivalent
23694#   these seems to normally reside in /usr/ccs/bin so add that to path before
23695#   starting to probe
23696#
23697#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
23698#         so that it can be overriden --with-tools-dir
23699if test "x$OPENJDK_BUILD_OS" = xsolaris; then
23700    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
23701fi
23702
23703# Find the right assembler.
23704if test "x$OPENJDK_TARGET_OS" = xsolaris; then
23705    # Extract the first word of "as", so it can be a program name with args.
23706set dummy as; ac_word=$2
23707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23708$as_echo_n "checking for $ac_word... " >&6; }
23709if test "${ac_cv_path_AS+set}" = set; then :
23710  $as_echo_n "(cached) " >&6
23711else
23712  case $AS in
23713  [\\/]* | ?:[\\/]*)
23714  ac_cv_path_AS="$AS" # Let the user override the test with a path.
23715  ;;
23716  *)
23717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23718for as_dir in $PATH
23719do
23720  IFS=$as_save_IFS
23721  test -z "$as_dir" && as_dir=.
23722    for ac_exec_ext in '' $ac_executable_extensions; do
23723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23724    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
23725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23726    break 2
23727  fi
23728done
23729  done
23730IFS=$as_save_IFS
23731
23732  ;;
23733esac
23734fi
23735AS=$ac_cv_path_AS
23736if test -n "$AS"; then
23737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
23738$as_echo "$AS" >&6; }
23739else
23740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23741$as_echo "no" >&6; }
23742fi
23743
23744
23745
23746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23747
23748  # First separate the path from the arguments. This will split at the first
23749  # space.
23750  complete="$AS"
23751  path="${complete%% *}"
23752  tmp="$complete EOL"
23753  arguments="${tmp#* }"
23754
23755  # Input might be given as Windows format, start by converting to
23756  # unix format.
23757  new_path=`$CYGPATH -u "$path"`
23758
23759  # Now try to locate executable using which
23760  new_path=`$WHICH "$new_path" 2> /dev/null`
23761  # bat and cmd files are not always considered executable in cygwin causing which
23762  # to not find them
23763  if test "x$new_path" = x \
23764           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23765           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23766    new_path=`$CYGPATH -u "$path"`
23767  fi
23768  if test "x$new_path" = x; then
23769    # Oops. Which didn't find the executable.
23770    # The splitting of arguments from the executable at a space might have been incorrect,
23771    # since paths with space are more likely in Windows. Give it another try with the whole
23772    # argument.
23773    path="$complete"
23774    arguments="EOL"
23775    new_path=`$CYGPATH -u "$path"`
23776    new_path=`$WHICH "$new_path" 2> /dev/null`
23777    # bat and cmd files are not always considered executable in cygwin causing which
23778    # to not find them
23779    if test "x$new_path" = x \
23780             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23781             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23782      new_path=`$CYGPATH -u "$path"`
23783    fi
23784    if test "x$new_path" = x; then
23785      # It's still not found. Now this is an unrecoverable error.
23786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23787$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23788      has_space=`$ECHO "$complete" | $GREP " "`
23789      if test "x$has_space" != x; then
23790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23792      fi
23793      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23794    fi
23795  fi
23796
23797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23800  # "foo.exe" is OK but "foo" is an error.
23801  #
23802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23803  # It is also a way to make sure we got the proper file name for the real test later on.
23804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23805  if test "x$test_shortpath" = x; then
23806    # Short path failed, file does not exist as specified.
23807    # Try adding .exe or .cmd
23808    if test -f "${new_path}.exe"; then
23809       input_to_shortpath="${new_path}.exe"
23810    elif test -f "${new_path}.cmd"; then
23811       input_to_shortpath="${new_path}.cmd"
23812    else
23813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
23814$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
23815      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23816$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23817      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23818    fi
23819  else
23820    input_to_shortpath="$new_path"
23821  fi
23822
23823  # Call helper function which possibly converts this using DOS-style short mode.
23824  # If so, the updated path is stored in $new_path.
23825  new_path="$input_to_shortpath"
23826
23827  input_path="$input_to_shortpath"
23828  # Check if we need to convert this using DOS-style short mode. If the path
23829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23830  # take no chances and rewrite it.
23831  # Note: m4 eats our [], so we need to use [ and ] instead.
23832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23833  if test "x$has_forbidden_chars" != x; then
23834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23838      # Going to short mode and back again did indeed matter. Since short mode is
23839      # case insensitive, let's make it lowercase to improve readability.
23840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23841      # Now convert it back to Unix-stile (cygpath)
23842      input_path=`$CYGPATH -u "$shortmode_path"`
23843      new_path="$input_path"
23844    fi
23845  fi
23846
23847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23848  if test "x$test_cygdrive_prefix" = x; then
23849    # As a simple fix, exclude /usr/bin since it's not a real path.
23850    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23852      # a path prefixed by /cygdrive for fixpath to work.
23853      new_path="$CYGWIN_ROOT_PATH$input_path"
23854    fi
23855  fi
23856
23857  # remove trailing .exe if any
23858  new_path="${new_path/%.exe/}"
23859
23860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23861
23862  # First separate the path from the arguments. This will split at the first
23863  # space.
23864  complete="$AS"
23865  path="${complete%% *}"
23866  tmp="$complete EOL"
23867  arguments="${tmp#* }"
23868
23869  # Input might be given as Windows format, start by converting to
23870  # unix format.
23871  new_path="$path"
23872
23873  windows_path="$new_path"
23874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23875    unix_path=`$CYGPATH -u "$windows_path"`
23876    new_path="$unix_path"
23877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23879    new_path="$unix_path"
23880  fi
23881
23882
23883  # Now try to locate executable using which
23884  new_path=`$WHICH "$new_path" 2> /dev/null`
23885
23886  if test "x$new_path" = x; then
23887    # Oops. Which didn't find the executable.
23888    # The splitting of arguments from the executable at a space might have been incorrect,
23889    # since paths with space are more likely in Windows. Give it another try with the whole
23890    # argument.
23891    path="$complete"
23892    arguments="EOL"
23893    new_path="$path"
23894
23895  windows_path="$new_path"
23896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23897    unix_path=`$CYGPATH -u "$windows_path"`
23898    new_path="$unix_path"
23899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23901    new_path="$unix_path"
23902  fi
23903
23904
23905    new_path=`$WHICH "$new_path" 2> /dev/null`
23906
23907    if test "x$new_path" = x; then
23908      # It's still not found. Now this is an unrecoverable error.
23909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23910$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23911      has_space=`$ECHO "$complete" | $GREP " "`
23912      if test "x$has_space" != x; then
23913        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23914$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23915      fi
23916      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23917    fi
23918  fi
23919
23920  # Now new_path has a complete unix path to the binary
23921  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23922    # Keep paths in /bin as-is, but remove trailing .exe if any
23923    new_path="${new_path/%.exe/}"
23924    # Do not save /bin paths to all_fixpath_prefixes!
23925  else
23926    # Not in mixed or Windows style, start by that.
23927    new_path=`cmd //c echo $new_path`
23928
23929  input_path="$new_path"
23930  # Check if we need to convert this using DOS-style short mode. If the path
23931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23932  # take no chances and rewrite it.
23933  # Note: m4 eats our [], so we need to use [ and ] instead.
23934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23935  if test "x$has_forbidden_chars" != x; then
23936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23938  fi
23939
23940    # Output is in $new_path
23941
23942  windows_path="$new_path"
23943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23944    unix_path=`$CYGPATH -u "$windows_path"`
23945    new_path="$unix_path"
23946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23948    new_path="$unix_path"
23949  fi
23950
23951    # remove trailing .exe if any
23952    new_path="${new_path/%.exe/}"
23953
23954    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23955    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23956  fi
23957
23958  else
23959    # We're on a posix platform. Hooray! :)
23960    # First separate the path from the arguments. This will split at the first
23961    # space.
23962    complete="$AS"
23963    path="${complete%% *}"
23964    tmp="$complete EOL"
23965    arguments="${tmp#* }"
23966
23967    new_path=`$WHICH $path 2> /dev/null`
23968    if test "x$new_path" = x; then
23969      is_absolute_path=`$ECHO "$path" | $GREP ^/`
23970      if test "x$is_absolute_path" != x; then
23971        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) with 'which' failed, using $path directly." >&5
23972$as_echo "$as_me: Resolving AS (as $path) with 'which' failed, using $path directly." >&6;}
23973        new_path="$path"
23974      else
23975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
23976$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
23977        has_space=`$ECHO "$complete" | $GREP " "`
23978        if test "x$has_space" != x; then
23979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23981        fi
23982        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
23983      fi
23984    fi
23985  fi
23986
23987  # Now join together the path and the arguments once again
23988  if test "x$arguments" != xEOL; then
23989      new_complete="$new_path ${arguments% *}"
23990  else
23991      new_complete="$new_path"
23992  fi
23993
23994  if test "x$complete" != "x$new_complete"; then
23995    AS="$new_complete"
23996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
23997$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
23998  fi
23999
24000else
24001    AS="$CC -c"
24002fi
24003
24004
24005if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24006    for ac_prog in gnm nm
24007do
24008  # Extract the first word of "$ac_prog", so it can be a program name with args.
24009set dummy $ac_prog; ac_word=$2
24010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24011$as_echo_n "checking for $ac_word... " >&6; }
24012if test "${ac_cv_path_NM+set}" = set; then :
24013  $as_echo_n "(cached) " >&6
24014else
24015  case $NM in
24016  [\\/]* | ?:[\\/]*)
24017  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24018  ;;
24019  *)
24020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24021for as_dir in $PATH
24022do
24023  IFS=$as_save_IFS
24024  test -z "$as_dir" && as_dir=.
24025    for ac_exec_ext in '' $ac_executable_extensions; do
24026  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24027    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24029    break 2
24030  fi
24031done
24032  done
24033IFS=$as_save_IFS
24034
24035  ;;
24036esac
24037fi
24038NM=$ac_cv_path_NM
24039if test -n "$NM"; then
24040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24041$as_echo "$NM" >&6; }
24042else
24043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24044$as_echo "no" >&6; }
24045fi
24046
24047
24048  test -n "$NM" && break
24049done
24050
24051
24052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24053
24054  # First separate the path from the arguments. This will split at the first
24055  # space.
24056  complete="$NM"
24057  path="${complete%% *}"
24058  tmp="$complete EOL"
24059  arguments="${tmp#* }"
24060
24061  # Input might be given as Windows format, start by converting to
24062  # unix format.
24063  new_path=`$CYGPATH -u "$path"`
24064
24065  # Now try to locate executable using which
24066  new_path=`$WHICH "$new_path" 2> /dev/null`
24067  # bat and cmd files are not always considered executable in cygwin causing which
24068  # to not find them
24069  if test "x$new_path" = x \
24070           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24071           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24072    new_path=`$CYGPATH -u "$path"`
24073  fi
24074  if test "x$new_path" = x; then
24075    # Oops. Which didn't find the executable.
24076    # The splitting of arguments from the executable at a space might have been incorrect,
24077    # since paths with space are more likely in Windows. Give it another try with the whole
24078    # argument.
24079    path="$complete"
24080    arguments="EOL"
24081    new_path=`$CYGPATH -u "$path"`
24082    new_path=`$WHICH "$new_path" 2> /dev/null`
24083    # bat and cmd files are not always considered executable in cygwin causing which
24084    # to not find them
24085    if test "x$new_path" = x \
24086             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24087             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24088      new_path=`$CYGPATH -u "$path"`
24089    fi
24090    if test "x$new_path" = x; then
24091      # It's still not found. Now this is an unrecoverable error.
24092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24093$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24094      has_space=`$ECHO "$complete" | $GREP " "`
24095      if test "x$has_space" != x; then
24096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24098      fi
24099      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24100    fi
24101  fi
24102
24103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24106  # "foo.exe" is OK but "foo" is an error.
24107  #
24108  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24109  # It is also a way to make sure we got the proper file name for the real test later on.
24110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24111  if test "x$test_shortpath" = x; then
24112    # Short path failed, file does not exist as specified.
24113    # Try adding .exe or .cmd
24114    if test -f "${new_path}.exe"; then
24115       input_to_shortpath="${new_path}.exe"
24116    elif test -f "${new_path}.cmd"; then
24117       input_to_shortpath="${new_path}.cmd"
24118    else
24119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24120$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24121      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24122$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24123      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24124    fi
24125  else
24126    input_to_shortpath="$new_path"
24127  fi
24128
24129  # Call helper function which possibly converts this using DOS-style short mode.
24130  # If so, the updated path is stored in $new_path.
24131  new_path="$input_to_shortpath"
24132
24133  input_path="$input_to_shortpath"
24134  # Check if we need to convert this using DOS-style short mode. If the path
24135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24136  # take no chances and rewrite it.
24137  # Note: m4 eats our [], so we need to use [ and ] instead.
24138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24139  if test "x$has_forbidden_chars" != x; then
24140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24144      # Going to short mode and back again did indeed matter. Since short mode is
24145      # case insensitive, let's make it lowercase to improve readability.
24146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24147      # Now convert it back to Unix-stile (cygpath)
24148      input_path=`$CYGPATH -u "$shortmode_path"`
24149      new_path="$input_path"
24150    fi
24151  fi
24152
24153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24154  if test "x$test_cygdrive_prefix" = x; then
24155    # As a simple fix, exclude /usr/bin since it's not a real path.
24156    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24158      # a path prefixed by /cygdrive for fixpath to work.
24159      new_path="$CYGWIN_ROOT_PATH$input_path"
24160    fi
24161  fi
24162
24163  # remove trailing .exe if any
24164  new_path="${new_path/%.exe/}"
24165
24166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24167
24168  # First separate the path from the arguments. This will split at the first
24169  # space.
24170  complete="$NM"
24171  path="${complete%% *}"
24172  tmp="$complete EOL"
24173  arguments="${tmp#* }"
24174
24175  # Input might be given as Windows format, start by converting to
24176  # unix format.
24177  new_path="$path"
24178
24179  windows_path="$new_path"
24180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24181    unix_path=`$CYGPATH -u "$windows_path"`
24182    new_path="$unix_path"
24183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24185    new_path="$unix_path"
24186  fi
24187
24188
24189  # Now try to locate executable using which
24190  new_path=`$WHICH "$new_path" 2> /dev/null`
24191
24192  if test "x$new_path" = x; then
24193    # Oops. Which didn't find the executable.
24194    # The splitting of arguments from the executable at a space might have been incorrect,
24195    # since paths with space are more likely in Windows. Give it another try with the whole
24196    # argument.
24197    path="$complete"
24198    arguments="EOL"
24199    new_path="$path"
24200
24201  windows_path="$new_path"
24202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24203    unix_path=`$CYGPATH -u "$windows_path"`
24204    new_path="$unix_path"
24205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24207    new_path="$unix_path"
24208  fi
24209
24210
24211    new_path=`$WHICH "$new_path" 2> /dev/null`
24212
24213    if test "x$new_path" = x; then
24214      # It's still not found. Now this is an unrecoverable error.
24215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24216$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24217      has_space=`$ECHO "$complete" | $GREP " "`
24218      if test "x$has_space" != x; then
24219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24221      fi
24222      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24223    fi
24224  fi
24225
24226  # Now new_path has a complete unix path to the binary
24227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24228    # Keep paths in /bin as-is, but remove trailing .exe if any
24229    new_path="${new_path/%.exe/}"
24230    # Do not save /bin paths to all_fixpath_prefixes!
24231  else
24232    # Not in mixed or Windows style, start by that.
24233    new_path=`cmd //c echo $new_path`
24234
24235  input_path="$new_path"
24236  # Check if we need to convert this using DOS-style short mode. If the path
24237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24238  # take no chances and rewrite it.
24239  # Note: m4 eats our [], so we need to use [ and ] instead.
24240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24241  if test "x$has_forbidden_chars" != x; then
24242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24244  fi
24245
24246    # Output is in $new_path
24247
24248  windows_path="$new_path"
24249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24250    unix_path=`$CYGPATH -u "$windows_path"`
24251    new_path="$unix_path"
24252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24254    new_path="$unix_path"
24255  fi
24256
24257    # remove trailing .exe if any
24258    new_path="${new_path/%.exe/}"
24259
24260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24262  fi
24263
24264  else
24265    # We're on a posix platform. Hooray! :)
24266    # First separate the path from the arguments. This will split at the first
24267    # space.
24268    complete="$NM"
24269    path="${complete%% *}"
24270    tmp="$complete EOL"
24271    arguments="${tmp#* }"
24272
24273    new_path=`$WHICH $path 2> /dev/null`
24274    if test "x$new_path" = x; then
24275      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24276      if test "x$is_absolute_path" != x; then
24277        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
24278$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
24279        new_path="$path"
24280      else
24281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24282$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24283        has_space=`$ECHO "$complete" | $GREP " "`
24284        if test "x$has_space" != x; then
24285          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24286$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24287        fi
24288        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24289      fi
24290    fi
24291  fi
24292
24293  # Now join together the path and the arguments once again
24294  if test "x$arguments" != xEOL; then
24295      new_complete="$new_path ${arguments% *}"
24296  else
24297      new_complete="$new_path"
24298  fi
24299
24300  if test "x$complete" != "x$new_complete"; then
24301    NM="$new_complete"
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24303$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24304  fi
24305
24306    # Extract the first word of "strip", so it can be a program name with args.
24307set dummy strip; ac_word=$2
24308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24309$as_echo_n "checking for $ac_word... " >&6; }
24310if test "${ac_cv_path_STRIP+set}" = set; then :
24311  $as_echo_n "(cached) " >&6
24312else
24313  case $STRIP in
24314  [\\/]* | ?:[\\/]*)
24315  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24316  ;;
24317  *)
24318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24319for as_dir in $PATH
24320do
24321  IFS=$as_save_IFS
24322  test -z "$as_dir" && as_dir=.
24323    for ac_exec_ext in '' $ac_executable_extensions; do
24324  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24325    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24327    break 2
24328  fi
24329done
24330  done
24331IFS=$as_save_IFS
24332
24333  ;;
24334esac
24335fi
24336STRIP=$ac_cv_path_STRIP
24337if test -n "$STRIP"; then
24338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24339$as_echo "$STRIP" >&6; }
24340else
24341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24342$as_echo "no" >&6; }
24343fi
24344
24345
24346
24347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24348
24349  # First separate the path from the arguments. This will split at the first
24350  # space.
24351  complete="$STRIP"
24352  path="${complete%% *}"
24353  tmp="$complete EOL"
24354  arguments="${tmp#* }"
24355
24356  # Input might be given as Windows format, start by converting to
24357  # unix format.
24358  new_path=`$CYGPATH -u "$path"`
24359
24360  # Now try to locate executable using which
24361  new_path=`$WHICH "$new_path" 2> /dev/null`
24362  # bat and cmd files are not always considered executable in cygwin causing which
24363  # to not find them
24364  if test "x$new_path" = x \
24365           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24366           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24367    new_path=`$CYGPATH -u "$path"`
24368  fi
24369  if test "x$new_path" = x; then
24370    # Oops. Which didn't find the executable.
24371    # The splitting of arguments from the executable at a space might have been incorrect,
24372    # since paths with space are more likely in Windows. Give it another try with the whole
24373    # argument.
24374    path="$complete"
24375    arguments="EOL"
24376    new_path=`$CYGPATH -u "$path"`
24377    new_path=`$WHICH "$new_path" 2> /dev/null`
24378    # bat and cmd files are not always considered executable in cygwin causing which
24379    # to not find them
24380    if test "x$new_path" = x \
24381             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24382             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24383      new_path=`$CYGPATH -u "$path"`
24384    fi
24385    if test "x$new_path" = x; then
24386      # It's still not found. Now this is an unrecoverable error.
24387      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24388$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24389      has_space=`$ECHO "$complete" | $GREP " "`
24390      if test "x$has_space" != x; then
24391        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24392$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24393      fi
24394      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24395    fi
24396  fi
24397
24398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24401  # "foo.exe" is OK but "foo" is an error.
24402  #
24403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24404  # It is also a way to make sure we got the proper file name for the real test later on.
24405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24406  if test "x$test_shortpath" = x; then
24407    # Short path failed, file does not exist as specified.
24408    # Try adding .exe or .cmd
24409    if test -f "${new_path}.exe"; then
24410       input_to_shortpath="${new_path}.exe"
24411    elif test -f "${new_path}.cmd"; then
24412       input_to_shortpath="${new_path}.cmd"
24413    else
24414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
24415$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
24416      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24417$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24418      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24419    fi
24420  else
24421    input_to_shortpath="$new_path"
24422  fi
24423
24424  # Call helper function which possibly converts this using DOS-style short mode.
24425  # If so, the updated path is stored in $new_path.
24426  new_path="$input_to_shortpath"
24427
24428  input_path="$input_to_shortpath"
24429  # Check if we need to convert this using DOS-style short mode. If the path
24430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24431  # take no chances and rewrite it.
24432  # Note: m4 eats our [], so we need to use [ and ] instead.
24433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24434  if test "x$has_forbidden_chars" != x; then
24435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24439      # Going to short mode and back again did indeed matter. Since short mode is
24440      # case insensitive, let's make it lowercase to improve readability.
24441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24442      # Now convert it back to Unix-stile (cygpath)
24443      input_path=`$CYGPATH -u "$shortmode_path"`
24444      new_path="$input_path"
24445    fi
24446  fi
24447
24448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24449  if test "x$test_cygdrive_prefix" = x; then
24450    # As a simple fix, exclude /usr/bin since it's not a real path.
24451    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24453      # a path prefixed by /cygdrive for fixpath to work.
24454      new_path="$CYGWIN_ROOT_PATH$input_path"
24455    fi
24456  fi
24457
24458  # remove trailing .exe if any
24459  new_path="${new_path/%.exe/}"
24460
24461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24462
24463  # First separate the path from the arguments. This will split at the first
24464  # space.
24465  complete="$STRIP"
24466  path="${complete%% *}"
24467  tmp="$complete EOL"
24468  arguments="${tmp#* }"
24469
24470  # Input might be given as Windows format, start by converting to
24471  # unix format.
24472  new_path="$path"
24473
24474  windows_path="$new_path"
24475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24476    unix_path=`$CYGPATH -u "$windows_path"`
24477    new_path="$unix_path"
24478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24480    new_path="$unix_path"
24481  fi
24482
24483
24484  # Now try to locate executable using which
24485  new_path=`$WHICH "$new_path" 2> /dev/null`
24486
24487  if test "x$new_path" = x; then
24488    # Oops. Which didn't find the executable.
24489    # The splitting of arguments from the executable at a space might have been incorrect,
24490    # since paths with space are more likely in Windows. Give it another try with the whole
24491    # argument.
24492    path="$complete"
24493    arguments="EOL"
24494    new_path="$path"
24495
24496  windows_path="$new_path"
24497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24498    unix_path=`$CYGPATH -u "$windows_path"`
24499    new_path="$unix_path"
24500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24502    new_path="$unix_path"
24503  fi
24504
24505
24506    new_path=`$WHICH "$new_path" 2> /dev/null`
24507
24508    if test "x$new_path" = x; then
24509      # It's still not found. Now this is an unrecoverable error.
24510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24511$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24512      has_space=`$ECHO "$complete" | $GREP " "`
24513      if test "x$has_space" != x; then
24514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24516      fi
24517      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24518    fi
24519  fi
24520
24521  # Now new_path has a complete unix path to the binary
24522  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24523    # Keep paths in /bin as-is, but remove trailing .exe if any
24524    new_path="${new_path/%.exe/}"
24525    # Do not save /bin paths to all_fixpath_prefixes!
24526  else
24527    # Not in mixed or Windows style, start by that.
24528    new_path=`cmd //c echo $new_path`
24529
24530  input_path="$new_path"
24531  # Check if we need to convert this using DOS-style short mode. If the path
24532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24533  # take no chances and rewrite it.
24534  # Note: m4 eats our [], so we need to use [ and ] instead.
24535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24536  if test "x$has_forbidden_chars" != x; then
24537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24538    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24539  fi
24540
24541    # Output is in $new_path
24542
24543  windows_path="$new_path"
24544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24545    unix_path=`$CYGPATH -u "$windows_path"`
24546    new_path="$unix_path"
24547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24549    new_path="$unix_path"
24550  fi
24551
24552    # remove trailing .exe if any
24553    new_path="${new_path/%.exe/}"
24554
24555    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24556    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24557  fi
24558
24559  else
24560    # We're on a posix platform. Hooray! :)
24561    # First separate the path from the arguments. This will split at the first
24562    # space.
24563    complete="$STRIP"
24564    path="${complete%% *}"
24565    tmp="$complete EOL"
24566    arguments="${tmp#* }"
24567
24568    new_path=`$WHICH $path 2> /dev/null`
24569    if test "x$new_path" = x; then
24570      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24571      if test "x$is_absolute_path" != x; then
24572        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
24573$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
24574        new_path="$path"
24575      else
24576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24577$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24578        has_space=`$ECHO "$complete" | $GREP " "`
24579        if test "x$has_space" != x; then
24580          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24581$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24582        fi
24583        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24584      fi
24585    fi
24586  fi
24587
24588  # Now join together the path and the arguments once again
24589  if test "x$arguments" != xEOL; then
24590      new_complete="$new_path ${arguments% *}"
24591  else
24592      new_complete="$new_path"
24593  fi
24594
24595  if test "x$complete" != "x$new_complete"; then
24596    STRIP="$new_complete"
24597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
24598$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
24599  fi
24600
24601    # Extract the first word of "mcs", so it can be a program name with args.
24602set dummy mcs; ac_word=$2
24603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24604$as_echo_n "checking for $ac_word... " >&6; }
24605if test "${ac_cv_path_MCS+set}" = set; then :
24606  $as_echo_n "(cached) " >&6
24607else
24608  case $MCS in
24609  [\\/]* | ?:[\\/]*)
24610  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
24611  ;;
24612  *)
24613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24614for as_dir in $PATH
24615do
24616  IFS=$as_save_IFS
24617  test -z "$as_dir" && as_dir=.
24618    for ac_exec_ext in '' $ac_executable_extensions; do
24619  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24620    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
24621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24622    break 2
24623  fi
24624done
24625  done
24626IFS=$as_save_IFS
24627
24628  ;;
24629esac
24630fi
24631MCS=$ac_cv_path_MCS
24632if test -n "$MCS"; then
24633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
24634$as_echo "$MCS" >&6; }
24635else
24636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24637$as_echo "no" >&6; }
24638fi
24639
24640
24641
24642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24643
24644  # First separate the path from the arguments. This will split at the first
24645  # space.
24646  complete="$MCS"
24647  path="${complete%% *}"
24648  tmp="$complete EOL"
24649  arguments="${tmp#* }"
24650
24651  # Input might be given as Windows format, start by converting to
24652  # unix format.
24653  new_path=`$CYGPATH -u "$path"`
24654
24655  # Now try to locate executable using which
24656  new_path=`$WHICH "$new_path" 2> /dev/null`
24657  # bat and cmd files are not always considered executable in cygwin causing which
24658  # to not find them
24659  if test "x$new_path" = x \
24660           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24661           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24662    new_path=`$CYGPATH -u "$path"`
24663  fi
24664  if test "x$new_path" = x; then
24665    # Oops. Which didn't find the executable.
24666    # The splitting of arguments from the executable at a space might have been incorrect,
24667    # since paths with space are more likely in Windows. Give it another try with the whole
24668    # argument.
24669    path="$complete"
24670    arguments="EOL"
24671    new_path=`$CYGPATH -u "$path"`
24672    new_path=`$WHICH "$new_path" 2> /dev/null`
24673    # bat and cmd files are not always considered executable in cygwin causing which
24674    # to not find them
24675    if test "x$new_path" = x \
24676             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24677             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24678      new_path=`$CYGPATH -u "$path"`
24679    fi
24680    if test "x$new_path" = x; then
24681      # It's still not found. Now this is an unrecoverable error.
24682      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24683$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24684      has_space=`$ECHO "$complete" | $GREP " "`
24685      if test "x$has_space" != x; then
24686        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24687$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24688      fi
24689      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24690    fi
24691  fi
24692
24693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24696  # "foo.exe" is OK but "foo" is an error.
24697  #
24698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24699  # It is also a way to make sure we got the proper file name for the real test later on.
24700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24701  if test "x$test_shortpath" = x; then
24702    # Short path failed, file does not exist as specified.
24703    # Try adding .exe or .cmd
24704    if test -f "${new_path}.exe"; then
24705       input_to_shortpath="${new_path}.exe"
24706    elif test -f "${new_path}.cmd"; then
24707       input_to_shortpath="${new_path}.cmd"
24708    else
24709      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
24710$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
24711      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24712$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24713      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24714    fi
24715  else
24716    input_to_shortpath="$new_path"
24717  fi
24718
24719  # Call helper function which possibly converts this using DOS-style short mode.
24720  # If so, the updated path is stored in $new_path.
24721  new_path="$input_to_shortpath"
24722
24723  input_path="$input_to_shortpath"
24724  # Check if we need to convert this using DOS-style short mode. If the path
24725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24726  # take no chances and rewrite it.
24727  # Note: m4 eats our [], so we need to use [ and ] instead.
24728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24729  if test "x$has_forbidden_chars" != x; then
24730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24734      # Going to short mode and back again did indeed matter. Since short mode is
24735      # case insensitive, let's make it lowercase to improve readability.
24736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24737      # Now convert it back to Unix-stile (cygpath)
24738      input_path=`$CYGPATH -u "$shortmode_path"`
24739      new_path="$input_path"
24740    fi
24741  fi
24742
24743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24744  if test "x$test_cygdrive_prefix" = x; then
24745    # As a simple fix, exclude /usr/bin since it's not a real path.
24746    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24748      # a path prefixed by /cygdrive for fixpath to work.
24749      new_path="$CYGWIN_ROOT_PATH$input_path"
24750    fi
24751  fi
24752
24753  # remove trailing .exe if any
24754  new_path="${new_path/%.exe/}"
24755
24756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24757
24758  # First separate the path from the arguments. This will split at the first
24759  # space.
24760  complete="$MCS"
24761  path="${complete%% *}"
24762  tmp="$complete EOL"
24763  arguments="${tmp#* }"
24764
24765  # Input might be given as Windows format, start by converting to
24766  # unix format.
24767  new_path="$path"
24768
24769  windows_path="$new_path"
24770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24771    unix_path=`$CYGPATH -u "$windows_path"`
24772    new_path="$unix_path"
24773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24775    new_path="$unix_path"
24776  fi
24777
24778
24779  # Now try to locate executable using which
24780  new_path=`$WHICH "$new_path" 2> /dev/null`
24781
24782  if test "x$new_path" = x; then
24783    # Oops. Which didn't find the executable.
24784    # The splitting of arguments from the executable at a space might have been incorrect,
24785    # since paths with space are more likely in Windows. Give it another try with the whole
24786    # argument.
24787    path="$complete"
24788    arguments="EOL"
24789    new_path="$path"
24790
24791  windows_path="$new_path"
24792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24793    unix_path=`$CYGPATH -u "$windows_path"`
24794    new_path="$unix_path"
24795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24797    new_path="$unix_path"
24798  fi
24799
24800
24801    new_path=`$WHICH "$new_path" 2> /dev/null`
24802
24803    if test "x$new_path" = x; then
24804      # It's still not found. Now this is an unrecoverable error.
24805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24806$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24807      has_space=`$ECHO "$complete" | $GREP " "`
24808      if test "x$has_space" != x; then
24809        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24810$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24811      fi
24812      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24813    fi
24814  fi
24815
24816  # Now new_path has a complete unix path to the binary
24817  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24818    # Keep paths in /bin as-is, but remove trailing .exe if any
24819    new_path="${new_path/%.exe/}"
24820    # Do not save /bin paths to all_fixpath_prefixes!
24821  else
24822    # Not in mixed or Windows style, start by that.
24823    new_path=`cmd //c echo $new_path`
24824
24825  input_path="$new_path"
24826  # Check if we need to convert this using DOS-style short mode. If the path
24827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24828  # take no chances and rewrite it.
24829  # Note: m4 eats our [], so we need to use [ and ] instead.
24830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24831  if test "x$has_forbidden_chars" != x; then
24832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24834  fi
24835
24836    # Output is in $new_path
24837
24838  windows_path="$new_path"
24839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24840    unix_path=`$CYGPATH -u "$windows_path"`
24841    new_path="$unix_path"
24842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24844    new_path="$unix_path"
24845  fi
24846
24847    # remove trailing .exe if any
24848    new_path="${new_path/%.exe/}"
24849
24850    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24851    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24852  fi
24853
24854  else
24855    # We're on a posix platform. Hooray! :)
24856    # First separate the path from the arguments. This will split at the first
24857    # space.
24858    complete="$MCS"
24859    path="${complete%% *}"
24860    tmp="$complete EOL"
24861    arguments="${tmp#* }"
24862
24863    new_path=`$WHICH $path 2> /dev/null`
24864    if test "x$new_path" = x; then
24865      is_absolute_path=`$ECHO "$path" | $GREP ^/`
24866      if test "x$is_absolute_path" != x; then
24867        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) with 'which' failed, using $path directly." >&5
24868$as_echo "$as_me: Resolving MCS (as $path) with 'which' failed, using $path directly." >&6;}
24869        new_path="$path"
24870      else
24871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
24872$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
24873        has_space=`$ECHO "$complete" | $GREP " "`
24874        if test "x$has_space" != x; then
24875          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24876$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24877        fi
24878        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
24879      fi
24880    fi
24881  fi
24882
24883  # Now join together the path and the arguments once again
24884  if test "x$arguments" != xEOL; then
24885      new_complete="$new_path ${arguments% *}"
24886  else
24887      new_complete="$new_path"
24888  fi
24889
24890  if test "x$complete" != "x$new_complete"; then
24891    MCS="$new_complete"
24892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
24893$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
24894  fi
24895
24896elif test "x$OPENJDK_TARGET_OS" != xwindows; then
24897    if test -n "$ac_tool_prefix"; then
24898  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
24899set dummy ${ac_tool_prefix}nm; ac_word=$2
24900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24901$as_echo_n "checking for $ac_word... " >&6; }
24902if test "${ac_cv_prog_NM+set}" = set; then :
24903  $as_echo_n "(cached) " >&6
24904else
24905  if test -n "$NM"; then
24906  ac_cv_prog_NM="$NM" # Let the user override the test.
24907else
24908as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24909for as_dir in $PATH
24910do
24911  IFS=$as_save_IFS
24912  test -z "$as_dir" && as_dir=.
24913    for ac_exec_ext in '' $ac_executable_extensions; do
24914  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24915    ac_cv_prog_NM="${ac_tool_prefix}nm"
24916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24917    break 2
24918  fi
24919done
24920  done
24921IFS=$as_save_IFS
24922
24923fi
24924fi
24925NM=$ac_cv_prog_NM
24926if test -n "$NM"; then
24927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24928$as_echo "$NM" >&6; }
24929else
24930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24931$as_echo "no" >&6; }
24932fi
24933
24934
24935fi
24936if test -z "$ac_cv_prog_NM"; then
24937  ac_ct_NM=$NM
24938  # Extract the first word of "nm", so it can be a program name with args.
24939set dummy nm; ac_word=$2
24940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24941$as_echo_n "checking for $ac_word... " >&6; }
24942if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
24943  $as_echo_n "(cached) " >&6
24944else
24945  if test -n "$ac_ct_NM"; then
24946  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
24947else
24948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24949for as_dir in $PATH
24950do
24951  IFS=$as_save_IFS
24952  test -z "$as_dir" && as_dir=.
24953    for ac_exec_ext in '' $ac_executable_extensions; do
24954  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24955    ac_cv_prog_ac_ct_NM="nm"
24956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24957    break 2
24958  fi
24959done
24960  done
24961IFS=$as_save_IFS
24962
24963fi
24964fi
24965ac_ct_NM=$ac_cv_prog_ac_ct_NM
24966if test -n "$ac_ct_NM"; then
24967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
24968$as_echo "$ac_ct_NM" >&6; }
24969else
24970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24971$as_echo "no" >&6; }
24972fi
24973
24974  if test "x$ac_ct_NM" = x; then
24975    NM=""
24976  else
24977    case $cross_compiling:$ac_tool_warned in
24978yes:)
24979{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24980$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24981ac_tool_warned=yes ;;
24982esac
24983    NM=$ac_ct_NM
24984  fi
24985else
24986  NM="$ac_cv_prog_NM"
24987fi
24988
24989
24990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24991
24992  # First separate the path from the arguments. This will split at the first
24993  # space.
24994  complete="$NM"
24995  path="${complete%% *}"
24996  tmp="$complete EOL"
24997  arguments="${tmp#* }"
24998
24999  # Input might be given as Windows format, start by converting to
25000  # unix format.
25001  new_path=`$CYGPATH -u "$path"`
25002
25003  # Now try to locate executable using which
25004  new_path=`$WHICH "$new_path" 2> /dev/null`
25005  # bat and cmd files are not always considered executable in cygwin causing which
25006  # to not find them
25007  if test "x$new_path" = x \
25008           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25009           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25010    new_path=`$CYGPATH -u "$path"`
25011  fi
25012  if test "x$new_path" = x; then
25013    # Oops. Which didn't find the executable.
25014    # The splitting of arguments from the executable at a space might have been incorrect,
25015    # since paths with space are more likely in Windows. Give it another try with the whole
25016    # argument.
25017    path="$complete"
25018    arguments="EOL"
25019    new_path=`$CYGPATH -u "$path"`
25020    new_path=`$WHICH "$new_path" 2> /dev/null`
25021    # bat and cmd files are not always considered executable in cygwin causing which
25022    # to not find them
25023    if test "x$new_path" = x \
25024             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25025             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25026      new_path=`$CYGPATH -u "$path"`
25027    fi
25028    if test "x$new_path" = x; then
25029      # It's still not found. Now this is an unrecoverable error.
25030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25031$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25032      has_space=`$ECHO "$complete" | $GREP " "`
25033      if test "x$has_space" != x; then
25034        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25035$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25036      fi
25037      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25038    fi
25039  fi
25040
25041  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25042  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25043  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25044  # "foo.exe" is OK but "foo" is an error.
25045  #
25046  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25047  # It is also a way to make sure we got the proper file name for the real test later on.
25048  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25049  if test "x$test_shortpath" = x; then
25050    # Short path failed, file does not exist as specified.
25051    # Try adding .exe or .cmd
25052    if test -f "${new_path}.exe"; then
25053       input_to_shortpath="${new_path}.exe"
25054    elif test -f "${new_path}.cmd"; then
25055       input_to_shortpath="${new_path}.cmd"
25056    else
25057      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25058$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25059      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25060$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25061      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25062    fi
25063  else
25064    input_to_shortpath="$new_path"
25065  fi
25066
25067  # Call helper function which possibly converts this using DOS-style short mode.
25068  # If so, the updated path is stored in $new_path.
25069  new_path="$input_to_shortpath"
25070
25071  input_path="$input_to_shortpath"
25072  # Check if we need to convert this using DOS-style short mode. If the path
25073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25074  # take no chances and rewrite it.
25075  # Note: m4 eats our [], so we need to use [ and ] instead.
25076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25077  if test "x$has_forbidden_chars" != x; then
25078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25082      # Going to short mode and back again did indeed matter. Since short mode is
25083      # case insensitive, let's make it lowercase to improve readability.
25084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25085      # Now convert it back to Unix-stile (cygpath)
25086      input_path=`$CYGPATH -u "$shortmode_path"`
25087      new_path="$input_path"
25088    fi
25089  fi
25090
25091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25092  if test "x$test_cygdrive_prefix" = x; then
25093    # As a simple fix, exclude /usr/bin since it's not a real path.
25094    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25096      # a path prefixed by /cygdrive for fixpath to work.
25097      new_path="$CYGWIN_ROOT_PATH$input_path"
25098    fi
25099  fi
25100
25101  # remove trailing .exe if any
25102  new_path="${new_path/%.exe/}"
25103
25104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25105
25106  # First separate the path from the arguments. This will split at the first
25107  # space.
25108  complete="$NM"
25109  path="${complete%% *}"
25110  tmp="$complete EOL"
25111  arguments="${tmp#* }"
25112
25113  # Input might be given as Windows format, start by converting to
25114  # unix format.
25115  new_path="$path"
25116
25117  windows_path="$new_path"
25118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25119    unix_path=`$CYGPATH -u "$windows_path"`
25120    new_path="$unix_path"
25121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25123    new_path="$unix_path"
25124  fi
25125
25126
25127  # Now try to locate executable using which
25128  new_path=`$WHICH "$new_path" 2> /dev/null`
25129
25130  if test "x$new_path" = x; then
25131    # Oops. Which didn't find the executable.
25132    # The splitting of arguments from the executable at a space might have been incorrect,
25133    # since paths with space are more likely in Windows. Give it another try with the whole
25134    # argument.
25135    path="$complete"
25136    arguments="EOL"
25137    new_path="$path"
25138
25139  windows_path="$new_path"
25140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25141    unix_path=`$CYGPATH -u "$windows_path"`
25142    new_path="$unix_path"
25143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25145    new_path="$unix_path"
25146  fi
25147
25148
25149    new_path=`$WHICH "$new_path" 2> /dev/null`
25150
25151    if test "x$new_path" = x; then
25152      # It's still not found. Now this is an unrecoverable error.
25153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25154$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25155      has_space=`$ECHO "$complete" | $GREP " "`
25156      if test "x$has_space" != x; then
25157        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25158$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25159      fi
25160      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25161    fi
25162  fi
25163
25164  # Now new_path has a complete unix path to the binary
25165  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25166    # Keep paths in /bin as-is, but remove trailing .exe if any
25167    new_path="${new_path/%.exe/}"
25168    # Do not save /bin paths to all_fixpath_prefixes!
25169  else
25170    # Not in mixed or Windows style, start by that.
25171    new_path=`cmd //c echo $new_path`
25172
25173  input_path="$new_path"
25174  # Check if we need to convert this using DOS-style short mode. If the path
25175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25176  # take no chances and rewrite it.
25177  # Note: m4 eats our [], so we need to use [ and ] instead.
25178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25179  if test "x$has_forbidden_chars" != x; then
25180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25181    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25182  fi
25183
25184    # Output is in $new_path
25185
25186  windows_path="$new_path"
25187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25188    unix_path=`$CYGPATH -u "$windows_path"`
25189    new_path="$unix_path"
25190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25192    new_path="$unix_path"
25193  fi
25194
25195    # remove trailing .exe if any
25196    new_path="${new_path/%.exe/}"
25197
25198    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25199    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25200  fi
25201
25202  else
25203    # We're on a posix platform. Hooray! :)
25204    # First separate the path from the arguments. This will split at the first
25205    # space.
25206    complete="$NM"
25207    path="${complete%% *}"
25208    tmp="$complete EOL"
25209    arguments="${tmp#* }"
25210
25211    new_path=`$WHICH $path 2> /dev/null`
25212    if test "x$new_path" = x; then
25213      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25214      if test "x$is_absolute_path" != x; then
25215        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) with 'which' failed, using $path directly." >&5
25216$as_echo "$as_me: Resolving NM (as $path) with 'which' failed, using $path directly." >&6;}
25217        new_path="$path"
25218      else
25219        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25220$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25221        has_space=`$ECHO "$complete" | $GREP " "`
25222        if test "x$has_space" != x; then
25223          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25224$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25225        fi
25226        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25227      fi
25228    fi
25229  fi
25230
25231  # Now join together the path and the arguments once again
25232  if test "x$arguments" != xEOL; then
25233      new_complete="$new_path ${arguments% *}"
25234  else
25235      new_complete="$new_path"
25236  fi
25237
25238  if test "x$complete" != "x$new_complete"; then
25239    NM="$new_complete"
25240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25241$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25242  fi
25243
25244    if test -n "$ac_tool_prefix"; then
25245  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25246set dummy ${ac_tool_prefix}strip; ac_word=$2
25247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25248$as_echo_n "checking for $ac_word... " >&6; }
25249if test "${ac_cv_prog_STRIP+set}" = set; then :
25250  $as_echo_n "(cached) " >&6
25251else
25252  if test -n "$STRIP"; then
25253  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25254else
25255as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25256for as_dir in $PATH
25257do
25258  IFS=$as_save_IFS
25259  test -z "$as_dir" && as_dir=.
25260    for ac_exec_ext in '' $ac_executable_extensions; do
25261  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25262    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25264    break 2
25265  fi
25266done
25267  done
25268IFS=$as_save_IFS
25269
25270fi
25271fi
25272STRIP=$ac_cv_prog_STRIP
25273if test -n "$STRIP"; then
25274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25275$as_echo "$STRIP" >&6; }
25276else
25277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25278$as_echo "no" >&6; }
25279fi
25280
25281
25282fi
25283if test -z "$ac_cv_prog_STRIP"; then
25284  ac_ct_STRIP=$STRIP
25285  # Extract the first word of "strip", so it can be a program name with args.
25286set dummy strip; ac_word=$2
25287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25288$as_echo_n "checking for $ac_word... " >&6; }
25289if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25290  $as_echo_n "(cached) " >&6
25291else
25292  if test -n "$ac_ct_STRIP"; then
25293  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25294else
25295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25296for as_dir in $PATH
25297do
25298  IFS=$as_save_IFS
25299  test -z "$as_dir" && as_dir=.
25300    for ac_exec_ext in '' $ac_executable_extensions; do
25301  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25302    ac_cv_prog_ac_ct_STRIP="strip"
25303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25304    break 2
25305  fi
25306done
25307  done
25308IFS=$as_save_IFS
25309
25310fi
25311fi
25312ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25313if test -n "$ac_ct_STRIP"; then
25314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25315$as_echo "$ac_ct_STRIP" >&6; }
25316else
25317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25318$as_echo "no" >&6; }
25319fi
25320
25321  if test "x$ac_ct_STRIP" = x; then
25322    STRIP=""
25323  else
25324    case $cross_compiling:$ac_tool_warned in
25325yes:)
25326{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25327$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25328ac_tool_warned=yes ;;
25329esac
25330    STRIP=$ac_ct_STRIP
25331  fi
25332else
25333  STRIP="$ac_cv_prog_STRIP"
25334fi
25335
25336
25337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25338
25339  # First separate the path from the arguments. This will split at the first
25340  # space.
25341  complete="$STRIP"
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=`$CYGPATH -u "$path"`
25349
25350  # Now try to locate executable using which
25351  new_path=`$WHICH "$new_path" 2> /dev/null`
25352  # bat and cmd files are not always considered executable in cygwin causing which
25353  # to not find them
25354  if test "x$new_path" = x \
25355           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25356           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25357    new_path=`$CYGPATH -u "$path"`
25358  fi
25359  if test "x$new_path" = x; then
25360    # Oops. Which didn't find the executable.
25361    # The splitting of arguments from the executable at a space might have been incorrect,
25362    # since paths with space are more likely in Windows. Give it another try with the whole
25363    # argument.
25364    path="$complete"
25365    arguments="EOL"
25366    new_path=`$CYGPATH -u "$path"`
25367    new_path=`$WHICH "$new_path" 2> /dev/null`
25368    # bat and cmd files are not always considered executable in cygwin causing which
25369    # to not find them
25370    if test "x$new_path" = x \
25371             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25372             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25373      new_path=`$CYGPATH -u "$path"`
25374    fi
25375    if test "x$new_path" = x; then
25376      # It's still not found. Now this is an unrecoverable error.
25377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25378$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25379      has_space=`$ECHO "$complete" | $GREP " "`
25380      if test "x$has_space" != x; then
25381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25383      fi
25384      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25385    fi
25386  fi
25387
25388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25391  # "foo.exe" is OK but "foo" is an error.
25392  #
25393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25394  # It is also a way to make sure we got the proper file name for the real test later on.
25395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25396  if test "x$test_shortpath" = x; then
25397    # Short path failed, file does not exist as specified.
25398    # Try adding .exe or .cmd
25399    if test -f "${new_path}.exe"; then
25400       input_to_shortpath="${new_path}.exe"
25401    elif test -f "${new_path}.cmd"; then
25402       input_to_shortpath="${new_path}.cmd"
25403    else
25404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25405$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25406      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25407$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25408      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25409    fi
25410  else
25411    input_to_shortpath="$new_path"
25412  fi
25413
25414  # Call helper function which possibly converts this using DOS-style short mode.
25415  # If so, the updated path is stored in $new_path.
25416  new_path="$input_to_shortpath"
25417
25418  input_path="$input_to_shortpath"
25419  # Check if we need to convert this using DOS-style short mode. If the path
25420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25421  # take no chances and rewrite it.
25422  # Note: m4 eats our [], so we need to use [ and ] instead.
25423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25424  if test "x$has_forbidden_chars" != x; then
25425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25429      # Going to short mode and back again did indeed matter. Since short mode is
25430      # case insensitive, let's make it lowercase to improve readability.
25431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25432      # Now convert it back to Unix-stile (cygpath)
25433      input_path=`$CYGPATH -u "$shortmode_path"`
25434      new_path="$input_path"
25435    fi
25436  fi
25437
25438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25439  if test "x$test_cygdrive_prefix" = x; then
25440    # As a simple fix, exclude /usr/bin since it's not a real path.
25441    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25443      # a path prefixed by /cygdrive for fixpath to work.
25444      new_path="$CYGWIN_ROOT_PATH$input_path"
25445    fi
25446  fi
25447
25448  # remove trailing .exe if any
25449  new_path="${new_path/%.exe/}"
25450
25451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25452
25453  # First separate the path from the arguments. This will split at the first
25454  # space.
25455  complete="$STRIP"
25456  path="${complete%% *}"
25457  tmp="$complete EOL"
25458  arguments="${tmp#* }"
25459
25460  # Input might be given as Windows format, start by converting to
25461  # unix format.
25462  new_path="$path"
25463
25464  windows_path="$new_path"
25465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25466    unix_path=`$CYGPATH -u "$windows_path"`
25467    new_path="$unix_path"
25468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25470    new_path="$unix_path"
25471  fi
25472
25473
25474  # Now try to locate executable using which
25475  new_path=`$WHICH "$new_path" 2> /dev/null`
25476
25477  if test "x$new_path" = x; then
25478    # Oops. Which didn't find the executable.
25479    # The splitting of arguments from the executable at a space might have been incorrect,
25480    # since paths with space are more likely in Windows. Give it another try with the whole
25481    # argument.
25482    path="$complete"
25483    arguments="EOL"
25484    new_path="$path"
25485
25486  windows_path="$new_path"
25487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25488    unix_path=`$CYGPATH -u "$windows_path"`
25489    new_path="$unix_path"
25490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25492    new_path="$unix_path"
25493  fi
25494
25495
25496    new_path=`$WHICH "$new_path" 2> /dev/null`
25497
25498    if test "x$new_path" = x; then
25499      # It's still not found. Now this is an unrecoverable error.
25500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25501$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25502      has_space=`$ECHO "$complete" | $GREP " "`
25503      if test "x$has_space" != x; then
25504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25506      fi
25507      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25508    fi
25509  fi
25510
25511  # Now new_path has a complete unix path to the binary
25512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25513    # Keep paths in /bin as-is, but remove trailing .exe if any
25514    new_path="${new_path/%.exe/}"
25515    # Do not save /bin paths to all_fixpath_prefixes!
25516  else
25517    # Not in mixed or Windows style, start by that.
25518    new_path=`cmd //c echo $new_path`
25519
25520  input_path="$new_path"
25521  # Check if we need to convert this using DOS-style short mode. If the path
25522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25523  # take no chances and rewrite it.
25524  # Note: m4 eats our [], so we need to use [ and ] instead.
25525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25526  if test "x$has_forbidden_chars" != x; then
25527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25529  fi
25530
25531    # Output is in $new_path
25532
25533  windows_path="$new_path"
25534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25535    unix_path=`$CYGPATH -u "$windows_path"`
25536    new_path="$unix_path"
25537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25539    new_path="$unix_path"
25540  fi
25541
25542    # remove trailing .exe if any
25543    new_path="${new_path/%.exe/}"
25544
25545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25547  fi
25548
25549  else
25550    # We're on a posix platform. Hooray! :)
25551    # First separate the path from the arguments. This will split at the first
25552    # space.
25553    complete="$STRIP"
25554    path="${complete%% *}"
25555    tmp="$complete EOL"
25556    arguments="${tmp#* }"
25557
25558    new_path=`$WHICH $path 2> /dev/null`
25559    if test "x$new_path" = x; then
25560      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25561      if test "x$is_absolute_path" != x; then
25562        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&5
25563$as_echo "$as_me: Resolving STRIP (as $path) with 'which' failed, using $path directly." >&6;}
25564        new_path="$path"
25565      else
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25567$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25568        has_space=`$ECHO "$complete" | $GREP " "`
25569        if test "x$has_space" != x; then
25570          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25571$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25572        fi
25573        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25574      fi
25575    fi
25576  fi
25577
25578  # Now join together the path and the arguments once again
25579  if test "x$arguments" != xEOL; then
25580      new_complete="$new_path ${arguments% *}"
25581  else
25582      new_complete="$new_path"
25583  fi
25584
25585  if test "x$complete" != "x$new_complete"; then
25586    STRIP="$new_complete"
25587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25588$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25589  fi
25590
25591fi
25592
25593# objcopy is used for moving debug symbols to separate files when
25594# full debug symbols are enabled.
25595if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
25596    if test -n "$ac_tool_prefix"; then
25597  for ac_prog in gobjcopy objcopy
25598  do
25599    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25600set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25602$as_echo_n "checking for $ac_word... " >&6; }
25603if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
25604  $as_echo_n "(cached) " >&6
25605else
25606  if test -n "$OBJCOPY"; then
25607  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
25608else
25609as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25610for as_dir in $PATH
25611do
25612  IFS=$as_save_IFS
25613  test -z "$as_dir" && as_dir=.
25614    for ac_exec_ext in '' $ac_executable_extensions; do
25615  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25616    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
25617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25618    break 2
25619  fi
25620done
25621  done
25622IFS=$as_save_IFS
25623
25624fi
25625fi
25626OBJCOPY=$ac_cv_prog_OBJCOPY
25627if test -n "$OBJCOPY"; then
25628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
25629$as_echo "$OBJCOPY" >&6; }
25630else
25631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25632$as_echo "no" >&6; }
25633fi
25634
25635
25636    test -n "$OBJCOPY" && break
25637  done
25638fi
25639if test -z "$OBJCOPY"; then
25640  ac_ct_OBJCOPY=$OBJCOPY
25641  for ac_prog in gobjcopy objcopy
25642do
25643  # Extract the first word of "$ac_prog", so it can be a program name with args.
25644set dummy $ac_prog; ac_word=$2
25645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25646$as_echo_n "checking for $ac_word... " >&6; }
25647if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
25648  $as_echo_n "(cached) " >&6
25649else
25650  if test -n "$ac_ct_OBJCOPY"; then
25651  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
25652else
25653as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25654for as_dir in $PATH
25655do
25656  IFS=$as_save_IFS
25657  test -z "$as_dir" && as_dir=.
25658    for ac_exec_ext in '' $ac_executable_extensions; do
25659  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25660    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
25661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25662    break 2
25663  fi
25664done
25665  done
25666IFS=$as_save_IFS
25667
25668fi
25669fi
25670ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
25671if test -n "$ac_ct_OBJCOPY"; then
25672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
25673$as_echo "$ac_ct_OBJCOPY" >&6; }
25674else
25675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25676$as_echo "no" >&6; }
25677fi
25678
25679
25680  test -n "$ac_ct_OBJCOPY" && break
25681done
25682
25683  if test "x$ac_ct_OBJCOPY" = x; then
25684    OBJCOPY=""
25685  else
25686    case $cross_compiling:$ac_tool_warned in
25687yes:)
25688{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25689$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25690ac_tool_warned=yes ;;
25691esac
25692    OBJCOPY=$ac_ct_OBJCOPY
25693  fi
25694fi
25695
25696    # Only call fixup if objcopy was found.
25697    if test -n "$OBJCOPY"; then
25698
25699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25700
25701  # First separate the path from the arguments. This will split at the first
25702  # space.
25703  complete="$OBJCOPY"
25704  path="${complete%% *}"
25705  tmp="$complete EOL"
25706  arguments="${tmp#* }"
25707
25708  # Input might be given as Windows format, start by converting to
25709  # unix format.
25710  new_path=`$CYGPATH -u "$path"`
25711
25712  # Now try to locate executable using which
25713  new_path=`$WHICH "$new_path" 2> /dev/null`
25714  # bat and cmd files are not always considered executable in cygwin causing which
25715  # to not find them
25716  if test "x$new_path" = x \
25717           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25718           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25719    new_path=`$CYGPATH -u "$path"`
25720  fi
25721  if test "x$new_path" = x; then
25722    # Oops. Which didn't find the executable.
25723    # The splitting of arguments from the executable at a space might have been incorrect,
25724    # since paths with space are more likely in Windows. Give it another try with the whole
25725    # argument.
25726    path="$complete"
25727    arguments="EOL"
25728    new_path=`$CYGPATH -u "$path"`
25729    new_path=`$WHICH "$new_path" 2> /dev/null`
25730    # bat and cmd files are not always considered executable in cygwin causing which
25731    # to not find them
25732    if test "x$new_path" = x \
25733             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25734             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25735      new_path=`$CYGPATH -u "$path"`
25736    fi
25737    if test "x$new_path" = x; then
25738      # It's still not found. Now this is an unrecoverable error.
25739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25740$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25741      has_space=`$ECHO "$complete" | $GREP " "`
25742      if test "x$has_space" != x; then
25743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25745      fi
25746      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25747    fi
25748  fi
25749
25750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25753  # "foo.exe" is OK but "foo" is an error.
25754  #
25755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25756  # It is also a way to make sure we got the proper file name for the real test later on.
25757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25758  if test "x$test_shortpath" = x; then
25759    # Short path failed, file does not exist as specified.
25760    # Try adding .exe or .cmd
25761    if test -f "${new_path}.exe"; then
25762       input_to_shortpath="${new_path}.exe"
25763    elif test -f "${new_path}.cmd"; then
25764       input_to_shortpath="${new_path}.cmd"
25765    else
25766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
25767$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
25768      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25769$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25770      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25771    fi
25772  else
25773    input_to_shortpath="$new_path"
25774  fi
25775
25776  # Call helper function which possibly converts this using DOS-style short mode.
25777  # If so, the updated path is stored in $new_path.
25778  new_path="$input_to_shortpath"
25779
25780  input_path="$input_to_shortpath"
25781  # Check if we need to convert this using DOS-style short mode. If the path
25782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25783  # take no chances and rewrite it.
25784  # Note: m4 eats our [], so we need to use [ and ] instead.
25785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25786  if test "x$has_forbidden_chars" != x; then
25787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25791      # Going to short mode and back again did indeed matter. Since short mode is
25792      # case insensitive, let's make it lowercase to improve readability.
25793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25794      # Now convert it back to Unix-stile (cygpath)
25795      input_path=`$CYGPATH -u "$shortmode_path"`
25796      new_path="$input_path"
25797    fi
25798  fi
25799
25800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25801  if test "x$test_cygdrive_prefix" = x; then
25802    # As a simple fix, exclude /usr/bin since it's not a real path.
25803    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25805      # a path prefixed by /cygdrive for fixpath to work.
25806      new_path="$CYGWIN_ROOT_PATH$input_path"
25807    fi
25808  fi
25809
25810  # remove trailing .exe if any
25811  new_path="${new_path/%.exe/}"
25812
25813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25814
25815  # First separate the path from the arguments. This will split at the first
25816  # space.
25817  complete="$OBJCOPY"
25818  path="${complete%% *}"
25819  tmp="$complete EOL"
25820  arguments="${tmp#* }"
25821
25822  # Input might be given as Windows format, start by converting to
25823  # unix format.
25824  new_path="$path"
25825
25826  windows_path="$new_path"
25827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25828    unix_path=`$CYGPATH -u "$windows_path"`
25829    new_path="$unix_path"
25830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25832    new_path="$unix_path"
25833  fi
25834
25835
25836  # Now try to locate executable using which
25837  new_path=`$WHICH "$new_path" 2> /dev/null`
25838
25839  if test "x$new_path" = x; then
25840    # Oops. Which didn't find the executable.
25841    # The splitting of arguments from the executable at a space might have been incorrect,
25842    # since paths with space are more likely in Windows. Give it another try with the whole
25843    # argument.
25844    path="$complete"
25845    arguments="EOL"
25846    new_path="$path"
25847
25848  windows_path="$new_path"
25849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25850    unix_path=`$CYGPATH -u "$windows_path"`
25851    new_path="$unix_path"
25852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25854    new_path="$unix_path"
25855  fi
25856
25857
25858    new_path=`$WHICH "$new_path" 2> /dev/null`
25859
25860    if test "x$new_path" = x; then
25861      # It's still not found. Now this is an unrecoverable error.
25862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25863$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25864      has_space=`$ECHO "$complete" | $GREP " "`
25865      if test "x$has_space" != x; then
25866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25868      fi
25869      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25870    fi
25871  fi
25872
25873  # Now new_path has a complete unix path to the binary
25874  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25875    # Keep paths in /bin as-is, but remove trailing .exe if any
25876    new_path="${new_path/%.exe/}"
25877    # Do not save /bin paths to all_fixpath_prefixes!
25878  else
25879    # Not in mixed or Windows style, start by that.
25880    new_path=`cmd //c echo $new_path`
25881
25882  input_path="$new_path"
25883  # Check if we need to convert this using DOS-style short mode. If the path
25884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25885  # take no chances and rewrite it.
25886  # Note: m4 eats our [], so we need to use [ and ] instead.
25887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25888  if test "x$has_forbidden_chars" != x; then
25889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25891  fi
25892
25893    # Output is in $new_path
25894
25895  windows_path="$new_path"
25896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25897    unix_path=`$CYGPATH -u "$windows_path"`
25898    new_path="$unix_path"
25899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25901    new_path="$unix_path"
25902  fi
25903
25904    # remove trailing .exe if any
25905    new_path="${new_path/%.exe/}"
25906
25907    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25908    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25909  fi
25910
25911  else
25912    # We're on a posix platform. Hooray! :)
25913    # First separate the path from the arguments. This will split at the first
25914    # space.
25915    complete="$OBJCOPY"
25916    path="${complete%% *}"
25917    tmp="$complete EOL"
25918    arguments="${tmp#* }"
25919
25920    new_path=`$WHICH $path 2> /dev/null`
25921    if test "x$new_path" = x; then
25922      is_absolute_path=`$ECHO "$path" | $GREP ^/`
25923      if test "x$is_absolute_path" != x; then
25924        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&5
25925$as_echo "$as_me: Resolving OBJCOPY (as $path) with 'which' failed, using $path directly." >&6;}
25926        new_path="$path"
25927      else
25928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
25929$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
25930        has_space=`$ECHO "$complete" | $GREP " "`
25931        if test "x$has_space" != x; then
25932          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25933$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25934        fi
25935        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
25936      fi
25937    fi
25938  fi
25939
25940  # Now join together the path and the arguments once again
25941  if test "x$arguments" != xEOL; then
25942      new_complete="$new_path ${arguments% *}"
25943  else
25944      new_complete="$new_path"
25945  fi
25946
25947  if test "x$complete" != "x$new_complete"; then
25948    OBJCOPY="$new_complete"
25949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
25950$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
25951  fi
25952
25953    fi
25954fi
25955
25956if test -n "$ac_tool_prefix"; then
25957  for ac_prog in gobjdump objdump
25958  do
25959    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25960set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25962$as_echo_n "checking for $ac_word... " >&6; }
25963if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
25964  $as_echo_n "(cached) " >&6
25965else
25966  if test -n "$OBJDUMP"; then
25967  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
25968else
25969as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25970for as_dir in $PATH
25971do
25972  IFS=$as_save_IFS
25973  test -z "$as_dir" && as_dir=.
25974    for ac_exec_ext in '' $ac_executable_extensions; do
25975  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25976    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
25977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25978    break 2
25979  fi
25980done
25981  done
25982IFS=$as_save_IFS
25983
25984fi
25985fi
25986OBJDUMP=$ac_cv_prog_OBJDUMP
25987if test -n "$OBJDUMP"; then
25988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
25989$as_echo "$OBJDUMP" >&6; }
25990else
25991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25992$as_echo "no" >&6; }
25993fi
25994
25995
25996    test -n "$OBJDUMP" && break
25997  done
25998fi
25999if test -z "$OBJDUMP"; then
26000  ac_ct_OBJDUMP=$OBJDUMP
26001  for ac_prog in gobjdump objdump
26002do
26003  # Extract the first word of "$ac_prog", so it can be a program name with args.
26004set dummy $ac_prog; ac_word=$2
26005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26006$as_echo_n "checking for $ac_word... " >&6; }
26007if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26008  $as_echo_n "(cached) " >&6
26009else
26010  if test -n "$ac_ct_OBJDUMP"; then
26011  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26012else
26013as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26014for as_dir in $PATH
26015do
26016  IFS=$as_save_IFS
26017  test -z "$as_dir" && as_dir=.
26018    for ac_exec_ext in '' $ac_executable_extensions; do
26019  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26020    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26022    break 2
26023  fi
26024done
26025  done
26026IFS=$as_save_IFS
26027
26028fi
26029fi
26030ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26031if test -n "$ac_ct_OBJDUMP"; then
26032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26033$as_echo "$ac_ct_OBJDUMP" >&6; }
26034else
26035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26036$as_echo "no" >&6; }
26037fi
26038
26039
26040  test -n "$ac_ct_OBJDUMP" && break
26041done
26042
26043  if test "x$ac_ct_OBJDUMP" = x; then
26044    OBJDUMP=""
26045  else
26046    case $cross_compiling:$ac_tool_warned in
26047yes:)
26048{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26049$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26050ac_tool_warned=yes ;;
26051esac
26052    OBJDUMP=$ac_ct_OBJDUMP
26053  fi
26054fi
26055
26056if test "x$OBJDUMP" != x; then
26057  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26058
26059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26060
26061  # First separate the path from the arguments. This will split at the first
26062  # space.
26063  complete="$OBJDUMP"
26064  path="${complete%% *}"
26065  tmp="$complete EOL"
26066  arguments="${tmp#* }"
26067
26068  # Input might be given as Windows format, start by converting to
26069  # unix format.
26070  new_path=`$CYGPATH -u "$path"`
26071
26072  # Now try to locate executable using which
26073  new_path=`$WHICH "$new_path" 2> /dev/null`
26074  # bat and cmd files are not always considered executable in cygwin causing which
26075  # to not find them
26076  if test "x$new_path" = x \
26077           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26078           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26079    new_path=`$CYGPATH -u "$path"`
26080  fi
26081  if test "x$new_path" = x; then
26082    # Oops. Which didn't find the executable.
26083    # The splitting of arguments from the executable at a space might have been incorrect,
26084    # since paths with space are more likely in Windows. Give it another try with the whole
26085    # argument.
26086    path="$complete"
26087    arguments="EOL"
26088    new_path=`$CYGPATH -u "$path"`
26089    new_path=`$WHICH "$new_path" 2> /dev/null`
26090    # bat and cmd files are not always considered executable in cygwin causing which
26091    # to not find them
26092    if test "x$new_path" = x \
26093             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26094             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26095      new_path=`$CYGPATH -u "$path"`
26096    fi
26097    if test "x$new_path" = x; then
26098      # It's still not found. Now this is an unrecoverable error.
26099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26100$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26101      has_space=`$ECHO "$complete" | $GREP " "`
26102      if test "x$has_space" != x; then
26103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26105      fi
26106      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26107    fi
26108  fi
26109
26110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26113  # "foo.exe" is OK but "foo" is an error.
26114  #
26115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26116  # It is also a way to make sure we got the proper file name for the real test later on.
26117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26118  if test "x$test_shortpath" = x; then
26119    # Short path failed, file does not exist as specified.
26120    # Try adding .exe or .cmd
26121    if test -f "${new_path}.exe"; then
26122       input_to_shortpath="${new_path}.exe"
26123    elif test -f "${new_path}.cmd"; then
26124       input_to_shortpath="${new_path}.cmd"
26125    else
26126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26127$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26128      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26129$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26130      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26131    fi
26132  else
26133    input_to_shortpath="$new_path"
26134  fi
26135
26136  # Call helper function which possibly converts this using DOS-style short mode.
26137  # If so, the updated path is stored in $new_path.
26138  new_path="$input_to_shortpath"
26139
26140  input_path="$input_to_shortpath"
26141  # Check if we need to convert this using DOS-style short mode. If the path
26142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26143  # take no chances and rewrite it.
26144  # Note: m4 eats our [], so we need to use [ and ] instead.
26145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26146  if test "x$has_forbidden_chars" != x; then
26147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26151      # Going to short mode and back again did indeed matter. Since short mode is
26152      # case insensitive, let's make it lowercase to improve readability.
26153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26154      # Now convert it back to Unix-stile (cygpath)
26155      input_path=`$CYGPATH -u "$shortmode_path"`
26156      new_path="$input_path"
26157    fi
26158  fi
26159
26160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26161  if test "x$test_cygdrive_prefix" = x; then
26162    # As a simple fix, exclude /usr/bin since it's not a real path.
26163    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26165      # a path prefixed by /cygdrive for fixpath to work.
26166      new_path="$CYGWIN_ROOT_PATH$input_path"
26167    fi
26168  fi
26169
26170  # remove trailing .exe if any
26171  new_path="${new_path/%.exe/}"
26172
26173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26174
26175  # First separate the path from the arguments. This will split at the first
26176  # space.
26177  complete="$OBJDUMP"
26178  path="${complete%% *}"
26179  tmp="$complete EOL"
26180  arguments="${tmp#* }"
26181
26182  # Input might be given as Windows format, start by converting to
26183  # unix format.
26184  new_path="$path"
26185
26186  windows_path="$new_path"
26187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26188    unix_path=`$CYGPATH -u "$windows_path"`
26189    new_path="$unix_path"
26190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26192    new_path="$unix_path"
26193  fi
26194
26195
26196  # Now try to locate executable using which
26197  new_path=`$WHICH "$new_path" 2> /dev/null`
26198
26199  if test "x$new_path" = x; then
26200    # Oops. Which didn't find the executable.
26201    # The splitting of arguments from the executable at a space might have been incorrect,
26202    # since paths with space are more likely in Windows. Give it another try with the whole
26203    # argument.
26204    path="$complete"
26205    arguments="EOL"
26206    new_path="$path"
26207
26208  windows_path="$new_path"
26209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26210    unix_path=`$CYGPATH -u "$windows_path"`
26211    new_path="$unix_path"
26212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26214    new_path="$unix_path"
26215  fi
26216
26217
26218    new_path=`$WHICH "$new_path" 2> /dev/null`
26219
26220    if test "x$new_path" = x; then
26221      # It's still not found. Now this is an unrecoverable error.
26222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26223$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26224      has_space=`$ECHO "$complete" | $GREP " "`
26225      if test "x$has_space" != x; then
26226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26228      fi
26229      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26230    fi
26231  fi
26232
26233  # Now new_path has a complete unix path to the binary
26234  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26235    # Keep paths in /bin as-is, but remove trailing .exe if any
26236    new_path="${new_path/%.exe/}"
26237    # Do not save /bin paths to all_fixpath_prefixes!
26238  else
26239    # Not in mixed or Windows style, start by that.
26240    new_path=`cmd //c echo $new_path`
26241
26242  input_path="$new_path"
26243  # Check if we need to convert this using DOS-style short mode. If the path
26244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26245  # take no chances and rewrite it.
26246  # Note: m4 eats our [], so we need to use [ and ] instead.
26247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26248  if test "x$has_forbidden_chars" != x; then
26249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26251  fi
26252
26253    # Output is in $new_path
26254
26255  windows_path="$new_path"
26256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26257    unix_path=`$CYGPATH -u "$windows_path"`
26258    new_path="$unix_path"
26259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26261    new_path="$unix_path"
26262  fi
26263
26264    # remove trailing .exe if any
26265    new_path="${new_path/%.exe/}"
26266
26267    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26268    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26269  fi
26270
26271  else
26272    # We're on a posix platform. Hooray! :)
26273    # First separate the path from the arguments. This will split at the first
26274    # space.
26275    complete="$OBJDUMP"
26276    path="${complete%% *}"
26277    tmp="$complete EOL"
26278    arguments="${tmp#* }"
26279
26280    new_path=`$WHICH $path 2> /dev/null`
26281    if test "x$new_path" = x; then
26282      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26283      if test "x$is_absolute_path" != x; then
26284        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&5
26285$as_echo "$as_me: Resolving OBJDUMP (as $path) with 'which' failed, using $path directly." >&6;}
26286        new_path="$path"
26287      else
26288        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26289$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26290        has_space=`$ECHO "$complete" | $GREP " "`
26291        if test "x$has_space" != x; then
26292          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26293$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26294        fi
26295        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26296      fi
26297    fi
26298  fi
26299
26300  # Now join together the path and the arguments once again
26301  if test "x$arguments" != xEOL; then
26302      new_complete="$new_path ${arguments% *}"
26303  else
26304      new_complete="$new_path"
26305  fi
26306
26307  if test "x$complete" != "x$new_complete"; then
26308    OBJDUMP="$new_complete"
26309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26310$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26311  fi
26312
26313fi
26314
26315if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26316   # Extract the first word of "lipo", so it can be a program name with args.
26317set dummy lipo; ac_word=$2
26318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26319$as_echo_n "checking for $ac_word... " >&6; }
26320if test "${ac_cv_path_LIPO+set}" = set; then :
26321  $as_echo_n "(cached) " >&6
26322else
26323  case $LIPO in
26324  [\\/]* | ?:[\\/]*)
26325  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26326  ;;
26327  *)
26328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26329for as_dir in $PATH
26330do
26331  IFS=$as_save_IFS
26332  test -z "$as_dir" && as_dir=.
26333    for ac_exec_ext in '' $ac_executable_extensions; do
26334  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26335    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26337    break 2
26338  fi
26339done
26340  done
26341IFS=$as_save_IFS
26342
26343  ;;
26344esac
26345fi
26346LIPO=$ac_cv_path_LIPO
26347if test -n "$LIPO"; then
26348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
26349$as_echo "$LIPO" >&6; }
26350else
26351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26352$as_echo "no" >&6; }
26353fi
26354
26355
26356
26357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26358
26359  # First separate the path from the arguments. This will split at the first
26360  # space.
26361  complete="$LIPO"
26362  path="${complete%% *}"
26363  tmp="$complete EOL"
26364  arguments="${tmp#* }"
26365
26366  # Input might be given as Windows format, start by converting to
26367  # unix format.
26368  new_path=`$CYGPATH -u "$path"`
26369
26370  # Now try to locate executable using which
26371  new_path=`$WHICH "$new_path" 2> /dev/null`
26372  # bat and cmd files are not always considered executable in cygwin causing which
26373  # to not find them
26374  if test "x$new_path" = x \
26375           && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26376           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26377    new_path=`$CYGPATH -u "$path"`
26378  fi
26379  if test "x$new_path" = x; then
26380    # Oops. Which didn't find the executable.
26381    # The splitting of arguments from the executable at a space might have been incorrect,
26382    # since paths with space are more likely in Windows. Give it another try with the whole
26383    # argument.
26384    path="$complete"
26385    arguments="EOL"
26386    new_path=`$CYGPATH -u "$path"`
26387    new_path=`$WHICH "$new_path" 2> /dev/null`
26388    # bat and cmd files are not always considered executable in cygwin causing which
26389    # to not find them
26390    if test "x$new_path" = x \
26391             && test "x`$ECHO \"$path\" | $GREP -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26392             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26393      new_path=`$CYGPATH -u "$path"`
26394    fi
26395    if test "x$new_path" = x; then
26396      # It's still not found. Now this is an unrecoverable error.
26397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26398$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26399      has_space=`$ECHO "$complete" | $GREP " "`
26400      if test "x$has_space" != x; then
26401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26403      fi
26404      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26405    fi
26406  fi
26407
26408  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26409  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26410  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26411  # "foo.exe" is OK but "foo" is an error.
26412  #
26413  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26414  # It is also a way to make sure we got the proper file name for the real test later on.
26415  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26416  if test "x$test_shortpath" = x; then
26417    # Short path failed, file does not exist as specified.
26418    # Try adding .exe or .cmd
26419    if test -f "${new_path}.exe"; then
26420       input_to_shortpath="${new_path}.exe"
26421    elif test -f "${new_path}.cmd"; then
26422       input_to_shortpath="${new_path}.cmd"
26423    else
26424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
26425$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
26426      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26427$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26428      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26429    fi
26430  else
26431    input_to_shortpath="$new_path"
26432  fi
26433
26434  # Call helper function which possibly converts this using DOS-style short mode.
26435  # If so, the updated path is stored in $new_path.
26436  new_path="$input_to_shortpath"
26437
26438  input_path="$input_to_shortpath"
26439  # Check if we need to convert this using DOS-style short mode. If the path
26440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26441  # take no chances and rewrite it.
26442  # Note: m4 eats our [], so we need to use [ and ] instead.
26443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26444  if test "x$has_forbidden_chars" != x; then
26445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26449      # Going to short mode and back again did indeed matter. Since short mode is
26450      # case insensitive, let's make it lowercase to improve readability.
26451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26452      # Now convert it back to Unix-stile (cygpath)
26453      input_path=`$CYGPATH -u "$shortmode_path"`
26454      new_path="$input_path"
26455    fi
26456  fi
26457
26458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26459  if test "x$test_cygdrive_prefix" = x; then
26460    # As a simple fix, exclude /usr/bin since it's not a real path.
26461    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26463      # a path prefixed by /cygdrive for fixpath to work.
26464      new_path="$CYGWIN_ROOT_PATH$input_path"
26465    fi
26466  fi
26467
26468  # remove trailing .exe if any
26469  new_path="${new_path/%.exe/}"
26470
26471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26472
26473  # First separate the path from the arguments. This will split at the first
26474  # space.
26475  complete="$LIPO"
26476  path="${complete%% *}"
26477  tmp="$complete EOL"
26478  arguments="${tmp#* }"
26479
26480  # Input might be given as Windows format, start by converting to
26481  # unix format.
26482  new_path="$path"
26483
26484  windows_path="$new_path"
26485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26486    unix_path=`$CYGPATH -u "$windows_path"`
26487    new_path="$unix_path"
26488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26490    new_path="$unix_path"
26491  fi
26492
26493
26494  # Now try to locate executable using which
26495  new_path=`$WHICH "$new_path" 2> /dev/null`
26496
26497  if test "x$new_path" = x; then
26498    # Oops. Which didn't find the executable.
26499    # The splitting of arguments from the executable at a space might have been incorrect,
26500    # since paths with space are more likely in Windows. Give it another try with the whole
26501    # argument.
26502    path="$complete"
26503    arguments="EOL"
26504    new_path="$path"
26505
26506  windows_path="$new_path"
26507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26508    unix_path=`$CYGPATH -u "$windows_path"`
26509    new_path="$unix_path"
26510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26512    new_path="$unix_path"
26513  fi
26514
26515
26516    new_path=`$WHICH "$new_path" 2> /dev/null`
26517
26518    if test "x$new_path" = x; then
26519      # It's still not found. Now this is an unrecoverable error.
26520      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26521$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26522      has_space=`$ECHO "$complete" | $GREP " "`
26523      if test "x$has_space" != x; then
26524        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26525$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26526      fi
26527      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26528    fi
26529  fi
26530
26531  # Now new_path has a complete unix path to the binary
26532  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26533    # Keep paths in /bin as-is, but remove trailing .exe if any
26534    new_path="${new_path/%.exe/}"
26535    # Do not save /bin paths to all_fixpath_prefixes!
26536  else
26537    # Not in mixed or Windows style, start by that.
26538    new_path=`cmd //c echo $new_path`
26539
26540  input_path="$new_path"
26541  # Check if we need to convert this using DOS-style short mode. If the path
26542  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26543  # take no chances and rewrite it.
26544  # Note: m4 eats our [], so we need to use [ and ] instead.
26545  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26546  if test "x$has_forbidden_chars" != x; then
26547    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26548    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26549  fi
26550
26551    # Output is in $new_path
26552
26553  windows_path="$new_path"
26554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26555    unix_path=`$CYGPATH -u "$windows_path"`
26556    new_path="$unix_path"
26557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26559    new_path="$unix_path"
26560  fi
26561
26562    # remove trailing .exe if any
26563    new_path="${new_path/%.exe/}"
26564
26565    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26566    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26567  fi
26568
26569  else
26570    # We're on a posix platform. Hooray! :)
26571    # First separate the path from the arguments. This will split at the first
26572    # space.
26573    complete="$LIPO"
26574    path="${complete%% *}"
26575    tmp="$complete EOL"
26576    arguments="${tmp#* }"
26577
26578    new_path=`$WHICH $path 2> /dev/null`
26579    if test "x$new_path" = x; then
26580      is_absolute_path=`$ECHO "$path" | $GREP ^/`
26581      if test "x$is_absolute_path" != x; then
26582        { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&5
26583$as_echo "$as_me: Resolving LIPO (as $path) with 'which' failed, using $path directly." >&6;}
26584        new_path="$path"
26585      else
26586        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
26587$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
26588        has_space=`$ECHO "$complete" | $GREP " "`
26589        if test "x$has_space" != x; then
26590          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26591$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26592        fi
26593        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
26594      fi
26595    fi
26596  fi
26597
26598  # Now join together the path and the arguments once again
26599  if test "x$arguments" != xEOL; then
26600      new_complete="$new_path ${arguments% *}"
26601  else
26602      new_complete="$new_path"
26603  fi
26604
26605  if test "x$complete" != "x$new_complete"; then
26606    LIPO="$new_complete"
26607    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
26608$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
26609  fi
26610
26611fi
26612
26613# Restore old path without tools dir
26614PATH="$OLD_PATH"
26615
26616
26617# FIXME: Currently we must test this after paths but before flags. Fix!
26618
26619# And we can test some aspects on the target using configure macros.
26620
26621
26622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
26623$as_echo_n "checking for ANSI C header files... " >&6; }
26624if test "${ac_cv_header_stdc+set}" = set; then :
26625  $as_echo_n "(cached) " >&6
26626else
26627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26628/* end confdefs.h.  */
26629#include <stdlib.h>
26630#include <stdarg.h>
26631#include <string.h>
26632#include <float.h>
26633
26634int
26635main ()
26636{
26637
26638  ;
26639  return 0;
26640}
26641_ACEOF
26642if ac_fn_cxx_try_compile "$LINENO"; then :
26643  ac_cv_header_stdc=yes
26644else
26645  ac_cv_header_stdc=no
26646fi
26647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26648
26649if test $ac_cv_header_stdc = yes; then
26650  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
26651  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26652/* end confdefs.h.  */
26653#include <string.h>
26654
26655_ACEOF
26656if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26657  $EGREP "memchr" >/dev/null 2>&1; then :
26658
26659else
26660  ac_cv_header_stdc=no
26661fi
26662rm -f conftest*
26663
26664fi
26665
26666if test $ac_cv_header_stdc = yes; then
26667  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
26668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26669/* end confdefs.h.  */
26670#include <stdlib.h>
26671
26672_ACEOF
26673if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26674  $EGREP "free" >/dev/null 2>&1; then :
26675
26676else
26677  ac_cv_header_stdc=no
26678fi
26679rm -f conftest*
26680
26681fi
26682
26683if test $ac_cv_header_stdc = yes; then
26684  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
26685  if test "$cross_compiling" = yes; then :
26686  :
26687else
26688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26689/* end confdefs.h.  */
26690#include <ctype.h>
26691#include <stdlib.h>
26692#if ((' ' & 0x0FF) == 0x020)
26693# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
26694# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
26695#else
26696# define ISLOWER(c) \
26697		   (('a' <= (c) && (c) <= 'i') \
26698		     || ('j' <= (c) && (c) <= 'r') \
26699		     || ('s' <= (c) && (c) <= 'z'))
26700# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
26701#endif
26702
26703#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
26704int
26705main ()
26706{
26707  int i;
26708  for (i = 0; i < 256; i++)
26709    if (XOR (islower (i), ISLOWER (i))
26710	|| toupper (i) != TOUPPER (i))
26711      return 2;
26712  return 0;
26713}
26714_ACEOF
26715if ac_fn_cxx_try_run "$LINENO"; then :
26716
26717else
26718  ac_cv_header_stdc=no
26719fi
26720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26721  conftest.$ac_objext conftest.beam conftest.$ac_ext
26722fi
26723
26724fi
26725fi
26726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
26727$as_echo "$ac_cv_header_stdc" >&6; }
26728if test $ac_cv_header_stdc = yes; then
26729
26730$as_echo "#define STDC_HEADERS 1" >>confdefs.h
26731
26732fi
26733
26734# On IRIX 5.3, sys/types and inttypes.h are conflicting.
26735for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
26736		  inttypes.h stdint.h unistd.h
26737do :
26738  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
26739ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
26740"
26741if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
26742  cat >>confdefs.h <<_ACEOF
26743#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
26744_ACEOF
26745
26746fi
26747
26748done
26749
26750
26751
26752###############################################################################
26753#
26754# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
26755# (The JVM can use 32 or 64 bit Java pointers but that decision
26756# is made at runtime.)
26757#
26758if test "x$OPENJDK_TARGET_OS" = xsolaris; then
26759  # Always specify -m flags on Solaris
26760
26761  # keep track of c/cxx flags that we added outselves...
26762  #   to prevent emitting warning...
26763  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26764  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26765  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26766
26767  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26768  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26769  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26770
26771  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26772  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26773  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26774
26775elif test "x$COMPILE_TYPE" = xreduced; then
26776  if test "x$OPENJDK_TARGET_OS" != xwindows; then
26777    # Specify -m if running reduced on other Posix platforms
26778
26779  # keep track of c/cxx flags that we added outselves...
26780  #   to prevent emitting warning...
26781  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26782  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26783  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
26784
26785  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
26786  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
26787  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
26788
26789  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
26790  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
26791  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
26792
26793  fi
26794fi
26795
26796# Make compilation sanity check
26797for ac_header in stdio.h
26798do :
26799  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
26800if test "x$ac_cv_header_stdio_h" = x""yes; then :
26801  cat >>confdefs.h <<_ACEOF
26802#define HAVE_STDIO_H 1
26803_ACEOF
26804
26805else
26806
26807  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
26808$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
26809  if test "x$COMPILE_TYPE" = xreduced; then
26810    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
26811$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
26812  elif test "x$COMPILE_TYPE" = xcross; then
26813    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
26814$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
26815  fi
26816  as_fn_error $? "Cannot continue." "$LINENO" 5
26817
26818fi
26819
26820done
26821
26822
26823# The cast to long int works around a bug in the HP C Compiler
26824# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
26825# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
26826# This bug is HP SR number 8606223364.
26827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
26828$as_echo_n "checking size of int *... " >&6; }
26829if test "${ac_cv_sizeof_int_p+set}" = set; then :
26830  $as_echo_n "(cached) " >&6
26831else
26832  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
26833
26834else
26835  if test "$ac_cv_type_int_p" = yes; then
26836     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
26837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26838as_fn_error 77 "cannot compute sizeof (int *)
26839See \`config.log' for more details" "$LINENO" 5 ; }
26840   else
26841     ac_cv_sizeof_int_p=0
26842   fi
26843fi
26844
26845fi
26846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
26847$as_echo "$ac_cv_sizeof_int_p" >&6; }
26848
26849
26850
26851cat >>confdefs.h <<_ACEOF
26852#define SIZEOF_INT_P $ac_cv_sizeof_int_p
26853_ACEOF
26854
26855
26856
26857if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
26858  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
26859  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
26860fi
26861
26862if test "x$SIZEOF_INT_P" = x; then
26863    # The test failed, lets stick to the assumed value.
26864    { $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
26865$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
26866else
26867    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
26868
26869    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
26870        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
26871    fi
26872fi
26873
26874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
26875$as_echo_n "checking for target address size... " >&6; }
26876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
26877$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
26878
26879
26880###############################################################################
26881#
26882# Is the target little of big endian?
26883#
26884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
26885$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
26886if test "${ac_cv_c_bigendian+set}" = set; then :
26887  $as_echo_n "(cached) " >&6
26888else
26889  ac_cv_c_bigendian=unknown
26890    # See if we're dealing with a universal compiler.
26891    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26892/* end confdefs.h.  */
26893#ifndef __APPLE_CC__
26894	       not a universal capable compiler
26895	     #endif
26896	     typedef int dummy;
26897
26898_ACEOF
26899if ac_fn_cxx_try_compile "$LINENO"; then :
26900
26901	# Check for potential -arch flags.  It is not universal unless
26902	# there are at least two -arch flags with different values.
26903	ac_arch=
26904	ac_prev=
26905	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
26906	 if test -n "$ac_prev"; then
26907	   case $ac_word in
26908	     i?86 | x86_64 | ppc | ppc64)
26909	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
26910		 ac_arch=$ac_word
26911	       else
26912		 ac_cv_c_bigendian=universal
26913		 break
26914	       fi
26915	       ;;
26916	   esac
26917	   ac_prev=
26918	 elif test "x$ac_word" = "x-arch"; then
26919	   ac_prev=arch
26920	 fi
26921       done
26922fi
26923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26924    if test $ac_cv_c_bigendian = unknown; then
26925      # See if sys/param.h defines the BYTE_ORDER macro.
26926      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26927/* end confdefs.h.  */
26928#include <sys/types.h>
26929	     #include <sys/param.h>
26930
26931int
26932main ()
26933{
26934#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
26935		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
26936		     && LITTLE_ENDIAN)
26937	      bogus endian macros
26938	     #endif
26939
26940  ;
26941  return 0;
26942}
26943_ACEOF
26944if ac_fn_cxx_try_compile "$LINENO"; then :
26945  # It does; now see whether it defined to BIG_ENDIAN or not.
26946	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26947/* end confdefs.h.  */
26948#include <sys/types.h>
26949		#include <sys/param.h>
26950
26951int
26952main ()
26953{
26954#if BYTE_ORDER != BIG_ENDIAN
26955		 not big endian
26956		#endif
26957
26958  ;
26959  return 0;
26960}
26961_ACEOF
26962if ac_fn_cxx_try_compile "$LINENO"; then :
26963  ac_cv_c_bigendian=yes
26964else
26965  ac_cv_c_bigendian=no
26966fi
26967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26968fi
26969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26970    fi
26971    if test $ac_cv_c_bigendian = unknown; then
26972      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
26973      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26974/* end confdefs.h.  */
26975#include <limits.h>
26976
26977int
26978main ()
26979{
26980#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
26981	      bogus endian macros
26982	     #endif
26983
26984  ;
26985  return 0;
26986}
26987_ACEOF
26988if ac_fn_cxx_try_compile "$LINENO"; then :
26989  # It does; now see whether it defined to _BIG_ENDIAN or not.
26990	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26991/* end confdefs.h.  */
26992#include <limits.h>
26993
26994int
26995main ()
26996{
26997#ifndef _BIG_ENDIAN
26998		 not big endian
26999		#endif
27000
27001  ;
27002  return 0;
27003}
27004_ACEOF
27005if ac_fn_cxx_try_compile "$LINENO"; then :
27006  ac_cv_c_bigendian=yes
27007else
27008  ac_cv_c_bigendian=no
27009fi
27010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27011fi
27012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27013    fi
27014    if test $ac_cv_c_bigendian = unknown; then
27015      # Compile a test program.
27016      if test "$cross_compiling" = yes; then :
27017  # Try to guess by grepping values from an object file.
27018	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27019/* end confdefs.h.  */
27020short int ascii_mm[] =
27021		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27022		short int ascii_ii[] =
27023		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27024		int use_ascii (int i) {
27025		  return ascii_mm[i] + ascii_ii[i];
27026		}
27027		short int ebcdic_ii[] =
27028		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27029		short int ebcdic_mm[] =
27030		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27031		int use_ebcdic (int i) {
27032		  return ebcdic_mm[i] + ebcdic_ii[i];
27033		}
27034		extern int foo;
27035
27036int
27037main ()
27038{
27039return use_ascii (foo) == use_ebcdic (foo);
27040  ;
27041  return 0;
27042}
27043_ACEOF
27044if ac_fn_cxx_try_compile "$LINENO"; then :
27045  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27046	      ac_cv_c_bigendian=yes
27047	    fi
27048	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27049	      if test "$ac_cv_c_bigendian" = unknown; then
27050		ac_cv_c_bigendian=no
27051	      else
27052		# finding both strings is unlikely to happen, but who knows?
27053		ac_cv_c_bigendian=unknown
27054	      fi
27055	    fi
27056fi
27057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27058else
27059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27060/* end confdefs.h.  */
27061$ac_includes_default
27062int
27063main ()
27064{
27065
27066	     /* Are we little or big endian?  From Harbison&Steele.  */
27067	     union
27068	     {
27069	       long int l;
27070	       char c[sizeof (long int)];
27071	     } u;
27072	     u.l = 1;
27073	     return u.c[sizeof (long int) - 1] == 1;
27074
27075  ;
27076  return 0;
27077}
27078_ACEOF
27079if ac_fn_cxx_try_run "$LINENO"; then :
27080  ac_cv_c_bigendian=no
27081else
27082  ac_cv_c_bigendian=yes
27083fi
27084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27085  conftest.$ac_objext conftest.beam conftest.$ac_ext
27086fi
27087
27088    fi
27089fi
27090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27091$as_echo "$ac_cv_c_bigendian" >&6; }
27092 case $ac_cv_c_bigendian in #(
27093   yes)
27094     ENDIAN="big";; #(
27095   no)
27096     ENDIAN="little" ;; #(
27097   universal)
27098     ENDIAN="universal_endianness"
27099     ;; #(
27100   *)
27101     ENDIAN="unknown" ;;
27102 esac
27103
27104
27105if test "x$ENDIAN" = xuniversal_endianness; then
27106    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27107fi
27108if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27109    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
27110fi
27111
27112
27113# Configure flags for the tools
27114
27115
27116###############################################################################
27117#
27118# How to compile shared libraries.
27119#
27120
27121if test "x$GCC" = xyes; then
27122    COMPILER_NAME=gcc
27123    PICFLAG="-fPIC"
27124    LIBRARY_PREFIX=lib
27125    SHARED_LIBRARY='lib$1.so'
27126    STATIC_LIBRARY='lib$1.a'
27127    SHARED_LIBRARY_FLAGS="-shared"
27128    SHARED_LIBRARY_SUFFIX='.so'
27129    STATIC_LIBRARY_SUFFIX='.a'
27130    OBJ_SUFFIX='.o'
27131    EXE_SUFFIX=''
27132    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27133    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27134    C_FLAG_REORDER=''
27135    CXX_FLAG_REORDER=''
27136    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27137    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27138    LD="$CC"
27139    LDEXE="$CC"
27140    LDCXX="$CXX"
27141    LDEXECXX="$CXX"
27142    POST_STRIP_CMD="$STRIP -g"
27143
27144    # Linking is different on MacOSX
27145    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27146        # Might change in the future to clang.
27147        COMPILER_NAME=gcc
27148        SHARED_LIBRARY='lib$1.dylib'
27149        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27150        SHARED_LIBRARY_SUFFIX='.dylib'
27151        EXE_SUFFIX=''
27152        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27153        SET_SHARED_LIBRARY_MAPFILE=''
27154        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27155        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27156        POST_STRIP_CMD="$STRIP -S"
27157    fi
27158else
27159    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27160        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27161        COMPILER_NAME=ossc
27162        PICFLAG="-KPIC"
27163        LIBRARY_PREFIX=lib
27164        SHARED_LIBRARY='lib$1.so'
27165        STATIC_LIBRARY='lib$1.a'
27166        SHARED_LIBRARY_FLAGS="-G"
27167        SHARED_LIBRARY_SUFFIX='.so'
27168        STATIC_LIBRARY_SUFFIX='.a'
27169        OBJ_SUFFIX='.o'
27170        EXE_SUFFIX=''
27171        SET_SHARED_LIBRARY_NAME=''
27172        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27173	C_FLAG_REORDER='-xF'
27174	CXX_FLAG_REORDER='-xF'
27175        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27176        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27177        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27178        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27179        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27180        POST_STRIP_CMD="$STRIP -x"
27181        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27182    fi
27183    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27184        # If it is not gcc, then assume it is the MS Visual Studio compiler
27185        COMPILER_NAME=cl
27186        PICFLAG=""
27187        LIBRARY_PREFIX=
27188        SHARED_LIBRARY='$1.dll'
27189        STATIC_LIBRARY='$1.lib'
27190        SHARED_LIBRARY_FLAGS="-LD"
27191        SHARED_LIBRARY_SUFFIX='.dll'
27192        STATIC_LIBRARY_SUFFIX='.lib'
27193        OBJ_SUFFIX='.obj'
27194        EXE_SUFFIX='.exe'
27195        SET_SHARED_LIBRARY_NAME=''
27196        SET_SHARED_LIBRARY_MAPFILE=''
27197        SET_SHARED_LIBRARY_ORIGIN=''
27198        SET_EXECUTABLE_ORIGIN=''
27199    fi
27200fi
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219# The (cross) compiler is now configured, we can now test capabilities
27220# of the target platform.
27221
27222
27223
27224###############################################################################
27225#
27226# Setup the opt flags for different compilers
27227# and different operating systems.
27228#
27229
27230#
27231# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27232#
27233if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27234    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27235    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27236    CFLAGS="$CFLAGS -mstackrealign"
27237    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27238$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27239    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27240/* end confdefs.h.  */
27241int main() { return 0; }
27242_ACEOF
27243if ac_fn_cxx_try_link "$LINENO"; then :
27244
27245		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27246$as_echo "yes" >&6; }
27247
27248else
27249
27250		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27251$as_echo "no" >&6; }
27252	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27253
27254fi
27255rm -f core conftest.err conftest.$ac_objext \
27256    conftest$ac_exeext conftest.$ac_ext
27257fi
27258
27259C_FLAG_DEPS="-MMD -MF"
27260CXX_FLAG_DEPS="-MMD -MF"
27261
27262case $COMPILER_TYPE in
27263  CC )
27264    D_FLAG="-g"
27265    case $COMPILER_NAME in
27266      gcc )
27267      	case $OPENJDK_TARGET_OS in
27268	  macosx )
27269	    # On MacOSX we optimize for size, something
27270	    # we should do for all platforms?
27271	    C_O_FLAG_HI="-Os"
27272	    C_O_FLAG_NORM="-Os"
27273	    C_O_FLAG_NONE=""
27274	    ;;
27275	  *)
27276	    C_O_FLAG_HI="-O3"
27277	    C_O_FLAG_NORM="-O2"
27278	    C_O_FLAG_NONE="-O0"
27279	    CFLAGS_DEBUG_SYMBOLS="-g"
27280	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27281	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27282	       CFLAGS_DEBUG_SYMBOLS="-g1"
27283	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27284	    fi
27285	    ;;
27286	esac
27287        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27288        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27289        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27290        ;;
27291      ossc )
27292        #
27293        # Forte has different names for this with their C++ compiler...
27294        #
27295        C_FLAG_DEPS="-xMMD -xMF"
27296        CXX_FLAG_DEPS="-xMMD -xMF"
27297
27298        # Extra options used with HIGHEST
27299        #
27300        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27301        #          done with care, there are some assumptions below that need to
27302        #          be understood about the use of pointers, and IEEE behavior.
27303        #
27304        # Use non-standard floating point mode (not IEEE 754)
27305        CC_HIGHEST="$CC_HIGHEST -fns"
27306        # Do some simplification of floating point arithmetic (not IEEE 754)
27307        CC_HIGHEST="$CC_HIGHEST -fsimple"
27308        # Use single precision floating point with 'float'
27309        CC_HIGHEST="$CC_HIGHEST -fsingle"
27310        # Assume memory references via basic pointer types do not alias
27311        #   (Source with excessing pointer casting and data access with mixed
27312        #    pointer types are not recommended)
27313        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27314        # Use intrinsic or inline versions for math/std functions
27315        #   (If you expect perfect errno behavior, do not use this)
27316        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27317        # Loop data dependency optimizations (need -xO3 or higher)
27318        CC_HIGHEST="$CC_HIGHEST -xdepend"
27319        # Pointer parameters to functions do not overlap
27320        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27321        #    If you pass in multiple pointers to the same data, do not use this)
27322        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27323        # Inline some library routines
27324        #   (If you expect perfect errno behavior, do not use this)
27325        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27326        # Use optimized math routines
27327        #   (If you expect perfect errno behavior, do not use this)
27328        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27329        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27330
27331        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
27332          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
27333          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
27334        fi
27335
27336        case $OPENJDK_TARGET_CPU_ARCH in
27337          x86)
27338            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
27339            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
27340            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
27341            C_O_FLAG_NONE="-xregs=no%frameptr"
27342            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
27343            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
27344            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
27345            CXX_O_FLAG_NONE="-xregs=no%frameptr"
27346            if test "x$OPENJDK_TARGET_CPU" = xx86; then
27347               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
27348               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
27349            fi
27350            ;;
27351          sparc)
27352            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27353            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
27354            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27355            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27356            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
27357            C_O_FLAG_NONE=""
27358            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
27359            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27360            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
27361            CXX_O_FLAG_NONE=""
27362            ;;
27363        esac
27364
27365    CFLAGS_DEBUG_SYMBOLS="-g -xs"
27366    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
27367    esac
27368    ;;
27369  CL )
27370    D_FLAG=
27371    C_O_FLAG_HIGHEST="-O2"
27372    C_O_FLAG_HI="-O1"
27373    C_O_FLAG_NORM="-O1"
27374    C_O_FLAG_NONE="-Od"
27375    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
27376    CXX_O_FLAG_HI="$C_O_FLAG_HI"
27377    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27378    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27379    ;;
27380esac
27381
27382if test -z "$C_O_FLAG_HIGHEST"; then
27383   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
27384fi
27385
27386if test -z "$CXX_O_FLAG_HIGHEST"; then
27387   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
27388fi
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
27404   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
27405$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
27406fi
27407
27408if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
27409   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
27410$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
27411fi
27412
27413if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
27414   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
27415$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
27416fi
27417
27418
27419# Check whether --with-extra-cflags was given.
27420if test "${with_extra_cflags+set}" = set; then :
27421  withval=$with_extra_cflags;
27422fi
27423
27424
27425
27426# Check whether --with-extra-cxxflags was given.
27427if test "${with_extra_cxxflags+set}" = set; then :
27428  withval=$with_extra_cxxflags;
27429fi
27430
27431
27432
27433# Check whether --with-extra-ldflags was given.
27434if test "${with_extra_ldflags+set}" = set; then :
27435  withval=$with_extra_ldflags;
27436fi
27437
27438
27439CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
27440CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
27441LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
27442
27443# Hotspot needs these set in their legacy form
27444LEGACY_EXTRA_CFLAGS=$with_extra_cflags
27445LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
27446LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
27447
27448
27449
27450
27451
27452###############################################################################
27453#
27454# Now setup the CFLAGS and LDFLAGS for the JDK build.
27455# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
27456#
27457case $COMPILER_NAME in
27458      gcc )
27459      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
27460                          -pipe \
27461                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
27462	  case $OPENJDK_TARGET_CPU_ARCH in
27463	  arm )
27464            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
27465	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27466	  ;;
27467	  ppc )
27468            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
27469	  ;;
27470	  * )
27471	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
27472	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
27473          ;;
27474	  esac
27475          ;;
27476      ossc )
27477          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
27478          case $OPENJDK_TARGET_CPU_ARCH in
27479          x86 )
27480            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
27481       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
27482          ;;
27483          esac
27484
27485      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
27486      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
27487
27488          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
27489          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
27490          ;;
27491      cl )
27492          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
27493               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
27494	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
27495	       -DWIN32 -DIAL"
27496          case $OPENJDK_TARGET_CPU in
27497              x86 )
27498                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
27499                  ;;
27500              x86_64 )
27501                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
27502                  ;;
27503          esac
27504          ;;
27505esac
27506
27507###############################################################################
27508
27509CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
27510
27511# The package path is used only on macosx?
27512PACKAGE_PATH=/opt/local
27513
27514
27515if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
27516    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
27517    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
27518    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
27519    #   Note: -Dmacro         is the same as    #define macro 1
27520    #         -Dmacro=	    is the same as    #define macro
27521    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27522        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
27523    else
27524        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
27525    fi
27526else
27527    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
27528fi
27529if test "x$OPENJDK_TARGET_OS" = xlinux; then
27530    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
27531fi
27532if test "x$OPENJDK_TARGET_OS" = xwindows; then
27533    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
27534fi
27535if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27536    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
27537fi
27538if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27539    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
27540fi
27541if test "x$OPENJDK_TARGET_OS" = xbsd; then
27542    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
27543fi
27544if test "x$DEBUG_LEVEL" = xrelease; then
27545    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
27546    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27547        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
27548    fi
27549else
27550    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
27551fi
27552
27553CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
27554CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
27555
27556CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
27557        -I${JDK_OUTPUTDIR}/include \
27558        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
27559        -I${JDK_TOPDIR}/src/share/javavm/export \
27560        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
27561        -I${JDK_TOPDIR}/src/share/native/common \
27562        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
27563
27564# The shared libraries are compiled using the picflag.
27565CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
27566CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
27567
27568# Executable flags
27569CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
27570CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
27571
27572# Now this is odd. The JDK native libraries have to link against libjvm.so
27573# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
27574# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
27575# is identical for client and server? Yes. Which is picked at runtime (client or server)?
27576# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
27577# libraries will link to whatever is in memory. Yuck.
27578#
27579# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
27580if test "x$COMPILER_NAME" = xcl; then
27581    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
27582    if test "x$OPENJDK_TARGET_CPU" = xx86; then
27583        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
27584    fi
27585    # TODO: make -debug optional "--disable-full-debug-symbols"
27586    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
27587    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
27588    LDFLAGS_JDKLIB_SUFFIX=""
27589    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
27590        LDFLAGS_STACK_SIZE=1048576
27591    else
27592        LDFLAGS_STACK_SIZE=327680
27593    fi
27594    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
27595else
27596    if test "x$COMPILER_NAME" = xgcc; then
27597        # If this is a --hash-style=gnu system, use --hash-style=both, why?
27598        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
27599        if test -n "$HAS_GNU_HASH"; then
27600            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
27601        fi
27602        if test "x$OPENJDK_TARGET_OS" = xlinux; then
27603          # And since we now know that the linker is gnu, then add -z defs, to forbid
27604          # undefined symbols in object files.
27605          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
27606          if test "x$DEBUG_LEVEL" = "xrelease"; then
27607              # When building release libraries, tell the linker optimize them.
27608              # Should this be supplied to the OSS linker as well?
27609              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
27610          fi
27611        fi
27612    fi
27613    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
27614                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
27615
27616    # On some platforms (mac) the linker warns about non existing -L dirs.
27617    # Add server first if available. Linking aginst client does not always produce the same results.
27618    # Only add client dir if client is being built. Default to server for other variants.
27619    if test "x$JVM_VARIANT_SERVER" = xtrue; then
27620        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
27621    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
27622        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
27623    else
27624        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
27625    fi
27626
27627    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
27628    if test "x$COMPILER_NAME" = xossc; then
27629        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
27630    fi
27631
27632    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
27633    if test "x$OPENJDK_TARGET_OS" = xlinux; then
27634        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
27635    fi
27636fi
27637
27638# Adjust flags according to debug level.
27639case $DEBUG_LEVEL in
27640      fastdebug )
27641              CFLAGS="$CFLAGS $D_FLAG"
27642              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27643              ;;
27644      slowdebug )
27645              CFLAGS="$CFLAGS $D_FLAG"
27646	      C_O_FLAG_HI="$C_O_FLAG_NONE"
27647	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
27648	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
27649	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
27650              JAVAC_FLAGS="$JAVAC_FLAGS -g"
27651              ;;
27652esac
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668# Setup debug symbols (need objcopy from the toolchain for that)
27669
27670#
27671# ENABLE_DEBUG_SYMBOLS
27672# This must be done after the toolchain is setup, since we're looking at objcopy.
27673#
27674ENABLE_DEBUG_SYMBOLS=default
27675
27676# default on macosx is no...
27677if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27678   ENABLE_DEBUG_SYMBOLS=no
27679fi
27680
27681# Check whether --enable-debug-symbols was given.
27682if test "${enable_debug_symbols+set}" = set; then :
27683  enableval=$enable_debug_symbols; ENABLE_DEBUG_SYMBOLS=${enable_debug_symbols}
27684fi
27685
27686
27687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
27688$as_echo_n "checking if we should generate debug symbols... " >&6; }
27689
27690if test "x$ENABLE_DEBUG_SYMBOLS" = "xyes" && test "x$OBJCOPY" = x; then
27691   # explicit enabling of enable-debug-symbols and can't find objcopy
27692   #   this is an error
27693   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
27694fi
27695
27696if test "x$ENABLE_DEBUG_SYMBOLS" = "xdefault"; then
27697  # Default is on if objcopy is found, otherwise off
27698  if test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
27699     ENABLE_DEBUG_SYMBOLS=yes
27700  else
27701     ENABLE_DEBUG_SYMBOLS=no
27702  fi
27703fi
27704
27705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
27706$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
27707
27708#
27709# ZIP_DEBUGINFO_FILES
27710#
27711ZIP_DEBUGINFO_FILES=yes
27712
27713# Check whether --enable-zip-debug-info was given.
27714if test "${enable_zip_debug_info+set}" = set; then :
27715  enableval=$enable_zip_debug_info; ZIP_DEBUGINFO_FILES=${enable_zip_debug_info}
27716fi
27717
27718
27719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
27720$as_echo_n "checking if we should zip debug-info files... " >&6; }
27721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP_DEBUGINFO_FILES" >&5
27722$as_echo "$ZIP_DEBUGINFO_FILES" >&6; }
27723
27724# Hotspot wants ZIP_DEBUGINFO_FILES to be 1 for yes
27725#   use that...
27726if test "x$ZIP_DEBUGINFO_FILES" = "xyes"; then
27727   ZIP_DEBUGINFO_FILES=1
27728else
27729   ZIP_DEBUGINFO_FILES=0
27730fi
27731
27732
27733
27734
27735
27736
27737
27738###############################################################################
27739#
27740# Check dependencies for external and internal libraries.
27741#
27742###############################################################################
27743
27744
27745
27746###############################################################################
27747#
27748# OS specific settings that we never will need to probe.
27749#
27750if test "x$OPENJDK_TARGET_OS" = xlinux; then
27751    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
27752$as_echo_n "checking what is not needed on Linux?... " >&6; }
27753    PULSE_NOT_NEEDED=yes
27754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
27755$as_echo "pulse" >&6; }
27756fi
27757
27758if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
27760$as_echo_n "checking what is not needed on Solaris?... " >&6; }
27761    ALSA_NOT_NEEDED=yes
27762    PULSE_NOT_NEEDED=yes
27763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27764$as_echo "alsa pulse" >&6; }
27765fi
27766
27767if test "x$OPENJDK_TARGET_OS" = xwindows; then
27768    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
27769$as_echo_n "checking what is not needed on Windows?... " >&6; }
27770    CUPS_NOT_NEEDED=yes
27771    ALSA_NOT_NEEDED=yes
27772    PULSE_NOT_NEEDED=yes
27773    X11_NOT_NEEDED=yes
27774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
27775$as_echo "alsa cups pulse x11" >&6; }
27776fi
27777
27778if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27779    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
27780$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
27781    ALSA_NOT_NEEDED=yes
27782    PULSE_NOT_NEEDED=yes
27783    X11_NOT_NEEDED=yes
27784    FREETYPE2_NOT_NEEDED=yes
27785    # If the java runtime framework is disabled, then we need X11.
27786    # This will be adjusted below.
27787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
27788$as_echo "alsa pulse x11" >&6; }
27789fi
27790
27791if test "x$OPENJDK_TARGET_OS" = xbsd; then
27792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
27793$as_echo_n "checking what is not needed on bsd?... " >&6; }
27794    ALSA_NOT_NEEDED=yes
27795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
27796$as_echo "alsa" >&6; }
27797fi
27798
27799if test "x$OPENJDK" = "xfalse"; then
27800    FREETYPE2_NOT_NEEDED=yes
27801fi
27802
27803if test "x$SUPPORT_HEADFUL" = xno; then
27804    X11_NOT_NEEDED=yes
27805fi
27806
27807###############################################################################
27808#
27809# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
27810# that uses this API.
27811#
27812# Check whether --enable-macosx-runtime-support was given.
27813if test "${enable_macosx_runtime_support+set}" = set; then :
27814  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
27815else
27816  MACOSX_RUNTIME_SUPPORT="no"
27817fi
27818
27819
27820USE_MACOSX_RUNTIME_SUPPORT=no
27821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
27822$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
27823if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
27824    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
27825        MACOSX_RUNTIME_SUPPORT=yes
27826        USE_MACOSX_RUNTIME_SUPPORT=yes
27827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
27828$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
27829    else
27830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
27831$as_echo "yes, but explicitly disabled." >&6; }
27832    fi
27833else
27834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27835$as_echo "no" >&6; }
27836fi
27837
27838if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
27839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
27840$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
27841    X11_NOT_NEEDED=
27842    FREETYPE2_NOT_NEEDED=
27843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
27844$as_echo "alsa pulse" >&6; }
27845fi
27846
27847
27848
27849
27850###############################################################################
27851#
27852# Check for X Windows
27853#
27854
27855# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
27856# Make a simple check for the libraries at the sysroot, and setup --x-includes and
27857# --x-libraries for the sysroot, if that seems to be correct.
27858if test "x$SYS_ROOT" != "x/"; then
27859  if test "x$x_includes" = xNONE; then
27860    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
27861      x_includes="$SYS_ROOT/usr/X11R6/include"
27862    fi
27863  fi
27864  if test "x$x_libraries" = xNONE; then
27865    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
27866      x_libraries="$SYS_ROOT/usr/X11R6/lib"
27867    fi
27868  fi
27869fi
27870
27871# Now let autoconf do it's magic
27872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
27873$as_echo_n "checking for X... " >&6; }
27874
27875
27876# Check whether --with-x was given.
27877if test "${with_x+set}" = set; then :
27878  withval=$with_x;
27879fi
27880
27881# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
27882if test "x$with_x" = xno; then
27883  # The user explicitly disabled X.
27884  have_x=disabled
27885else
27886  case $x_includes,$x_libraries in #(
27887    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
27888    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
27889  $as_echo_n "(cached) " >&6
27890else
27891  # One or both of the vars are not set, and there is no cached value.
27892ac_x_includes=no ac_x_libraries=no
27893rm -f -r conftest.dir
27894if mkdir conftest.dir; then
27895  cd conftest.dir
27896  cat >Imakefile <<'_ACEOF'
27897incroot:
27898	@echo incroot='${INCROOT}'
27899usrlibdir:
27900	@echo usrlibdir='${USRLIBDIR}'
27901libdir:
27902	@echo libdir='${LIBDIR}'
27903_ACEOF
27904  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
27905    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
27906    for ac_var in incroot usrlibdir libdir; do
27907      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
27908    done
27909    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
27910    for ac_extension in a so sl dylib la dll; do
27911      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
27912	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
27913	ac_im_usrlibdir=$ac_im_libdir; break
27914      fi
27915    done
27916    # Screen out bogus values from the imake configuration.  They are
27917    # bogus both because they are the default anyway, and because
27918    # using them would break gcc on systems where it needs fixed includes.
27919    case $ac_im_incroot in
27920	/usr/include) ac_x_includes= ;;
27921	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
27922    esac
27923    case $ac_im_usrlibdir in
27924	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
27925	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
27926    esac
27927  fi
27928  cd ..
27929  rm -f -r conftest.dir
27930fi
27931
27932# Standard set of common directories for X headers.
27933# Check X11 before X11Rn because it is often a symlink to the current release.
27934ac_x_header_dirs='
27935/usr/X11/include
27936/usr/X11R7/include
27937/usr/X11R6/include
27938/usr/X11R5/include
27939/usr/X11R4/include
27940
27941/usr/include/X11
27942/usr/include/X11R7
27943/usr/include/X11R6
27944/usr/include/X11R5
27945/usr/include/X11R4
27946
27947/usr/local/X11/include
27948/usr/local/X11R7/include
27949/usr/local/X11R6/include
27950/usr/local/X11R5/include
27951/usr/local/X11R4/include
27952
27953/usr/local/include/X11
27954/usr/local/include/X11R7
27955/usr/local/include/X11R6
27956/usr/local/include/X11R5
27957/usr/local/include/X11R4
27958
27959/usr/X386/include
27960/usr/x386/include
27961/usr/XFree86/include/X11
27962
27963/usr/include
27964/usr/local/include
27965/usr/unsupported/include
27966/usr/athena/include
27967/usr/local/x11r5/include
27968/usr/lpp/Xamples/include
27969
27970/usr/openwin/include
27971/usr/openwin/share/include'
27972
27973if test "$ac_x_includes" = no; then
27974  # Guess where to find include files, by looking for Xlib.h.
27975  # First, try using that file with no special directory specified.
27976  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27977/* end confdefs.h.  */
27978#include <X11/Xlib.h>
27979_ACEOF
27980if ac_fn_cxx_try_cpp "$LINENO"; then :
27981  # We can compile using X headers with no special include directory.
27982ac_x_includes=
27983else
27984  for ac_dir in $ac_x_header_dirs; do
27985  if test -r "$ac_dir/X11/Xlib.h"; then
27986    ac_x_includes=$ac_dir
27987    break
27988  fi
27989done
27990fi
27991rm -f conftest.err conftest.i conftest.$ac_ext
27992fi # $ac_x_includes = no
27993
27994if test "$ac_x_libraries" = no; then
27995  # Check for the libraries.
27996  # See if we find them without any special options.
27997  # Don't add to $LIBS permanently.
27998  ac_save_LIBS=$LIBS
27999  LIBS="-lX11 $LIBS"
28000  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28001/* end confdefs.h.  */
28002#include <X11/Xlib.h>
28003int
28004main ()
28005{
28006XrmInitialize ()
28007  ;
28008  return 0;
28009}
28010_ACEOF
28011if ac_fn_cxx_try_link "$LINENO"; then :
28012  LIBS=$ac_save_LIBS
28013# We can link X programs with no special library path.
28014ac_x_libraries=
28015else
28016  LIBS=$ac_save_LIBS
28017for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28018do
28019  # Don't even attempt the hair of trying to link an X program!
28020  for ac_extension in a so sl dylib la dll; do
28021    if test -r "$ac_dir/libX11.$ac_extension"; then
28022      ac_x_libraries=$ac_dir
28023      break 2
28024    fi
28025  done
28026done
28027fi
28028rm -f core conftest.err conftest.$ac_objext \
28029    conftest$ac_exeext conftest.$ac_ext
28030fi # $ac_x_libraries = no
28031
28032case $ac_x_includes,$ac_x_libraries in #(
28033  no,* | *,no | *\'*)
28034    # Didn't find X, or a directory has "'" in its name.
28035    ac_cv_have_x="have_x=no";; #(
28036  *)
28037    # Record where we found X for the cache.
28038    ac_cv_have_x="have_x=yes\
28039	ac_x_includes='$ac_x_includes'\
28040	ac_x_libraries='$ac_x_libraries'"
28041esac
28042fi
28043;; #(
28044    *) have_x=yes;;
28045  esac
28046  eval "$ac_cv_have_x"
28047fi # $with_x != no
28048
28049if test "$have_x" != yes; then
28050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28051$as_echo "$have_x" >&6; }
28052  no_x=yes
28053else
28054  # If each of the values was on the command line, it overrides each guess.
28055  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28056  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28057  # Update the cache value to reflect the command line values.
28058  ac_cv_have_x="have_x=yes\
28059	ac_x_includes='$x_includes'\
28060	ac_x_libraries='$x_libraries'"
28061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28062$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28063fi
28064
28065if test "$no_x" = yes; then
28066  # Not all programs may use this symbol, but it does not hurt to define it.
28067
28068$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28069
28070  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28071else
28072  if test -n "$x_includes"; then
28073    X_CFLAGS="$X_CFLAGS -I$x_includes"
28074  fi
28075
28076  # It would also be nice to do this for all -L options, not just this one.
28077  if test -n "$x_libraries"; then
28078    X_LIBS="$X_LIBS -L$x_libraries"
28079    # For Solaris; some versions of Sun CC require a space after -R and
28080    # others require no space.  Words are not sufficient . . . .
28081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28082$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28083    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28084    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28085    ac_cxx_werror_flag=yes
28086    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28087/* end confdefs.h.  */
28088
28089int
28090main ()
28091{
28092
28093  ;
28094  return 0;
28095}
28096_ACEOF
28097if ac_fn_cxx_try_link "$LINENO"; then :
28098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28099$as_echo "no" >&6; }
28100       X_LIBS="$X_LIBS -R$x_libraries"
28101else
28102  LIBS="$ac_xsave_LIBS -R $x_libraries"
28103       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28104/* end confdefs.h.  */
28105
28106int
28107main ()
28108{
28109
28110  ;
28111  return 0;
28112}
28113_ACEOF
28114if ac_fn_cxx_try_link "$LINENO"; then :
28115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28116$as_echo "yes" >&6; }
28117	  X_LIBS="$X_LIBS -R $x_libraries"
28118else
28119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28120$as_echo "neither works" >&6; }
28121fi
28122rm -f core conftest.err conftest.$ac_objext \
28123    conftest$ac_exeext conftest.$ac_ext
28124fi
28125rm -f core conftest.err conftest.$ac_objext \
28126    conftest$ac_exeext conftest.$ac_ext
28127    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28128    LIBS=$ac_xsave_LIBS
28129  fi
28130
28131  # Check for system-dependent libraries X programs must link with.
28132  # Do this before checking for the system-independent R6 libraries
28133  # (-lICE), since we may need -lsocket or whatever for X linking.
28134
28135  if test "$ISC" = yes; then
28136    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28137  else
28138    # Martyn Johnson says this is needed for Ultrix, if the X
28139    # libraries were built with DECnet support.  And Karl Berry says
28140    # the Alpha needs dnet_stub (dnet does not exist).
28141    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28142    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28143/* end confdefs.h.  */
28144
28145/* Override any GCC internal prototype to avoid an error.
28146   Use char because int might match the return type of a GCC
28147   builtin and then its argument prototype would still apply.  */
28148#ifdef __cplusplus
28149extern "C"
28150#endif
28151char XOpenDisplay ();
28152int
28153main ()
28154{
28155return XOpenDisplay ();
28156  ;
28157  return 0;
28158}
28159_ACEOF
28160if ac_fn_cxx_try_link "$LINENO"; then :
28161
28162else
28163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28164$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28165if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28166  $as_echo_n "(cached) " >&6
28167else
28168  ac_check_lib_save_LIBS=$LIBS
28169LIBS="-ldnet  $LIBS"
28170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28171/* end confdefs.h.  */
28172
28173/* Override any GCC internal prototype to avoid an error.
28174   Use char because int might match the return type of a GCC
28175   builtin and then its argument prototype would still apply.  */
28176#ifdef __cplusplus
28177extern "C"
28178#endif
28179char dnet_ntoa ();
28180int
28181main ()
28182{
28183return dnet_ntoa ();
28184  ;
28185  return 0;
28186}
28187_ACEOF
28188if ac_fn_cxx_try_link "$LINENO"; then :
28189  ac_cv_lib_dnet_dnet_ntoa=yes
28190else
28191  ac_cv_lib_dnet_dnet_ntoa=no
28192fi
28193rm -f core conftest.err conftest.$ac_objext \
28194    conftest$ac_exeext conftest.$ac_ext
28195LIBS=$ac_check_lib_save_LIBS
28196fi
28197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28198$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28199if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28200  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28201fi
28202
28203    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28204      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28205$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28206if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28207  $as_echo_n "(cached) " >&6
28208else
28209  ac_check_lib_save_LIBS=$LIBS
28210LIBS="-ldnet_stub  $LIBS"
28211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28212/* end confdefs.h.  */
28213
28214/* Override any GCC internal prototype to avoid an error.
28215   Use char because int might match the return type of a GCC
28216   builtin and then its argument prototype would still apply.  */
28217#ifdef __cplusplus
28218extern "C"
28219#endif
28220char dnet_ntoa ();
28221int
28222main ()
28223{
28224return dnet_ntoa ();
28225  ;
28226  return 0;
28227}
28228_ACEOF
28229if ac_fn_cxx_try_link "$LINENO"; then :
28230  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28231else
28232  ac_cv_lib_dnet_stub_dnet_ntoa=no
28233fi
28234rm -f core conftest.err conftest.$ac_objext \
28235    conftest$ac_exeext conftest.$ac_ext
28236LIBS=$ac_check_lib_save_LIBS
28237fi
28238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28239$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28240if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28241  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28242fi
28243
28244    fi
28245fi
28246rm -f core conftest.err conftest.$ac_objext \
28247    conftest$ac_exeext conftest.$ac_ext
28248    LIBS="$ac_xsave_LIBS"
28249
28250    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28251    # to get the SysV transport functions.
28252    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28253    # needs -lnsl.
28254    # The nsl library prevents programs from opening the X display
28255    # on Irix 5.2, according to T.E. Dickey.
28256    # The functions gethostbyname, getservbyname, and inet_addr are
28257    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28258    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28259if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28260
28261fi
28262
28263    if test $ac_cv_func_gethostbyname = no; then
28264      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28265$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28266if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28267  $as_echo_n "(cached) " >&6
28268else
28269  ac_check_lib_save_LIBS=$LIBS
28270LIBS="-lnsl  $LIBS"
28271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28272/* end confdefs.h.  */
28273
28274/* Override any GCC internal prototype to avoid an error.
28275   Use char because int might match the return type of a GCC
28276   builtin and then its argument prototype would still apply.  */
28277#ifdef __cplusplus
28278extern "C"
28279#endif
28280char gethostbyname ();
28281int
28282main ()
28283{
28284return gethostbyname ();
28285  ;
28286  return 0;
28287}
28288_ACEOF
28289if ac_fn_cxx_try_link "$LINENO"; then :
28290  ac_cv_lib_nsl_gethostbyname=yes
28291else
28292  ac_cv_lib_nsl_gethostbyname=no
28293fi
28294rm -f core conftest.err conftest.$ac_objext \
28295    conftest$ac_exeext conftest.$ac_ext
28296LIBS=$ac_check_lib_save_LIBS
28297fi
28298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28299$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28300if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28301  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28302fi
28303
28304      if test $ac_cv_lib_nsl_gethostbyname = no; then
28305	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28306$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28307if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28308  $as_echo_n "(cached) " >&6
28309else
28310  ac_check_lib_save_LIBS=$LIBS
28311LIBS="-lbsd  $LIBS"
28312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28313/* end confdefs.h.  */
28314
28315/* Override any GCC internal prototype to avoid an error.
28316   Use char because int might match the return type of a GCC
28317   builtin and then its argument prototype would still apply.  */
28318#ifdef __cplusplus
28319extern "C"
28320#endif
28321char gethostbyname ();
28322int
28323main ()
28324{
28325return gethostbyname ();
28326  ;
28327  return 0;
28328}
28329_ACEOF
28330if ac_fn_cxx_try_link "$LINENO"; then :
28331  ac_cv_lib_bsd_gethostbyname=yes
28332else
28333  ac_cv_lib_bsd_gethostbyname=no
28334fi
28335rm -f core conftest.err conftest.$ac_objext \
28336    conftest$ac_exeext conftest.$ac_ext
28337LIBS=$ac_check_lib_save_LIBS
28338fi
28339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
28340$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
28341if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
28342  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
28343fi
28344
28345      fi
28346    fi
28347
28348    # lieder@skyler.mavd.honeywell.com says without -lsocket,
28349    # socket/setsockopt and other routines are undefined under SCO ODT
28350    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
28351    # on later versions), says Simon Leinen: it contains gethostby*
28352    # variants that don't use the name server (or something).  -lsocket
28353    # must be given before -lnsl if both are needed.  We assume that
28354    # if connect needs -lnsl, so does gethostbyname.
28355    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
28356if test "x$ac_cv_func_connect" = x""yes; then :
28357
28358fi
28359
28360    if test $ac_cv_func_connect = no; then
28361      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
28362$as_echo_n "checking for connect in -lsocket... " >&6; }
28363if test "${ac_cv_lib_socket_connect+set}" = set; then :
28364  $as_echo_n "(cached) " >&6
28365else
28366  ac_check_lib_save_LIBS=$LIBS
28367LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
28368cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28369/* end confdefs.h.  */
28370
28371/* Override any GCC internal prototype to avoid an error.
28372   Use char because int might match the return type of a GCC
28373   builtin and then its argument prototype would still apply.  */
28374#ifdef __cplusplus
28375extern "C"
28376#endif
28377char connect ();
28378int
28379main ()
28380{
28381return connect ();
28382  ;
28383  return 0;
28384}
28385_ACEOF
28386if ac_fn_cxx_try_link "$LINENO"; then :
28387  ac_cv_lib_socket_connect=yes
28388else
28389  ac_cv_lib_socket_connect=no
28390fi
28391rm -f core conftest.err conftest.$ac_objext \
28392    conftest$ac_exeext conftest.$ac_ext
28393LIBS=$ac_check_lib_save_LIBS
28394fi
28395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
28396$as_echo "$ac_cv_lib_socket_connect" >&6; }
28397if test "x$ac_cv_lib_socket_connect" = x""yes; then :
28398  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
28399fi
28400
28401    fi
28402
28403    # Guillermo Gomez says -lposix is necessary on A/UX.
28404    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
28405if test "x$ac_cv_func_remove" = x""yes; then :
28406
28407fi
28408
28409    if test $ac_cv_func_remove = no; then
28410      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
28411$as_echo_n "checking for remove in -lposix... " >&6; }
28412if test "${ac_cv_lib_posix_remove+set}" = set; then :
28413  $as_echo_n "(cached) " >&6
28414else
28415  ac_check_lib_save_LIBS=$LIBS
28416LIBS="-lposix  $LIBS"
28417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28418/* end confdefs.h.  */
28419
28420/* Override any GCC internal prototype to avoid an error.
28421   Use char because int might match the return type of a GCC
28422   builtin and then its argument prototype would still apply.  */
28423#ifdef __cplusplus
28424extern "C"
28425#endif
28426char remove ();
28427int
28428main ()
28429{
28430return remove ();
28431  ;
28432  return 0;
28433}
28434_ACEOF
28435if ac_fn_cxx_try_link "$LINENO"; then :
28436  ac_cv_lib_posix_remove=yes
28437else
28438  ac_cv_lib_posix_remove=no
28439fi
28440rm -f core conftest.err conftest.$ac_objext \
28441    conftest$ac_exeext conftest.$ac_ext
28442LIBS=$ac_check_lib_save_LIBS
28443fi
28444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
28445$as_echo "$ac_cv_lib_posix_remove" >&6; }
28446if test "x$ac_cv_lib_posix_remove" = x""yes; then :
28447  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
28448fi
28449
28450    fi
28451
28452    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
28453    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
28454if test "x$ac_cv_func_shmat" = x""yes; then :
28455
28456fi
28457
28458    if test $ac_cv_func_shmat = no; then
28459      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
28460$as_echo_n "checking for shmat in -lipc... " >&6; }
28461if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
28462  $as_echo_n "(cached) " >&6
28463else
28464  ac_check_lib_save_LIBS=$LIBS
28465LIBS="-lipc  $LIBS"
28466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28467/* end confdefs.h.  */
28468
28469/* Override any GCC internal prototype to avoid an error.
28470   Use char because int might match the return type of a GCC
28471   builtin and then its argument prototype would still apply.  */
28472#ifdef __cplusplus
28473extern "C"
28474#endif
28475char shmat ();
28476int
28477main ()
28478{
28479return shmat ();
28480  ;
28481  return 0;
28482}
28483_ACEOF
28484if ac_fn_cxx_try_link "$LINENO"; then :
28485  ac_cv_lib_ipc_shmat=yes
28486else
28487  ac_cv_lib_ipc_shmat=no
28488fi
28489rm -f core conftest.err conftest.$ac_objext \
28490    conftest$ac_exeext conftest.$ac_ext
28491LIBS=$ac_check_lib_save_LIBS
28492fi
28493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
28494$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
28495if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
28496  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
28497fi
28498
28499    fi
28500  fi
28501
28502  # Check for libraries that X11R6 Xt/Xaw programs need.
28503  ac_save_LDFLAGS=$LDFLAGS
28504  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
28505  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
28506  # check for ICE first), but we must link in the order -lSM -lICE or
28507  # we get undefined symbols.  So assume we have SM if we have ICE.
28508  # These have to be linked with before -lX11, unlike the other
28509  # libraries we check for below, so use a different variable.
28510  # John Interrante, Karl Berry
28511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
28512$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
28513if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
28514  $as_echo_n "(cached) " >&6
28515else
28516  ac_check_lib_save_LIBS=$LIBS
28517LIBS="-lICE $X_EXTRA_LIBS $LIBS"
28518cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28519/* end confdefs.h.  */
28520
28521/* Override any GCC internal prototype to avoid an error.
28522   Use char because int might match the return type of a GCC
28523   builtin and then its argument prototype would still apply.  */
28524#ifdef __cplusplus
28525extern "C"
28526#endif
28527char IceConnectionNumber ();
28528int
28529main ()
28530{
28531return IceConnectionNumber ();
28532  ;
28533  return 0;
28534}
28535_ACEOF
28536if ac_fn_cxx_try_link "$LINENO"; then :
28537  ac_cv_lib_ICE_IceConnectionNumber=yes
28538else
28539  ac_cv_lib_ICE_IceConnectionNumber=no
28540fi
28541rm -f core conftest.err conftest.$ac_objext \
28542    conftest$ac_exeext conftest.$ac_ext
28543LIBS=$ac_check_lib_save_LIBS
28544fi
28545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
28546$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
28547if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
28548  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
28549fi
28550
28551  LDFLAGS=$ac_save_LDFLAGS
28552
28553fi
28554
28555
28556if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
28557
28558    # Print a helpful message on how to acquire the necessary build dependency.
28559    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28560    MISSING_DEPENDENCY=x11
28561    PKGHANDLER_COMMAND=
28562
28563    case $PKGHANDLER in
28564	apt-get)
28565                apt_help     $MISSING_DEPENDENCY ;;
28566    yum)
28567                yum_help     $MISSING_DEPENDENCY ;;
28568	port)
28569                port_help    $MISSING_DEPENDENCY ;;
28570	pkgutil)
28571                pkgutil_help $MISSING_DEPENDENCY ;;
28572	pkgadd)
28573                pkgadd_help  $MISSING_DEPENDENCY ;;
28574    * )
28575      break ;;
28576    esac
28577
28578    if test "x$PKGHANDLER_COMMAND" != x; then
28579        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28580    fi
28581
28582    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
28583fi
28584
28585# Some of the old makefiles require a setting of OPENWIN_HOME
28586# Since the X11R6 directory has disappeared on later Linuxes,
28587# we need to probe for it.
28588if test "x$OPENJDK_TARGET_OS" = xlinux; then
28589    if test -d "$SYS_ROOT/usr/X11R6"; then
28590        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
28591    fi
28592    if test -d "$SYS_ROOT/usr/include/X11"; then
28593        OPENWIN_HOME="$SYS_ROOT/usr"
28594    fi
28595fi
28596if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28597    OPENWIN_HOME="/usr/openwin"
28598fi
28599
28600
28601
28602#
28603# Weird Sol10 something check...TODO change to try compile
28604#
28605if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
28606  if test "`uname -r`" = "5.10"; then
28607     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
28608     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
28609     fi
28610  fi
28611fi
28612
28613ac_ext=c
28614ac_cpp='$CPP $CPPFLAGS'
28615ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28616ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28617ac_compiler_gnu=$ac_cv_c_compiler_gnu
28618
28619OLD_CFLAGS="$CFLAGS"
28620CFLAGS="$CFLAGS $X_CFLAGS"
28621
28622# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
28623for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
28624do :
28625  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28626ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
28627                   # include <X11/Xutil.h>
28628
28629"
28630if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28631  cat >>confdefs.h <<_ACEOF
28632#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28633_ACEOF
28634 X11_A_OK=yes
28635else
28636  X11_A_OK=no
28637fi
28638
28639done
28640
28641
28642CFLAGS="$OLD_CFLAGS"
28643ac_ext=cpp
28644ac_cpp='$CXXCPP $CPPFLAGS'
28645ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28646ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28647ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
28648
28649
28650if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
28651
28652    # Print a helpful message on how to acquire the necessary build dependency.
28653    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
28654    MISSING_DEPENDENCY=x11
28655    PKGHANDLER_COMMAND=
28656
28657    case $PKGHANDLER in
28658	apt-get)
28659                apt_help     $MISSING_DEPENDENCY ;;
28660    yum)
28661                yum_help     $MISSING_DEPENDENCY ;;
28662	port)
28663                port_help    $MISSING_DEPENDENCY ;;
28664	pkgutil)
28665                pkgutil_help $MISSING_DEPENDENCY ;;
28666	pkgadd)
28667                pkgadd_help  $MISSING_DEPENDENCY ;;
28668    * )
28669      break ;;
28670    esac
28671
28672    if test "x$PKGHANDLER_COMMAND" != x; then
28673        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28674    fi
28675
28676    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
28677fi
28678
28679
28680
28681
28682
28683
28684###############################################################################
28685#
28686# The common unix printing system cups is used to print from java.
28687#
28688
28689# Check whether --with-cups was given.
28690if test "${with_cups+set}" = set; then :
28691  withval=$with_cups;
28692fi
28693
28694
28695# Check whether --with-cups-include was given.
28696if test "${with_cups_include+set}" = set; then :
28697  withval=$with_cups_include;
28698fi
28699
28700
28701if test "x$CUPS_NOT_NEEDED" = xyes; then
28702	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
28703		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
28704$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
28705	fi
28706	CUPS_CFLAGS=
28707else
28708	CUPS_FOUND=no
28709
28710	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
28711	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
28712	fi
28713
28714	if test "x${with_cups}" != x; then
28715	    CUPS_CFLAGS="-I${with_cups}/include"
28716	    CUPS_FOUND=yes
28717	fi
28718	if test "x${with_cups_include}" != x; then
28719	    CUPS_CFLAGS="-I${with_cups_include}"
28720	    CUPS_FOUND=yes
28721	fi
28722	if test "x$CUPS_FOUND" = xno; then
28723
28724
28725    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
28726        # Source the builddeps file again, to make sure it uses the latest variables!
28727        . $builddepsfile
28728        # Look for a target and build machine specific resource!
28729        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
28730        if test "x$resource" = x; then
28731            # Ok, lets instead look for a target specific resource
28732            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
28733        fi
28734        if test "x$resource" = x; then
28735            # Ok, lets instead look for a build specific resource
28736            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
28737        fi
28738        if test "x$resource" = x; then
28739            # Ok, lets instead look for a generic resource
28740            # (The cups comes from M4 and not the shell, thus no need for eval here.)
28741            resource=${builddep_cups}
28742        fi
28743        if test "x$resource" != x; then
28744            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
28745$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
28746	    # If the resource in the builddeps.conf file is an existing directory,
28747	    # for example /java/linux/cups
28748	    if test -d ${resource}; then
28749	       depdir=${resource}
28750	    else
28751
28752# cups is for example mymodule
28753# $resource is for example libs/general/libmymod_1_2_3.zip
28754# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
28755# $with_builddeps_dir is for example /localhome/builddeps
28756# depdir is the name of the variable into which we store the depdir, eg MYMOD
28757# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
28758# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
28759    filename=`basename $resource`
28760    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
28761    filebase=${filename%%.*}
28762    extension=${filename#*.}
28763    installdir=$with_builddeps_dir/$filebase
28764    if test ! -f $installdir/$filename.unpacked; then
28765        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
28766$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
28767        if test ! -d $installdir; then
28768            mkdir -p $installdir
28769        fi
28770        if test ! -d $installdir; then
28771            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
28772        fi
28773        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
28774        touch $tmpfile
28775        if test ! -f $tmpfile; then
28776            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
28777        fi
28778
28779    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
28780    # $tmpfile is the local file name for the downloaded file.
28781    VALID_TOOL=no
28782    if test "x$BDEPS_FTP" = xwget; then
28783       VALID_TOOL=yes
28784       wget -O $tmpfile $with_builddeps_server/$resource
28785    fi
28786    if test "x$BDEPS_FTP" = xlftp; then
28787       VALID_TOOL=yes
28788       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
28789    fi
28790    if test "x$BDEPS_FTP" = xftp; then
28791        VALID_TOOL=yes
28792        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
28793        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
28794        FTPUSERPWD=${FTPSERVER%%@*}
28795        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
28796            FTPUSER=${userpwd%%:*}
28797            FTPPWD=${userpwd#*@}
28798            FTPSERVER=${FTPSERVER#*@}
28799        else
28800            FTPUSER=ftp
28801            FTPPWD=ftp
28802        fi
28803        # the "pass" command does not work on some
28804        # ftp clients (read ftp.exe) but if it works,
28805        # passive mode is better!
28806        (\
28807            echo "user $FTPUSER $FTPPWD"        ;\
28808            echo "pass"                         ;\
28809            echo "bin"                          ;\
28810            echo "get $FTPPATH $tmpfile"              ;\
28811        ) | ftp -in $FTPSERVER
28812    fi
28813    if test "x$VALID_TOOL" != xyes; then
28814       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
28815    fi
28816
28817        mv $tmpfile $installdir/$filename
28818        if test ! -s $installdir/$filename; then
28819            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
28820        fi
28821        case "$extension" in
28822            zip)  echo "Unzipping $installdir/$filename..."
28823               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
28824            ;;
28825            tar.gz) echo "Untaring $installdir/$filename..."
28826               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28827            ;;
28828            tgz) echo "Untaring $installdir/$filename..."
28829               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
28830            ;;
28831            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
28832            ;;
28833        esac
28834    fi
28835    if test -f $installdir/$filename.unpacked; then
28836        depdir=$installdir
28837    fi
28838
28839	    fi
28840            # Source the builddeps file again, because in the previous command, the depdir
28841            # was updated to point at the current build dependency install directory.
28842            . $builddepsfile
28843            # Now extract variables from the builddeps.conf files.
28844            theroot=${builddep_cups_ROOT}
28845            thecflags=${builddep_cups_CFLAGS}
28846            thelibs=${builddep_cups_LIBS}
28847            if test "x$depdir" = x; then
28848                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
28849            fi
28850            CUPS=$depdir
28851            if test "x$theroot" != x; then
28852               CUPS="$theroot"
28853            fi
28854            if test "x$thecflags" != x; then
28855               CUPS_CFLAGS="$thecflags"
28856            fi
28857            if test "x$thelibs" != x; then
28858               CUPS_LIBS="$thelibs"
28859            fi
28860            CUPS_FOUND=yes
28861
28862        fi
28863
28864    fi
28865
28866	fi
28867	if test "x$CUPS_FOUND" = xno; then
28868	    # Are the cups headers installed in the default /usr/include location?
28869	    for ac_header in cups/cups.h cups/ppd.h
28870do :
28871  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28872ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
28873if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28874  cat >>confdefs.h <<_ACEOF
28875#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28876_ACEOF
28877 CUPS_FOUND=yes
28878	                      CUPS_CFLAGS=
28879	                      DEFAULT_CUPS=yes
28880fi
28881
28882done
28883
28884	fi
28885	if test "x$CUPS_FOUND" = xno; then
28886	    # Getting nervous now? Lets poke around for standard Solaris third-party
28887	    # package installation locations.
28888	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
28889$as_echo_n "checking for cups headers... " >&6; }
28890	    if test -s /opt/sfw/cups/include/cups/cups.h; then
28891	       # An SFW package seems to be installed!
28892	       CUPS_FOUND=yes
28893	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
28894	    elif test -s /opt/csw/include/cups/cups.h; then
28895	       # A CSW package seems to be installed!
28896	       CUPS_FOUND=yes
28897	       CUPS_CFLAGS="-I/opt/csw/include"
28898	    fi
28899	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
28900$as_echo "$CUPS_FOUND" >&6; }
28901	fi
28902	if test "x$CUPS_FOUND" = xno; then
28903
28904    # Print a helpful message on how to acquire the necessary build dependency.
28905    # cups is the help tag: freetyp2, cups, pulse, alsa etc
28906    MISSING_DEPENDENCY=cups
28907    PKGHANDLER_COMMAND=
28908
28909    case $PKGHANDLER in
28910	apt-get)
28911                apt_help     $MISSING_DEPENDENCY ;;
28912    yum)
28913                yum_help     $MISSING_DEPENDENCY ;;
28914	port)
28915                port_help    $MISSING_DEPENDENCY ;;
28916	pkgutil)
28917                pkgutil_help $MISSING_DEPENDENCY ;;
28918	pkgadd)
28919                pkgadd_help  $MISSING_DEPENDENCY ;;
28920    * )
28921      break ;;
28922    esac
28923
28924    if test "x$PKGHANDLER_COMMAND" != x; then
28925        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28926    fi
28927
28928	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
28929	fi
28930fi
28931
28932
28933
28934
28935
28936
28937###############################################################################
28938#
28939# The ubiquitous freetype2 library is used to render fonts.
28940#
28941
28942# Check whether --with-freetype was given.
28943if test "${with_freetype+set}" = set; then :
28944  withval=$with_freetype;
28945fi
28946
28947
28948# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
28949USING_SYSTEM_FT_LIB=false
28950
28951if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
28952	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
28953		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
28954$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
28955	fi
28956	FREETYPE2_CFLAGS=
28957	FREETYPE2_LIBS=
28958        FREETYPE2_LIB_PATH=
28959else
28960	FREETYPE2_FOUND=no
28961
28962	if test "x$with_freetype" != x; then
28963
28964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28965
28966  # Input might be given as Windows format, start by converting to
28967  # unix format.
28968  path="$with_freetype"
28969  new_path=`$CYGPATH -u "$path"`
28970
28971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28974  # "foo.exe" is OK but "foo" is an error.
28975  #
28976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28977  # It is also a way to make sure we got the proper file name for the real test later on.
28978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28979  if test "x$test_shortpath" = x; then
28980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
28981$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
28982    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
28983  fi
28984
28985  # Call helper function which possibly converts this using DOS-style short mode.
28986  # If so, the updated path is stored in $new_path.
28987
28988  input_path="$new_path"
28989  # Check if we need to convert this using DOS-style short mode. If the path
28990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28991  # take no chances and rewrite it.
28992  # Note: m4 eats our [], so we need to use [ and ] instead.
28993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28994  if test "x$has_forbidden_chars" != x; then
28995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28999      # Going to short mode and back again did indeed matter. Since short mode is
29000      # case insensitive, let's make it lowercase to improve readability.
29001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29002      # Now convert it back to Unix-stile (cygpath)
29003      input_path=`$CYGPATH -u "$shortmode_path"`
29004      new_path="$input_path"
29005    fi
29006  fi
29007
29008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29009  if test "x$test_cygdrive_prefix" = x; then
29010    # As a simple fix, exclude /usr/bin since it's not a real path.
29011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29013      # a path prefixed by /cygdrive for fixpath to work.
29014      new_path="$CYGWIN_ROOT_PATH$input_path"
29015    fi
29016  fi
29017
29018
29019  if test "x$path" != "x$new_path"; then
29020    with_freetype="$new_path"
29021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29022$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29023  fi
29024
29025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29026
29027  path="$with_freetype"
29028  has_colon=`$ECHO $path | $GREP ^.:`
29029  new_path="$path"
29030  if test "x$has_colon" = x; then
29031    # Not in mixed or Windows style, start by that.
29032    new_path=`cmd //c echo $path`
29033  fi
29034
29035
29036  input_path="$new_path"
29037  # Check if we need to convert this using DOS-style short mode. If the path
29038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29039  # take no chances and rewrite it.
29040  # Note: m4 eats our [], so we need to use [ and ] instead.
29041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29042  if test "x$has_forbidden_chars" != x; then
29043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29045  fi
29046
29047
29048  windows_path="$new_path"
29049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29050    unix_path=`$CYGPATH -u "$windows_path"`
29051    new_path="$unix_path"
29052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29054    new_path="$unix_path"
29055  fi
29056
29057  if test "x$path" != "x$new_path"; then
29058    with_freetype="$new_path"
29059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29060$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29061  fi
29062
29063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29065
29066  else
29067    # We're on a posix platform. Hooray! :)
29068    path="$with_freetype"
29069
29070    if test ! -f "$path" && test ! -d "$path"; then
29071      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29072    fi
29073
29074    has_space=`$ECHO "$path" | $GREP " "`
29075    if test "x$has_space" != x; then
29076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29077$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29078      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29079    fi
29080  fi
29081
29082	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29083            FREETYPE2_LIB_PATH="$with_freetype/lib"
29084            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29085                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29086                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29087            fi
29088            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29089                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29090            fi
29091	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29092            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29093                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29094            fi
29095 	    FREETYPE2_FOUND=yes
29096   	    if test "x$FREETYPE2_FOUND" = xyes; then
29097	        # Verify that the directories exist
29098                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29099		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29100		fi
29101	        # List the contents of the lib.
29102		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29103                if test "x$FREETYPELIB" = x; then
29104		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29105		fi
29106	        # Check one h-file
29107                if ! test -s "$with_freetype/include/ft2build.h"; then
29108		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29109		fi
29110            fi
29111        fi
29112	if test "x$FREETYPE2_FOUND" = xno; then
29113
29114
29115    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29116        # Source the builddeps file again, to make sure it uses the latest variables!
29117        . $builddepsfile
29118        # Look for a target and build machine specific resource!
29119        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29120        if test "x$resource" = x; then
29121            # Ok, lets instead look for a target specific resource
29122            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29123        fi
29124        if test "x$resource" = x; then
29125            # Ok, lets instead look for a build specific resource
29126            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29127        fi
29128        if test "x$resource" = x; then
29129            # Ok, lets instead look for a generic resource
29130            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29131            resource=${builddep_freetype2}
29132        fi
29133        if test "x$resource" != x; then
29134            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29135$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29136	    # If the resource in the builddeps.conf file is an existing directory,
29137	    # for example /java/linux/cups
29138	    if test -d ${resource}; then
29139	       depdir=${resource}
29140	    else
29141
29142# freetype2 is for example mymodule
29143# $resource is for example libs/general/libmymod_1_2_3.zip
29144# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29145# $with_builddeps_dir is for example /localhome/builddeps
29146# depdir is the name of the variable into which we store the depdir, eg MYMOD
29147# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29148# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29149    filename=`basename $resource`
29150    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29151    filebase=${filename%%.*}
29152    extension=${filename#*.}
29153    installdir=$with_builddeps_dir/$filebase
29154    if test ! -f $installdir/$filename.unpacked; then
29155        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29156$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29157        if test ! -d $installdir; then
29158            mkdir -p $installdir
29159        fi
29160        if test ! -d $installdir; then
29161            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29162        fi
29163        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29164        touch $tmpfile
29165        if test ! -f $tmpfile; then
29166            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29167        fi
29168
29169    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29170    # $tmpfile is the local file name for the downloaded file.
29171    VALID_TOOL=no
29172    if test "x$BDEPS_FTP" = xwget; then
29173       VALID_TOOL=yes
29174       wget -O $tmpfile $with_builddeps_server/$resource
29175    fi
29176    if test "x$BDEPS_FTP" = xlftp; then
29177       VALID_TOOL=yes
29178       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29179    fi
29180    if test "x$BDEPS_FTP" = xftp; then
29181        VALID_TOOL=yes
29182        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29183        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29184        FTPUSERPWD=${FTPSERVER%%@*}
29185        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29186            FTPUSER=${userpwd%%:*}
29187            FTPPWD=${userpwd#*@}
29188            FTPSERVER=${FTPSERVER#*@}
29189        else
29190            FTPUSER=ftp
29191            FTPPWD=ftp
29192        fi
29193        # the "pass" command does not work on some
29194        # ftp clients (read ftp.exe) but if it works,
29195        # passive mode is better!
29196        (\
29197            echo "user $FTPUSER $FTPPWD"        ;\
29198            echo "pass"                         ;\
29199            echo "bin"                          ;\
29200            echo "get $FTPPATH $tmpfile"              ;\
29201        ) | ftp -in $FTPSERVER
29202    fi
29203    if test "x$VALID_TOOL" != xyes; then
29204       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29205    fi
29206
29207        mv $tmpfile $installdir/$filename
29208        if test ! -s $installdir/$filename; then
29209            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29210        fi
29211        case "$extension" in
29212            zip)  echo "Unzipping $installdir/$filename..."
29213               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29214            ;;
29215            tar.gz) echo "Untaring $installdir/$filename..."
29216               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29217            ;;
29218            tgz) echo "Untaring $installdir/$filename..."
29219               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29220            ;;
29221            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29222            ;;
29223        esac
29224    fi
29225    if test -f $installdir/$filename.unpacked; then
29226        depdir=$installdir
29227    fi
29228
29229	    fi
29230            # Source the builddeps file again, because in the previous command, the depdir
29231            # was updated to point at the current build dependency install directory.
29232            . $builddepsfile
29233            # Now extract variables from the builddeps.conf files.
29234            theroot=${builddep_freetype2_ROOT}
29235            thecflags=${builddep_freetype2_CFLAGS}
29236            thelibs=${builddep_freetype2_LIBS}
29237            if test "x$depdir" = x; then
29238                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29239            fi
29240            FREETYPE2=$depdir
29241            if test "x$theroot" != x; then
29242               FREETYPE2="$theroot"
29243            fi
29244            if test "x$thecflags" != x; then
29245               FREETYPE2_CFLAGS="$thecflags"
29246            fi
29247            if test "x$thelibs" != x; then
29248               FREETYPE2_LIBS="$thelibs"
29249            fi
29250            FREETYPE2_FOUND=yes
29251            else FREETYPE2_FOUND=no
29252
29253        fi
29254        else FREETYPE2_FOUND=no
29255
29256    fi
29257
29258            USING_SYSTEM_FT_LIB=true
29259	fi
29260	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29261            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29262
29263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29264
29265  # Input might be given as Windows format, start by converting to
29266  # unix format.
29267  path="$FREETYPELOCATION"
29268  new_path=`$CYGPATH -u "$path"`
29269
29270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29273  # "foo.exe" is OK but "foo" is an error.
29274  #
29275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29276  # It is also a way to make sure we got the proper file name for the real test later on.
29277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29278  if test "x$test_shortpath" = x; then
29279    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29280$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29281    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29282  fi
29283
29284  # Call helper function which possibly converts this using DOS-style short mode.
29285  # If so, the updated path is stored in $new_path.
29286
29287  input_path="$new_path"
29288  # Check if we need to convert this using DOS-style short mode. If the path
29289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29290  # take no chances and rewrite it.
29291  # Note: m4 eats our [], so we need to use [ and ] instead.
29292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29293  if test "x$has_forbidden_chars" != x; then
29294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29295    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29296    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29297    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29298      # Going to short mode and back again did indeed matter. Since short mode is
29299      # case insensitive, let's make it lowercase to improve readability.
29300      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29301      # Now convert it back to Unix-stile (cygpath)
29302      input_path=`$CYGPATH -u "$shortmode_path"`
29303      new_path="$input_path"
29304    fi
29305  fi
29306
29307  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29308  if test "x$test_cygdrive_prefix" = x; then
29309    # As a simple fix, exclude /usr/bin since it's not a real path.
29310    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29311      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29312      # a path prefixed by /cygdrive for fixpath to work.
29313      new_path="$CYGWIN_ROOT_PATH$input_path"
29314    fi
29315  fi
29316
29317
29318  if test "x$path" != "x$new_path"; then
29319    FREETYPELOCATION="$new_path"
29320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29321$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29322  fi
29323
29324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29325
29326  path="$FREETYPELOCATION"
29327  has_colon=`$ECHO $path | $GREP ^.:`
29328  new_path="$path"
29329  if test "x$has_colon" = x; then
29330    # Not in mixed or Windows style, start by that.
29331    new_path=`cmd //c echo $path`
29332  fi
29333
29334
29335  input_path="$new_path"
29336  # Check if we need to convert this using DOS-style short mode. If the path
29337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29338  # take no chances and rewrite it.
29339  # Note: m4 eats our [], so we need to use [ and ] instead.
29340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29341  if test "x$has_forbidden_chars" != x; then
29342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29344  fi
29345
29346
29347  windows_path="$new_path"
29348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29349    unix_path=`$CYGPATH -u "$windows_path"`
29350    new_path="$unix_path"
29351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29353    new_path="$unix_path"
29354  fi
29355
29356  if test "x$path" != "x$new_path"; then
29357    FREETYPELOCATION="$new_path"
29358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29359$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29360  fi
29361
29362  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29363  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29364
29365  else
29366    # We're on a posix platform. Hooray! :)
29367    path="$FREETYPELOCATION"
29368
29369    if test ! -f "$path" && test ! -d "$path"; then
29370      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
29371    fi
29372
29373    has_space=`$ECHO "$path" | $GREP " "`
29374    if test "x$has_space" != x; then
29375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29376$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29377      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29378    fi
29379  fi
29380
29381	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
29382$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
29383	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
29384	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
29385	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
29386 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
29387                if ! test -s "$FREETYPE2_LIBS"; then
29388		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
29389		fi
29390                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
29391		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
29392		fi
29393                USING_SYSTEM_FT_LIB=true
29394                FREETYPE2_FOUND=yes
29395	    fi
29396	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29397$as_echo "$FREETYPE2_FOUND" >&6; }
29398        fi
29399	if test "x$FREETYPE2_FOUND" = xno; then
29400
29401pkg_failed=no
29402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
29403$as_echo_n "checking for FREETYPE2... " >&6; }
29404
29405if test -n "$FREETYPE2_CFLAGS"; then
29406    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
29407 elif test -n "$PKG_CONFIG"; then
29408    if test -n "$PKG_CONFIG" && \
29409    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29410  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29411  ac_status=$?
29412  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29413  test $ac_status = 0; }; then
29414  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
29415else
29416  pkg_failed=yes
29417fi
29418 else
29419    pkg_failed=untried
29420fi
29421if test -n "$FREETYPE2_LIBS"; then
29422    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
29423 elif test -n "$PKG_CONFIG"; then
29424    if test -n "$PKG_CONFIG" && \
29425    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
29426  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
29427  ac_status=$?
29428  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29429  test $ac_status = 0; }; then
29430  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
29431else
29432  pkg_failed=yes
29433fi
29434 else
29435    pkg_failed=untried
29436fi
29437
29438
29439
29440if test $pkg_failed = yes; then
29441
29442if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29443        _pkg_short_errors_supported=yes
29444else
29445        _pkg_short_errors_supported=no
29446fi
29447        if test $_pkg_short_errors_supported = yes; then
29448	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
29449        else
29450	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
29451        fi
29452	# Put the nasty error message in config.log where it belongs
29453	echo "$FREETYPE2_PKG_ERRORS" >&5
29454
29455	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29456$as_echo "no" >&6; }
29457                FREETYPE2_FOUND=no
29458elif test $pkg_failed = untried; then
29459	FREETYPE2_FOUND=no
29460else
29461	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
29462	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
29463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29464$as_echo "yes" >&6; }
29465	FREETYPE2_FOUND=yes
29466fi
29467            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
29468            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
29469            USING_SYSTEM_FT_LIB=true
29470            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
29471            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
29472              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
29473            fi
29474	fi
29475	if test "x$FREETYPE2_FOUND" = xno; then
29476	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
29477$as_echo_n "checking for freetype in some standard locations... " >&6; }
29478
29479	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
29480	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
29481	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
29482	    fi
29483	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
29484	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
29485	        DEFAULT_FREETYPE_LIBS="-lfreetype"
29486	    fi
29487
29488	    PREV_CXXCFLAGS="$CXXFLAGS"
29489	    PREV_LDFLAGS="$LDFLAGS"
29490	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
29491	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
29492	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29493/* end confdefs.h.  */
29494#include<ft2build.h>
29495	                    #include FT_FREETYPE_H
29496	                   int main() { return 0; }
29497
29498_ACEOF
29499if ac_fn_cxx_try_link "$LINENO"; then :
29500
29501	                      # Yes, the default cflags and libs did the trick.
29502	                      FREETYPE2_FOUND=yes
29503	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
29504	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
29505
29506else
29507
29508	                      FREETYPE2_FOUND=no
29509
29510fi
29511rm -f core conftest.err conftest.$ac_objext \
29512    conftest$ac_exeext conftest.$ac_ext
29513            CXXCFLAGS="$PREV_CXXFLAGS"
29514	    LDFLAGS="$PREV_LDFLAGS"
29515	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
29516$as_echo "$FREETYPE2_FOUND" >&6; }
29517            USING_SYSTEM_FT_LIB=true
29518	fi
29519	if test "x$FREETYPE2_FOUND" = xno; then
29520
29521    # Print a helpful message on how to acquire the necessary build dependency.
29522    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
29523    MISSING_DEPENDENCY=freetype2
29524    PKGHANDLER_COMMAND=
29525
29526    case $PKGHANDLER in
29527	apt-get)
29528                apt_help     $MISSING_DEPENDENCY ;;
29529    yum)
29530                yum_help     $MISSING_DEPENDENCY ;;
29531	port)
29532                port_help    $MISSING_DEPENDENCY ;;
29533	pkgutil)
29534                pkgutil_help $MISSING_DEPENDENCY ;;
29535	pkgadd)
29536                pkgadd_help  $MISSING_DEPENDENCY ;;
29537    * )
29538      break ;;
29539    esac
29540
29541    if test "x$PKGHANDLER_COMMAND" != x; then
29542        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29543    fi
29544
29545		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29546	fi
29547
29548        if test "x$OPENJDK_TARGET_OS" != xwindows; then
29549            # AC_CHECK_LIB does not support use of cl.exe
29550            PREV_LDFLAGS="$LDFLAGS"
29551            LDFLAGS="$FREETYPE2_LIBS"
29552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
29553$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
29554if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
29555  $as_echo_n "(cached) " >&6
29556else
29557  ac_check_lib_save_LIBS=$LIBS
29558LIBS="-lfreetype  $LIBS"
29559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29560/* end confdefs.h.  */
29561
29562/* Override any GCC internal prototype to avoid an error.
29563   Use char because int might match the return type of a GCC
29564   builtin and then its argument prototype would still apply.  */
29565#ifdef __cplusplus
29566extern "C"
29567#endif
29568char FT_Init_FreeType ();
29569int
29570main ()
29571{
29572return FT_Init_FreeType ();
29573  ;
29574  return 0;
29575}
29576_ACEOF
29577if ac_fn_cxx_try_link "$LINENO"; then :
29578  ac_cv_lib_freetype_FT_Init_FreeType=yes
29579else
29580  ac_cv_lib_freetype_FT_Init_FreeType=no
29581fi
29582rm -f core conftest.err conftest.$ac_objext \
29583    conftest$ac_exeext conftest.$ac_ext
29584LIBS=$ac_check_lib_save_LIBS
29585fi
29586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
29587$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
29588if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
29589  FREETYPE2_FOUND=true
29590else
29591  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
29592fi
29593
29594            LDFLAGS="$PREV_LDFLAGS"
29595        fi
29596fi
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606###############################################################################
29607#
29608# Check for alsa headers and libraries. Used on Linux/GNU systems.
29609#
29610
29611# Check whether --with-alsa was given.
29612if test "${with_alsa+set}" = set; then :
29613  withval=$with_alsa;
29614fi
29615
29616
29617# Check whether --with-alsa-include was given.
29618if test "${with_alsa_include+set}" = set; then :
29619  withval=$with_alsa_include;
29620fi
29621
29622
29623# Check whether --with-alsa-lib was given.
29624if test "${with_alsa_lib+set}" = set; then :
29625  withval=$with_alsa_lib;
29626fi
29627
29628
29629if test "x$ALSA_NOT_NEEDED" = xyes; then
29630	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
29631		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
29632$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
29633	fi
29634	ALSA_CFLAGS=
29635	ALSA_LIBS=
29636else
29637	ALSA_FOUND=no
29638
29639	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
29640	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
29641	fi
29642
29643	if test "x${with_alsa}" != x; then
29644	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
29645	    ALSA_CFLAGS="-I${with_alsa}/include"
29646	    ALSA_FOUND=yes
29647	fi
29648	if test "x${with_alsa_include}" != x; then
29649	    ALSA_CFLAGS="-I${with_alsa_include}"
29650	    ALSA_FOUND=yes
29651	fi
29652	if test "x${with_alsa_lib}" != x; then
29653	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
29654	    ALSA_FOUND=yes
29655	fi
29656	if test "x$ALSA_FOUND" = xno; then
29657
29658
29659    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29660        # Source the builddeps file again, to make sure it uses the latest variables!
29661        . $builddepsfile
29662        # Look for a target and build machine specific resource!
29663        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29664        if test "x$resource" = x; then
29665            # Ok, lets instead look for a target specific resource
29666            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
29667        fi
29668        if test "x$resource" = x; then
29669            # Ok, lets instead look for a build specific resource
29670            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
29671        fi
29672        if test "x$resource" = x; then
29673            # Ok, lets instead look for a generic resource
29674            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
29675            resource=${builddep_alsa}
29676        fi
29677        if test "x$resource" != x; then
29678            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
29679$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
29680	    # If the resource in the builddeps.conf file is an existing directory,
29681	    # for example /java/linux/cups
29682	    if test -d ${resource}; then
29683	       depdir=${resource}
29684	    else
29685
29686# alsa is for example mymodule
29687# $resource is for example libs/general/libmymod_1_2_3.zip
29688# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29689# $with_builddeps_dir is for example /localhome/builddeps
29690# depdir is the name of the variable into which we store the depdir, eg MYMOD
29691# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29692# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29693    filename=`basename $resource`
29694    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29695    filebase=${filename%%.*}
29696    extension=${filename#*.}
29697    installdir=$with_builddeps_dir/$filebase
29698    if test ! -f $installdir/$filename.unpacked; then
29699        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
29700$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29701        if test ! -d $installdir; then
29702            mkdir -p $installdir
29703        fi
29704        if test ! -d $installdir; then
29705            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29706        fi
29707        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
29708        touch $tmpfile
29709        if test ! -f $tmpfile; then
29710            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29711        fi
29712
29713    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29714    # $tmpfile is the local file name for the downloaded file.
29715    VALID_TOOL=no
29716    if test "x$BDEPS_FTP" = xwget; then
29717       VALID_TOOL=yes
29718       wget -O $tmpfile $with_builddeps_server/$resource
29719    fi
29720    if test "x$BDEPS_FTP" = xlftp; then
29721       VALID_TOOL=yes
29722       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29723    fi
29724    if test "x$BDEPS_FTP" = xftp; then
29725        VALID_TOOL=yes
29726        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29727        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29728        FTPUSERPWD=${FTPSERVER%%@*}
29729        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29730            FTPUSER=${userpwd%%:*}
29731            FTPPWD=${userpwd#*@}
29732            FTPSERVER=${FTPSERVER#*@}
29733        else
29734            FTPUSER=ftp
29735            FTPPWD=ftp
29736        fi
29737        # the "pass" command does not work on some
29738        # ftp clients (read ftp.exe) but if it works,
29739        # passive mode is better!
29740        (\
29741            echo "user $FTPUSER $FTPPWD"        ;\
29742            echo "pass"                         ;\
29743            echo "bin"                          ;\
29744            echo "get $FTPPATH $tmpfile"              ;\
29745        ) | ftp -in $FTPSERVER
29746    fi
29747    if test "x$VALID_TOOL" != xyes; then
29748       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29749    fi
29750
29751        mv $tmpfile $installdir/$filename
29752        if test ! -s $installdir/$filename; then
29753            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29754        fi
29755        case "$extension" in
29756            zip)  echo "Unzipping $installdir/$filename..."
29757               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29758            ;;
29759            tar.gz) echo "Untaring $installdir/$filename..."
29760               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29761            ;;
29762            tgz) echo "Untaring $installdir/$filename..."
29763               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29764            ;;
29765            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29766            ;;
29767        esac
29768    fi
29769    if test -f $installdir/$filename.unpacked; then
29770        depdir=$installdir
29771    fi
29772
29773	    fi
29774            # Source the builddeps file again, because in the previous command, the depdir
29775            # was updated to point at the current build dependency install directory.
29776            . $builddepsfile
29777            # Now extract variables from the builddeps.conf files.
29778            theroot=${builddep_alsa_ROOT}
29779            thecflags=${builddep_alsa_CFLAGS}
29780            thelibs=${builddep_alsa_LIBS}
29781            if test "x$depdir" = x; then
29782                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
29783            fi
29784            ALSA=$depdir
29785            if test "x$theroot" != x; then
29786               ALSA="$theroot"
29787            fi
29788            if test "x$thecflags" != x; then
29789               ALSA_CFLAGS="$thecflags"
29790            fi
29791            if test "x$thelibs" != x; then
29792               ALSA_LIBS="$thelibs"
29793            fi
29794            ALSA_FOUND=yes
29795            else ALSA_FOUND=no
29796
29797        fi
29798        else ALSA_FOUND=no
29799
29800    fi
29801
29802	fi
29803	if test "x$ALSA_FOUND" = xno; then
29804
29805pkg_failed=no
29806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
29807$as_echo_n "checking for ALSA... " >&6; }
29808
29809if test -n "$ALSA_CFLAGS"; then
29810    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
29811 elif test -n "$PKG_CONFIG"; then
29812    if test -n "$PKG_CONFIG" && \
29813    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29814  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29815  ac_status=$?
29816  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29817  test $ac_status = 0; }; then
29818  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
29819else
29820  pkg_failed=yes
29821fi
29822 else
29823    pkg_failed=untried
29824fi
29825if test -n "$ALSA_LIBS"; then
29826    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
29827 elif test -n "$PKG_CONFIG"; then
29828    if test -n "$PKG_CONFIG" && \
29829    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
29830  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
29831  ac_status=$?
29832  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29833  test $ac_status = 0; }; then
29834  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
29835else
29836  pkg_failed=yes
29837fi
29838 else
29839    pkg_failed=untried
29840fi
29841
29842
29843
29844if test $pkg_failed = yes; then
29845
29846if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
29847        _pkg_short_errors_supported=yes
29848else
29849        _pkg_short_errors_supported=no
29850fi
29851        if test $_pkg_short_errors_supported = yes; then
29852	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
29853        else
29854	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
29855        fi
29856	# Put the nasty error message in config.log where it belongs
29857	echo "$ALSA_PKG_ERRORS" >&5
29858
29859	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29860$as_echo "no" >&6; }
29861                ALSA_FOUND=no
29862elif test $pkg_failed = untried; then
29863	ALSA_FOUND=no
29864else
29865	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
29866	ALSA_LIBS=$pkg_cv_ALSA_LIBS
29867        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29868$as_echo "yes" >&6; }
29869	ALSA_FOUND=yes
29870fi
29871	fi
29872	if test "x$ALSA_FOUND" = xno; then
29873	    for ac_header in alsa/asoundlib.h
29874do :
29875  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
29876if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
29877  cat >>confdefs.h <<_ACEOF
29878#define HAVE_ALSA_ASOUNDLIB_H 1
29879_ACEOF
29880 ALSA_FOUND=yes
29881	                      ALSA_CFLAGS=-Iignoreme
29882	                      ALSA_LIBS=-lasound
29883	                      DEFAULT_ALSA=yes
29884else
29885  ALSA_FOUND=no
29886fi
29887
29888done
29889
29890	fi
29891	if test "x$ALSA_FOUND" = xno; then
29892
29893    # Print a helpful message on how to acquire the necessary build dependency.
29894    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
29895    MISSING_DEPENDENCY=alsa
29896    PKGHANDLER_COMMAND=
29897
29898    case $PKGHANDLER in
29899	apt-get)
29900                apt_help     $MISSING_DEPENDENCY ;;
29901    yum)
29902                yum_help     $MISSING_DEPENDENCY ;;
29903	port)
29904                port_help    $MISSING_DEPENDENCY ;;
29905	pkgutil)
29906                pkgutil_help $MISSING_DEPENDENCY ;;
29907	pkgadd)
29908                pkgadd_help  $MISSING_DEPENDENCY ;;
29909    * )
29910      break ;;
29911    esac
29912
29913    if test "x$PKGHANDLER_COMMAND" != x; then
29914        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29915    fi
29916
29917	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
29918	fi
29919fi
29920
29921
29922
29923
29924
29925
29926
29927###############################################################################
29928#
29929# Check for the jpeg library
29930#
29931
29932USE_EXTERNAL_LIBJPEG=true
29933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
29934$as_echo_n "checking for main in -ljpeg... " >&6; }
29935if test "${ac_cv_lib_jpeg_main+set}" = set; then :
29936  $as_echo_n "(cached) " >&6
29937else
29938  ac_check_lib_save_LIBS=$LIBS
29939LIBS="-ljpeg  $LIBS"
29940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29941/* end confdefs.h.  */
29942
29943
29944int
29945main ()
29946{
29947return main ();
29948  ;
29949  return 0;
29950}
29951_ACEOF
29952if ac_fn_cxx_try_link "$LINENO"; then :
29953  ac_cv_lib_jpeg_main=yes
29954else
29955  ac_cv_lib_jpeg_main=no
29956fi
29957rm -f core conftest.err conftest.$ac_objext \
29958    conftest$ac_exeext conftest.$ac_ext
29959LIBS=$ac_check_lib_save_LIBS
29960fi
29961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
29962$as_echo "$ac_cv_lib_jpeg_main" >&6; }
29963if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
29964  cat >>confdefs.h <<_ACEOF
29965#define HAVE_LIBJPEG 1
29966_ACEOF
29967
29968  LIBS="-ljpeg $LIBS"
29969
29970else
29971   USE_EXTERNAL_LIBJPEG=false
29972               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
29973$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
29974
29975fi
29976
29977
29978
29979###############################################################################
29980#
29981# Check for the gif library
29982#
29983
29984USE_EXTERNAL_LIBJPEG=true
29985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
29986$as_echo_n "checking for main in -lgif... " >&6; }
29987if test "${ac_cv_lib_gif_main+set}" = set; then :
29988  $as_echo_n "(cached) " >&6
29989else
29990  ac_check_lib_save_LIBS=$LIBS
29991LIBS="-lgif  $LIBS"
29992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29993/* end confdefs.h.  */
29994
29995
29996int
29997main ()
29998{
29999return main ();
30000  ;
30001  return 0;
30002}
30003_ACEOF
30004if ac_fn_cxx_try_link "$LINENO"; then :
30005  ac_cv_lib_gif_main=yes
30006else
30007  ac_cv_lib_gif_main=no
30008fi
30009rm -f core conftest.err conftest.$ac_objext \
30010    conftest$ac_exeext conftest.$ac_ext
30011LIBS=$ac_check_lib_save_LIBS
30012fi
30013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30014$as_echo "$ac_cv_lib_gif_main" >&6; }
30015if test "x$ac_cv_lib_gif_main" = x""yes; then :
30016  cat >>confdefs.h <<_ACEOF
30017#define HAVE_LIBGIF 1
30018_ACEOF
30019
30020  LIBS="-lgif $LIBS"
30021
30022else
30023   USE_EXTERNAL_LIBGIF=false
30024               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30025$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30026
30027fi
30028
30029
30030
30031###############################################################################
30032#
30033# Check for the zlib library
30034#
30035
30036
30037# Check whether --with-zlib was given.
30038if test "${with_zlib+set}" = set; then :
30039  withval=$with_zlib;
30040fi
30041
30042
30043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30044$as_echo_n "checking for compress in -lz... " >&6; }
30045if test "${ac_cv_lib_z_compress+set}" = set; then :
30046  $as_echo_n "(cached) " >&6
30047else
30048  ac_check_lib_save_LIBS=$LIBS
30049LIBS="-lz  $LIBS"
30050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30051/* end confdefs.h.  */
30052
30053/* Override any GCC internal prototype to avoid an error.
30054   Use char because int might match the return type of a GCC
30055   builtin and then its argument prototype would still apply.  */
30056#ifdef __cplusplus
30057extern "C"
30058#endif
30059char compress ();
30060int
30061main ()
30062{
30063return compress ();
30064  ;
30065  return 0;
30066}
30067_ACEOF
30068if ac_fn_cxx_try_link "$LINENO"; then :
30069  ac_cv_lib_z_compress=yes
30070else
30071  ac_cv_lib_z_compress=no
30072fi
30073rm -f core conftest.err conftest.$ac_objext \
30074    conftest$ac_exeext conftest.$ac_ext
30075LIBS=$ac_check_lib_save_LIBS
30076fi
30077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30078$as_echo "$ac_cv_lib_z_compress" >&6; }
30079if test "x$ac_cv_lib_z_compress" = x""yes; then :
30080   ZLIB_FOUND=yes
30081else
30082   ZLIB_FOUND=no
30083fi
30084
30085
30086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30087$as_echo_n "checking for which zlib to use... " >&6; }
30088
30089DEFAULT_ZLIB=bundled
30090if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30091#
30092# On macosx default is system...on others default is
30093#
30094    DEFAULT_ZLIB=system
30095fi
30096
30097if test "x${ZLIB_FOUND}" != "xyes"; then
30098#
30099# If we don't find any system...set default to bundled
30100#
30101    DEFAULT_ZLIB=bundled
30102fi
30103
30104#
30105# If user didn't specify, use DEFAULT_ZLIB
30106#
30107if test "x${with_zlib}" = "x"; then
30108    with_zlib=${DEFAULT_ZLIB}
30109fi
30110
30111if test "x${with_zlib}" = "xbundled"; then
30112    USE_EXTERNAL_LIBZ=false
30113    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30114$as_echo "bundled" >&6; }
30115elif test "x${with_zlib}" = "xsystem"; then
30116    if test "x${ZLIB_FOUND}" = "xyes"; then
30117        USE_EXTERNAL_LIBZ=true
30118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30119$as_echo "system" >&6; }
30120    else
30121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30122$as_echo "system not found" >&6; }
30123        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30124    fi
30125else
30126    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30127fi
30128
30129
30130
30131###############################################################################
30132LIBZIP_CAN_USE_MMAP=true
30133
30134
30135
30136###############################################################################
30137#
30138# Check if altzone exists in time.h
30139#
30140
30141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30142/* end confdefs.h.  */
30143#include <time.h>
30144int
30145main ()
30146{
30147return (int)altzone;
30148  ;
30149  return 0;
30150}
30151_ACEOF
30152if ac_fn_cxx_try_link "$LINENO"; then :
30153  has_altzone=yes
30154else
30155  has_altzone=no
30156fi
30157rm -f core conftest.err conftest.$ac_objext \
30158    conftest$ac_exeext conftest.$ac_ext
30159if test "x$has_altzone" = xyes; then
30160
30161$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30162
30163fi
30164
30165###############################################################################
30166#
30167# Check the maths library
30168#
30169
30170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30171$as_echo_n "checking for cos in -lm... " >&6; }
30172if test "${ac_cv_lib_m_cos+set}" = set; then :
30173  $as_echo_n "(cached) " >&6
30174else
30175  ac_check_lib_save_LIBS=$LIBS
30176LIBS="-lm  $LIBS"
30177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30178/* end confdefs.h.  */
30179
30180/* Override any GCC internal prototype to avoid an error.
30181   Use char because int might match the return type of a GCC
30182   builtin and then its argument prototype would still apply.  */
30183#ifdef __cplusplus
30184extern "C"
30185#endif
30186char cos ();
30187int
30188main ()
30189{
30190return cos ();
30191  ;
30192  return 0;
30193}
30194_ACEOF
30195if ac_fn_cxx_try_link "$LINENO"; then :
30196  ac_cv_lib_m_cos=yes
30197else
30198  ac_cv_lib_m_cos=no
30199fi
30200rm -f core conftest.err conftest.$ac_objext \
30201    conftest$ac_exeext conftest.$ac_ext
30202LIBS=$ac_check_lib_save_LIBS
30203fi
30204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30205$as_echo "$ac_cv_lib_m_cos" >&6; }
30206if test "x$ac_cv_lib_m_cos" = x""yes; then :
30207  cat >>confdefs.h <<_ACEOF
30208#define HAVE_LIBM 1
30209_ACEOF
30210
30211  LIBS="-lm $LIBS"
30212
30213else
30214
30215                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30216$as_echo "$as_me: Maths library was not found" >&6;}
30217
30218fi
30219
30220
30221
30222###############################################################################
30223#
30224# Check for libdl.so
30225
30226save_LIBS="$LIBS"
30227LIBS=""
30228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30229$as_echo_n "checking for dlopen in -ldl... " >&6; }
30230if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30231  $as_echo_n "(cached) " >&6
30232else
30233  ac_check_lib_save_LIBS=$LIBS
30234LIBS="-ldl  $LIBS"
30235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30236/* end confdefs.h.  */
30237
30238/* Override any GCC internal prototype to avoid an error.
30239   Use char because int might match the return type of a GCC
30240   builtin and then its argument prototype would still apply.  */
30241#ifdef __cplusplus
30242extern "C"
30243#endif
30244char dlopen ();
30245int
30246main ()
30247{
30248return dlopen ();
30249  ;
30250  return 0;
30251}
30252_ACEOF
30253if ac_fn_cxx_try_link "$LINENO"; then :
30254  ac_cv_lib_dl_dlopen=yes
30255else
30256  ac_cv_lib_dl_dlopen=no
30257fi
30258rm -f core conftest.err conftest.$ac_objext \
30259    conftest$ac_exeext conftest.$ac_ext
30260LIBS=$ac_check_lib_save_LIBS
30261fi
30262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30263$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30264if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30265  cat >>confdefs.h <<_ACEOF
30266#define HAVE_LIBDL 1
30267_ACEOF
30268
30269  LIBS="-ldl $LIBS"
30270
30271fi
30272
30273LIBDL="$LIBS"
30274
30275LIBS="$save_LIBS"
30276
30277
30278
30279###############################################################################
30280#
30281# statically link libstdc++ before C++ ABI is stablized on Linux unless
30282# dynamic build is configured on command line.
30283#
30284
30285# Check whether --with-stdc++lib was given.
30286if test "${with_stdc__lib+set}" = set; then :
30287  withval=$with_stdc__lib;
30288    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30289        && test "x$with_stdc__lib" != xdefault; then
30290      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30291    fi
30292
30293else
30294  with_stdc__lib=default
30295
30296fi
30297
30298
30299if test "x$OPENJDK_TARGET_OS" = xlinux; then
30300    # Test if -lstdc++ works.
30301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30302$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30303    ac_ext=cpp
30304ac_cpp='$CXXCPP $CPPFLAGS'
30305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30308
30309    OLD_CXXFLAGS="$CXXFLAGS"
30310    CXXFLAGS="$CXXFLAGS -lstdc++"
30311    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30312/* end confdefs.h.  */
30313
30314int
30315main ()
30316{
30317return 0;
30318  ;
30319  return 0;
30320}
30321_ACEOF
30322if ac_fn_cxx_try_link "$LINENO"; then :
30323  has_dynamic_libstdcxx=yes
30324else
30325  has_dynamic_libstdcxx=no
30326fi
30327rm -f core conftest.err conftest.$ac_objext \
30328    conftest$ac_exeext conftest.$ac_ext
30329    CXXFLAGS="$OLD_CXXFLAGS"
30330    ac_ext=cpp
30331ac_cpp='$CXXCPP $CPPFLAGS'
30332ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30333ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30334ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30335
30336    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
30337$as_echo "$has_dynamic_libstdcxx" >&6; }
30338
30339    # Test if stdc++ can be linked statically.
30340    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
30341$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
30342    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
30343    ac_ext=cpp
30344ac_cpp='$CXXCPP $CPPFLAGS'
30345ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30346ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30347ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30348
30349    OLD_LIBS="$LIBS"
30350    OLD_CXX="$CXX"
30351    LIBS="$STATIC_STDCXX_FLAGS"
30352    CXX="$CC"
30353    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30354/* end confdefs.h.  */
30355
30356int
30357main ()
30358{
30359return 0;
30360  ;
30361  return 0;
30362}
30363_ACEOF
30364if ac_fn_cxx_try_link "$LINENO"; then :
30365  has_static_libstdcxx=yes
30366else
30367  has_static_libstdcxx=no
30368fi
30369rm -f core conftest.err conftest.$ac_objext \
30370    conftest$ac_exeext conftest.$ac_ext
30371    LIBS="$OLD_LIBS"
30372    CXX="$OLD_CXX"
30373    ac_ext=cpp
30374ac_cpp='$CXXCPP $CPPFLAGS'
30375ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30376ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30377ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30378
30379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
30380$as_echo "$has_static_libstdcxx" >&6; }
30381
30382    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
30383        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
30384    fi
30385
30386    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
30387        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
30388    fi
30389
30390    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
30391        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
30392    fi
30393
30394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
30395$as_echo_n "checking how to link with libstdc++... " >&6; }
30396    # If dynamic was requested, it's available since it would fail above otherwise.
30397    # If dynamic wasn't requested, go with static unless it isn't available.
30398    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
30399        LIBCXX="$LIBCXX -lstdc++"
30400        LDCXX="$CXX"
30401        STATIC_CXX_SETTING="STATIC_CXX=false"
30402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
30403$as_echo "dynamic" >&6; }
30404    else
30405        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
30406        LDCXX="$CC"
30407        STATIC_CXX_SETTING="STATIC_CXX=true"
30408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
30409$as_echo "static" >&6; }
30410    fi
30411fi
30412
30413
30414# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
30415if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
30416    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
30417fi
30418
30419# TODO better (platform agnostic) test
30420if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
30421    LIBCXX="-lstdc++"
30422fi
30423
30424
30425
30426
30427
30428# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
30429
30430# When using cygwin or msys, we need a wrapper binary that renames
30431# /cygdrive/c/ arguments into c:/ arguments and peeks into
30432# @files and rewrites these too! This wrapper binary is
30433# called fixpath.
30434FIXPATH=
30435if test "x$OPENJDK_BUILD_OS" = xwindows; then
30436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
30437$as_echo_n "checking if fixpath can be created... " >&6; }
30438    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
30439    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
30440    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
30441      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
30442      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
30443      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
30444      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
30445    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
30446      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
30447      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
30448
30449      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
30450      # @ was chosen as separator to minimize risk of other tools messing around with it
30451      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
30452      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
30453
30454      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
30455    fi
30456    rm -f $OUTPUT_ROOT/fixpath*
30457    cd $OUTPUT_ROOT
30458    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
30459    cd $CURDIR
30460
30461    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
30462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30463$as_echo "no" >&6; }
30464        cat $OUTPUT_ROOT/fixpath1.log
30465        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
30466    fi
30467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30468$as_echo "yes" >&6; }
30469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
30470$as_echo_n "checking if fixpath.exe works... " >&6; }
30471    cd $OUTPUT_ROOT
30472    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
30473    cd $CURDIR
30474    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
30475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30476$as_echo "no" >&6; }
30477        cat $OUTPUT_ROOT/fixpath2.log
30478        as_fn_error $? "fixpath did not work!" "$LINENO" 5
30479    fi
30480    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30481$as_echo "yes" >&6; }
30482    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
30483fi
30484
30485
30486
30487
30488###############################################################################
30489#
30490# We need to do some final tweaking, when everything else is done.
30491#
30492###############################################################################
30493
30494
30495HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
30496
30497
30498# The name of the Service Agent jar.
30499SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
30500if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
30501    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
30502fi
30503
30504
30505
30506
30507###############################################################################
30508#
30509# Configure parts of the build that only affect the build performance,
30510# not the result.
30511#
30512###############################################################################
30513
30514
30515# How many cores do we have on this build system?
30516
30517# Check whether --with-num-cores was given.
30518if test "${with_num_cores+set}" = set; then :
30519  withval=$with_num_cores;
30520fi
30521
30522if test "x$with_num_cores" = x; then
30523    # The number of cores were not specified, try to probe them.
30524
30525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
30526$as_echo_n "checking for number of cores... " >&6; }
30527    NUM_CORES=1
30528    FOUND_CORES=no
30529
30530    if test -f /proc/cpuinfo; then
30531        # Looks like a Linux (or cygwin) system
30532        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
30533        FOUND_CORES=yes
30534    elif test -x /usr/sbin/psrinfo; then
30535        # Looks like a Solaris system
30536        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
30537        FOUND_CORES=yes
30538    elif test -x /usr/sbin/system_profiler; then
30539        # Looks like a MacOSX system
30540        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
30541        FOUND_CORES=yes
30542    elif test -n "$NUMBER_OF_PROCESSORS"; then
30543        # On windows, look in the env
30544        NUM_CORES=$NUMBER_OF_PROCESSORS
30545        FOUND_CORES=yes
30546    fi
30547
30548    # For c/c++ code we run twice as many concurrent build
30549    # jobs than we have cores, otherwise we will stall on io.
30550    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30551
30552    if test "x$FOUND_CORES" = xyes; then
30553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
30554$as_echo "$NUM_CORES" >&6; }
30555    else
30556        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
30557$as_echo "could not detect number of cores, defaulting to 1" >&6; }
30558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
30559$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
30560    fi
30561
30562
30563else
30564    NUM_CORES=$with_num_cores
30565    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
30566fi
30567
30568
30569
30570
30571# How much memory do we have on this build system?
30572
30573# Check whether --with-memory-size was given.
30574if test "${with_memory_size+set}" = set; then :
30575  withval=$with_memory_size;
30576fi
30577
30578if test "x$with_memory_size" = x; then
30579    # The memory size was not specified, try to probe it.
30580
30581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
30582$as_echo_n "checking for memory size... " >&6; }
30583    # Default to 1024 MB
30584    MEMORY_SIZE=1024
30585    FOUND_MEM=no
30586
30587    if test -f /proc/meminfo; then
30588        # Looks like a Linux (or cygwin) system
30589        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
30590        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
30591        FOUND_MEM=yes
30592    elif test -x /usr/sbin/prtconf; then
30593        # Looks like a Solaris system
30594        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
30595        FOUND_MEM=yes
30596    elif test -x /usr/sbin/system_profiler; then
30597        # Looks like a MacOSX system
30598        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
30599        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
30600        FOUND_MEM=yes
30601    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
30602        # Windows, but without cygwin
30603        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
30604        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
30605        FOUND_MEM=yes
30606    fi
30607
30608    if test "x$FOUND_MEM" = xyes; then
30609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
30610$as_echo "$MEMORY_SIZE MB" >&6; }
30611    else
30612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
30613$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
30614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
30615$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
30616    fi
30617
30618else
30619    MEMORY_SIZE=$with_memory_size
30620fi
30621
30622
30623
30624# Setup smart javac (after cores and memory have been setup)
30625
30626
30627# Check whether --with-sjavac-server-java was given.
30628if test "${with_sjavac_server_java+set}" = set; then :
30629  withval=$with_sjavac_server_java;
30630fi
30631
30632
30633if test "x$with_sjavac_server_java" != x; then
30634    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
30635    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
30636    if test "x$FOUND_VERSION" = x; then
30637        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
30638    fi
30639else
30640    SJAVAC_SERVER_JAVA=""
30641    # Hotspot specific options.
30642
30643    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30644    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
30645    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
30646    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
30647    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30648        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
30649    fi
30650
30651    # JRockit specific options.
30652
30653    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
30654    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
30655    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
30656    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
30657    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30658        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
30659    fi
30660
30661    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
30662fi
30663
30664
30665
30666# Check whether --with-sjavac-server-cores was given.
30667if test "${with_sjavac_server_cores+set}" = set; then :
30668  withval=$with_sjavac_server_cores;
30669fi
30670
30671if test "x$with_sjavac_server_cores" != x; then
30672    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
30673else
30674    if test "$NUM_CORES" -gt 16; then
30675        # We set this arbitrary limit because we want to limit the heap
30676        # size of the javac server.
30677        # In the future we will make the javac compilers in the server
30678        # share more and more state, thus enabling us to use more and
30679        # more concurrent threads in the server.
30680        SJAVAC_SERVER_CORES="16"
30681    else
30682        SJAVAC_SERVER_CORES="$NUM_CORES"
30683    fi
30684
30685    if test "$MEMORY_SIZE" -gt "17000"; then
30686        MAX_HEAP_MEM=10000
30687
30688    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30689    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30690    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30691    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30692    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30693        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30694    fi
30695
30696
30697    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30698    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
30699    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
30700    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
30701    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30702        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
30703    fi
30704
30705    elif test "$MEMORY_SIZE" -gt "10000"; then
30706        MAX_HEAP_MEM=6000
30707
30708    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30709    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30710    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30711    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30712    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30713        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30714    fi
30715
30716
30717    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30718    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
30719    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
30720    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
30721    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30722        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
30723    fi
30724
30725    elif test "$MEMORY_SIZE" -gt "5000"; then
30726        MAX_HEAP_MEM=3000
30727
30728    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30729    # If so, then append -d64 to SJAVAC_SERVER_JAVA
30730    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
30731    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
30732    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30733        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
30734    fi
30735
30736
30737    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30738    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
30739    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
30740    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
30741    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30742        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
30743    fi
30744
30745    elif test "$MEMORY_SIZE" -gt "3800"; then
30746        MAX_HEAP_MEM=2500
30747
30748    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30749    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
30750    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
30751    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
30752    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30753        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
30754    fi
30755
30756    elif test "$MEMORY_SIZE" -gt "1900"; then
30757        MAX_HEAP_MEM=1200
30758
30759    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30760    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
30761    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
30762    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
30763    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30764        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
30765    fi
30766
30767    elif test "$MEMORY_SIZE" -gt "1000"; then
30768        MAX_HEAP_MEM=900
30769
30770    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30771    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
30772    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
30773    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
30774    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30775        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
30776    fi
30777
30778    else
30779        MAX_HEAP_MEM=512
30780
30781    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30782    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
30783    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
30784    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
30785    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30786        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
30787    fi
30788
30789    fi
30790
30791
30792    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30793    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
30794    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
30795    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
30796    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30797        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
30798    fi
30799
30800
30801    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30802    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
30803    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
30804    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
30805    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30806        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
30807    fi
30808
30809
30810    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
30811    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
30812    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
30813    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
30814    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30815        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
30816    fi
30817
30818
30819    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
30820    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
30821        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
30822$as_echo_n "checking if number of server cores must be reduced... " >&6; }
30823        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
30824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
30825$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
30826    fi
30827fi
30828
30829
30830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
30831$as_echo_n "checking whether to use sjavac... " >&6; }
30832# Check whether --enable-sjavac was given.
30833if test "${enable_sjavac+set}" = set; then :
30834  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
30835else
30836  ENABLE_SJAVAC='no'
30837fi
30838
30839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
30840$as_echo "$ENABLE_SJAVAC" >&6; }
30841
30842
30843if test "x$ENABLE_SJAVAC" = xyes; then
30844    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
30845else
30846    SJAVAC_SERVER_DIR=
30847fi
30848
30849
30850
30851
30852# Can the C/C++ compiler use precompiled headers?
30853
30854
30855###############################################################################
30856#
30857# Can the C/C++ compiler use precompiled headers?
30858#
30859# Check whether --enable-precompiled-headers was given.
30860if test "${enable_precompiled_headers+set}" = set; then :
30861  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
30862else
30863  ENABLE_PRECOMPH=yes
30864fi
30865
30866
30867USE_PRECOMPILED_HEADER=1
30868if test "x$ENABLE_PRECOMPH" = xno; then
30869    USE_PRECOMPILED_HEADER=0
30870fi
30871
30872if test "x$ENABLE_PRECOMPH" = xyes; then
30873    # Check that the compiler actually supports precomp headers.
30874    if test "x$GCC" = xyes; then
30875         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
30876$as_echo_n "checking that precompiled headers work... " >&6; }
30877         echo "int alfa();" > conftest.h
30878         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
30879         if test ! -f conftest.hpp.gch; then
30880             USE_PRECOMPILED_HEADER=0
30881             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30882$as_echo "no" >&6; }
30883         else
30884             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30885$as_echo "yes" >&6; }
30886         fi
30887         rm -f conftest.h conftest.hpp.gch
30888    fi
30889fi
30890
30891
30892
30893
30894# Setup use of ccache, if available
30895
30896    # Check whether --enable-ccache was given.
30897if test "${enable_ccache+set}" = set; then :
30898  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
30899else
30900  ENABLE_CCACHE=yes
30901fi
30902
30903    if test "x$ENABLE_CCACHE" = xyes; then
30904        # Extract the first word of "ccache", so it can be a program name with args.
30905set dummy ccache; ac_word=$2
30906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30907$as_echo_n "checking for $ac_word... " >&6; }
30908if test "${ac_cv_path_CCACHE+set}" = set; then :
30909  $as_echo_n "(cached) " >&6
30910else
30911  case $CCACHE in
30912  [\\/]* | ?:[\\/]*)
30913  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
30914  ;;
30915  *)
30916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30917for as_dir in $PATH
30918do
30919  IFS=$as_save_IFS
30920  test -z "$as_dir" && as_dir=.
30921    for ac_exec_ext in '' $ac_executable_extensions; do
30922  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
30923    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
30924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30925    break 2
30926  fi
30927done
30928  done
30929IFS=$as_save_IFS
30930
30931  ;;
30932esac
30933fi
30934CCACHE=$ac_cv_path_CCACHE
30935if test -n "$CCACHE"; then
30936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
30937$as_echo "$CCACHE" >&6; }
30938else
30939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30940$as_echo "no" >&6; }
30941fi
30942
30943
30944    else
30945        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
30946$as_echo_n "checking for ccache... " >&6; }
30947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
30948$as_echo "explicitly disabled" >&6; }
30949        CCACHE=
30950    fi
30951
30952
30953
30954# Check whether --with-ccache-dir was given.
30955if test "${with_ccache_dir+set}" = set; then :
30956  withval=$with_ccache_dir;
30957fi
30958
30959
30960    if test "x$with_ccache_dir" != x; then
30961        # When using a non home ccache directory, assume the use is to share ccache files
30962        # with other users. Thus change the umask.
30963        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
30964    fi
30965    CCACHE_FOUND=""
30966    if test "x$CCACHE" != x; then
30967
30968    if test "x$CCACHE" != x; then
30969        CCACHE_FOUND="true"
30970        # Only use ccache if it is 3.1.4 or later, which supports
30971        # precompiled headers.
30972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
30973$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
30974        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
30975        if test "x$HAS_GOOD_CCACHE" = x; then
30976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
30977$as_echo "no, disabling ccache" >&6; }
30978            CCACHE=
30979        else
30980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30981$as_echo "yes" >&6; }
30982            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
30983$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
30984            PUSHED_FLAGS="$CXXFLAGS"
30985            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
30986            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30987/* end confdefs.h.  */
30988
30989int
30990main ()
30991{
30992
30993  ;
30994  return 0;
30995}
30996_ACEOF
30997if ac_fn_cxx_try_compile "$LINENO"; then :
30998  CC_KNOWS_CCACHE_TRICK=yes
30999else
31000  CC_KNOWS_CCACHE_TRICK=no
31001fi
31002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31003            CXXFLAGS="$PUSHED_FLAGS"
31004            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31005                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31006$as_echo "yes" >&6; }
31007            else
31008                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31009$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31010                CCACHE=
31011            fi
31012        fi
31013    fi
31014
31015    if test "x$CCACHE" != x; then
31016        CCACHE_SLOPPINESS=time_macros
31017        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31018        CCACHE_FLAGS=-fpch-preprocess
31019
31020        if test "x$SET_CCACHE_DIR" != x; then
31021            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31022	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31023        fi
31024    fi
31025
31026    fi
31027
31028
31029###############################################################################
31030#
31031# And now the finish...
31032#
31033###############################################################################
31034
31035# Check for some common pitfalls
31036
31037
31038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31039$as_echo_n "checking if build directory is on local disk... " >&6; }
31040
31041	# df -l lists only local disks; if the given directory is not found then
31042	# a non-zero exit code is given
31043  if test "x$DF" = x; then
31044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31045      # msys does not have df; use Windows "net use" instead.
31046      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31047      if test "x$IS_NETWORK_DISK" = x; then
31048        OUTPUT_DIR_IS_LOCAL="yes"
31049      else
31050        OUTPUT_DIR_IS_LOCAL="no"
31051      fi
31052    else
31053      # No df here, say it's local
31054      OUTPUT_DIR_IS_LOCAL="yes"
31055    fi
31056  else
31057    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31058      OUTPUT_DIR_IS_LOCAL="yes"
31059    else
31060      OUTPUT_DIR_IS_LOCAL="no"
31061    fi
31062  fi
31063
31064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31065$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31066
31067# Check if the user has any old-style ALT_ variables set.
31068FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31069
31070# Before generating output files, test if they exist. If they do, this is a reconfigure.
31071# Since we can't properly handle the dependencies for this, warn the user about the situation
31072if test -e $OUTPUT_ROOT/spec.gmk; then
31073  IS_RECONFIGURE=yes
31074else
31075  IS_RECONFIGURE=no
31076fi
31077
31078if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31079  HIDE_PERFORMANCE_HINTS=yes
31080else
31081  HIDE_PERFORMANCE_HINTS=no
31082  # Hide it the next time around...
31083  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31084fi
31085
31086
31087
31088# At the end, call the custom hook. (Dummy macro if no custom sources available)
31089
31090
31091# We're messing a bit with internal autoconf variables to put the config.status
31092# in the output directory instead of the current directory.
31093CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31094# Create the actual output files. Now the main work of configure is done.
31095cat >confcache <<\_ACEOF
31096# This file is a shell script that caches the results of configure
31097# tests run on this system so they can be shared between configure
31098# scripts and configure runs, see configure's option --config-cache.
31099# It is not useful on other systems.  If it contains results you don't
31100# want to keep, you may remove or edit it.
31101#
31102# config.status only pays attention to the cache file if you give it
31103# the --recheck option to rerun configure.
31104#
31105# `ac_cv_env_foo' variables (set or unset) will be overridden when
31106# loading this file, other *unset* `ac_cv_foo' will be assigned the
31107# following values.
31108
31109_ACEOF
31110
31111# The following way of writing the cache mishandles newlines in values,
31112# but we know of no workaround that is simple, portable, and efficient.
31113# So, we kill variables containing newlines.
31114# Ultrix sh set writes to stderr and can't be redirected directly,
31115# and sets the high bit in the cache file unless we assign to the vars.
31116(
31117  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31118    eval ac_val=\$$ac_var
31119    case $ac_val in #(
31120    *${as_nl}*)
31121      case $ac_var in #(
31122      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31123$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31124      esac
31125      case $ac_var in #(
31126      _ | IFS | as_nl) ;; #(
31127      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31128      *) { eval $ac_var=; unset $ac_var;} ;;
31129      esac ;;
31130    esac
31131  done
31132
31133  (set) 2>&1 |
31134    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31135    *${as_nl}ac_space=\ *)
31136      # `set' does not quote correctly, so add quotes: double-quote
31137      # substitution turns \\\\ into \\, and sed turns \\ into \.
31138      sed -n \
31139	"s/'/'\\\\''/g;
31140	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31141      ;; #(
31142    *)
31143      # `set' quotes correctly as required by POSIX, so do not add quotes.
31144      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31145      ;;
31146    esac |
31147    sort
31148) |
31149  sed '
31150     /^ac_cv_env_/b end
31151     t clear
31152     :clear
31153     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31154     t end
31155     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31156     :end' >>confcache
31157if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31158  if test -w "$cache_file"; then
31159    test "x$cache_file" != "x/dev/null" &&
31160      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31161$as_echo "$as_me: updating cache $cache_file" >&6;}
31162    cat confcache >$cache_file
31163  else
31164    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31165$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31166  fi
31167fi
31168rm -f confcache
31169
31170test "x$prefix" = xNONE && prefix=$ac_default_prefix
31171# Let make expand exec_prefix.
31172test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31173
31174DEFS=-DHAVE_CONFIG_H
31175
31176ac_libobjs=
31177ac_ltlibobjs=
31178U=
31179for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31180  # 1. Remove the extension, and $U if already installed.
31181  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31182  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31183  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31184  #    will be set to the directory where LIBOBJS objects are built.
31185  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31186  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31187done
31188LIBOBJS=$ac_libobjs
31189
31190LTLIBOBJS=$ac_ltlibobjs
31191
31192
31193
31194: ${CONFIG_STATUS=./config.status}
31195ac_write_fail=0
31196ac_clean_files_save=$ac_clean_files
31197ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31198{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31199$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31200as_write_fail=0
31201cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31202#! $SHELL
31203# Generated by $as_me.
31204# Run this file to recreate the current configuration.
31205# Compiler output produced by configure, useful for debugging
31206# configure, is in config.log if it exists.
31207
31208debug=false
31209ac_cs_recheck=false
31210ac_cs_silent=false
31211
31212SHELL=\${CONFIG_SHELL-$SHELL}
31213export SHELL
31214_ASEOF
31215cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31216## -------------------- ##
31217## M4sh Initialization. ##
31218## -------------------- ##
31219
31220# Be more Bourne compatible
31221DUALCASE=1; export DUALCASE # for MKS sh
31222if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31223  emulate sh
31224  NULLCMD=:
31225  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31226  # is contrary to our usage.  Disable this feature.
31227  alias -g '${1+"$@"}'='"$@"'
31228  setopt NO_GLOB_SUBST
31229else
31230  case `(set -o) 2>/dev/null` in #(
31231  *posix*) :
31232    set -o posix ;; #(
31233  *) :
31234     ;;
31235esac
31236fi
31237
31238
31239as_nl='
31240'
31241export as_nl
31242# Printing a long string crashes Solaris 7 /usr/bin/printf.
31243as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31244as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31245as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31246# Prefer a ksh shell builtin over an external printf program on Solaris,
31247# but without wasting forks for bash or zsh.
31248if test -z "$BASH_VERSION$ZSH_VERSION" \
31249    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31250  as_echo='print -r --'
31251  as_echo_n='print -rn --'
31252elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31253  as_echo='printf %s\n'
31254  as_echo_n='printf %s'
31255else
31256  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31257    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31258    as_echo_n='/usr/ucb/echo -n'
31259  else
31260    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31261    as_echo_n_body='eval
31262      arg=$1;
31263      case $arg in #(
31264      *"$as_nl"*)
31265	expr "X$arg" : "X\\(.*\\)$as_nl";
31266	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31267      esac;
31268      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31269    '
31270    export as_echo_n_body
31271    as_echo_n='sh -c $as_echo_n_body as_echo'
31272  fi
31273  export as_echo_body
31274  as_echo='sh -c $as_echo_body as_echo'
31275fi
31276
31277# The user is always right.
31278if test "${PATH_SEPARATOR+set}" != set; then
31279  PATH_SEPARATOR=:
31280  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31281    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31282      PATH_SEPARATOR=';'
31283  }
31284fi
31285
31286
31287# IFS
31288# We need space, tab and new line, in precisely that order.  Quoting is
31289# there to prevent editors from complaining about space-tab.
31290# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31291# splitting by setting IFS to empty value.)
31292IFS=" ""	$as_nl"
31293
31294# Find who we are.  Look in the path if we contain no directory separator.
31295case $0 in #((
31296  *[\\/]* ) as_myself=$0 ;;
31297  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31298for as_dir in $PATH
31299do
31300  IFS=$as_save_IFS
31301  test -z "$as_dir" && as_dir=.
31302    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31303  done
31304IFS=$as_save_IFS
31305
31306     ;;
31307esac
31308# We did not find ourselves, most probably we were run as `sh COMMAND'
31309# in which case we are not to be found in the path.
31310if test "x$as_myself" = x; then
31311  as_myself=$0
31312fi
31313if test ! -f "$as_myself"; then
31314  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31315  exit 1
31316fi
31317
31318# Unset variables that we do not need and which cause bugs (e.g. in
31319# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31320# suppresses any "Segmentation fault" message there.  '((' could
31321# trigger a bug in pdksh 5.2.14.
31322for as_var in BASH_ENV ENV MAIL MAILPATH
31323do eval test x\${$as_var+set} = xset \
31324  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
31325done
31326PS1='$ '
31327PS2='> '
31328PS4='+ '
31329
31330# NLS nuisances.
31331LC_ALL=C
31332export LC_ALL
31333LANGUAGE=C
31334export LANGUAGE
31335
31336# CDPATH.
31337(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
31338
31339
31340# as_fn_error STATUS ERROR [LINENO LOG_FD]
31341# ----------------------------------------
31342# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
31343# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
31344# script with STATUS, using 1 if that was 0.
31345as_fn_error ()
31346{
31347  as_status=$1; test $as_status -eq 0 && as_status=1
31348  if test "$4"; then
31349    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
31350    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
31351  fi
31352  $as_echo "$as_me: error: $2" >&2
31353  as_fn_exit $as_status
31354} # as_fn_error
31355
31356
31357# as_fn_set_status STATUS
31358# -----------------------
31359# Set $? to STATUS, without forking.
31360as_fn_set_status ()
31361{
31362  return $1
31363} # as_fn_set_status
31364
31365# as_fn_exit STATUS
31366# -----------------
31367# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
31368as_fn_exit ()
31369{
31370  set +e
31371  as_fn_set_status $1
31372  exit $1
31373} # as_fn_exit
31374
31375# as_fn_unset VAR
31376# ---------------
31377# Portably unset VAR.
31378as_fn_unset ()
31379{
31380  { eval $1=; unset $1;}
31381}
31382as_unset=as_fn_unset
31383# as_fn_append VAR VALUE
31384# ----------------------
31385# Append the text in VALUE to the end of the definition contained in VAR. Take
31386# advantage of any shell optimizations that allow amortized linear growth over
31387# repeated appends, instead of the typical quadratic growth present in naive
31388# implementations.
31389if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
31390  eval 'as_fn_append ()
31391  {
31392    eval $1+=\$2
31393  }'
31394else
31395  as_fn_append ()
31396  {
31397    eval $1=\$$1\$2
31398  }
31399fi # as_fn_append
31400
31401# as_fn_arith ARG...
31402# ------------------
31403# Perform arithmetic evaluation on the ARGs, and store the result in the
31404# global $as_val. Take advantage of shells that can avoid forks. The arguments
31405# must be portable across $(()) and expr.
31406if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
31407  eval 'as_fn_arith ()
31408  {
31409    as_val=$(( $* ))
31410  }'
31411else
31412  as_fn_arith ()
31413  {
31414    as_val=`expr "$@" || test $? -eq 1`
31415  }
31416fi # as_fn_arith
31417
31418
31419if expr a : '\(a\)' >/dev/null 2>&1 &&
31420   test "X`expr 00001 : '.*\(...\)'`" = X001; then
31421  as_expr=expr
31422else
31423  as_expr=false
31424fi
31425
31426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
31427  as_basename=basename
31428else
31429  as_basename=false
31430fi
31431
31432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31433  as_dirname=dirname
31434else
31435  as_dirname=false
31436fi
31437
31438as_me=`$as_basename -- "$0" ||
31439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
31440	 X"$0" : 'X\(//\)$' \| \
31441	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
31442$as_echo X/"$0" |
31443    sed '/^.*\/\([^/][^/]*\)\/*$/{
31444	    s//\1/
31445	    q
31446	  }
31447	  /^X\/\(\/\/\)$/{
31448	    s//\1/
31449	    q
31450	  }
31451	  /^X\/\(\/\).*/{
31452	    s//\1/
31453	    q
31454	  }
31455	  s/.*/./; q'`
31456
31457# Avoid depending upon Character Ranges.
31458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
31459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
31460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
31461as_cr_digits='0123456789'
31462as_cr_alnum=$as_cr_Letters$as_cr_digits
31463
31464ECHO_C= ECHO_N= ECHO_T=
31465case `echo -n x` in #(((((
31466-n*)
31467  case `echo 'xy\c'` in
31468  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
31469  xy)  ECHO_C='\c';;
31470  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
31471       ECHO_T='	';;
31472  esac;;
31473*)
31474  ECHO_N='-n';;
31475esac
31476
31477rm -f conf$$ conf$$.exe conf$$.file
31478if test -d conf$$.dir; then
31479  rm -f conf$$.dir/conf$$.file
31480else
31481  rm -f conf$$.dir
31482  mkdir conf$$.dir 2>/dev/null
31483fi
31484if (echo >conf$$.file) 2>/dev/null; then
31485  if ln -s conf$$.file conf$$ 2>/dev/null; then
31486    as_ln_s='ln -s'
31487    # ... but there are two gotchas:
31488    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31489    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31490    # In both cases, we have to default to `cp -p'.
31491    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
31492      as_ln_s='cp -p'
31493  elif ln conf$$.file conf$$ 2>/dev/null; then
31494    as_ln_s=ln
31495  else
31496    as_ln_s='cp -p'
31497  fi
31498else
31499  as_ln_s='cp -p'
31500fi
31501rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31502rmdir conf$$.dir 2>/dev/null
31503
31504
31505# as_fn_mkdir_p
31506# -------------
31507# Create "$as_dir" as a directory, including parents if necessary.
31508as_fn_mkdir_p ()
31509{
31510
31511  case $as_dir in #(
31512  -*) as_dir=./$as_dir;;
31513  esac
31514  test -d "$as_dir" || eval $as_mkdir_p || {
31515    as_dirs=
31516    while :; do
31517      case $as_dir in #(
31518      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
31519      *) as_qdir=$as_dir;;
31520      esac
31521      as_dirs="'$as_qdir' $as_dirs"
31522      as_dir=`$as_dirname -- "$as_dir" ||
31523$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31524	 X"$as_dir" : 'X\(//\)[^/]' \| \
31525	 X"$as_dir" : 'X\(//\)$' \| \
31526	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31527$as_echo X"$as_dir" |
31528    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31529	    s//\1/
31530	    q
31531	  }
31532	  /^X\(\/\/\)[^/].*/{
31533	    s//\1/
31534	    q
31535	  }
31536	  /^X\(\/\/\)$/{
31537	    s//\1/
31538	    q
31539	  }
31540	  /^X\(\/\).*/{
31541	    s//\1/
31542	    q
31543	  }
31544	  s/.*/./; q'`
31545      test -d "$as_dir" && break
31546    done
31547    test -z "$as_dirs" || eval "mkdir $as_dirs"
31548  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
31549
31550
31551} # as_fn_mkdir_p
31552if mkdir -p . 2>/dev/null; then
31553  as_mkdir_p='mkdir -p "$as_dir"'
31554else
31555  test -d ./-p && rmdir ./-p
31556  as_mkdir_p=false
31557fi
31558
31559if test -x / >/dev/null 2>&1; then
31560  as_test_x='test -x'
31561else
31562  if ls -dL / >/dev/null 2>&1; then
31563    as_ls_L_option=L
31564  else
31565    as_ls_L_option=
31566  fi
31567  as_test_x='
31568    eval sh -c '\''
31569      if test -d "$1"; then
31570	test -d "$1/.";
31571      else
31572	case $1 in #(
31573	-*)set "./$1";;
31574	esac;
31575	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
31576	???[sx]*):;;*)false;;esac;fi
31577    '\'' sh
31578  '
31579fi
31580as_executable_p=$as_test_x
31581
31582# Sed expression to map a string onto a valid CPP name.
31583as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
31584
31585# Sed expression to map a string onto a valid variable name.
31586as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31587
31588
31589exec 6>&1
31590## ----------------------------------- ##
31591## Main body of $CONFIG_STATUS script. ##
31592## ----------------------------------- ##
31593_ASEOF
31594test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31595
31596cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31597# Save the log message, to keep $0 and so on meaningful, and to
31598# report actual input values of CONFIG_FILES etc. instead of their
31599# values after options handling.
31600ac_log="
31601This file was extended by OpenJDK $as_me jdk8, which was
31602generated by GNU Autoconf 2.67.  Invocation command line was
31603
31604  CONFIG_FILES    = $CONFIG_FILES
31605  CONFIG_HEADERS  = $CONFIG_HEADERS
31606  CONFIG_LINKS    = $CONFIG_LINKS
31607  CONFIG_COMMANDS = $CONFIG_COMMANDS
31608  $ $0 $@
31609
31610on `(hostname || uname -n) 2>/dev/null | sed 1q`
31611"
31612
31613_ACEOF
31614
31615case $ac_config_files in *"
31616"*) set x $ac_config_files; shift; ac_config_files=$*;;
31617esac
31618
31619case $ac_config_headers in *"
31620"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
31621esac
31622
31623
31624cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31625# Files that config.status was made for.
31626config_files="$ac_config_files"
31627config_headers="$ac_config_headers"
31628
31629_ACEOF
31630
31631cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31632ac_cs_usage="\
31633\`$as_me' instantiates files and other configuration actions
31634from templates according to the current configuration.  Unless the files
31635and actions are specified as TAGs, all are instantiated by default.
31636
31637Usage: $0 [OPTION]... [TAG]...
31638
31639  -h, --help       print this help, then exit
31640  -V, --version    print version number and configuration settings, then exit
31641      --config     print configuration, then exit
31642  -q, --quiet, --silent
31643                   do not print progress messages
31644  -d, --debug      don't remove temporary files
31645      --recheck    update $as_me by reconfiguring in the same conditions
31646      --file=FILE[:TEMPLATE]
31647                   instantiate the configuration file FILE
31648      --header=FILE[:TEMPLATE]
31649                   instantiate the configuration header FILE
31650
31651Configuration files:
31652$config_files
31653
31654Configuration headers:
31655$config_headers
31656
31657Report bugs to <build-dev@openjdk.java.net>.
31658OpenJDK home page: <http://openjdk.java.net>."
31659
31660_ACEOF
31661cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31662ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31663ac_cs_version="\\
31664OpenJDK config.status jdk8
31665configured by $0, generated by GNU Autoconf 2.67,
31666  with options \\"\$ac_cs_config\\"
31667
31668Copyright (C) 2010 Free Software Foundation, Inc.
31669This config.status script is free software; the Free Software Foundation
31670gives unlimited permission to copy, distribute and modify it."
31671
31672ac_pwd='$ac_pwd'
31673srcdir='$srcdir'
31674AWK='$AWK'
31675test -n "\$AWK" || AWK=awk
31676_ACEOF
31677
31678cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31679# The default lists apply if the user does not specify any file.
31680ac_need_defaults=:
31681while test $# != 0
31682do
31683  case $1 in
31684  --*=?*)
31685    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31686    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31687    ac_shift=:
31688    ;;
31689  --*=)
31690    ac_option=`expr "X$1" : 'X\([^=]*\)='`
31691    ac_optarg=
31692    ac_shift=:
31693    ;;
31694  *)
31695    ac_option=$1
31696    ac_optarg=$2
31697    ac_shift=shift
31698    ;;
31699  esac
31700
31701  case $ac_option in
31702  # Handling of the options.
31703  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31704    ac_cs_recheck=: ;;
31705  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31706    $as_echo "$ac_cs_version"; exit ;;
31707  --config | --confi | --conf | --con | --co | --c )
31708    $as_echo "$ac_cs_config"; exit ;;
31709  --debug | --debu | --deb | --de | --d | -d )
31710    debug=: ;;
31711  --file | --fil | --fi | --f )
31712    $ac_shift
31713    case $ac_optarg in
31714    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31715    '') as_fn_error $? "missing file argument" ;;
31716    esac
31717    as_fn_append CONFIG_FILES " '$ac_optarg'"
31718    ac_need_defaults=false;;
31719  --header | --heade | --head | --hea )
31720    $ac_shift
31721    case $ac_optarg in
31722    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
31723    esac
31724    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31725    ac_need_defaults=false;;
31726  --he | --h)
31727    # Conflict between --help and --header
31728    as_fn_error $? "ambiguous option: \`$1'
31729Try \`$0 --help' for more information.";;
31730  --help | --hel | -h )
31731    $as_echo "$ac_cs_usage"; exit ;;
31732  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31733  | -silent | --silent | --silen | --sile | --sil | --si | --s)
31734    ac_cs_silent=: ;;
31735
31736  # This is an error.
31737  -*) as_fn_error $? "unrecognized option: \`$1'
31738Try \`$0 --help' for more information." ;;
31739
31740  *) as_fn_append ac_config_targets " $1"
31741     ac_need_defaults=false ;;
31742
31743  esac
31744  shift
31745done
31746
31747ac_configure_extra_args=
31748
31749if $ac_cs_silent; then
31750  exec 6>/dev/null
31751  ac_configure_extra_args="$ac_configure_extra_args --silent"
31752fi
31753
31754_ACEOF
31755cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31756if \$ac_cs_recheck; then
31757  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31758  shift
31759  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
31760  CONFIG_SHELL='$SHELL'
31761  export CONFIG_SHELL
31762  exec "\$@"
31763fi
31764
31765_ACEOF
31766cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31767exec 5>>config.log
31768{
31769  echo
31770  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31771## Running $as_me. ##
31772_ASBOX
31773  $as_echo "$ac_log"
31774} >&5
31775
31776_ACEOF
31777cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31778_ACEOF
31779
31780cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31781
31782# Handling of arguments.
31783for ac_config_target in $ac_config_targets
31784do
31785  case $ac_config_target in
31786    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
31787    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
31788    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
31789    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
31790    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
31791    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
31792    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
31793
31794  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
31795  esac
31796done
31797
31798
31799# If the user did not use the arguments to specify the items to instantiate,
31800# then the envvar interface is used.  Set only those that are not.
31801# We use the long form for the default assignment because of an extremely
31802# bizarre bug on SunOS 4.1.3.
31803if $ac_need_defaults; then
31804  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
31805  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
31806fi
31807
31808# Have a temporary directory for convenience.  Make it in the build tree
31809# simply because there is no reason against having it here, and in addition,
31810# creating and moving files from /tmp can sometimes cause problems.
31811# Hook for its removal unless debugging.
31812# Note that there is a small window in which the directory will not be cleaned:
31813# after its creation but before its name has been assigned to `$tmp'.
31814$debug ||
31815{
31816  tmp=
31817  trap 'exit_status=$?
31818  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
31819' 0
31820  trap 'as_fn_exit 1' 1 2 13 15
31821}
31822# Create a (secure) tmp directory for tmp files.
31823
31824{
31825  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31826  test -n "$tmp" && test -d "$tmp"
31827}  ||
31828{
31829  tmp=./conf$$-$RANDOM
31830  (umask 077 && mkdir "$tmp")
31831} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31832
31833# Set up the scripts for CONFIG_FILES section.
31834# No need to generate them if there are no CONFIG_FILES.
31835# This happens for instance with `./config.status config.h'.
31836if test -n "$CONFIG_FILES"; then
31837
31838
31839ac_cr=`echo X | tr X '\015'`
31840# On cygwin, bash can eat \r inside `` if the user requested igncr.
31841# But we know of no other shell where ac_cr would be empty at this
31842# point, so we can use a bashism as a fallback.
31843if test "x$ac_cr" = x; then
31844  eval ac_cr=\$\'\\r\'
31845fi
31846ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
31847if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
31848  ac_cs_awk_cr='\\r'
31849else
31850  ac_cs_awk_cr=$ac_cr
31851fi
31852
31853echo 'BEGIN {' >"$tmp/subs1.awk" &&
31854_ACEOF
31855
31856
31857{
31858  echo "cat >conf$$subs.awk <<_ACEOF" &&
31859  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
31860  echo "_ACEOF"
31861} >conf$$subs.sh ||
31862  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31863ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31864ac_delim='%!_!# '
31865for ac_last_try in false false false false false :; do
31866  . ./conf$$subs.sh ||
31867    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31868
31869  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31870  if test $ac_delim_n = $ac_delim_num; then
31871    break
31872  elif $ac_last_try; then
31873    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31874  else
31875    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31876  fi
31877done
31878rm -f conf$$subs.sh
31879
31880cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31881cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
31882_ACEOF
31883sed -n '
31884h
31885s/^/S["/; s/!.*/"]=/
31886p
31887g
31888s/^[^!]*!//
31889:repl
31890t repl
31891s/'"$ac_delim"'$//
31892t delim
31893:nl
31894h
31895s/\(.\{148\}\)..*/\1/
31896t more1
31897s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
31898p
31899n
31900b repl
31901:more1
31902s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31903p
31904g
31905s/.\{148\}//
31906t nl
31907:delim
31908h
31909s/\(.\{148\}\)..*/\1/
31910t more2
31911s/["\\]/\\&/g; s/^/"/; s/$/"/
31912p
31913b
31914:more2
31915s/["\\]/\\&/g; s/^/"/; s/$/"\\/
31916p
31917g
31918s/.\{148\}//
31919t delim
31920' <conf$$subs.awk | sed '
31921/^[^""]/{
31922  N
31923  s/\n//
31924}
31925' >>$CONFIG_STATUS || ac_write_fail=1
31926rm -f conf$$subs.awk
31927cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31928_ACAWK
31929cat >>"\$tmp/subs1.awk" <<_ACAWK &&
31930  for (key in S) S_is_set[key] = 1
31931  FS = ""
31932
31933}
31934{
31935  line = $ 0
31936  nfields = split(line, field, "@")
31937  substed = 0
31938  len = length(field[1])
31939  for (i = 2; i < nfields; i++) {
31940    key = field[i]
31941    keylen = length(key)
31942    if (S_is_set[key]) {
31943      value = S[key]
31944      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
31945      len += length(value) + length(field[++i])
31946      substed = 1
31947    } else
31948      len += 1 + keylen
31949  }
31950
31951  print line
31952}
31953
31954_ACAWK
31955_ACEOF
31956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31957if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
31958  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
31959else
31960  cat
31961fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
31962  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
31963_ACEOF
31964
31965# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
31966# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
31967# trailing colons and then remove the whole line if VPATH becomes empty
31968# (actually we leave an empty line to preserve line numbers).
31969if test "x$srcdir" = x.; then
31970  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
31971h
31972s///
31973s/^/:/
31974s/[	 ]*$/:/
31975s/:\$(srcdir):/:/g
31976s/:\${srcdir}:/:/g
31977s/:@srcdir@:/:/g
31978s/^:*//
31979s/:*$//
31980x
31981s/\(=[	 ]*\).*/\1/
31982G
31983s/\n//
31984s/^[^=]*=[	 ]*$//
31985}'
31986fi
31987
31988cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31989fi # test -n "$CONFIG_FILES"
31990
31991# Set up the scripts for CONFIG_HEADERS section.
31992# No need to generate them if there are no CONFIG_HEADERS.
31993# This happens for instance with `./config.status Makefile'.
31994if test -n "$CONFIG_HEADERS"; then
31995cat >"$tmp/defines.awk" <<\_ACAWK ||
31996BEGIN {
31997_ACEOF
31998
31999# Transform confdefs.h into an awk script `defines.awk', embedded as
32000# here-document in config.status, that substitutes the proper values into
32001# config.h.in to produce config.h.
32002
32003# Create a delimiter string that does not exist in confdefs.h, to ease
32004# handling of long lines.
32005ac_delim='%!_!# '
32006for ac_last_try in false false :; do
32007  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32008  if test -z "$ac_t"; then
32009    break
32010  elif $ac_last_try; then
32011    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32012  else
32013    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32014  fi
32015done
32016
32017# For the awk script, D is an array of macro values keyed by name,
32018# likewise P contains macro parameters if any.  Preserve backslash
32019# newline sequences.
32020
32021ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32022sed -n '
32023s/.\{148\}/&'"$ac_delim"'/g
32024t rset
32025:rset
32026s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32027t def
32028d
32029:def
32030s/\\$//
32031t bsnl
32032s/["\\]/\\&/g
32033s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32034D["\1"]=" \3"/p
32035s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32036d
32037:bsnl
32038s/["\\]/\\&/g
32039s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32040D["\1"]=" \3\\\\\\n"\\/p
32041t cont
32042s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32043t cont
32044d
32045:cont
32046n
32047s/.\{148\}/&'"$ac_delim"'/g
32048t clear
32049:clear
32050s/\\$//
32051t bsnlc
32052s/["\\]/\\&/g; s/^/"/; s/$/"/p
32053d
32054:bsnlc
32055s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32056b cont
32057' <confdefs.h | sed '
32058s/'"$ac_delim"'/"\\\
32059"/g' >>$CONFIG_STATUS || ac_write_fail=1
32060
32061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32062  for (key in D) D_is_set[key] = 1
32063  FS = ""
32064}
32065/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32066  line = \$ 0
32067  split(line, arg, " ")
32068  if (arg[1] == "#") {
32069    defundef = arg[2]
32070    mac1 = arg[3]
32071  } else {
32072    defundef = substr(arg[1], 2)
32073    mac1 = arg[2]
32074  }
32075  split(mac1, mac2, "(") #)
32076  macro = mac2[1]
32077  prefix = substr(line, 1, index(line, defundef) - 1)
32078  if (D_is_set[macro]) {
32079    # Preserve the white space surrounding the "#".
32080    print prefix "define", macro P[macro] D[macro]
32081    next
32082  } else {
32083    # Replace #undef with comments.  This is necessary, for example,
32084    # in the case of _POSIX_SOURCE, which is predefined and required
32085    # on some systems where configure will not decide to define it.
32086    if (defundef == "undef") {
32087      print "/*", prefix defundef, macro, "*/"
32088      next
32089    }
32090  }
32091}
32092{ print }
32093_ACAWK
32094_ACEOF
32095cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32096  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32097fi # test -n "$CONFIG_HEADERS"
32098
32099
32100eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32101shift
32102for ac_tag
32103do
32104  case $ac_tag in
32105  :[FHLC]) ac_mode=$ac_tag; continue;;
32106  esac
32107  case $ac_mode$ac_tag in
32108  :[FHL]*:*);;
32109  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32110  :[FH]-) ac_tag=-:-;;
32111  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32112  esac
32113  ac_save_IFS=$IFS
32114  IFS=:
32115  set x $ac_tag
32116  IFS=$ac_save_IFS
32117  shift
32118  ac_file=$1
32119  shift
32120
32121  case $ac_mode in
32122  :L) ac_source=$1;;
32123  :[FH])
32124    ac_file_inputs=
32125    for ac_f
32126    do
32127      case $ac_f in
32128      -) ac_f="$tmp/stdin";;
32129      *) # Look for the file first in the build tree, then in the source tree
32130	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32131	 # because $ac_f cannot contain `:'.
32132	 test -f "$ac_f" ||
32133	   case $ac_f in
32134	   [\\/$]*) false;;
32135	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32136	   esac ||
32137	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32138      esac
32139      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32140      as_fn_append ac_file_inputs " '$ac_f'"
32141    done
32142
32143    # Let's still pretend it is `configure' which instantiates (i.e., don't
32144    # use $as_me), people would be surprised to read:
32145    #    /* config.h.  Generated by config.status.  */
32146    configure_input='Generated from '`
32147	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32148	`' by configure.'
32149    if test x"$ac_file" != x-; then
32150      configure_input="$ac_file.  $configure_input"
32151      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32152$as_echo "$as_me: creating $ac_file" >&6;}
32153    fi
32154    # Neutralize special characters interpreted by sed in replacement strings.
32155    case $configure_input in #(
32156    *\&* | *\|* | *\\* )
32157       ac_sed_conf_input=`$as_echo "$configure_input" |
32158       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32159    *) ac_sed_conf_input=$configure_input;;
32160    esac
32161
32162    case $ac_tag in
32163    *:-:* | *:-) cat >"$tmp/stdin" \
32164      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32165    esac
32166    ;;
32167  esac
32168
32169  ac_dir=`$as_dirname -- "$ac_file" ||
32170$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32171	 X"$ac_file" : 'X\(//\)[^/]' \| \
32172	 X"$ac_file" : 'X\(//\)$' \| \
32173	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32174$as_echo X"$ac_file" |
32175    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32176	    s//\1/
32177	    q
32178	  }
32179	  /^X\(\/\/\)[^/].*/{
32180	    s//\1/
32181	    q
32182	  }
32183	  /^X\(\/\/\)$/{
32184	    s//\1/
32185	    q
32186	  }
32187	  /^X\(\/\).*/{
32188	    s//\1/
32189	    q
32190	  }
32191	  s/.*/./; q'`
32192  as_dir="$ac_dir"; as_fn_mkdir_p
32193  ac_builddir=.
32194
32195case "$ac_dir" in
32196.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32197*)
32198  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32199  # A ".." for each directory in $ac_dir_suffix.
32200  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32201  case $ac_top_builddir_sub in
32202  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32203  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32204  esac ;;
32205esac
32206ac_abs_top_builddir=$ac_pwd
32207ac_abs_builddir=$ac_pwd$ac_dir_suffix
32208# for backward compatibility:
32209ac_top_builddir=$ac_top_build_prefix
32210
32211case $srcdir in
32212  .)  # We are building in place.
32213    ac_srcdir=.
32214    ac_top_srcdir=$ac_top_builddir_sub
32215    ac_abs_top_srcdir=$ac_pwd ;;
32216  [\\/]* | ?:[\\/]* )  # Absolute name.
32217    ac_srcdir=$srcdir$ac_dir_suffix;
32218    ac_top_srcdir=$srcdir
32219    ac_abs_top_srcdir=$srcdir ;;
32220  *) # Relative name.
32221    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32222    ac_top_srcdir=$ac_top_build_prefix$srcdir
32223    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32224esac
32225ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32226
32227
32228  case $ac_mode in
32229  :F)
32230  #
32231  # CONFIG_FILE
32232  #
32233
32234_ACEOF
32235
32236cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32237# If the template does not know about datarootdir, expand it.
32238# FIXME: This hack should be removed a few years after 2.60.
32239ac_datarootdir_hack=; ac_datarootdir_seen=
32240ac_sed_dataroot='
32241/datarootdir/ {
32242  p
32243  q
32244}
32245/@datadir@/p
32246/@docdir@/p
32247/@infodir@/p
32248/@localedir@/p
32249/@mandir@/p'
32250case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32251*datarootdir*) ac_datarootdir_seen=yes;;
32252*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32253  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32254$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32255_ACEOF
32256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32257  ac_datarootdir_hack='
32258  s&@datadir@&$datadir&g
32259  s&@docdir@&$docdir&g
32260  s&@infodir@&$infodir&g
32261  s&@localedir@&$localedir&g
32262  s&@mandir@&$mandir&g
32263  s&\\\${datarootdir}&$datarootdir&g' ;;
32264esac
32265_ACEOF
32266
32267# Neutralize VPATH when `$srcdir' = `.'.
32268# Shell code in configure.ac might set extrasub.
32269# FIXME: do we really want to maintain this feature?
32270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32271ac_sed_extra="$ac_vpsub
32272$extrasub
32273_ACEOF
32274cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32275:t
32276/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32277s|@configure_input@|$ac_sed_conf_input|;t t
32278s&@top_builddir@&$ac_top_builddir_sub&;t t
32279s&@top_build_prefix@&$ac_top_build_prefix&;t t
32280s&@srcdir@&$ac_srcdir&;t t
32281s&@abs_srcdir@&$ac_abs_srcdir&;t t
32282s&@top_srcdir@&$ac_top_srcdir&;t t
32283s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32284s&@builddir@&$ac_builddir&;t t
32285s&@abs_builddir@&$ac_abs_builddir&;t t
32286s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32287$ac_datarootdir_hack
32288"
32289eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32290  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32291
32292test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32293  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32294  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32295  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32296which seems to be undefined.  Please make sure it is defined" >&5
32297$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32298which seems to be undefined.  Please make sure it is defined" >&2;}
32299
32300  rm -f "$tmp/stdin"
32301  case $ac_file in
32302  -) cat "$tmp/out" && rm -f "$tmp/out";;
32303  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32304  esac \
32305  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32306 ;;
32307  :H)
32308  #
32309  # CONFIG_HEADER
32310  #
32311  if test x"$ac_file" != x-; then
32312    {
32313      $as_echo "/* $configure_input  */" \
32314      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32315    } >"$tmp/config.h" \
32316      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32317    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32318      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32319$as_echo "$as_me: $ac_file is unchanged" >&6;}
32320    else
32321      rm -f "$ac_file"
32322      mv "$tmp/config.h" "$ac_file" \
32323	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
32324    fi
32325  else
32326    $as_echo "/* $configure_input  */" \
32327      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
32328      || as_fn_error $? "could not create -" "$LINENO" 5
32329  fi
32330 ;;
32331
32332
32333  esac
32334
32335done # for ac_tag
32336
32337
32338as_fn_exit 0
32339_ACEOF
32340ac_clean_files=$ac_clean_files_save
32341
32342test $ac_write_fail = 0 ||
32343  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
32344
32345
32346# configure is writing to config.log, and then calls config.status.
32347# config.status does its own redirection, appending to config.log.
32348# Unfortunately, on DOS this fails, as config.log is still kept open
32349# by configure, so config.status won't be able to write to it; its
32350# output is simply discarded.  So we exec the FD to /dev/null,
32351# effectively closing config.log, so it can be properly (re)opened and
32352# appended to by config.status.  When coming back to configure, we
32353# need to make the FD available again.
32354if test "$no_create" != yes; then
32355  ac_cs_success=:
32356  ac_config_status_args=
32357  test "$silent" = yes &&
32358    ac_config_status_args="$ac_config_status_args --quiet"
32359  exec 5>/dev/null
32360  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
32361  exec 5>>config.log
32362  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
32363  # would make configure fail if this is the last instruction.
32364  $ac_cs_success || as_fn_exit 1
32365fi
32366if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
32367  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
32368$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
32369fi
32370
32371
32372# Make the compare script executable
32373$CHMOD +x $OUTPUT_ROOT/compare.sh
32374
32375# Finally output some useful information to the user
32376
32377# Finally output some useful information to the user
32378
32379if test "x$CCACHE_FOUND" != x; then
32380	if  test "x$HAS_GOOD_CCACHE" = x; then
32381		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
32382		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
32383	else
32384		CCACHE_STATUS="installed and in use"
32385	fi
32386else
32387	if test "x$GCC" = xyes; then
32388		CCACHE_STATUS="not installed (consider installing)"
32389		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
32390	else
32391		CCACHE_STATUS="not available for your system"
32392	fi
32393fi
32394
32395printf "\n"
32396printf "====================================================\n"
32397printf "A new configuration has been successfully created in\n"
32398printf "$OUTPUT_ROOT\n"
32399if test "x$CONFIGURE_COMMAND_LINE" != x; then
32400	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
32401else
32402	printf "using default settings.\n"
32403fi
32404
32405printf "\n"
32406printf "Configuration summary:\n"
32407printf "* Debug level:    $DEBUG_LEVEL\n"
32408printf "* JDK variant:    $JDK_VARIANT\n"
32409printf "* JVM variants:   $with_jvm_variants\n"
32410printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
32411
32412printf "\n"
32413printf "Tools summary:\n"
32414if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
32415  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
32416fi
32417printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
32418printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
32419printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
32420
32421printf "\n"
32422printf "Build performance summary:\n"
32423printf "* Cores to use:   $NUM_CORES\n"
32424printf "* Memory limit:   $MEMORY_SIZE MB\n"
32425printf "* ccache status:  $CCACHE_STATUS\n"
32426printf "\n"
32427
32428if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
32429	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
32430	printf "$CCACHE_HELP_MSG\n"
32431
32432    # Print a helpful message on how to acquire the necessary build dependency.
32433    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
32434    MISSING_DEPENDENCY=ccache
32435    PKGHANDLER_COMMAND=
32436
32437    case $PKGHANDLER in
32438	apt-get)
32439                apt_help     $MISSING_DEPENDENCY ;;
32440    yum)
32441                yum_help     $MISSING_DEPENDENCY ;;
32442	port)
32443                port_help    $MISSING_DEPENDENCY ;;
32444	pkgutil)
32445                pkgutil_help $MISSING_DEPENDENCY ;;
32446	pkgadd)
32447                pkgadd_help  $MISSING_DEPENDENCY ;;
32448    * )
32449      break ;;
32450    esac
32451
32452    if test "x$PKGHANDLER_COMMAND" != x; then
32453        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32454    fi
32455
32456	printf "$HELP_MSG\n"
32457	printf "\n"
32458fi
32459
32460if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
32461	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
32462	printf "will result in longer build times.\n"
32463	printf "\n"
32464fi
32465
32466if test "x$FOUND_ALT_VARIABLES" != "x"; then
32467	printf "WARNING: You have old-style ALT_ environment variables set.\n"
32468	printf "These are not respected, and will be ignored. It is recommended\n"
32469	printf "that you clean your environment. The following variables are set:\n"
32470	printf "$FOUND_ALT_VARIABLES\n"
32471	printf "\n"
32472fi
32473
32474if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
32475	printf "WARNING: Your build output directory is not on a local disk.\n"
32476	printf "This will severely degrade build performance!\n"
32477	printf "It is recommended that you create an output directory on a local disk,\n"
32478	printf "and run the configure script again from that directory.\n"
32479	printf "\n"
32480fi
32481
32482if test "x$IS_RECONFIGURE" = "xyes"; then
32483	printf "WARNING: The result of this configuration has overridden an older\n"
32484	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
32485	printf "proper build. Failure to do so might result in strange build problems.\n"
32486	printf "\n"
32487fi
32488
32489