generated-configure.sh revision 647:c022bc48b7ed
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
644MACOSX_VERSION_MIN
645PACKAGE_PATH
646LEGACY_EXTRA_LDFLAGS
647LEGACY_EXTRA_CXXFLAGS
648LEGACY_EXTRA_CFLAGS
649CXX_FLAG_DEPS
650C_FLAG_DEPS
651CXX_O_FLAG_NONE
652CXX_O_FLAG_NORM
653CXX_O_FLAG_HI
654CXX_O_FLAG_HIGHEST
655C_O_FLAG_NONE
656C_O_FLAG_NORM
657C_O_FLAG_HI
658C_O_FLAG_HIGHEST
659POST_MCS_CMD
660POST_STRIP_CMD
661SET_EXECUTABLE_ORIGIN
662SET_SHARED_LIBRARY_ORIGIN
663CXX_FLAG_REORDER
664C_FLAG_REORDER
665SET_SHARED_LIBRARY_MAPFILE
666SET_SHARED_LIBRARY_NAME
667SHARED_LIBRARY_FLAGS
668EXE_SUFFIX
669STATIC_LIBRARY_SUFFIX
670SHARED_LIBRARY_SUFFIX
671LIBRARY_PREFIX
672STATIC_LIBRARY
673SHARED_LIBRARY
674OBJ_SUFFIX
675LIPO
676ac_ct_OBJDUMP
677OBJDUMP
678ac_ct_OBJCOPY
679OBJCOPY
680MCS
681STRIP
682NM
683AS
684CXXCPP
685CPP
686COMPILER_TYPE
687RC_FLAGS
688DUMPBIN
689WINAR
690HOTSPOT_RC
691HOTSPOT_MT
692RC
693MT
694WINLD
695HOTSPOT_LD
696HOTSPOT_CXX
697ARFLAGS
698AR
699LDEXECXX
700LDCXX
701LDEXE
702LD
703ac_ct_OBJC
704OBJCFLAGS
705OBJC
706ac_ct_CXX
707CXXFLAGS
708CXX
709ac_ct_PROPER_COMPILER_CXX
710PROPER_COMPILER_CXX
711POTENTIAL_CXX
712TOOLS_DIR_CXX
713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720ac_ct_PROPER_COMPILER_CC
721PROPER_COMPILER_CC
722POTENTIAL_CC
723TOOLS_DIR_CC
724BUILD_LD
725BUILD_CXX
726BUILD_CC
727MSVCR_DLL
728VS_PATH
729VS_LIB
730VS_INCLUDE
731CYGWIN_LINK
732AR_OUT_OPTION
733LD_OUT_OPTION
734EXE_OUT_OPTION
735CC_OUT_OPTION
736BUILD_HOTSPOT
737HOTSPOT_DIST
738BUILD_OUTPUT
739OVERRIDE_SRC_ROOT
740ADD_SRC_ROOT
741JDK_TOPDIR
742NASHORN_TOPDIR
743HOTSPOT_TOPDIR
744JAXWS_TOPDIR
745JAXP_TOPDIR
746CORBA_TOPDIR
747LANGTOOLS_TOPDIR
748BOOT_JDK_JVMARGS
749JAVAC_FLAGS
750BOOT_JDK_SOURCETARGET
751BOOT_JDK
752BOOT_TOOLSJAR
753BOOT_RTJAR
754JAVA_CHECK
755JAVAC_CHECK
756COOKED_BUILD_NUMBER
757JDK_VERSION
758COPYRIGHT_YEAR
759MACOSX_BUNDLE_ID_BASE
760MACOSX_BUNDLE_NAME_BASE
761COMPANY_NAME
762JDK_RC_PLATFORM_NAME
763PRODUCT_SUFFIX
764PRODUCT_NAME
765LAUNCHER_NAME
766MILESTONE
767JDK_BUILD_NUMBER
768JDK_UPDATE_VERSION
769JDK_MICRO_VERSION
770JDK_MINOR_VERSION
771JDK_MAJOR_VERSION
772USER_RELEASE_SUFFIX
773COMPRESS_JARS
774UNLIMITED_CRYPTO
775CACERTS_FILE
776TEST_IN_BUILD
777BUILD_HEADLESS
778SUPPORT_HEADFUL
779SUPPORT_HEADLESS
780BDEPS_FTP
781BDEPS_UNZIP
782OS_VERSION_MICRO
783OS_VERSION_MINOR
784OS_VERSION_MAJOR
785PKG_CONFIG
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_MINIMAL1
814JVM_VARIANT_CLIENT
815JVM_VARIANT_SERVER
816JVM_VARIANTS
817JDK_VARIANT
818SET_OPENJDK
819BUILD_LOG_WRAPPER
820BUILD_LOG_PREVIOUS
821BUILD_LOG
822SYS_ROOT
823PATH_SEP
824SRC_ROOT
825DEFINE_CROSS_COMPILE_ARCH
826LP64
827OPENJDK_TARGET_OS_API_DIR
828OPENJDK_TARGET_CPU_JLI_CFLAGS
829OPENJDK_TARGET_CPU_OSARCH
830OPENJDK_TARGET_CPU_ISADIR
831OPENJDK_TARGET_CPU_LIBDIR
832OPENJDK_TARGET_CPU_LEGACY_LIB
833OPENJDK_TARGET_CPU_LEGACY
834REQUIRED_OS_VERSION
835REQUIRED_OS_NAME
836COMPILE_TYPE
837OPENJDK_TARGET_CPU_ENDIAN
838OPENJDK_TARGET_CPU_BITS
839OPENJDK_TARGET_CPU_ARCH
840OPENJDK_TARGET_CPU
841OPENJDK_TARGET_OS_API
842OPENJDK_TARGET_OS
843OPENJDK_BUILD_CPU_ENDIAN
844OPENJDK_BUILD_CPU_BITS
845OPENJDK_BUILD_CPU_ARCH
846OPENJDK_BUILD_CPU
847OPENJDK_BUILD_OS_API
848OPENJDK_BUILD_OS
849OPENJDK_BUILD_AUTOCONF_NAME
850OPENJDK_TARGET_AUTOCONF_NAME
851target_os
852target_vendor
853target_cpu
854target
855host_os
856host_vendor
857host_cpu
858host
859build_os
860build_vendor
861build_cpu
862build
863SETFILE
864DF
865READLINK
866CYGPATH
867NAWK
868SED
869FGREP
870EGREP
871GREP
872AWK
873XARGS
874WHICH
875WC
876UNIQ
877UNAME
878TR
879TOUCH
880TEE
881TAR
882TAIL
883SORT
884SH
885RM
886THEPWDCMD
887PRINTF
888MV
889MKTEMP
890MKDIR
891LS
892LN
893HEAD
894FIND
895FILE
896EXPR
897ECHO
898DIRNAME
899DIFF
900DATE
901CUT
902CPIO
903CP
904COMM
905CMP
906CHMOD
907CAT
908BASH
909BASENAME
910DATE_WHEN_CONFIGURED
911CONFIGURE_COMMAND_LINE
912CUSTOM_MAKE_DIR
913target_alias
914host_alias
915build_alias
916LIBS
917ECHO_T
918ECHO_N
919ECHO_C
920DEFS
921mandir
922localedir
923libdir
924psdir
925pdfdir
926dvidir
927htmldir
928infodir
929docdir
930oldincludedir
931includedir
932localstatedir
933sharedstatedir
934sysconfdir
935datadir
936datarootdir
937libexecdir
938sbindir
939bindir
940program_transform_name
941prefix
942exec_prefix
943PACKAGE_URL
944PACKAGE_BUGREPORT
945PACKAGE_STRING
946PACKAGE_VERSION
947PACKAGE_TARNAME
948PACKAGE_NAME
949PATH_SEPARATOR
950SHELL'
951ac_subst_files=''
952ac_user_opts='
953enable_option_checking
954with_custom_make_dir
955with_target_bits
956with_sys_root
957with_tools_dir
958with_devkit
959enable_openjdk_only
960with_jdk_variant
961with_jvm_variants
962enable_debug
963with_debug_level
964with_conf_name
965with_builddeps_conf
966with_builddeps_server
967with_builddeps_dir
968with_builddeps_group
969enable_headful
970enable_hotspot_test_in_build
971with_cacerts_file
972enable_unlimited_crypto
973with_milestone
974with_build_number
975with_user_release_suffix
976with_boot_jdk
977with_boot_jdk_jvmargs
978with_add_source_root
979with_override_source_root
980with_adds_and_overrides
981with_override_langtools
982with_override_corba
983with_override_jaxp
984with_override_jaxws
985with_override_hotspot
986with_override_jdk
987with_import_hotspot
988with_msvcr_dll
989with_extra_cflags
990with_extra_cxxflags
991with_extra_ldflags
992enable_debug_symbols
993enable_zip_debug_info
994enable_macosx_runtime_support
995with_x
996with_cups
997with_cups_include
998with_freetype
999with_alsa
1000with_alsa_include
1001with_alsa_lib
1002with_zlib
1003with_stdc__lib
1004with_num_cores
1005with_memory_size
1006with_sjavac_server_java
1007with_sjavac_server_cores
1008enable_sjavac
1009enable_precompiled_headers
1010enable_ccache
1011with_ccache_dir
1012'
1013      ac_precious_vars='build_alias
1014host_alias
1015target_alias
1016PKG_CONFIG
1017CC
1018CFLAGS
1019LDFLAGS
1020LIBS
1021CPPFLAGS
1022CXX
1023CXXFLAGS
1024CCC
1025OBJC
1026OBJCFLAGS
1027CPP
1028CXXCPP
1029XMKMF
1030FREETYPE2_CFLAGS
1031FREETYPE2_LIBS
1032ALSA_CFLAGS
1033ALSA_LIBS'
1034
1035
1036# Initialize some variables set by options.
1037ac_init_help=
1038ac_init_version=false
1039ac_unrecognized_opts=
1040ac_unrecognized_sep=
1041# The variables have the same names as the options, with
1042# dashes changed to underlines.
1043cache_file=/dev/null
1044exec_prefix=NONE
1045no_create=
1046no_recursion=
1047prefix=NONE
1048program_prefix=NONE
1049program_suffix=NONE
1050program_transform_name=s,x,x,
1051silent=
1052site=
1053srcdir=
1054verbose=
1055x_includes=NONE
1056x_libraries=NONE
1057
1058# Installation directory options.
1059# These are left unexpanded so users can "make install exec_prefix=/foo"
1060# and all the variables that are supposed to be based on exec_prefix
1061# by default will actually change.
1062# Use braces instead of parens because sh, perl, etc. also accept them.
1063# (The list follows the same order as the GNU Coding Standards.)
1064bindir='${exec_prefix}/bin'
1065sbindir='${exec_prefix}/sbin'
1066libexecdir='${exec_prefix}/libexec'
1067datarootdir='${prefix}/share'
1068datadir='${datarootdir}'
1069sysconfdir='${prefix}/etc'
1070sharedstatedir='${prefix}/com'
1071localstatedir='${prefix}/var'
1072includedir='${prefix}/include'
1073oldincludedir='/usr/include'
1074docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1075infodir='${datarootdir}/info'
1076htmldir='${docdir}'
1077dvidir='${docdir}'
1078pdfdir='${docdir}'
1079psdir='${docdir}'
1080libdir='${exec_prefix}/lib'
1081localedir='${datarootdir}/locale'
1082mandir='${datarootdir}/man'
1083
1084ac_prev=
1085ac_dashdash=
1086for ac_option
1087do
1088  # If the previous option needs an argument, assign it.
1089  if test -n "$ac_prev"; then
1090    eval $ac_prev=\$ac_option
1091    ac_prev=
1092    continue
1093  fi
1094
1095  case $ac_option in
1096  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1097  *=)   ac_optarg= ;;
1098  *)    ac_optarg=yes ;;
1099  esac
1100
1101  # Accept the important Cygnus configure options, so we can diagnose typos.
1102
1103  case $ac_dashdash$ac_option in
1104  --)
1105    ac_dashdash=yes ;;
1106
1107  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1108    ac_prev=bindir ;;
1109  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1110    bindir=$ac_optarg ;;
1111
1112  -build | --build | --buil | --bui | --bu)
1113    ac_prev=build_alias ;;
1114  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1115    build_alias=$ac_optarg ;;
1116
1117  -cache-file | --cache-file | --cache-fil | --cache-fi \
1118  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1119    ac_prev=cache_file ;;
1120  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1121  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1122    cache_file=$ac_optarg ;;
1123
1124  --config-cache | -C)
1125    cache_file=config.cache ;;
1126
1127  -datadir | --datadir | --datadi | --datad)
1128    ac_prev=datadir ;;
1129  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1130    datadir=$ac_optarg ;;
1131
1132  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1133  | --dataroo | --dataro | --datar)
1134    ac_prev=datarootdir ;;
1135  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1136  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1137    datarootdir=$ac_optarg ;;
1138
1139  -disable-* | --disable-*)
1140    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1141    # Reject names that are not valid shell variable names.
1142    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1143      as_fn_error $? "invalid feature name: $ac_useropt"
1144    ac_useropt_orig=$ac_useropt
1145    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1146    case $ac_user_opts in
1147      *"
1148"enable_$ac_useropt"
1149"*) ;;
1150      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1151	 ac_unrecognized_sep=', ';;
1152    esac
1153    eval enable_$ac_useropt=no ;;
1154
1155  -docdir | --docdir | --docdi | --doc | --do)
1156    ac_prev=docdir ;;
1157  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1158    docdir=$ac_optarg ;;
1159
1160  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1161    ac_prev=dvidir ;;
1162  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1163    dvidir=$ac_optarg ;;
1164
1165  -enable-* | --enable-*)
1166    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1167    # Reject names that are not valid shell variable names.
1168    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1169      as_fn_error $? "invalid feature name: $ac_useropt"
1170    ac_useropt_orig=$ac_useropt
1171    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1172    case $ac_user_opts in
1173      *"
1174"enable_$ac_useropt"
1175"*) ;;
1176      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1177	 ac_unrecognized_sep=', ';;
1178    esac
1179    eval enable_$ac_useropt=\$ac_optarg ;;
1180
1181  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1182  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1183  | --exec | --exe | --ex)
1184    ac_prev=exec_prefix ;;
1185  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1186  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1187  | --exec=* | --exe=* | --ex=*)
1188    exec_prefix=$ac_optarg ;;
1189
1190  -gas | --gas | --ga | --g)
1191    # Obsolete; use --with-gas.
1192    with_gas=yes ;;
1193
1194  -help | --help | --hel | --he | -h)
1195    ac_init_help=long ;;
1196  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1197    ac_init_help=recursive ;;
1198  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1199    ac_init_help=short ;;
1200
1201  -host | --host | --hos | --ho)
1202    ac_prev=host_alias ;;
1203  -host=* | --host=* | --hos=* | --ho=*)
1204    host_alias=$ac_optarg ;;
1205
1206  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1207    ac_prev=htmldir ;;
1208  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1209  | --ht=*)
1210    htmldir=$ac_optarg ;;
1211
1212  -includedir | --includedir | --includedi | --included | --include \
1213  | --includ | --inclu | --incl | --inc)
1214    ac_prev=includedir ;;
1215  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1216  | --includ=* | --inclu=* | --incl=* | --inc=*)
1217    includedir=$ac_optarg ;;
1218
1219  -infodir | --infodir | --infodi | --infod | --info | --inf)
1220    ac_prev=infodir ;;
1221  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1222    infodir=$ac_optarg ;;
1223
1224  -libdir | --libdir | --libdi | --libd)
1225    ac_prev=libdir ;;
1226  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1227    libdir=$ac_optarg ;;
1228
1229  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1230  | --libexe | --libex | --libe)
1231    ac_prev=libexecdir ;;
1232  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1233  | --libexe=* | --libex=* | --libe=*)
1234    libexecdir=$ac_optarg ;;
1235
1236  -localedir | --localedir | --localedi | --localed | --locale)
1237    ac_prev=localedir ;;
1238  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1239    localedir=$ac_optarg ;;
1240
1241  -localstatedir | --localstatedir | --localstatedi | --localstated \
1242  | --localstate | --localstat | --localsta | --localst | --locals)
1243    ac_prev=localstatedir ;;
1244  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1245  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1246    localstatedir=$ac_optarg ;;
1247
1248  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1249    ac_prev=mandir ;;
1250  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1251    mandir=$ac_optarg ;;
1252
1253  -nfp | --nfp | --nf)
1254    # Obsolete; use --without-fp.
1255    with_fp=no ;;
1256
1257  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1258  | --no-cr | --no-c | -n)
1259    no_create=yes ;;
1260
1261  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1262  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1263    no_recursion=yes ;;
1264
1265  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1266  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1267  | --oldin | --oldi | --old | --ol | --o)
1268    ac_prev=oldincludedir ;;
1269  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1270  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1271  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1272    oldincludedir=$ac_optarg ;;
1273
1274  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1275    ac_prev=prefix ;;
1276  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1277    prefix=$ac_optarg ;;
1278
1279  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1280  | --program-pre | --program-pr | --program-p)
1281    ac_prev=program_prefix ;;
1282  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1283  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1284    program_prefix=$ac_optarg ;;
1285
1286  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1287  | --program-suf | --program-su | --program-s)
1288    ac_prev=program_suffix ;;
1289  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1290  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1291    program_suffix=$ac_optarg ;;
1292
1293  -program-transform-name | --program-transform-name \
1294  | --program-transform-nam | --program-transform-na \
1295  | --program-transform-n | --program-transform- \
1296  | --program-transform | --program-transfor \
1297  | --program-transfo | --program-transf \
1298  | --program-trans | --program-tran \
1299  | --progr-tra | --program-tr | --program-t)
1300    ac_prev=program_transform_name ;;
1301  -program-transform-name=* | --program-transform-name=* \
1302  | --program-transform-nam=* | --program-transform-na=* \
1303  | --program-transform-n=* | --program-transform-=* \
1304  | --program-transform=* | --program-transfor=* \
1305  | --program-transfo=* | --program-transf=* \
1306  | --program-trans=* | --program-tran=* \
1307  | --progr-tra=* | --program-tr=* | --program-t=*)
1308    program_transform_name=$ac_optarg ;;
1309
1310  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1311    ac_prev=pdfdir ;;
1312  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1313    pdfdir=$ac_optarg ;;
1314
1315  -psdir | --psdir | --psdi | --psd | --ps)
1316    ac_prev=psdir ;;
1317  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1318    psdir=$ac_optarg ;;
1319
1320  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1321  | -silent | --silent | --silen | --sile | --sil)
1322    silent=yes ;;
1323
1324  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1325    ac_prev=sbindir ;;
1326  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1327  | --sbi=* | --sb=*)
1328    sbindir=$ac_optarg ;;
1329
1330  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1331  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1332  | --sharedst | --shareds | --shared | --share | --shar \
1333  | --sha | --sh)
1334    ac_prev=sharedstatedir ;;
1335  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1336  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1337  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1338  | --sha=* | --sh=*)
1339    sharedstatedir=$ac_optarg ;;
1340
1341  -site | --site | --sit)
1342    ac_prev=site ;;
1343  -site=* | --site=* | --sit=*)
1344    site=$ac_optarg ;;
1345
1346  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1347    ac_prev=srcdir ;;
1348  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1349    srcdir=$ac_optarg ;;
1350
1351  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1352  | --syscon | --sysco | --sysc | --sys | --sy)
1353    ac_prev=sysconfdir ;;
1354  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1355  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1356    sysconfdir=$ac_optarg ;;
1357
1358  -target | --target | --targe | --targ | --tar | --ta | --t)
1359    ac_prev=target_alias ;;
1360  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1361    target_alias=$ac_optarg ;;
1362
1363  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1364    verbose=yes ;;
1365
1366  -version | --version | --versio | --versi | --vers | -V)
1367    ac_init_version=: ;;
1368
1369  -with-* | --with-*)
1370    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1371    # Reject names that are not valid shell variable names.
1372    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1373      as_fn_error $? "invalid package name: $ac_useropt"
1374    ac_useropt_orig=$ac_useropt
1375    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1376    case $ac_user_opts in
1377      *"
1378"with_$ac_useropt"
1379"*) ;;
1380      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1381	 ac_unrecognized_sep=', ';;
1382    esac
1383    eval with_$ac_useropt=\$ac_optarg ;;
1384
1385  -without-* | --without-*)
1386    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1387    # Reject names that are not valid shell variable names.
1388    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1389      as_fn_error $? "invalid package name: $ac_useropt"
1390    ac_useropt_orig=$ac_useropt
1391    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1392    case $ac_user_opts in
1393      *"
1394"with_$ac_useropt"
1395"*) ;;
1396      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1397	 ac_unrecognized_sep=', ';;
1398    esac
1399    eval with_$ac_useropt=no ;;
1400
1401  --x)
1402    # Obsolete; use --with-x.
1403    with_x=yes ;;
1404
1405  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1406  | --x-incl | --x-inc | --x-in | --x-i)
1407    ac_prev=x_includes ;;
1408  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1409  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1410    x_includes=$ac_optarg ;;
1411
1412  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1413  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1414    ac_prev=x_libraries ;;
1415  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1416  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1417    x_libraries=$ac_optarg ;;
1418
1419  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1420Try \`$0 --help' for more information"
1421    ;;
1422
1423  *=*)
1424    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1425    # Reject names that are not valid shell variable names.
1426    case $ac_envvar in #(
1427      '' | [0-9]* | *[!_$as_cr_alnum]* )
1428      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1429    esac
1430    eval $ac_envvar=\$ac_optarg
1431    export $ac_envvar ;;
1432
1433  *)
1434    # FIXME: should be removed in autoconf 3.0.
1435    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1436    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1437      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1438    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1439    ;;
1440
1441  esac
1442done
1443
1444if test -n "$ac_prev"; then
1445  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1446  as_fn_error $? "missing argument to $ac_option"
1447fi
1448
1449if test -n "$ac_unrecognized_opts"; then
1450  case $enable_option_checking in
1451    no) ;;
1452    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1453    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1454  esac
1455fi
1456
1457# Check all directory arguments for consistency.
1458for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1459		datadir sysconfdir sharedstatedir localstatedir includedir \
1460		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1461		libdir localedir mandir
1462do
1463  eval ac_val=\$$ac_var
1464  # Remove trailing slashes.
1465  case $ac_val in
1466    */ )
1467      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1468      eval $ac_var=\$ac_val;;
1469  esac
1470  # Be sure to have absolute directory names.
1471  case $ac_val in
1472    [\\/$]* | ?:[\\/]* )  continue;;
1473    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1474  esac
1475  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1476done
1477
1478# There might be people who depend on the old broken behavior: `$host'
1479# used to hold the argument of --host etc.
1480# FIXME: To remove some day.
1481build=$build_alias
1482host=$host_alias
1483target=$target_alias
1484
1485# FIXME: To remove some day.
1486if test "x$host_alias" != x; then
1487  if test "x$build_alias" = x; then
1488    cross_compiling=maybe
1489    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1490    If a cross compiler is detected then cross compile mode will be used" >&2
1491  elif test "x$build_alias" != "x$host_alias"; then
1492    cross_compiling=yes
1493  fi
1494fi
1495
1496ac_tool_prefix=
1497test -n "$host_alias" && ac_tool_prefix=$host_alias-
1498
1499test "$silent" = yes && exec 6>/dev/null
1500
1501
1502ac_pwd=`pwd` && test -n "$ac_pwd" &&
1503ac_ls_di=`ls -di .` &&
1504ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1505  as_fn_error $? "working directory cannot be determined"
1506test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1507  as_fn_error $? "pwd does not report name of working directory"
1508
1509
1510# Find the source files, if location was not specified.
1511if test -z "$srcdir"; then
1512  ac_srcdir_defaulted=yes
1513  # Try the directory containing this script, then the parent directory.
1514  ac_confdir=`$as_dirname -- "$as_myself" ||
1515$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1516	 X"$as_myself" : 'X\(//\)[^/]' \| \
1517	 X"$as_myself" : 'X\(//\)$' \| \
1518	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1519$as_echo X"$as_myself" |
1520    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1521	    s//\1/
1522	    q
1523	  }
1524	  /^X\(\/\/\)[^/].*/{
1525	    s//\1/
1526	    q
1527	  }
1528	  /^X\(\/\/\)$/{
1529	    s//\1/
1530	    q
1531	  }
1532	  /^X\(\/\).*/{
1533	    s//\1/
1534	    q
1535	  }
1536	  s/.*/./; q'`
1537  srcdir=$ac_confdir
1538  if test ! -r "$srcdir/$ac_unique_file"; then
1539    srcdir=..
1540  fi
1541else
1542  ac_srcdir_defaulted=no
1543fi
1544if test ! -r "$srcdir/$ac_unique_file"; then
1545  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1546  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1547fi
1548ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1549ac_abs_confdir=`(
1550	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1551	pwd)`
1552# When building in place, set srcdir=.
1553if test "$ac_abs_confdir" = "$ac_pwd"; then
1554  srcdir=.
1555fi
1556# Remove unnecessary trailing slashes from srcdir.
1557# Double slashes in file names in object file debugging info
1558# mess up M-x gdb in Emacs.
1559case $srcdir in
1560*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1561esac
1562for ac_var in $ac_precious_vars; do
1563  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1564  eval ac_env_${ac_var}_value=\$${ac_var}
1565  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1566  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1567done
1568
1569#
1570# Report the --help message.
1571#
1572if test "$ac_init_help" = "long"; then
1573  # Omit some internal or obsolete options to make the list less imposing.
1574  # This message is too long to be a string in the A/UX 3.1 sh.
1575  cat <<_ACEOF
1576\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1577
1578Usage: $0 [OPTION]... [VAR=VALUE]...
1579
1580To assign environment variables (e.g., CC, CFLAGS...), specify them as
1581VAR=VALUE.  See below for descriptions of some of the useful variables.
1582
1583Defaults for the options are specified in brackets.
1584
1585Configuration:
1586  -h, --help              display this help and exit
1587      --help=short        display options specific to this package
1588      --help=recursive    display the short help of all the included packages
1589  -V, --version           display version information and exit
1590  -q, --quiet, --silent   do not print \`checking ...' messages
1591      --cache-file=FILE   cache test results in FILE [disabled]
1592  -C, --config-cache      alias for \`--cache-file=config.cache'
1593  -n, --no-create         do not create output files
1594      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1595
1596Installation directories:
1597  --prefix=PREFIX         install architecture-independent files in PREFIX
1598                          [$ac_default_prefix]
1599  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1600                          [PREFIX]
1601
1602By default, \`make install' will install all the files in
1603\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1604an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1605for instance \`--prefix=\$HOME'.
1606
1607For better control, use the options below.
1608
1609Fine tuning of the installation directories:
1610  --bindir=DIR            user executables [EPREFIX/bin]
1611  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1612  --libexecdir=DIR        program executables [EPREFIX/libexec]
1613  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1614  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1615  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1616  --libdir=DIR            object code libraries [EPREFIX/lib]
1617  --includedir=DIR        C header files [PREFIX/include]
1618  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1619  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1620  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1621  --infodir=DIR           info documentation [DATAROOTDIR/info]
1622  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1623  --mandir=DIR            man documentation [DATAROOTDIR/man]
1624  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1625  --htmldir=DIR           html documentation [DOCDIR]
1626  --dvidir=DIR            dvi documentation [DOCDIR]
1627  --pdfdir=DIR            pdf documentation [DOCDIR]
1628  --psdir=DIR             ps documentation [DOCDIR]
1629_ACEOF
1630
1631  cat <<\_ACEOF
1632
1633X features:
1634  --x-includes=DIR    X include files are in DIR
1635  --x-libraries=DIR   X library files are in DIR
1636
1637System types:
1638  --build=BUILD     configure for building on BUILD [guessed]
1639  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1640  --target=TARGET   configure for building compilers for TARGET [HOST]
1641_ACEOF
1642fi
1643
1644if test -n "$ac_init_help"; then
1645  case $ac_init_help in
1646     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1647   esac
1648  cat <<\_ACEOF
1649
1650Optional Features:
1651  --disable-option-checking  ignore unrecognized --enable/--with options
1652  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1653  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1654  --enable-openjdk-only   suppress building custom source even if present
1655                          [disabled]
1656  --enable-debug          set the debug level to fastdebug (shorthand for
1657                          --with-debug-level=fastdebug) [disabled]
1658  --disable-headful       disable building headful support (graphical UI
1659                          support) [enabled]
1660  --enable-hotspot-test-in-build
1661                          run the Queens test after Hotspot build [disabled]
1662  --enable-unlimited-crypto
1663                          Enable unlimited crypto policy [disabled]
1664  --disable-debug-symbols disable generation of debug symbols [enabled]
1665  --disable-zip-debug-info
1666                          disable zipping of debug-info files [enabled]
1667  --disable-macosx-runtime-support
1668                          disable the use of MacOSX Java runtime support
1669                          framework [enabled]
1670  --enable-sjavac         use sjavac to do fast incremental compiles
1671                          [disabled]
1672  --disable-precompiled-headers
1673                          disable using precompiled headers when compiling C++
1674                          [enabled]
1675  --disable-ccache        disable using ccache to speed up recompilations
1676                          [enabled]
1677
1678Optional Packages:
1679  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1680  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1681  --with-custom-make-dir  use this directory for custom build/make files
1682  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1683                          support it), e.g. --with-target-bits=32 [guessed]
1684  --with-sys-root         pass this sys-root to the compilers and tools (for
1685                          cross-compiling)
1686  --with-tools-dir        search this directory for compilers and tools (for
1687                          cross-compiling)
1688  --with-devkit           use this directory as base for tools-dir and
1689                          sys-root (for cross-compiling)
1690  --with-jdk-variant      JDK variant to build (normal) [normal]
1691  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1692                          client, minimal1, kernel, zero, zeroshark) [server]
1693  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1694                          [release]
1695  --with-conf-name        use this as the name of the configuration [generated
1696                          from important configuration options]
1697  --with-builddeps-conf   use this configuration file for the builddeps
1698  --with-builddeps-server download and use build dependencies from this server
1699                          url
1700  --with-builddeps-dir    store downloaded build dependencies here
1701                          [/localhome/builddeps]
1702  --with-builddeps-group  chgrp the downloaded build dependencies to this
1703                          group
1704  --with-cacerts-file     specify alternative cacerts file
1705  --with-milestone        Set milestone value for build [internal]
1706  --with-build-number     Set build number value for build [b00]
1707  --with-user-release-suffix
1708                          Add a custom string to the version string if build
1709                          number isn't set.[username_builddateb00]
1710  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1711  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1712                          invocations of the Boot JDK, overriding the default
1713                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1714                          -enableassertions"
1715  --with-add-source-root  for each and every source directory, look in this
1716                          additional source root for the same directory; if it
1717                          exists and have files in it, include it in the build
1718  --with-override-source-root
1719                          for each and every source directory, look in this
1720                          override source root for the same directory; if it
1721                          exists, use that directory instead and ignore the
1722                          directory in the original source root
1723  --with-adds-and-overrides
1724                          use the subdirs 'adds' and 'overrides' in the
1725                          specified directory as add-source-root and
1726                          override-source-root
1727  --with-override-langtools
1728                          use this langtools dir for the build
1729  --with-override-corba   use this corba dir for the build
1730  --with-override-jaxp    use this jaxp dir for the build
1731  --with-override-jaxws   use this jaxws dir for the build
1732  --with-override-hotspot use this hotspot dir for the build
1733  --with-override-jdk     use this jdk dir for the build
1734  --with-import-hotspot   import hotspot binaries from this jdk image or
1735                          hotspot build dist dir instead of building from
1736                          source
1737  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1738                          only) [probed]
1739  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1740  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1741  --with-extra-ldflags    extra flags to be used when linking jdk
1742  --with-x                use the X Window System
1743  --with-cups             specify prefix directory for the cups package
1744                          (expecting the headers under PATH/include)
1745  --with-cups-include     specify directory for the cups include files
1746  --with-freetype         specify prefix directory for the freetype2 package
1747                          (expecting the libraries under PATH/lib and the
1748                          headers under PATH/include)
1749  --with-alsa             specify prefix directory for the alsa package
1750                          (expecting the libraries under PATH/lib and the
1751                          headers under PATH/include)
1752  --with-alsa-include     specify directory for the alsa include files
1753  --with-alsa-lib         specify directory for the alsa library
1754  --with-zlib             use zlib from build system or OpenJDK source
1755                          (system, bundled) [bundled]
1756  --with-stdc++lib=<static>,<dynamic>,<default>
1757                          force linking of the C++ runtime on Linux to either
1758                          static or dynamic, default is static with dynamic as
1759                          fallback
1760  --with-num-cores        number of cores in the build system, e.g.
1761                          --with-num-cores=8 [probed]
1762  --with-memory-size      memory (in MB) available in the build system, e.g.
1763                          --with-memory-size=1024 [probed]
1764  --with-sjavac-server-java
1765                          use this java binary for running the sjavac
1766                          background server [Boot JDK java]
1767  --with-sjavac-server-cores
1768                          use at most this number of concurrent threads on the
1769                          sjavac server [probed]
1770  --with-ccache-dir       where to store ccache files [~/.ccache]
1771
1772Some influential environment variables:
1773  PKG_CONFIG  path to pkg-config utility
1774  CC          C compiler command
1775  CFLAGS      C compiler flags
1776  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1777              nonstandard directory <lib dir>
1778  LIBS        libraries to pass to the linker, e.g. -l<library>
1779  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1780              you have headers in a nonstandard directory <include dir>
1781  CXX         C++ compiler command
1782  CXXFLAGS    C++ compiler flags
1783  OBJC        Objective C compiler command
1784  OBJCFLAGS   Objective C compiler flags
1785  CPP         C preprocessor
1786  CXXCPP      C++ preprocessor
1787  XMKMF       Path to xmkmf, Makefile generator for X Window System
1788  FREETYPE2_CFLAGS
1789              C compiler flags for FREETYPE2, overriding pkg-config
1790  FREETYPE2_LIBS
1791              linker flags for FREETYPE2, overriding pkg-config
1792  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1793  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1794
1795Use these variables to override the choices made by `configure' or to help
1796it to find libraries and programs with nonstandard names/locations.
1797
1798Report bugs to <build-dev@openjdk.java.net>.
1799OpenJDK home page: <http://openjdk.java.net>.
1800_ACEOF
1801ac_status=$?
1802fi
1803
1804if test "$ac_init_help" = "recursive"; then
1805  # If there are subdirs, report their specific --help.
1806  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1807    test -d "$ac_dir" ||
1808      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1809      continue
1810    ac_builddir=.
1811
1812case "$ac_dir" in
1813.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1814*)
1815  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1816  # A ".." for each directory in $ac_dir_suffix.
1817  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1818  case $ac_top_builddir_sub in
1819  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1820  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1821  esac ;;
1822esac
1823ac_abs_top_builddir=$ac_pwd
1824ac_abs_builddir=$ac_pwd$ac_dir_suffix
1825# for backward compatibility:
1826ac_top_builddir=$ac_top_build_prefix
1827
1828case $srcdir in
1829  .)  # We are building in place.
1830    ac_srcdir=.
1831    ac_top_srcdir=$ac_top_builddir_sub
1832    ac_abs_top_srcdir=$ac_pwd ;;
1833  [\\/]* | ?:[\\/]* )  # Absolute name.
1834    ac_srcdir=$srcdir$ac_dir_suffix;
1835    ac_top_srcdir=$srcdir
1836    ac_abs_top_srcdir=$srcdir ;;
1837  *) # Relative name.
1838    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1839    ac_top_srcdir=$ac_top_build_prefix$srcdir
1840    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1841esac
1842ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1843
1844    cd "$ac_dir" || { ac_status=$?; continue; }
1845    # Check for guested configure.
1846    if test -f "$ac_srcdir/configure.gnu"; then
1847      echo &&
1848      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1849    elif test -f "$ac_srcdir/configure"; then
1850      echo &&
1851      $SHELL "$ac_srcdir/configure" --help=recursive
1852    else
1853      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1854    fi || ac_status=$?
1855    cd "$ac_pwd" || { ac_status=$?; break; }
1856  done
1857fi
1858
1859test -n "$ac_init_help" && exit $ac_status
1860if $ac_init_version; then
1861  cat <<\_ACEOF
1862OpenJDK configure jdk8
1863generated by GNU Autoconf 2.67
1864
1865Copyright (C) 2010 Free Software Foundation, Inc.
1866This configure script is free software; the Free Software Foundation
1867gives unlimited permission to copy, distribute and modify it.
1868_ACEOF
1869  exit
1870fi
1871
1872## ------------------------ ##
1873## Autoconf initialization. ##
1874## ------------------------ ##
1875
1876# ac_fn_c_try_compile LINENO
1877# --------------------------
1878# Try to compile conftest.$ac_ext, and return whether this succeeded.
1879ac_fn_c_try_compile ()
1880{
1881  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1882  rm -f conftest.$ac_objext
1883  if { { ac_try="$ac_compile"
1884case "(($ac_try" in
1885  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1886  *) ac_try_echo=$ac_try;;
1887esac
1888eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1889$as_echo "$ac_try_echo"; } >&5
1890  (eval "$ac_compile") 2>conftest.err
1891  ac_status=$?
1892  if test -s conftest.err; then
1893    grep -v '^ *+' conftest.err >conftest.er1
1894    cat conftest.er1 >&5
1895    mv -f conftest.er1 conftest.err
1896  fi
1897  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1898  test $ac_status = 0; } && {
1899	 test -z "$ac_c_werror_flag" ||
1900	 test ! -s conftest.err
1901       } && test -s conftest.$ac_objext; then :
1902  ac_retval=0
1903else
1904  $as_echo "$as_me: failed program was:" >&5
1905sed 's/^/| /' conftest.$ac_ext >&5
1906
1907	ac_retval=1
1908fi
1909  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1910  as_fn_set_status $ac_retval
1911
1912} # ac_fn_c_try_compile
1913
1914# ac_fn_cxx_try_compile LINENO
1915# ----------------------------
1916# Try to compile conftest.$ac_ext, and return whether this succeeded.
1917ac_fn_cxx_try_compile ()
1918{
1919  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1920  rm -f conftest.$ac_objext
1921  if { { ac_try="$ac_compile"
1922case "(($ac_try" in
1923  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1924  *) ac_try_echo=$ac_try;;
1925esac
1926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1927$as_echo "$ac_try_echo"; } >&5
1928  (eval "$ac_compile") 2>conftest.err
1929  ac_status=$?
1930  if test -s conftest.err; then
1931    grep -v '^ *+' conftest.err >conftest.er1
1932    cat conftest.er1 >&5
1933    mv -f conftest.er1 conftest.err
1934  fi
1935  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1936  test $ac_status = 0; } && {
1937	 test -z "$ac_cxx_werror_flag" ||
1938	 test ! -s conftest.err
1939       } && test -s conftest.$ac_objext; then :
1940  ac_retval=0
1941else
1942  $as_echo "$as_me: failed program was:" >&5
1943sed 's/^/| /' conftest.$ac_ext >&5
1944
1945	ac_retval=1
1946fi
1947  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1948  as_fn_set_status $ac_retval
1949
1950} # ac_fn_cxx_try_compile
1951
1952# ac_fn_objc_try_compile LINENO
1953# -----------------------------
1954# Try to compile conftest.$ac_ext, and return whether this succeeded.
1955ac_fn_objc_try_compile ()
1956{
1957  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1958  rm -f conftest.$ac_objext
1959  if { { ac_try="$ac_compile"
1960case "(($ac_try" in
1961  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1962  *) ac_try_echo=$ac_try;;
1963esac
1964eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1965$as_echo "$ac_try_echo"; } >&5
1966  (eval "$ac_compile") 2>conftest.err
1967  ac_status=$?
1968  if test -s conftest.err; then
1969    grep -v '^ *+' conftest.err >conftest.er1
1970    cat conftest.er1 >&5
1971    mv -f conftest.er1 conftest.err
1972  fi
1973  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1974  test $ac_status = 0; } && {
1975	 test -z "$ac_objc_werror_flag" ||
1976	 test ! -s conftest.err
1977       } && test -s conftest.$ac_objext; then :
1978  ac_retval=0
1979else
1980  $as_echo "$as_me: failed program was:" >&5
1981sed 's/^/| /' conftest.$ac_ext >&5
1982
1983	ac_retval=1
1984fi
1985  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1986  as_fn_set_status $ac_retval
1987
1988} # ac_fn_objc_try_compile
1989
1990# ac_fn_c_try_cpp LINENO
1991# ----------------------
1992# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1993ac_fn_c_try_cpp ()
1994{
1995  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996  if { { ac_try="$ac_cpp conftest.$ac_ext"
1997case "(($ac_try" in
1998  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1999  *) ac_try_echo=$ac_try;;
2000esac
2001eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2002$as_echo "$ac_try_echo"; } >&5
2003  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2004  ac_status=$?
2005  if test -s conftest.err; then
2006    grep -v '^ *+' conftest.err >conftest.er1
2007    cat conftest.er1 >&5
2008    mv -f conftest.er1 conftest.err
2009  fi
2010  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2011  test $ac_status = 0; } > conftest.i && {
2012	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2013	 test ! -s conftest.err
2014       }; then :
2015  ac_retval=0
2016else
2017  $as_echo "$as_me: failed program was:" >&5
2018sed 's/^/| /' conftest.$ac_ext >&5
2019
2020    ac_retval=1
2021fi
2022  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2023  as_fn_set_status $ac_retval
2024
2025} # ac_fn_c_try_cpp
2026
2027# ac_fn_cxx_try_cpp LINENO
2028# ------------------------
2029# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2030ac_fn_cxx_try_cpp ()
2031{
2032  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2033  if { { ac_try="$ac_cpp conftest.$ac_ext"
2034case "(($ac_try" in
2035  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2036  *) ac_try_echo=$ac_try;;
2037esac
2038eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2039$as_echo "$ac_try_echo"; } >&5
2040  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2041  ac_status=$?
2042  if test -s conftest.err; then
2043    grep -v '^ *+' conftest.err >conftest.er1
2044    cat conftest.er1 >&5
2045    mv -f conftest.er1 conftest.err
2046  fi
2047  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2048  test $ac_status = 0; } > conftest.i && {
2049	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2050	 test ! -s conftest.err
2051       }; then :
2052  ac_retval=0
2053else
2054  $as_echo "$as_me: failed program was:" >&5
2055sed 's/^/| /' conftest.$ac_ext >&5
2056
2057    ac_retval=1
2058fi
2059  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2060  as_fn_set_status $ac_retval
2061
2062} # ac_fn_cxx_try_cpp
2063
2064# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2065# ---------------------------------------------------------
2066# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2067# the include files in INCLUDES and setting the cache variable VAR
2068# accordingly.
2069ac_fn_cxx_check_header_mongrel ()
2070{
2071  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072  if eval "test \"\${$3+set}\"" = set; then :
2073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2074$as_echo_n "checking for $2... " >&6; }
2075if eval "test \"\${$3+set}\"" = set; then :
2076  $as_echo_n "(cached) " >&6
2077fi
2078eval ac_res=\$$3
2079	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2080$as_echo "$ac_res" >&6; }
2081else
2082  # Is the header compilable?
2083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2084$as_echo_n "checking $2 usability... " >&6; }
2085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086/* end confdefs.h.  */
2087$4
2088#include <$2>
2089_ACEOF
2090if ac_fn_cxx_try_compile "$LINENO"; then :
2091  ac_header_compiler=yes
2092else
2093  ac_header_compiler=no
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2097$as_echo "$ac_header_compiler" >&6; }
2098
2099# Is the header present?
2100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2101$as_echo_n "checking $2 presence... " >&6; }
2102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h.  */
2104#include <$2>
2105_ACEOF
2106if ac_fn_cxx_try_cpp "$LINENO"; then :
2107  ac_header_preproc=yes
2108else
2109  ac_header_preproc=no
2110fi
2111rm -f conftest.err conftest.i conftest.$ac_ext
2112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2113$as_echo "$ac_header_preproc" >&6; }
2114
2115# So?  What about this header?
2116case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2117  yes:no: )
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2119$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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    ;;
2123  no:yes:* )
2124    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2125$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2126    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2127$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2128    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2129$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2130    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2131$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2132    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2133$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2134( $as_echo "## ----------------------------------------- ##
2135## Report this to build-dev@openjdk.java.net ##
2136## ----------------------------------------- ##"
2137     ) | sed "s/^/$as_me: WARNING:     /" >&2
2138    ;;
2139esac
2140  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2141$as_echo_n "checking for $2... " >&6; }
2142if eval "test \"\${$3+set}\"" = set; then :
2143  $as_echo_n "(cached) " >&6
2144else
2145  eval "$3=\$ac_header_compiler"
2146fi
2147eval ac_res=\$$3
2148	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2149$as_echo "$ac_res" >&6; }
2150fi
2151  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2152
2153} # ac_fn_cxx_check_header_mongrel
2154
2155# ac_fn_cxx_try_run LINENO
2156# ------------------------
2157# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2158# that executables *can* be run.
2159ac_fn_cxx_try_run ()
2160{
2161  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2162  if { { ac_try="$ac_link"
2163case "(($ac_try" in
2164  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2165  *) ac_try_echo=$ac_try;;
2166esac
2167eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2168$as_echo "$ac_try_echo"; } >&5
2169  (eval "$ac_link") 2>&5
2170  ac_status=$?
2171  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2172  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2173  { { case "(($ac_try" in
2174  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2175  *) ac_try_echo=$ac_try;;
2176esac
2177eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2178$as_echo "$ac_try_echo"; } >&5
2179  (eval "$ac_try") 2>&5
2180  ac_status=$?
2181  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2182  test $ac_status = 0; }; }; then :
2183  ac_retval=0
2184else
2185  $as_echo "$as_me: program exited with status $ac_status" >&5
2186       $as_echo "$as_me: failed program was:" >&5
2187sed 's/^/| /' conftest.$ac_ext >&5
2188
2189       ac_retval=$ac_status
2190fi
2191  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2192  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2193  as_fn_set_status $ac_retval
2194
2195} # ac_fn_cxx_try_run
2196
2197# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2198# ---------------------------------------------------------
2199# Tests whether HEADER exists and can be compiled using the include files in
2200# INCLUDES, setting the cache variable VAR accordingly.
2201ac_fn_cxx_check_header_compile ()
2202{
2203  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2204  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205$as_echo_n "checking for $2... " >&6; }
2206if eval "test \"\${$3+set}\"" = set; then :
2207  $as_echo_n "(cached) " >&6
2208else
2209  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2210/* end confdefs.h.  */
2211$4
2212#include <$2>
2213_ACEOF
2214if ac_fn_cxx_try_compile "$LINENO"; then :
2215  eval "$3=yes"
2216else
2217  eval "$3=no"
2218fi
2219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2220fi
2221eval ac_res=\$$3
2222	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2223$as_echo "$ac_res" >&6; }
2224  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2225
2226} # ac_fn_cxx_check_header_compile
2227
2228# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2229# ----------------------------------------------
2230# Tries to find the compile-time value of EXPR in a program that includes
2231# INCLUDES, setting VAR accordingly. Returns whether the value could be
2232# computed
2233ac_fn_cxx_compute_int ()
2234{
2235  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2236  if test "$cross_compiling" = yes; then
2237    # Depending upon the size, compute the lo and hi bounds.
2238cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239/* end confdefs.h.  */
2240$4
2241int
2242main ()
2243{
2244static int test_array [1 - 2 * !(($2) >= 0)];
2245test_array [0] = 0
2246
2247  ;
2248  return 0;
2249}
2250_ACEOF
2251if ac_fn_cxx_try_compile "$LINENO"; then :
2252  ac_lo=0 ac_mid=0
2253  while :; do
2254    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255/* end confdefs.h.  */
2256$4
2257int
2258main ()
2259{
2260static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2261test_array [0] = 0
2262
2263  ;
2264  return 0;
2265}
2266_ACEOF
2267if ac_fn_cxx_try_compile "$LINENO"; then :
2268  ac_hi=$ac_mid; break
2269else
2270  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2271			if test $ac_lo -le $ac_mid; then
2272			  ac_lo= ac_hi=
2273			  break
2274			fi
2275			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2276fi
2277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2278  done
2279else
2280  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2281/* end confdefs.h.  */
2282$4
2283int
2284main ()
2285{
2286static int test_array [1 - 2 * !(($2) < 0)];
2287test_array [0] = 0
2288
2289  ;
2290  return 0;
2291}
2292_ACEOF
2293if ac_fn_cxx_try_compile "$LINENO"; then :
2294  ac_hi=-1 ac_mid=-1
2295  while :; do
2296    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h.  */
2298$4
2299int
2300main ()
2301{
2302static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2303test_array [0] = 0
2304
2305  ;
2306  return 0;
2307}
2308_ACEOF
2309if ac_fn_cxx_try_compile "$LINENO"; then :
2310  ac_lo=$ac_mid; break
2311else
2312  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2313			if test $ac_mid -le $ac_hi; then
2314			  ac_lo= ac_hi=
2315			  break
2316			fi
2317			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2318fi
2319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2320  done
2321else
2322  ac_lo= ac_hi=
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327# Binary search between lo and hi bounds.
2328while test "x$ac_lo" != "x$ac_hi"; do
2329  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2330  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h.  */
2332$4
2333int
2334main ()
2335{
2336static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2337test_array [0] = 0
2338
2339  ;
2340  return 0;
2341}
2342_ACEOF
2343if ac_fn_cxx_try_compile "$LINENO"; then :
2344  ac_hi=$ac_mid
2345else
2346  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2347fi
2348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2349done
2350case $ac_lo in #((
2351?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2352'') ac_retval=1 ;;
2353esac
2354  else
2355    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2356/* end confdefs.h.  */
2357$4
2358static long int longval () { return $2; }
2359static unsigned long int ulongval () { return $2; }
2360#include <stdio.h>
2361#include <stdlib.h>
2362int
2363main ()
2364{
2365
2366  FILE *f = fopen ("conftest.val", "w");
2367  if (! f)
2368    return 1;
2369  if (($2) < 0)
2370    {
2371      long int i = longval ();
2372      if (i != ($2))
2373	return 1;
2374      fprintf (f, "%ld", i);
2375    }
2376  else
2377    {
2378      unsigned long int i = ulongval ();
2379      if (i != ($2))
2380	return 1;
2381      fprintf (f, "%lu", i);
2382    }
2383  /* Do not output a trailing newline, as this causes \r\n confusion
2384     on some platforms.  */
2385  return ferror (f) || fclose (f) != 0;
2386
2387  ;
2388  return 0;
2389}
2390_ACEOF
2391if ac_fn_cxx_try_run "$LINENO"; then :
2392  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2393else
2394  ac_retval=1
2395fi
2396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2397  conftest.$ac_objext conftest.beam conftest.$ac_ext
2398rm -f conftest.val
2399
2400  fi
2401  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2402  as_fn_set_status $ac_retval
2403
2404} # ac_fn_cxx_compute_int
2405
2406# ac_fn_cxx_try_link LINENO
2407# -------------------------
2408# Try to link conftest.$ac_ext, and return whether this succeeded.
2409ac_fn_cxx_try_link ()
2410{
2411  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2412  rm -f conftest.$ac_objext conftest$ac_exeext
2413  if { { ac_try="$ac_link"
2414case "(($ac_try" in
2415  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2416  *) ac_try_echo=$ac_try;;
2417esac
2418eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2419$as_echo "$ac_try_echo"; } >&5
2420  (eval "$ac_link") 2>conftest.err
2421  ac_status=$?
2422  if test -s conftest.err; then
2423    grep -v '^ *+' conftest.err >conftest.er1
2424    cat conftest.er1 >&5
2425    mv -f conftest.er1 conftest.err
2426  fi
2427  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2428  test $ac_status = 0; } && {
2429	 test -z "$ac_cxx_werror_flag" ||
2430	 test ! -s conftest.err
2431       } && test -s conftest$ac_exeext && {
2432	 test "$cross_compiling" = yes ||
2433	 $as_test_x conftest$ac_exeext
2434       }; then :
2435  ac_retval=0
2436else
2437  $as_echo "$as_me: failed program was:" >&5
2438sed 's/^/| /' conftest.$ac_ext >&5
2439
2440	ac_retval=1
2441fi
2442  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2443  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2444  # interfere with the next link command; also delete a directory that is
2445  # left behind by Apple's compiler.  We do this before executing the actions.
2446  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2447  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2448  as_fn_set_status $ac_retval
2449
2450} # ac_fn_cxx_try_link
2451
2452# ac_fn_cxx_check_func LINENO FUNC VAR
2453# ------------------------------------
2454# Tests whether FUNC exists, setting the cache variable VAR accordingly
2455ac_fn_cxx_check_func ()
2456{
2457  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2459$as_echo_n "checking for $2... " >&6; }
2460if eval "test \"\${$3+set}\"" = set; then :
2461  $as_echo_n "(cached) " >&6
2462else
2463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2464/* end confdefs.h.  */
2465/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2466   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2467#define $2 innocuous_$2
2468
2469/* System header to define __stub macros and hopefully few prototypes,
2470    which can conflict with char $2 (); below.
2471    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2472    <limits.h> exists even on freestanding compilers.  */
2473
2474#ifdef __STDC__
2475# include <limits.h>
2476#else
2477# include <assert.h>
2478#endif
2479
2480#undef $2
2481
2482/* Override any GCC internal prototype to avoid an error.
2483   Use char because int might match the return type of a GCC
2484   builtin and then its argument prototype would still apply.  */
2485#ifdef __cplusplus
2486extern "C"
2487#endif
2488char $2 ();
2489/* The GNU C library defines this for functions which it implements
2490    to always fail with ENOSYS.  Some functions are actually named
2491    something starting with __ and the normal name is an alias.  */
2492#if defined __stub_$2 || defined __stub___$2
2493choke me
2494#endif
2495
2496int
2497main ()
2498{
2499return $2 ();
2500  ;
2501  return 0;
2502}
2503_ACEOF
2504if ac_fn_cxx_try_link "$LINENO"; then :
2505  eval "$3=yes"
2506else
2507  eval "$3=no"
2508fi
2509rm -f core conftest.err conftest.$ac_objext \
2510    conftest$ac_exeext conftest.$ac_ext
2511fi
2512eval ac_res=\$$3
2513	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2514$as_echo "$ac_res" >&6; }
2515  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2516
2517} # ac_fn_cxx_check_func
2518
2519# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2520# -------------------------------------------------------
2521# Tests whether HEADER exists and can be compiled using the include files in
2522# INCLUDES, setting the cache variable VAR accordingly.
2523ac_fn_c_check_header_compile ()
2524{
2525  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2527$as_echo_n "checking for $2... " >&6; }
2528if eval "test \"\${$3+set}\"" = set; then :
2529  $as_echo_n "(cached) " >&6
2530else
2531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2532/* end confdefs.h.  */
2533$4
2534#include <$2>
2535_ACEOF
2536if ac_fn_c_try_compile "$LINENO"; then :
2537  eval "$3=yes"
2538else
2539  eval "$3=no"
2540fi
2541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2542fi
2543eval ac_res=\$$3
2544	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2545$as_echo "$ac_res" >&6; }
2546  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2547
2548} # ac_fn_c_check_header_compile
2549cat >config.log <<_ACEOF
2550This file contains any messages produced by compilers while
2551running configure, to aid debugging if configure makes a mistake.
2552
2553It was created by OpenJDK $as_me jdk8, which was
2554generated by GNU Autoconf 2.67.  Invocation command line was
2555
2556  $ $0 $@
2557
2558_ACEOF
2559exec 5>>config.log
2560{
2561cat <<_ASUNAME
2562## --------- ##
2563## Platform. ##
2564## --------- ##
2565
2566hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2567uname -m = `(uname -m) 2>/dev/null || echo unknown`
2568uname -r = `(uname -r) 2>/dev/null || echo unknown`
2569uname -s = `(uname -s) 2>/dev/null || echo unknown`
2570uname -v = `(uname -v) 2>/dev/null || echo unknown`
2571
2572/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2573/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2574
2575/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2576/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2577/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2578/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2579/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2580/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2581/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2582
2583_ASUNAME
2584
2585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2586for as_dir in $PATH
2587do
2588  IFS=$as_save_IFS
2589  test -z "$as_dir" && as_dir=.
2590    $as_echo "PATH: $as_dir"
2591  done
2592IFS=$as_save_IFS
2593
2594} >&5
2595
2596cat >&5 <<_ACEOF
2597
2598
2599## ----------- ##
2600## Core tests. ##
2601## ----------- ##
2602
2603_ACEOF
2604
2605
2606# Keep a trace of the command line.
2607# Strip out --no-create and --no-recursion so they do not pile up.
2608# Strip out --silent because we don't want to record it for future runs.
2609# Also quote any args containing shell meta-characters.
2610# Make two passes to allow for proper duplicate-argument suppression.
2611ac_configure_args=
2612ac_configure_args0=
2613ac_configure_args1=
2614ac_must_keep_next=false
2615for ac_pass in 1 2
2616do
2617  for ac_arg
2618  do
2619    case $ac_arg in
2620    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2621    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2622    | -silent | --silent | --silen | --sile | --sil)
2623      continue ;;
2624    *\'*)
2625      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2626    esac
2627    case $ac_pass in
2628    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2629    2)
2630      as_fn_append ac_configure_args1 " '$ac_arg'"
2631      if test $ac_must_keep_next = true; then
2632	ac_must_keep_next=false # Got value, back to normal.
2633      else
2634	case $ac_arg in
2635	  *=* | --config-cache | -C | -disable-* | --disable-* \
2636	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2637	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2638	  | -with-* | --with-* | -without-* | --without-* | --x)
2639	    case "$ac_configure_args0 " in
2640	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2641	    esac
2642	    ;;
2643	  -* ) ac_must_keep_next=true ;;
2644	esac
2645      fi
2646      as_fn_append ac_configure_args " '$ac_arg'"
2647      ;;
2648    esac
2649  done
2650done
2651{ ac_configure_args0=; unset ac_configure_args0;}
2652{ ac_configure_args1=; unset ac_configure_args1;}
2653
2654# When interrupted or exit'd, cleanup temporary files, and complete
2655# config.log.  We remove comments because anyway the quotes in there
2656# would cause problems or look ugly.
2657# WARNING: Use '\'' to represent an apostrophe within the trap.
2658# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2659trap 'exit_status=$?
2660  # Save into config.log some information that might help in debugging.
2661  {
2662    echo
2663
2664    $as_echo "## ---------------- ##
2665## Cache variables. ##
2666## ---------------- ##"
2667    echo
2668    # The following way of writing the cache mishandles newlines in values,
2669(
2670  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2671    eval ac_val=\$$ac_var
2672    case $ac_val in #(
2673    *${as_nl}*)
2674      case $ac_var in #(
2675      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2676$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2677      esac
2678      case $ac_var in #(
2679      _ | IFS | as_nl) ;; #(
2680      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2681      *) { eval $ac_var=; unset $ac_var;} ;;
2682      esac ;;
2683    esac
2684  done
2685  (set) 2>&1 |
2686    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2687    *${as_nl}ac_space=\ *)
2688      sed -n \
2689	"s/'\''/'\''\\\\'\'''\''/g;
2690	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2691      ;; #(
2692    *)
2693      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2694      ;;
2695    esac |
2696    sort
2697)
2698    echo
2699
2700    $as_echo "## ----------------- ##
2701## Output variables. ##
2702## ----------------- ##"
2703    echo
2704    for ac_var in $ac_subst_vars
2705    do
2706      eval ac_val=\$$ac_var
2707      case $ac_val in
2708      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2709      esac
2710      $as_echo "$ac_var='\''$ac_val'\''"
2711    done | sort
2712    echo
2713
2714    if test -n "$ac_subst_files"; then
2715      $as_echo "## ------------------- ##
2716## File substitutions. ##
2717## ------------------- ##"
2718      echo
2719      for ac_var in $ac_subst_files
2720      do
2721	eval ac_val=\$$ac_var
2722	case $ac_val in
2723	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2724	esac
2725	$as_echo "$ac_var='\''$ac_val'\''"
2726      done | sort
2727      echo
2728    fi
2729
2730    if test -s confdefs.h; then
2731      $as_echo "## ----------- ##
2732## confdefs.h. ##
2733## ----------- ##"
2734      echo
2735      cat confdefs.h
2736      echo
2737    fi
2738    test "$ac_signal" != 0 &&
2739      $as_echo "$as_me: caught signal $ac_signal"
2740    $as_echo "$as_me: exit $exit_status"
2741  } >&5
2742  rm -f core *.core core.conftest.* &&
2743    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2744    exit $exit_status
2745' 0
2746for ac_signal in 1 2 13 15; do
2747  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2748done
2749ac_signal=0
2750
2751# confdefs.h avoids OS command line length limits that DEFS can exceed.
2752rm -f -r conftest* confdefs.h
2753
2754$as_echo "/* confdefs.h */" > confdefs.h
2755
2756# Predefined preprocessor variables.
2757
2758cat >>confdefs.h <<_ACEOF
2759#define PACKAGE_NAME "$PACKAGE_NAME"
2760_ACEOF
2761
2762cat >>confdefs.h <<_ACEOF
2763#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2764_ACEOF
2765
2766cat >>confdefs.h <<_ACEOF
2767#define PACKAGE_VERSION "$PACKAGE_VERSION"
2768_ACEOF
2769
2770cat >>confdefs.h <<_ACEOF
2771#define PACKAGE_STRING "$PACKAGE_STRING"
2772_ACEOF
2773
2774cat >>confdefs.h <<_ACEOF
2775#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2776_ACEOF
2777
2778cat >>confdefs.h <<_ACEOF
2779#define PACKAGE_URL "$PACKAGE_URL"
2780_ACEOF
2781
2782
2783# Let the site file select an alternate cache file if it wants to.
2784# Prefer an explicitly selected file to automatically selected ones.
2785ac_site_file1=NONE
2786ac_site_file2=NONE
2787if test -n "$CONFIG_SITE"; then
2788  # We do not want a PATH search for config.site.
2789  case $CONFIG_SITE in #((
2790    -*)  ac_site_file1=./$CONFIG_SITE;;
2791    */*) ac_site_file1=$CONFIG_SITE;;
2792    *)   ac_site_file1=./$CONFIG_SITE;;
2793  esac
2794elif test "x$prefix" != xNONE; then
2795  ac_site_file1=$prefix/share/config.site
2796  ac_site_file2=$prefix/etc/config.site
2797else
2798  ac_site_file1=$ac_default_prefix/share/config.site
2799  ac_site_file2=$ac_default_prefix/etc/config.site
2800fi
2801for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2802do
2803  test "x$ac_site_file" = xNONE && continue
2804  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2805    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2806$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2807    sed 's/^/| /' "$ac_site_file" >&5
2808    . "$ac_site_file" \
2809      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2810$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2811as_fn_error $? "failed to load site script $ac_site_file
2812See \`config.log' for more details" "$LINENO" 5 ; }
2813  fi
2814done
2815
2816if test -r "$cache_file"; then
2817  # Some versions of bash will fail to source /dev/null (special files
2818  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2819  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2820    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2821$as_echo "$as_me: loading cache $cache_file" >&6;}
2822    case $cache_file in
2823      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2824      *)                      . "./$cache_file";;
2825    esac
2826  fi
2827else
2828  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2829$as_echo "$as_me: creating cache $cache_file" >&6;}
2830  >$cache_file
2831fi
2832
2833# Check that the precious variables saved in the cache have kept the same
2834# value.
2835ac_cache_corrupted=false
2836for ac_var in $ac_precious_vars; do
2837  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2838  eval ac_new_set=\$ac_env_${ac_var}_set
2839  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2840  eval ac_new_val=\$ac_env_${ac_var}_value
2841  case $ac_old_set,$ac_new_set in
2842    set,)
2843      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2844$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2845      ac_cache_corrupted=: ;;
2846    ,set)
2847      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2848$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2849      ac_cache_corrupted=: ;;
2850    ,);;
2851    *)
2852      if test "x$ac_old_val" != "x$ac_new_val"; then
2853	# differences in whitespace do not lead to failure.
2854	ac_old_val_w=`echo x $ac_old_val`
2855	ac_new_val_w=`echo x $ac_new_val`
2856	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2857	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2858$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2859	  ac_cache_corrupted=:
2860	else
2861	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2862$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2863	  eval $ac_var=\$ac_old_val
2864	fi
2865	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2866$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2867	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2868$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2869      fi;;
2870  esac
2871  # Pass precious variables to config.status.
2872  if test "$ac_new_set" = set; then
2873    case $ac_new_val in
2874    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2875    *) ac_arg=$ac_var=$ac_new_val ;;
2876    esac
2877    case " $ac_configure_args " in
2878      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2879      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2880    esac
2881  fi
2882done
2883if $ac_cache_corrupted; then
2884  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2885$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2886  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2887$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2888  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2889fi
2890## -------------------- ##
2891## Main body of script. ##
2892## -------------------- ##
2893
2894ac_ext=c
2895ac_cpp='$CPP $CPPFLAGS'
2896ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2897ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2898ac_compiler_gnu=$ac_cv_c_compiler_gnu
2899
2900
2901
2902ac_aux_dir=
2903for ac_dir in build-aux "$srcdir"/build-aux; do
2904  if test -f "$ac_dir/install-sh"; then
2905    ac_aux_dir=$ac_dir
2906    ac_install_sh="$ac_aux_dir/install-sh -c"
2907    break
2908  elif test -f "$ac_dir/install.sh"; then
2909    ac_aux_dir=$ac_dir
2910    ac_install_sh="$ac_aux_dir/install.sh -c"
2911    break
2912  elif test -f "$ac_dir/shtool"; then
2913    ac_aux_dir=$ac_dir
2914    ac_install_sh="$ac_aux_dir/shtool install -c"
2915    break
2916  fi
2917done
2918if test -z "$ac_aux_dir"; then
2919  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2920fi
2921
2922# These three variables are undocumented and unsupported,
2923# and are intended to be withdrawn in a future Autoconf release.
2924# They can cause serious problems if a builder's source tree is in a directory
2925# whose full name contains unusual characters.
2926ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2927ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2928ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2929
2930
2931# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2932
2933#
2934# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2935# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2936#
2937# This code is free software; you can redistribute it and/or modify it
2938# under the terms of the GNU General Public License version 2 only, as
2939# published by the Free Software Foundation.  Oracle designates this
2940# particular file as subject to the "Classpath" exception as provided
2941# by Oracle in the LICENSE file that accompanied this code.
2942#
2943# This code is distributed in the hope that it will be useful, but WITHOUT
2944# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2945# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2946# version 2 for more details (a copy is included in the LICENSE file that
2947# accompanied this code).
2948#
2949# You should have received a copy of the GNU General Public License version
2950# 2 along with this work; if not, write to the Free Software Foundation,
2951# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2952#
2953# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2954# or visit www.oracle.com if you need additional information or have any
2955# questions.
2956#
2957
2958#
2959# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2960#
2961# This program is free software; you can redistribute it and/or modify
2962# it under the terms of the GNU General Public License as published by
2963# the Free Software Foundation; either version 2 of the License, or
2964# (at your option) any later version.
2965#
2966# This program is distributed in the hope that it will be useful, but
2967# WITHOUT ANY WARRANTY; without even the implied warranty of
2968# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2969# General Public License for more details.
2970#
2971# You should have received a copy of the GNU General Public License
2972# along with this program; if not, write to the Free Software
2973# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2974#
2975# As a special exception to the GNU General Public License, if you
2976# distribute this file as part of a program that contains a
2977# configuration script generated by Autoconf, you may include it under
2978# the same distribution terms that you use for the rest of that program.
2979
2980# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2981# ----------------------------------
2982# PKG_PROG_PKG_CONFIG
2983
2984# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2985#
2986# Check to see whether a particular set of modules exists.  Similar
2987# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2988#
2989#
2990# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2991# this or PKG_CHECK_MODULES is called, or make sure to call
2992# PKG_CHECK_EXISTS manually
2993# --------------------------------------------------------------
2994
2995
2996
2997# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2998# ---------------------------------------------
2999# _PKG_CONFIG
3000
3001# _PKG_SHORT_ERRORS_SUPPORTED
3002# -----------------------------
3003# _PKG_SHORT_ERRORS_SUPPORTED
3004
3005
3006# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3007# [ACTION-IF-NOT-FOUND])
3008#
3009#
3010# Note that if there is a possibility the first call to
3011# PKG_CHECK_MODULES might not happen, you should be sure to include an
3012# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3013#
3014#
3015# --------------------------------------------------------------
3016# PKG_CHECK_MODULES
3017
3018
3019# Include these first...
3020#
3021# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3022# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3023#
3024# This code is free software; you can redistribute it and/or modify it
3025# under the terms of the GNU General Public License version 2 only, as
3026# published by the Free Software Foundation.  Oracle designates this
3027# particular file as subject to the "Classpath" exception as provided
3028# by Oracle in the LICENSE file that accompanied this code.
3029#
3030# This code is distributed in the hope that it will be useful, but WITHOUT
3031# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3032# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3033# version 2 for more details (a copy is included in the LICENSE file that
3034# accompanied this code).
3035#
3036# You should have received a copy of the GNU General Public License version
3037# 2 along with this work; if not, write to the Free Software Foundation,
3038# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3039#
3040# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3041# or visit www.oracle.com if you need additional information or have any
3042# questions.
3043#
3044
3045
3046
3047# This will make sure the given variable points to a full and proper
3048# path. This means:
3049# 1) There will be no spaces in the path. On posix platforms,
3050#    spaces in the path will result in an error. On Windows,
3051#    the path will be rewritten using short-style to be space-free.
3052# 2) The path will be absolute, and it will be in unix-style (on
3053#     cygwin).
3054# $1: The name of the variable to fix
3055
3056
3057# This will make sure the given variable points to a executable
3058# with a full and proper path. This means:
3059# 1) There will be no spaces in the path. On posix platforms,
3060#    spaces in the path will result in an error. On Windows,
3061#    the path will be rewritten using short-style to be space-free.
3062# 2) The path will be absolute, and it will be in unix-style (on
3063#     cygwin).
3064# Any arguments given to the executable is preserved.
3065# If the input variable does not have a directory specification, then
3066# it need to be in the PATH.
3067# $1: The name of the variable to fix
3068
3069
3070
3071
3072
3073
3074# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3075# $1: variable to check
3076# $2: executable name to print in warning (optional)
3077
3078
3079# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3080# Arguments as AC_PATH_PROG:
3081# $1: variable to set
3082# $2: executable name to look for
3083
3084
3085# Setup the most fundamental tools that relies on not much else to set up,
3086# but is used by much of the early bootstrap code.
3087
3088
3089# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3090
3091
3092
3093
3094
3095
3096
3097#%%% Simple tools %%%
3098
3099# Check if we have found a usable version of make
3100# $1: the path to a potential make binary (or empty)
3101# $2: the description on how we found this
3102
3103
3104# Goes looking for a usable version of GNU make.
3105
3106
3107
3108
3109
3110
3111# Check if build directory is on local disk. If not possible to determine,
3112# we prefer to claim it's local.
3113# Argument 1: directory to test
3114# Argument 2: what to do if it is on local disk
3115# Argument 3: what to do otherwise (remote disk or failure)
3116
3117
3118# Check that source files have basic read permissions set. This might
3119# not be the case in cygwin in certain conditions.
3120
3121
3122
3123
3124#
3125# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3126# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3127#
3128# This code is free software; you can redistribute it and/or modify it
3129# under the terms of the GNU General Public License version 2 only, as
3130# published by the Free Software Foundation.  Oracle designates this
3131# particular file as subject to the "Classpath" exception as provided
3132# by Oracle in the LICENSE file that accompanied this code.
3133#
3134# This code is distributed in the hope that it will be useful, but WITHOUT
3135# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3136# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3137# version 2 for more details (a copy is included in the LICENSE file that
3138# accompanied this code).
3139#
3140# You should have received a copy of the GNU General Public License version
3141# 2 along with this work; if not, write to the Free Software Foundation,
3142# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3143#
3144# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3145# or visit www.oracle.com if you need additional information or have any
3146# questions.
3147#
3148
3149
3150
3151
3152
3153# Helper function which possibly converts a path using DOS-style short mode.
3154# If so, the updated path is stored in $new_path.
3155# $1: The path to check
3156
3157
3158# Helper function which possibly converts a path using DOS-style short mode.
3159# If so, the updated path is stored in $new_path.
3160# $1: The path to check
3161
3162
3163# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3164# and could probably be heavily simplified. However, all changes in this
3165# area tend to need lot of testing in different scenarios, and in lack of
3166# proper unit testing, cleaning this up has not been deemed worth the effort
3167# at the moment.
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3178
3179
3180
3181
3182#
3183# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3184# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3185#
3186# This code is free software; you can redistribute it and/or modify it
3187# under the terms of the GNU General Public License version 2 only, as
3188# published by the Free Software Foundation.  Oracle designates this
3189# particular file as subject to the "Classpath" exception as provided
3190# by Oracle in the LICENSE file that accompanied this code.
3191#
3192# This code is distributed in the hope that it will be useful, but WITHOUT
3193# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3194# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3195# version 2 for more details (a copy is included in the LICENSE file that
3196# accompanied this code).
3197#
3198# You should have received a copy of the GNU General Public License version
3199# 2 along with this work; if not, write to the Free Software Foundation,
3200# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3201#
3202# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3203# or visit www.oracle.com if you need additional information or have any
3204# questions.
3205#
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217# ... then the rest
3218#
3219# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3220# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3221#
3222# This code is free software; you can redistribute it and/or modify it
3223# under the terms of the GNU General Public License version 2 only, as
3224# published by the Free Software Foundation.  Oracle designates this
3225# particular file as subject to the "Classpath" exception as provided
3226# by Oracle in the LICENSE file that accompanied this code.
3227#
3228# This code is distributed in the hope that it will be useful, but WITHOUT
3229# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3230# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3231# version 2 for more details (a copy is included in the LICENSE file that
3232# accompanied this code).
3233#
3234# You should have received a copy of the GNU General Public License version
3235# 2 along with this work; if not, write to the Free Software Foundation,
3236# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3237#
3238# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3239# or visit www.oracle.com if you need additional information or have any
3240# questions.
3241#
3242
3243# Execute the check given as argument, and verify the result
3244# If the Boot JDK was previously found, do nothing
3245# $1 A command line (typically autoconf macro) to execute
3246
3247
3248# Test: Is bootjdk explicitely set by command line arguments?
3249
3250
3251# Test: Is bootjdk available from builddeps?
3252
3253
3254# Test: Is $JAVA_HOME set?
3255
3256
3257# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3258
3259
3260# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3261
3262
3263# Look for a jdk in the given path. If there are multiple, try to select the newest.
3264# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3265# $1 = Path to directory containing jdk installations.
3266# $2 = String to append to the found JDK directory to get the proper JDK home
3267
3268
3269# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3270# environmental variable as base for where to look.
3271# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3272
3273
3274# Test: Is there a JDK installed in default, well-known locations?
3275
3276
3277# Check that a command-line tool in the Boot JDK is correct
3278# $1 = name of variable to assign
3279# $2 = name of binary
3280
3281
3282###############################################################################
3283#
3284# We need a Boot JDK to bootstrap the build.
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
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333#
3334# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3335# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3336#
3337# This code is free software; you can redistribute it and/or modify it
3338# under the terms of the GNU General Public License version 2 only, as
3339# published by the Free Software Foundation.  Oracle designates this
3340# particular file as subject to the "Classpath" exception as provided
3341# by Oracle in the LICENSE file that accompanied this code.
3342#
3343# This code is distributed in the hope that it will be useful, but WITHOUT
3344# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3345# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3346# version 2 for more details (a copy is included in the LICENSE file that
3347# accompanied this code).
3348#
3349# You should have received a copy of the GNU General Public License version
3350# 2 along with this work; if not, write to the Free Software Foundation,
3351# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3352#
3353# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3354# or visit www.oracle.com if you need additional information or have any
3355# questions.
3356#
3357
3358
3359
3360
3361
3362cygwin_help() {
3363    case $1 in
3364    unzip)
3365        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3366    zip)
3367        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3368    make)
3369        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3370    * )
3371       break ;;
3372    esac
3373}
3374
3375apt_help() {
3376    case $1 in
3377    devkit)
3378        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3379    openjdk)
3380        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3381    alsa)
3382        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3383    cups)
3384        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3385    freetype2)
3386        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3387    pulse)
3388        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3389    x11)
3390        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3391    ccache)
3392        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3393    * )
3394       break ;;
3395    esac
3396}
3397
3398yum_help() {
3399    case $1 in
3400    devkit)
3401        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3402    openjdk)
3403        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3404    alsa)
3405        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3406    cups)
3407        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3408    freetype2)
3409        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3410    pulse)
3411        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3412    x11)
3413        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3414    ccache)
3415        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3416    * )
3417       break ;;
3418    esac
3419}
3420
3421port_help() {
3422    PKGHANDLER_COMMAND=""
3423}
3424
3425pkgutil_help() {
3426    PKGHANDLER_COMMAND=""
3427}
3428
3429pkgadd_help() {
3430    PKGHANDLER_COMMAND=""
3431}
3432
3433
3434
3435#
3436# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3437# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3438#
3439# This code is free software; you can redistribute it and/or modify it
3440# under the terms of the GNU General Public License version 2 only, as
3441# published by the Free Software Foundation.  Oracle designates this
3442# particular file as subject to the "Classpath" exception as provided
3443# by Oracle in the LICENSE file that accompanied this code.
3444#
3445# This code is distributed in the hope that it will be useful, but WITHOUT
3446# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3447# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3448# version 2 for more details (a copy is included in the LICENSE file that
3449# accompanied this code).
3450#
3451# You should have received a copy of the GNU General Public License version
3452# 2 along with this work; if not, write to the Free Software Foundation,
3453# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3454#
3455# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3456# or visit www.oracle.com if you need additional information or have any
3457# questions.
3458#
3459
3460
3461
3462
3463
3464
3465
3466
3467###############################################################################
3468#
3469# Should we build only OpenJDK even if closed sources are present?
3470#
3471
3472
3473
3474
3475###############################################################################
3476#
3477# Setup version numbers
3478#
3479
3480
3481
3482
3483
3484
3485# Support for customization of the build process. Some build files
3486# will include counterparts from this location, if they exist. This allows
3487# for a degree of customization of the build targets and the rules/recipes
3488# to create them
3489
3490# Check whether --with-custom-make-dir was given.
3491if test "${with_custom_make_dir+set}" = set; then :
3492  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3493fi
3494
3495
3496
3497#
3498# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3499# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3500#
3501# This code is free software; you can redistribute it and/or modify it
3502# under the terms of the GNU General Public License version 2 only, as
3503# published by the Free Software Foundation.  Oracle designates this
3504# particular file as subject to the "Classpath" exception as provided
3505# by Oracle in the LICENSE file that accompanied this code.
3506#
3507# This code is distributed in the hope that it will be useful, but WITHOUT
3508# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3509# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3510# version 2 for more details (a copy is included in the LICENSE file that
3511# accompanied this code).
3512#
3513# You should have received a copy of the GNU General Public License version
3514# 2 along with this work; if not, write to the Free Software Foundation,
3515# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3516#
3517# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3518# or visit www.oracle.com if you need additional information or have any
3519# questions.
3520#
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536#
3537# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3538# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3539#
3540# This code is free software; you can redistribute it and/or modify it
3541# under the terms of the GNU General Public License version 2 only, as
3542# published by the Free Software Foundation.  Oracle designates this
3543# particular file as subject to the "Classpath" exception as provided
3544# by Oracle in the LICENSE file that accompanied this code.
3545#
3546# This code is distributed in the hope that it will be useful, but WITHOUT
3547# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3548# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3549# version 2 for more details (a copy is included in the LICENSE file that
3550# accompanied this code).
3551#
3552# You should have received a copy of the GNU General Public License version
3553# 2 along with this work; if not, write to the Free Software Foundation,
3554# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3555#
3556# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3557# or visit www.oracle.com if you need additional information or have any
3558# questions.
3559#
3560
3561# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3562# Converts autoconf style CPU name to OpenJDK style, into
3563# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3564
3565
3566# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3567# Converts autoconf style OS name to OpenJDK style, into
3568# VAR_OS and VAR_OS_API.
3569
3570
3571# Expects $host_os $host_cpu $build_os and $build_cpu
3572# and $with_target_bits to have been setup!
3573#
3574# Translate the standard triplet(quadruplet) definition
3575# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3576# OPENJDK_BUILD_OS, etc.
3577
3578
3579# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3580# accordingly. Must be done after setting up build and target system, but before
3581# doing anything else with these values.
3582
3583
3584    # Setup the legacy variables, for controlling the old makefiles.
3585    #
3586
3587
3588
3589
3590#%%% Build and target systems %%%
3591
3592
3593
3594
3595# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3596# Add -mX to various FLAGS variables.
3597
3598
3599
3600
3601
3602
3603#
3604# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3605# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3606#
3607# This code is free software; you can redistribute it and/or modify it
3608# under the terms of the GNU General Public License version 2 only, as
3609# published by the Free Software Foundation.  Oracle designates this
3610# particular file as subject to the "Classpath" exception as provided
3611# by Oracle in the LICENSE file that accompanied this code.
3612#
3613# This code is distributed in the hope that it will be useful, but WITHOUT
3614# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3615# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3616# version 2 for more details (a copy is included in the LICENSE file that
3617# accompanied this code).
3618#
3619# You should have received a copy of the GNU General Public License version
3620# 2 along with this work; if not, write to the Free Software Foundation,
3621# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3622#
3623# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3624# or visit www.oracle.com if you need additional information or have any
3625# questions.
3626#
3627
3628
3629
3630
3631
3632
3633
3634
3635#
3636# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3637# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3638#
3639# This code is free software; you can redistribute it and/or modify it
3640# under the terms of the GNU General Public License version 2 only, as
3641# published by the Free Software Foundation.  Oracle designates this
3642# particular file as subject to the "Classpath" exception as provided
3643# by Oracle in the LICENSE file that accompanied this code.
3644#
3645# This code is distributed in the hope that it will be useful, but WITHOUT
3646# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3647# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3648# version 2 for more details (a copy is included in the LICENSE file that
3649# accompanied this code).
3650#
3651# You should have received a copy of the GNU General Public License version
3652# 2 along with this work; if not, write to the Free Software Foundation,
3653# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3654#
3655# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3656# or visit www.oracle.com if you need additional information or have any
3657# questions.
3658#
3659
3660# $1 = compiler to test (CC or CXX)
3661# $2 = human readable name of compiler (C or C++)
3662
3663
3664
3665
3666
3667# $1 = compiler to test (CC or CXX)
3668# $2 = human readable name of compiler (C or C++)
3669# $3 = list of compiler names to search for
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682#
3683# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3684# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3685#
3686# This code is free software; you can redistribute it and/or modify it
3687# under the terms of the GNU General Public License version 2 only, as
3688# published by the Free Software Foundation.  Oracle designates this
3689# particular file as subject to the "Classpath" exception as provided
3690# by Oracle in the LICENSE file that accompanied this code.
3691#
3692# This code is distributed in the hope that it will be useful, but WITHOUT
3693# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3694# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3695# version 2 for more details (a copy is included in the LICENSE file that
3696# accompanied this code).
3697#
3698# You should have received a copy of the GNU General Public License version
3699# 2 along with this work; if not, write to the Free Software Foundation,
3700# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3701#
3702# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3703# or visit www.oracle.com if you need additional information or have any
3704# questions.
3705#
3706
3707
3708
3709
3710
3711
3712
3713# Check if the VS env variables were setup prior to running configure.
3714# If not, then find vcvarsall.bat and run it automatically, and integrate
3715# the set env variables into the spec file.
3716
3717
3718
3719
3720
3721
3722# This line needs to be here, verbatim, after all includes and the dummy hook
3723# definitions. It is replaced with custom functionality when building
3724# custom sources.
3725#CUSTOM_AUTOCONF_INCLUDE
3726
3727# Do not change or remove the following line, it is needed for consistency checks:
3728DATE_WHEN_GENERATED=1361899489
3729
3730###############################################################################
3731#
3732# Initialization / Boot-strapping
3733#
3734# The bootstrapping process needs to solve the "chicken or the egg" problem,
3735# thus it jumps back and forth, each time gaining something needed later on.
3736#
3737###############################################################################
3738
3739# Basic initialization that must happen first of all
3740
3741# Save the original command line. This is passed to us by the wrapper configure script.
3742
3743DATE_WHEN_CONFIGURED=`LANG=C date`
3744
3745{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3746$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3747{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3748$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3749
3750
3751
3752# Start with tools that do not need have cross compilation support
3753# and can be expected to be found in the default PATH. These tools are
3754# used by configure. Nor are these tools expected to be found in the
3755# devkit from the builddeps server either, since they are
3756# needed to download the devkit.
3757
3758# First are all the simple required tools.
3759
3760    for ac_prog in basename
3761do
3762  # Extract the first word of "$ac_prog", so it can be a program name with args.
3763set dummy $ac_prog; ac_word=$2
3764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3765$as_echo_n "checking for $ac_word... " >&6; }
3766if test "${ac_cv_path_BASENAME+set}" = set; then :
3767  $as_echo_n "(cached) " >&6
3768else
3769  case $BASENAME in
3770  [\\/]* | ?:[\\/]*)
3771  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3772  ;;
3773  *)
3774  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3775for as_dir in $PATH
3776do
3777  IFS=$as_save_IFS
3778  test -z "$as_dir" && as_dir=.
3779    for ac_exec_ext in '' $ac_executable_extensions; do
3780  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3781    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3782    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3783    break 2
3784  fi
3785done
3786  done
3787IFS=$as_save_IFS
3788
3789  ;;
3790esac
3791fi
3792BASENAME=$ac_cv_path_BASENAME
3793if test -n "$BASENAME"; then
3794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3795$as_echo "$BASENAME" >&6; }
3796else
3797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3798$as_echo "no" >&6; }
3799fi
3800
3801
3802  test -n "$BASENAME" && break
3803done
3804
3805
3806    if test "x$BASENAME" = x; then
3807        if test "xbasename" = x; then
3808          PROG_NAME=basename
3809        else
3810          PROG_NAME=basename
3811        fi
3812        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3813$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3814        as_fn_error $? "Cannot continue" "$LINENO" 5
3815    fi
3816
3817
3818
3819    for ac_prog in bash
3820do
3821  # Extract the first word of "$ac_prog", so it can be a program name with args.
3822set dummy $ac_prog; ac_word=$2
3823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3824$as_echo_n "checking for $ac_word... " >&6; }
3825if test "${ac_cv_path_BASH+set}" = set; then :
3826  $as_echo_n "(cached) " >&6
3827else
3828  case $BASH in
3829  [\\/]* | ?:[\\/]*)
3830  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3831  ;;
3832  *)
3833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3834for as_dir in $PATH
3835do
3836  IFS=$as_save_IFS
3837  test -z "$as_dir" && as_dir=.
3838    for ac_exec_ext in '' $ac_executable_extensions; do
3839  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3840    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3842    break 2
3843  fi
3844done
3845  done
3846IFS=$as_save_IFS
3847
3848  ;;
3849esac
3850fi
3851BASH=$ac_cv_path_BASH
3852if test -n "$BASH"; then
3853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3854$as_echo "$BASH" >&6; }
3855else
3856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3857$as_echo "no" >&6; }
3858fi
3859
3860
3861  test -n "$BASH" && break
3862done
3863
3864
3865    if test "x$BASH" = x; then
3866        if test "xbash" = x; then
3867          PROG_NAME=bash
3868        else
3869          PROG_NAME=bash
3870        fi
3871        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3872$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3873        as_fn_error $? "Cannot continue" "$LINENO" 5
3874    fi
3875
3876
3877
3878    for ac_prog in cat
3879do
3880  # Extract the first word of "$ac_prog", so it can be a program name with args.
3881set dummy $ac_prog; ac_word=$2
3882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3883$as_echo_n "checking for $ac_word... " >&6; }
3884if test "${ac_cv_path_CAT+set}" = set; then :
3885  $as_echo_n "(cached) " >&6
3886else
3887  case $CAT in
3888  [\\/]* | ?:[\\/]*)
3889  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3890  ;;
3891  *)
3892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3893for as_dir in $PATH
3894do
3895  IFS=$as_save_IFS
3896  test -z "$as_dir" && as_dir=.
3897    for ac_exec_ext in '' $ac_executable_extensions; do
3898  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3899    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3901    break 2
3902  fi
3903done
3904  done
3905IFS=$as_save_IFS
3906
3907  ;;
3908esac
3909fi
3910CAT=$ac_cv_path_CAT
3911if test -n "$CAT"; then
3912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3913$as_echo "$CAT" >&6; }
3914else
3915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3916$as_echo "no" >&6; }
3917fi
3918
3919
3920  test -n "$CAT" && break
3921done
3922
3923
3924    if test "x$CAT" = x; then
3925        if test "xcat" = x; then
3926          PROG_NAME=cat
3927        else
3928          PROG_NAME=cat
3929        fi
3930        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3931$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3932        as_fn_error $? "Cannot continue" "$LINENO" 5
3933    fi
3934
3935
3936
3937    for ac_prog in chmod
3938do
3939  # Extract the first word of "$ac_prog", so it can be a program name with args.
3940set dummy $ac_prog; ac_word=$2
3941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3942$as_echo_n "checking for $ac_word... " >&6; }
3943if test "${ac_cv_path_CHMOD+set}" = set; then :
3944  $as_echo_n "(cached) " >&6
3945else
3946  case $CHMOD in
3947  [\\/]* | ?:[\\/]*)
3948  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3949  ;;
3950  *)
3951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3952for as_dir in $PATH
3953do
3954  IFS=$as_save_IFS
3955  test -z "$as_dir" && as_dir=.
3956    for ac_exec_ext in '' $ac_executable_extensions; do
3957  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3958    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3960    break 2
3961  fi
3962done
3963  done
3964IFS=$as_save_IFS
3965
3966  ;;
3967esac
3968fi
3969CHMOD=$ac_cv_path_CHMOD
3970if test -n "$CHMOD"; then
3971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3972$as_echo "$CHMOD" >&6; }
3973else
3974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3975$as_echo "no" >&6; }
3976fi
3977
3978
3979  test -n "$CHMOD" && break
3980done
3981
3982
3983    if test "x$CHMOD" = x; then
3984        if test "xchmod" = x; then
3985          PROG_NAME=chmod
3986        else
3987          PROG_NAME=chmod
3988        fi
3989        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3990$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3991        as_fn_error $? "Cannot continue" "$LINENO" 5
3992    fi
3993
3994
3995
3996    for ac_prog in cmp
3997do
3998  # Extract the first word of "$ac_prog", so it can be a program name with args.
3999set dummy $ac_prog; ac_word=$2
4000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4001$as_echo_n "checking for $ac_word... " >&6; }
4002if test "${ac_cv_path_CMP+set}" = set; then :
4003  $as_echo_n "(cached) " >&6
4004else
4005  case $CMP in
4006  [\\/]* | ?:[\\/]*)
4007  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4008  ;;
4009  *)
4010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4011for as_dir in $PATH
4012do
4013  IFS=$as_save_IFS
4014  test -z "$as_dir" && as_dir=.
4015    for ac_exec_ext in '' $ac_executable_extensions; do
4016  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4017    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4019    break 2
4020  fi
4021done
4022  done
4023IFS=$as_save_IFS
4024
4025  ;;
4026esac
4027fi
4028CMP=$ac_cv_path_CMP
4029if test -n "$CMP"; then
4030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4031$as_echo "$CMP" >&6; }
4032else
4033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4034$as_echo "no" >&6; }
4035fi
4036
4037
4038  test -n "$CMP" && break
4039done
4040
4041
4042    if test "x$CMP" = x; then
4043        if test "xcmp" = x; then
4044          PROG_NAME=cmp
4045        else
4046          PROG_NAME=cmp
4047        fi
4048        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4049$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4050        as_fn_error $? "Cannot continue" "$LINENO" 5
4051    fi
4052
4053
4054
4055    for ac_prog in comm
4056do
4057  # Extract the first word of "$ac_prog", so it can be a program name with args.
4058set dummy $ac_prog; ac_word=$2
4059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4060$as_echo_n "checking for $ac_word... " >&6; }
4061if test "${ac_cv_path_COMM+set}" = set; then :
4062  $as_echo_n "(cached) " >&6
4063else
4064  case $COMM in
4065  [\\/]* | ?:[\\/]*)
4066  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4067  ;;
4068  *)
4069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4070for as_dir in $PATH
4071do
4072  IFS=$as_save_IFS
4073  test -z "$as_dir" && as_dir=.
4074    for ac_exec_ext in '' $ac_executable_extensions; do
4075  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4076    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4078    break 2
4079  fi
4080done
4081  done
4082IFS=$as_save_IFS
4083
4084  ;;
4085esac
4086fi
4087COMM=$ac_cv_path_COMM
4088if test -n "$COMM"; then
4089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4090$as_echo "$COMM" >&6; }
4091else
4092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4093$as_echo "no" >&6; }
4094fi
4095
4096
4097  test -n "$COMM" && break
4098done
4099
4100
4101    if test "x$COMM" = x; then
4102        if test "xcomm" = x; then
4103          PROG_NAME=comm
4104        else
4105          PROG_NAME=comm
4106        fi
4107        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4108$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4109        as_fn_error $? "Cannot continue" "$LINENO" 5
4110    fi
4111
4112
4113
4114    for ac_prog in cp
4115do
4116  # Extract the first word of "$ac_prog", so it can be a program name with args.
4117set dummy $ac_prog; ac_word=$2
4118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4119$as_echo_n "checking for $ac_word... " >&6; }
4120if test "${ac_cv_path_CP+set}" = set; then :
4121  $as_echo_n "(cached) " >&6
4122else
4123  case $CP in
4124  [\\/]* | ?:[\\/]*)
4125  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4126  ;;
4127  *)
4128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4129for as_dir in $PATH
4130do
4131  IFS=$as_save_IFS
4132  test -z "$as_dir" && as_dir=.
4133    for ac_exec_ext in '' $ac_executable_extensions; do
4134  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4135    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4137    break 2
4138  fi
4139done
4140  done
4141IFS=$as_save_IFS
4142
4143  ;;
4144esac
4145fi
4146CP=$ac_cv_path_CP
4147if test -n "$CP"; then
4148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4149$as_echo "$CP" >&6; }
4150else
4151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4152$as_echo "no" >&6; }
4153fi
4154
4155
4156  test -n "$CP" && break
4157done
4158
4159
4160    if test "x$CP" = x; then
4161        if test "xcp" = x; then
4162          PROG_NAME=cp
4163        else
4164          PROG_NAME=cp
4165        fi
4166        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4167$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4168        as_fn_error $? "Cannot continue" "$LINENO" 5
4169    fi
4170
4171
4172
4173    for ac_prog in cpio
4174do
4175  # Extract the first word of "$ac_prog", so it can be a program name with args.
4176set dummy $ac_prog; ac_word=$2
4177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4178$as_echo_n "checking for $ac_word... " >&6; }
4179if test "${ac_cv_path_CPIO+set}" = set; then :
4180  $as_echo_n "(cached) " >&6
4181else
4182  case $CPIO in
4183  [\\/]* | ?:[\\/]*)
4184  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4185  ;;
4186  *)
4187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4188for as_dir in $PATH
4189do
4190  IFS=$as_save_IFS
4191  test -z "$as_dir" && as_dir=.
4192    for ac_exec_ext in '' $ac_executable_extensions; do
4193  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4194    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4196    break 2
4197  fi
4198done
4199  done
4200IFS=$as_save_IFS
4201
4202  ;;
4203esac
4204fi
4205CPIO=$ac_cv_path_CPIO
4206if test -n "$CPIO"; then
4207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4208$as_echo "$CPIO" >&6; }
4209else
4210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4211$as_echo "no" >&6; }
4212fi
4213
4214
4215  test -n "$CPIO" && break
4216done
4217
4218
4219    if test "x$CPIO" = x; then
4220        if test "xcpio" = x; then
4221          PROG_NAME=cpio
4222        else
4223          PROG_NAME=cpio
4224        fi
4225        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4226$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4227        as_fn_error $? "Cannot continue" "$LINENO" 5
4228    fi
4229
4230
4231
4232    for ac_prog in cut
4233do
4234  # Extract the first word of "$ac_prog", so it can be a program name with args.
4235set dummy $ac_prog; ac_word=$2
4236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4237$as_echo_n "checking for $ac_word... " >&6; }
4238if test "${ac_cv_path_CUT+set}" = set; then :
4239  $as_echo_n "(cached) " >&6
4240else
4241  case $CUT in
4242  [\\/]* | ?:[\\/]*)
4243  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4244  ;;
4245  *)
4246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4247for as_dir in $PATH
4248do
4249  IFS=$as_save_IFS
4250  test -z "$as_dir" && as_dir=.
4251    for ac_exec_ext in '' $ac_executable_extensions; do
4252  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4253    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4255    break 2
4256  fi
4257done
4258  done
4259IFS=$as_save_IFS
4260
4261  ;;
4262esac
4263fi
4264CUT=$ac_cv_path_CUT
4265if test -n "$CUT"; then
4266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4267$as_echo "$CUT" >&6; }
4268else
4269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4270$as_echo "no" >&6; }
4271fi
4272
4273
4274  test -n "$CUT" && break
4275done
4276
4277
4278    if test "x$CUT" = x; then
4279        if test "xcut" = x; then
4280          PROG_NAME=cut
4281        else
4282          PROG_NAME=cut
4283        fi
4284        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4285$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4286        as_fn_error $? "Cannot continue" "$LINENO" 5
4287    fi
4288
4289
4290
4291    for ac_prog in date
4292do
4293  # Extract the first word of "$ac_prog", so it can be a program name with args.
4294set dummy $ac_prog; ac_word=$2
4295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4296$as_echo_n "checking for $ac_word... " >&6; }
4297if test "${ac_cv_path_DATE+set}" = set; then :
4298  $as_echo_n "(cached) " >&6
4299else
4300  case $DATE in
4301  [\\/]* | ?:[\\/]*)
4302  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4303  ;;
4304  *)
4305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4306for as_dir in $PATH
4307do
4308  IFS=$as_save_IFS
4309  test -z "$as_dir" && as_dir=.
4310    for ac_exec_ext in '' $ac_executable_extensions; do
4311  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4312    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4314    break 2
4315  fi
4316done
4317  done
4318IFS=$as_save_IFS
4319
4320  ;;
4321esac
4322fi
4323DATE=$ac_cv_path_DATE
4324if test -n "$DATE"; then
4325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4326$as_echo "$DATE" >&6; }
4327else
4328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4329$as_echo "no" >&6; }
4330fi
4331
4332
4333  test -n "$DATE" && break
4334done
4335
4336
4337    if test "x$DATE" = x; then
4338        if test "xdate" = x; then
4339          PROG_NAME=date
4340        else
4341          PROG_NAME=date
4342        fi
4343        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4344$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4345        as_fn_error $? "Cannot continue" "$LINENO" 5
4346    fi
4347
4348
4349
4350    for ac_prog in gdiff diff
4351do
4352  # Extract the first word of "$ac_prog", so it can be a program name with args.
4353set dummy $ac_prog; ac_word=$2
4354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4355$as_echo_n "checking for $ac_word... " >&6; }
4356if test "${ac_cv_path_DIFF+set}" = set; then :
4357  $as_echo_n "(cached) " >&6
4358else
4359  case $DIFF in
4360  [\\/]* | ?:[\\/]*)
4361  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4362  ;;
4363  *)
4364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4365for as_dir in $PATH
4366do
4367  IFS=$as_save_IFS
4368  test -z "$as_dir" && as_dir=.
4369    for ac_exec_ext in '' $ac_executable_extensions; do
4370  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4371    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4373    break 2
4374  fi
4375done
4376  done
4377IFS=$as_save_IFS
4378
4379  ;;
4380esac
4381fi
4382DIFF=$ac_cv_path_DIFF
4383if test -n "$DIFF"; then
4384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4385$as_echo "$DIFF" >&6; }
4386else
4387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4388$as_echo "no" >&6; }
4389fi
4390
4391
4392  test -n "$DIFF" && break
4393done
4394
4395
4396    if test "x$DIFF" = x; then
4397        if test "xgdiff diff" = x; then
4398          PROG_NAME=diff
4399        else
4400          PROG_NAME=gdiff diff
4401        fi
4402        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4403$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4404        as_fn_error $? "Cannot continue" "$LINENO" 5
4405    fi
4406
4407
4408
4409    for ac_prog in dirname
4410do
4411  # Extract the first word of "$ac_prog", so it can be a program name with args.
4412set dummy $ac_prog; ac_word=$2
4413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4414$as_echo_n "checking for $ac_word... " >&6; }
4415if test "${ac_cv_path_DIRNAME+set}" = set; then :
4416  $as_echo_n "(cached) " >&6
4417else
4418  case $DIRNAME in
4419  [\\/]* | ?:[\\/]*)
4420  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4421  ;;
4422  *)
4423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4424for as_dir in $PATH
4425do
4426  IFS=$as_save_IFS
4427  test -z "$as_dir" && as_dir=.
4428    for ac_exec_ext in '' $ac_executable_extensions; do
4429  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4430    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4432    break 2
4433  fi
4434done
4435  done
4436IFS=$as_save_IFS
4437
4438  ;;
4439esac
4440fi
4441DIRNAME=$ac_cv_path_DIRNAME
4442if test -n "$DIRNAME"; then
4443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4444$as_echo "$DIRNAME" >&6; }
4445else
4446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4447$as_echo "no" >&6; }
4448fi
4449
4450
4451  test -n "$DIRNAME" && break
4452done
4453
4454
4455    if test "x$DIRNAME" = x; then
4456        if test "xdirname" = x; then
4457          PROG_NAME=dirname
4458        else
4459          PROG_NAME=dirname
4460        fi
4461        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4462$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4463        as_fn_error $? "Cannot continue" "$LINENO" 5
4464    fi
4465
4466
4467
4468    for ac_prog in echo
4469do
4470  # Extract the first word of "$ac_prog", so it can be a program name with args.
4471set dummy $ac_prog; ac_word=$2
4472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4473$as_echo_n "checking for $ac_word... " >&6; }
4474if test "${ac_cv_path_ECHO+set}" = set; then :
4475  $as_echo_n "(cached) " >&6
4476else
4477  case $ECHO in
4478  [\\/]* | ?:[\\/]*)
4479  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4480  ;;
4481  *)
4482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4483for as_dir in $PATH
4484do
4485  IFS=$as_save_IFS
4486  test -z "$as_dir" && as_dir=.
4487    for ac_exec_ext in '' $ac_executable_extensions; do
4488  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4489    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4491    break 2
4492  fi
4493done
4494  done
4495IFS=$as_save_IFS
4496
4497  ;;
4498esac
4499fi
4500ECHO=$ac_cv_path_ECHO
4501if test -n "$ECHO"; then
4502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4503$as_echo "$ECHO" >&6; }
4504else
4505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4506$as_echo "no" >&6; }
4507fi
4508
4509
4510  test -n "$ECHO" && break
4511done
4512
4513
4514    if test "x$ECHO" = x; then
4515        if test "xecho" = x; then
4516          PROG_NAME=echo
4517        else
4518          PROG_NAME=echo
4519        fi
4520        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4521$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4522        as_fn_error $? "Cannot continue" "$LINENO" 5
4523    fi
4524
4525
4526
4527    for ac_prog in expr
4528do
4529  # Extract the first word of "$ac_prog", so it can be a program name with args.
4530set dummy $ac_prog; ac_word=$2
4531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4532$as_echo_n "checking for $ac_word... " >&6; }
4533if test "${ac_cv_path_EXPR+set}" = set; then :
4534  $as_echo_n "(cached) " >&6
4535else
4536  case $EXPR in
4537  [\\/]* | ?:[\\/]*)
4538  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4539  ;;
4540  *)
4541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4542for as_dir in $PATH
4543do
4544  IFS=$as_save_IFS
4545  test -z "$as_dir" && as_dir=.
4546    for ac_exec_ext in '' $ac_executable_extensions; do
4547  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4548    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4550    break 2
4551  fi
4552done
4553  done
4554IFS=$as_save_IFS
4555
4556  ;;
4557esac
4558fi
4559EXPR=$ac_cv_path_EXPR
4560if test -n "$EXPR"; then
4561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4562$as_echo "$EXPR" >&6; }
4563else
4564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4565$as_echo "no" >&6; }
4566fi
4567
4568
4569  test -n "$EXPR" && break
4570done
4571
4572
4573    if test "x$EXPR" = x; then
4574        if test "xexpr" = x; then
4575          PROG_NAME=expr
4576        else
4577          PROG_NAME=expr
4578        fi
4579        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4580$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4581        as_fn_error $? "Cannot continue" "$LINENO" 5
4582    fi
4583
4584
4585
4586    for ac_prog in file
4587do
4588  # Extract the first word of "$ac_prog", so it can be a program name with args.
4589set dummy $ac_prog; ac_word=$2
4590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4591$as_echo_n "checking for $ac_word... " >&6; }
4592if test "${ac_cv_path_FILE+set}" = set; then :
4593  $as_echo_n "(cached) " >&6
4594else
4595  case $FILE in
4596  [\\/]* | ?:[\\/]*)
4597  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4598  ;;
4599  *)
4600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4601for as_dir in $PATH
4602do
4603  IFS=$as_save_IFS
4604  test -z "$as_dir" && as_dir=.
4605    for ac_exec_ext in '' $ac_executable_extensions; do
4606  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4607    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4609    break 2
4610  fi
4611done
4612  done
4613IFS=$as_save_IFS
4614
4615  ;;
4616esac
4617fi
4618FILE=$ac_cv_path_FILE
4619if test -n "$FILE"; then
4620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4621$as_echo "$FILE" >&6; }
4622else
4623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4624$as_echo "no" >&6; }
4625fi
4626
4627
4628  test -n "$FILE" && break
4629done
4630
4631
4632    if test "x$FILE" = x; then
4633        if test "xfile" = x; then
4634          PROG_NAME=file
4635        else
4636          PROG_NAME=file
4637        fi
4638        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4639$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4640        as_fn_error $? "Cannot continue" "$LINENO" 5
4641    fi
4642
4643
4644
4645    for ac_prog in find
4646do
4647  # Extract the first word of "$ac_prog", so it can be a program name with args.
4648set dummy $ac_prog; ac_word=$2
4649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4650$as_echo_n "checking for $ac_word... " >&6; }
4651if test "${ac_cv_path_FIND+set}" = set; then :
4652  $as_echo_n "(cached) " >&6
4653else
4654  case $FIND in
4655  [\\/]* | ?:[\\/]*)
4656  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4657  ;;
4658  *)
4659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4660for as_dir in $PATH
4661do
4662  IFS=$as_save_IFS
4663  test -z "$as_dir" && as_dir=.
4664    for ac_exec_ext in '' $ac_executable_extensions; do
4665  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4666    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4668    break 2
4669  fi
4670done
4671  done
4672IFS=$as_save_IFS
4673
4674  ;;
4675esac
4676fi
4677FIND=$ac_cv_path_FIND
4678if test -n "$FIND"; then
4679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4680$as_echo "$FIND" >&6; }
4681else
4682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4683$as_echo "no" >&6; }
4684fi
4685
4686
4687  test -n "$FIND" && break
4688done
4689
4690
4691    if test "x$FIND" = x; then
4692        if test "xfind" = x; then
4693          PROG_NAME=find
4694        else
4695          PROG_NAME=find
4696        fi
4697        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4698$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4699        as_fn_error $? "Cannot continue" "$LINENO" 5
4700    fi
4701
4702
4703
4704    for ac_prog in head
4705do
4706  # Extract the first word of "$ac_prog", so it can be a program name with args.
4707set dummy $ac_prog; ac_word=$2
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4709$as_echo_n "checking for $ac_word... " >&6; }
4710if test "${ac_cv_path_HEAD+set}" = set; then :
4711  $as_echo_n "(cached) " >&6
4712else
4713  case $HEAD in
4714  [\\/]* | ?:[\\/]*)
4715  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4716  ;;
4717  *)
4718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4719for as_dir in $PATH
4720do
4721  IFS=$as_save_IFS
4722  test -z "$as_dir" && as_dir=.
4723    for ac_exec_ext in '' $ac_executable_extensions; do
4724  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4725    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4727    break 2
4728  fi
4729done
4730  done
4731IFS=$as_save_IFS
4732
4733  ;;
4734esac
4735fi
4736HEAD=$ac_cv_path_HEAD
4737if test -n "$HEAD"; then
4738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4739$as_echo "$HEAD" >&6; }
4740else
4741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4742$as_echo "no" >&6; }
4743fi
4744
4745
4746  test -n "$HEAD" && break
4747done
4748
4749
4750    if test "x$HEAD" = x; then
4751        if test "xhead" = x; then
4752          PROG_NAME=head
4753        else
4754          PROG_NAME=head
4755        fi
4756        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4757$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4758        as_fn_error $? "Cannot continue" "$LINENO" 5
4759    fi
4760
4761
4762
4763    for ac_prog in ln
4764do
4765  # Extract the first word of "$ac_prog", so it can be a program name with args.
4766set dummy $ac_prog; ac_word=$2
4767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4768$as_echo_n "checking for $ac_word... " >&6; }
4769if test "${ac_cv_path_LN+set}" = set; then :
4770  $as_echo_n "(cached) " >&6
4771else
4772  case $LN in
4773  [\\/]* | ?:[\\/]*)
4774  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4775  ;;
4776  *)
4777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4778for as_dir in $PATH
4779do
4780  IFS=$as_save_IFS
4781  test -z "$as_dir" && as_dir=.
4782    for ac_exec_ext in '' $ac_executable_extensions; do
4783  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4784    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4786    break 2
4787  fi
4788done
4789  done
4790IFS=$as_save_IFS
4791
4792  ;;
4793esac
4794fi
4795LN=$ac_cv_path_LN
4796if test -n "$LN"; then
4797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4798$as_echo "$LN" >&6; }
4799else
4800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4801$as_echo "no" >&6; }
4802fi
4803
4804
4805  test -n "$LN" && break
4806done
4807
4808
4809    if test "x$LN" = x; then
4810        if test "xln" = x; then
4811          PROG_NAME=ln
4812        else
4813          PROG_NAME=ln
4814        fi
4815        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4816$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4817        as_fn_error $? "Cannot continue" "$LINENO" 5
4818    fi
4819
4820
4821
4822    for ac_prog in ls
4823do
4824  # Extract the first word of "$ac_prog", so it can be a program name with args.
4825set dummy $ac_prog; ac_word=$2
4826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4827$as_echo_n "checking for $ac_word... " >&6; }
4828if test "${ac_cv_path_LS+set}" = set; then :
4829  $as_echo_n "(cached) " >&6
4830else
4831  case $LS in
4832  [\\/]* | ?:[\\/]*)
4833  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4834  ;;
4835  *)
4836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4837for as_dir in $PATH
4838do
4839  IFS=$as_save_IFS
4840  test -z "$as_dir" && as_dir=.
4841    for ac_exec_ext in '' $ac_executable_extensions; do
4842  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4843    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4845    break 2
4846  fi
4847done
4848  done
4849IFS=$as_save_IFS
4850
4851  ;;
4852esac
4853fi
4854LS=$ac_cv_path_LS
4855if test -n "$LS"; then
4856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4857$as_echo "$LS" >&6; }
4858else
4859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4860$as_echo "no" >&6; }
4861fi
4862
4863
4864  test -n "$LS" && break
4865done
4866
4867
4868    if test "x$LS" = x; then
4869        if test "xls" = x; then
4870          PROG_NAME=ls
4871        else
4872          PROG_NAME=ls
4873        fi
4874        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4875$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4876        as_fn_error $? "Cannot continue" "$LINENO" 5
4877    fi
4878
4879
4880
4881    for ac_prog in mkdir
4882do
4883  # Extract the first word of "$ac_prog", so it can be a program name with args.
4884set dummy $ac_prog; ac_word=$2
4885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4886$as_echo_n "checking for $ac_word... " >&6; }
4887if test "${ac_cv_path_MKDIR+set}" = set; then :
4888  $as_echo_n "(cached) " >&6
4889else
4890  case $MKDIR in
4891  [\\/]* | ?:[\\/]*)
4892  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4893  ;;
4894  *)
4895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4896for as_dir in $PATH
4897do
4898  IFS=$as_save_IFS
4899  test -z "$as_dir" && as_dir=.
4900    for ac_exec_ext in '' $ac_executable_extensions; do
4901  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4902    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4904    break 2
4905  fi
4906done
4907  done
4908IFS=$as_save_IFS
4909
4910  ;;
4911esac
4912fi
4913MKDIR=$ac_cv_path_MKDIR
4914if test -n "$MKDIR"; then
4915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4916$as_echo "$MKDIR" >&6; }
4917else
4918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4919$as_echo "no" >&6; }
4920fi
4921
4922
4923  test -n "$MKDIR" && break
4924done
4925
4926
4927    if test "x$MKDIR" = x; then
4928        if test "xmkdir" = x; then
4929          PROG_NAME=mkdir
4930        else
4931          PROG_NAME=mkdir
4932        fi
4933        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4934$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4935        as_fn_error $? "Cannot continue" "$LINENO" 5
4936    fi
4937
4938
4939
4940    for ac_prog in mktemp
4941do
4942  # Extract the first word of "$ac_prog", so it can be a program name with args.
4943set dummy $ac_prog; ac_word=$2
4944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4945$as_echo_n "checking for $ac_word... " >&6; }
4946if test "${ac_cv_path_MKTEMP+set}" = set; then :
4947  $as_echo_n "(cached) " >&6
4948else
4949  case $MKTEMP in
4950  [\\/]* | ?:[\\/]*)
4951  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4952  ;;
4953  *)
4954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in $PATH
4956do
4957  IFS=$as_save_IFS
4958  test -z "$as_dir" && as_dir=.
4959    for ac_exec_ext in '' $ac_executable_extensions; do
4960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4961    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4963    break 2
4964  fi
4965done
4966  done
4967IFS=$as_save_IFS
4968
4969  ;;
4970esac
4971fi
4972MKTEMP=$ac_cv_path_MKTEMP
4973if test -n "$MKTEMP"; then
4974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4975$as_echo "$MKTEMP" >&6; }
4976else
4977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4978$as_echo "no" >&6; }
4979fi
4980
4981
4982  test -n "$MKTEMP" && break
4983done
4984
4985
4986    if test "x$MKTEMP" = x; then
4987        if test "xmktemp" = x; then
4988          PROG_NAME=mktemp
4989        else
4990          PROG_NAME=mktemp
4991        fi
4992        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4993$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4994        as_fn_error $? "Cannot continue" "$LINENO" 5
4995    fi
4996
4997
4998
4999    for ac_prog in mv
5000do
5001  # Extract the first word of "$ac_prog", so it can be a program name with args.
5002set dummy $ac_prog; ac_word=$2
5003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5004$as_echo_n "checking for $ac_word... " >&6; }
5005if test "${ac_cv_path_MV+set}" = set; then :
5006  $as_echo_n "(cached) " >&6
5007else
5008  case $MV in
5009  [\\/]* | ?:[\\/]*)
5010  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5011  ;;
5012  *)
5013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5014for as_dir in $PATH
5015do
5016  IFS=$as_save_IFS
5017  test -z "$as_dir" && as_dir=.
5018    for ac_exec_ext in '' $ac_executable_extensions; do
5019  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5020    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5022    break 2
5023  fi
5024done
5025  done
5026IFS=$as_save_IFS
5027
5028  ;;
5029esac
5030fi
5031MV=$ac_cv_path_MV
5032if test -n "$MV"; then
5033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5034$as_echo "$MV" >&6; }
5035else
5036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5037$as_echo "no" >&6; }
5038fi
5039
5040
5041  test -n "$MV" && break
5042done
5043
5044
5045    if test "x$MV" = x; then
5046        if test "xmv" = x; then
5047          PROG_NAME=mv
5048        else
5049          PROG_NAME=mv
5050        fi
5051        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5052$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5053        as_fn_error $? "Cannot continue" "$LINENO" 5
5054    fi
5055
5056
5057
5058    for ac_prog in printf
5059do
5060  # Extract the first word of "$ac_prog", so it can be a program name with args.
5061set dummy $ac_prog; ac_word=$2
5062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5063$as_echo_n "checking for $ac_word... " >&6; }
5064if test "${ac_cv_path_PRINTF+set}" = set; then :
5065  $as_echo_n "(cached) " >&6
5066else
5067  case $PRINTF in
5068  [\\/]* | ?:[\\/]*)
5069  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5070  ;;
5071  *)
5072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5073for as_dir in $PATH
5074do
5075  IFS=$as_save_IFS
5076  test -z "$as_dir" && as_dir=.
5077    for ac_exec_ext in '' $ac_executable_extensions; do
5078  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5079    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5081    break 2
5082  fi
5083done
5084  done
5085IFS=$as_save_IFS
5086
5087  ;;
5088esac
5089fi
5090PRINTF=$ac_cv_path_PRINTF
5091if test -n "$PRINTF"; then
5092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5093$as_echo "$PRINTF" >&6; }
5094else
5095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5096$as_echo "no" >&6; }
5097fi
5098
5099
5100  test -n "$PRINTF" && break
5101done
5102
5103
5104    if test "x$PRINTF" = x; then
5105        if test "xprintf" = x; then
5106          PROG_NAME=printf
5107        else
5108          PROG_NAME=printf
5109        fi
5110        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5111$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5112        as_fn_error $? "Cannot continue" "$LINENO" 5
5113    fi
5114
5115
5116
5117    for ac_prog in pwd
5118do
5119  # Extract the first word of "$ac_prog", so it can be a program name with args.
5120set dummy $ac_prog; ac_word=$2
5121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5122$as_echo_n "checking for $ac_word... " >&6; }
5123if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5124  $as_echo_n "(cached) " >&6
5125else
5126  case $THEPWDCMD in
5127  [\\/]* | ?:[\\/]*)
5128  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5129  ;;
5130  *)
5131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5132for as_dir in $PATH
5133do
5134  IFS=$as_save_IFS
5135  test -z "$as_dir" && as_dir=.
5136    for ac_exec_ext in '' $ac_executable_extensions; do
5137  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5138    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5140    break 2
5141  fi
5142done
5143  done
5144IFS=$as_save_IFS
5145
5146  ;;
5147esac
5148fi
5149THEPWDCMD=$ac_cv_path_THEPWDCMD
5150if test -n "$THEPWDCMD"; then
5151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5152$as_echo "$THEPWDCMD" >&6; }
5153else
5154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5155$as_echo "no" >&6; }
5156fi
5157
5158
5159  test -n "$THEPWDCMD" && break
5160done
5161
5162
5163    if test "x$THEPWDCMD" = x; then
5164        if test "xpwd" = x; then
5165          PROG_NAME=thepwdcmd
5166        else
5167          PROG_NAME=pwd
5168        fi
5169        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5170$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5171        as_fn_error $? "Cannot continue" "$LINENO" 5
5172    fi
5173
5174
5175
5176    for ac_prog in rm
5177do
5178  # Extract the first word of "$ac_prog", so it can be a program name with args.
5179set dummy $ac_prog; ac_word=$2
5180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5181$as_echo_n "checking for $ac_word... " >&6; }
5182if test "${ac_cv_path_RM+set}" = set; then :
5183  $as_echo_n "(cached) " >&6
5184else
5185  case $RM in
5186  [\\/]* | ?:[\\/]*)
5187  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5188  ;;
5189  *)
5190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191for as_dir in $PATH
5192do
5193  IFS=$as_save_IFS
5194  test -z "$as_dir" && as_dir=.
5195    for ac_exec_ext in '' $ac_executable_extensions; do
5196  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5197    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5199    break 2
5200  fi
5201done
5202  done
5203IFS=$as_save_IFS
5204
5205  ;;
5206esac
5207fi
5208RM=$ac_cv_path_RM
5209if test -n "$RM"; then
5210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5211$as_echo "$RM" >&6; }
5212else
5213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5214$as_echo "no" >&6; }
5215fi
5216
5217
5218  test -n "$RM" && break
5219done
5220
5221
5222    if test "x$RM" = x; then
5223        if test "xrm" = x; then
5224          PROG_NAME=rm
5225        else
5226          PROG_NAME=rm
5227        fi
5228        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5229$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5230        as_fn_error $? "Cannot continue" "$LINENO" 5
5231    fi
5232
5233
5234
5235    for ac_prog in sh
5236do
5237  # Extract the first word of "$ac_prog", so it can be a program name with args.
5238set dummy $ac_prog; ac_word=$2
5239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5240$as_echo_n "checking for $ac_word... " >&6; }
5241if test "${ac_cv_path_SH+set}" = set; then :
5242  $as_echo_n "(cached) " >&6
5243else
5244  case $SH in
5245  [\\/]* | ?:[\\/]*)
5246  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5247  ;;
5248  *)
5249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5250for as_dir in $PATH
5251do
5252  IFS=$as_save_IFS
5253  test -z "$as_dir" && as_dir=.
5254    for ac_exec_ext in '' $ac_executable_extensions; do
5255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5256    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5258    break 2
5259  fi
5260done
5261  done
5262IFS=$as_save_IFS
5263
5264  ;;
5265esac
5266fi
5267SH=$ac_cv_path_SH
5268if test -n "$SH"; then
5269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5270$as_echo "$SH" >&6; }
5271else
5272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5273$as_echo "no" >&6; }
5274fi
5275
5276
5277  test -n "$SH" && break
5278done
5279
5280
5281    if test "x$SH" = x; then
5282        if test "xsh" = x; then
5283          PROG_NAME=sh
5284        else
5285          PROG_NAME=sh
5286        fi
5287        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5288$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5289        as_fn_error $? "Cannot continue" "$LINENO" 5
5290    fi
5291
5292
5293
5294    for ac_prog in sort
5295do
5296  # Extract the first word of "$ac_prog", so it can be a program name with args.
5297set dummy $ac_prog; ac_word=$2
5298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5299$as_echo_n "checking for $ac_word... " >&6; }
5300if test "${ac_cv_path_SORT+set}" = set; then :
5301  $as_echo_n "(cached) " >&6
5302else
5303  case $SORT in
5304  [\\/]* | ?:[\\/]*)
5305  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5306  ;;
5307  *)
5308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5309for as_dir in $PATH
5310do
5311  IFS=$as_save_IFS
5312  test -z "$as_dir" && as_dir=.
5313    for ac_exec_ext in '' $ac_executable_extensions; do
5314  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5315    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5317    break 2
5318  fi
5319done
5320  done
5321IFS=$as_save_IFS
5322
5323  ;;
5324esac
5325fi
5326SORT=$ac_cv_path_SORT
5327if test -n "$SORT"; then
5328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5329$as_echo "$SORT" >&6; }
5330else
5331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5332$as_echo "no" >&6; }
5333fi
5334
5335
5336  test -n "$SORT" && break
5337done
5338
5339
5340    if test "x$SORT" = x; then
5341        if test "xsort" = x; then
5342          PROG_NAME=sort
5343        else
5344          PROG_NAME=sort
5345        fi
5346        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5347$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5348        as_fn_error $? "Cannot continue" "$LINENO" 5
5349    fi
5350
5351
5352
5353    for ac_prog in tail
5354do
5355  # Extract the first word of "$ac_prog", so it can be a program name with args.
5356set dummy $ac_prog; ac_word=$2
5357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5358$as_echo_n "checking for $ac_word... " >&6; }
5359if test "${ac_cv_path_TAIL+set}" = set; then :
5360  $as_echo_n "(cached) " >&6
5361else
5362  case $TAIL in
5363  [\\/]* | ?:[\\/]*)
5364  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5365  ;;
5366  *)
5367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5368for as_dir in $PATH
5369do
5370  IFS=$as_save_IFS
5371  test -z "$as_dir" && as_dir=.
5372    for ac_exec_ext in '' $ac_executable_extensions; do
5373  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5374    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5376    break 2
5377  fi
5378done
5379  done
5380IFS=$as_save_IFS
5381
5382  ;;
5383esac
5384fi
5385TAIL=$ac_cv_path_TAIL
5386if test -n "$TAIL"; then
5387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5388$as_echo "$TAIL" >&6; }
5389else
5390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5391$as_echo "no" >&6; }
5392fi
5393
5394
5395  test -n "$TAIL" && break
5396done
5397
5398
5399    if test "x$TAIL" = x; then
5400        if test "xtail" = x; then
5401          PROG_NAME=tail
5402        else
5403          PROG_NAME=tail
5404        fi
5405        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5406$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5407        as_fn_error $? "Cannot continue" "$LINENO" 5
5408    fi
5409
5410
5411
5412    for ac_prog in tar
5413do
5414  # Extract the first word of "$ac_prog", so it can be a program name with args.
5415set dummy $ac_prog; ac_word=$2
5416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5417$as_echo_n "checking for $ac_word... " >&6; }
5418if test "${ac_cv_path_TAR+set}" = set; then :
5419  $as_echo_n "(cached) " >&6
5420else
5421  case $TAR in
5422  [\\/]* | ?:[\\/]*)
5423  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5424  ;;
5425  *)
5426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5427for as_dir in $PATH
5428do
5429  IFS=$as_save_IFS
5430  test -z "$as_dir" && as_dir=.
5431    for ac_exec_ext in '' $ac_executable_extensions; do
5432  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5433    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5435    break 2
5436  fi
5437done
5438  done
5439IFS=$as_save_IFS
5440
5441  ;;
5442esac
5443fi
5444TAR=$ac_cv_path_TAR
5445if test -n "$TAR"; then
5446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5447$as_echo "$TAR" >&6; }
5448else
5449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5450$as_echo "no" >&6; }
5451fi
5452
5453
5454  test -n "$TAR" && break
5455done
5456
5457
5458    if test "x$TAR" = x; then
5459        if test "xtar" = x; then
5460          PROG_NAME=tar
5461        else
5462          PROG_NAME=tar
5463        fi
5464        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5465$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5466        as_fn_error $? "Cannot continue" "$LINENO" 5
5467    fi
5468
5469
5470
5471    for ac_prog in tee
5472do
5473  # Extract the first word of "$ac_prog", so it can be a program name with args.
5474set dummy $ac_prog; ac_word=$2
5475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5476$as_echo_n "checking for $ac_word... " >&6; }
5477if test "${ac_cv_path_TEE+set}" = set; then :
5478  $as_echo_n "(cached) " >&6
5479else
5480  case $TEE in
5481  [\\/]* | ?:[\\/]*)
5482  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5483  ;;
5484  *)
5485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5486for as_dir in $PATH
5487do
5488  IFS=$as_save_IFS
5489  test -z "$as_dir" && as_dir=.
5490    for ac_exec_ext in '' $ac_executable_extensions; do
5491  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5492    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5494    break 2
5495  fi
5496done
5497  done
5498IFS=$as_save_IFS
5499
5500  ;;
5501esac
5502fi
5503TEE=$ac_cv_path_TEE
5504if test -n "$TEE"; then
5505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5506$as_echo "$TEE" >&6; }
5507else
5508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5509$as_echo "no" >&6; }
5510fi
5511
5512
5513  test -n "$TEE" && break
5514done
5515
5516
5517    if test "x$TEE" = x; then
5518        if test "xtee" = x; then
5519          PROG_NAME=tee
5520        else
5521          PROG_NAME=tee
5522        fi
5523        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5524$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5525        as_fn_error $? "Cannot continue" "$LINENO" 5
5526    fi
5527
5528
5529
5530    for ac_prog in touch
5531do
5532  # Extract the first word of "$ac_prog", so it can be a program name with args.
5533set dummy $ac_prog; ac_word=$2
5534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5535$as_echo_n "checking for $ac_word... " >&6; }
5536if test "${ac_cv_path_TOUCH+set}" = set; then :
5537  $as_echo_n "(cached) " >&6
5538else
5539  case $TOUCH in
5540  [\\/]* | ?:[\\/]*)
5541  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5542  ;;
5543  *)
5544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5545for as_dir in $PATH
5546do
5547  IFS=$as_save_IFS
5548  test -z "$as_dir" && as_dir=.
5549    for ac_exec_ext in '' $ac_executable_extensions; do
5550  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5551    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5553    break 2
5554  fi
5555done
5556  done
5557IFS=$as_save_IFS
5558
5559  ;;
5560esac
5561fi
5562TOUCH=$ac_cv_path_TOUCH
5563if test -n "$TOUCH"; then
5564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5565$as_echo "$TOUCH" >&6; }
5566else
5567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5568$as_echo "no" >&6; }
5569fi
5570
5571
5572  test -n "$TOUCH" && break
5573done
5574
5575
5576    if test "x$TOUCH" = x; then
5577        if test "xtouch" = x; then
5578          PROG_NAME=touch
5579        else
5580          PROG_NAME=touch
5581        fi
5582        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5583$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5584        as_fn_error $? "Cannot continue" "$LINENO" 5
5585    fi
5586
5587
5588
5589    for ac_prog in tr
5590do
5591  # Extract the first word of "$ac_prog", so it can be a program name with args.
5592set dummy $ac_prog; ac_word=$2
5593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5594$as_echo_n "checking for $ac_word... " >&6; }
5595if test "${ac_cv_path_TR+set}" = set; then :
5596  $as_echo_n "(cached) " >&6
5597else
5598  case $TR in
5599  [\\/]* | ?:[\\/]*)
5600  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5601  ;;
5602  *)
5603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5604for as_dir in $PATH
5605do
5606  IFS=$as_save_IFS
5607  test -z "$as_dir" && as_dir=.
5608    for ac_exec_ext in '' $ac_executable_extensions; do
5609  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5610    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5612    break 2
5613  fi
5614done
5615  done
5616IFS=$as_save_IFS
5617
5618  ;;
5619esac
5620fi
5621TR=$ac_cv_path_TR
5622if test -n "$TR"; then
5623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5624$as_echo "$TR" >&6; }
5625else
5626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5627$as_echo "no" >&6; }
5628fi
5629
5630
5631  test -n "$TR" && break
5632done
5633
5634
5635    if test "x$TR" = x; then
5636        if test "xtr" = x; then
5637          PROG_NAME=tr
5638        else
5639          PROG_NAME=tr
5640        fi
5641        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5642$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5643        as_fn_error $? "Cannot continue" "$LINENO" 5
5644    fi
5645
5646
5647
5648    for ac_prog in uname
5649do
5650  # Extract the first word of "$ac_prog", so it can be a program name with args.
5651set dummy $ac_prog; ac_word=$2
5652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5653$as_echo_n "checking for $ac_word... " >&6; }
5654if test "${ac_cv_path_UNAME+set}" = set; then :
5655  $as_echo_n "(cached) " >&6
5656else
5657  case $UNAME in
5658  [\\/]* | ?:[\\/]*)
5659  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5660  ;;
5661  *)
5662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5663for as_dir in $PATH
5664do
5665  IFS=$as_save_IFS
5666  test -z "$as_dir" && as_dir=.
5667    for ac_exec_ext in '' $ac_executable_extensions; do
5668  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5669    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5671    break 2
5672  fi
5673done
5674  done
5675IFS=$as_save_IFS
5676
5677  ;;
5678esac
5679fi
5680UNAME=$ac_cv_path_UNAME
5681if test -n "$UNAME"; then
5682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5683$as_echo "$UNAME" >&6; }
5684else
5685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5686$as_echo "no" >&6; }
5687fi
5688
5689
5690  test -n "$UNAME" && break
5691done
5692
5693
5694    if test "x$UNAME" = x; then
5695        if test "xuname" = x; then
5696          PROG_NAME=uname
5697        else
5698          PROG_NAME=uname
5699        fi
5700        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5701$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5702        as_fn_error $? "Cannot continue" "$LINENO" 5
5703    fi
5704
5705
5706
5707    for ac_prog in uniq
5708do
5709  # Extract the first word of "$ac_prog", so it can be a program name with args.
5710set dummy $ac_prog; ac_word=$2
5711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5712$as_echo_n "checking for $ac_word... " >&6; }
5713if test "${ac_cv_path_UNIQ+set}" = set; then :
5714  $as_echo_n "(cached) " >&6
5715else
5716  case $UNIQ in
5717  [\\/]* | ?:[\\/]*)
5718  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5719  ;;
5720  *)
5721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5722for as_dir in $PATH
5723do
5724  IFS=$as_save_IFS
5725  test -z "$as_dir" && as_dir=.
5726    for ac_exec_ext in '' $ac_executable_extensions; do
5727  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5728    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5730    break 2
5731  fi
5732done
5733  done
5734IFS=$as_save_IFS
5735
5736  ;;
5737esac
5738fi
5739UNIQ=$ac_cv_path_UNIQ
5740if test -n "$UNIQ"; then
5741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5742$as_echo "$UNIQ" >&6; }
5743else
5744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5745$as_echo "no" >&6; }
5746fi
5747
5748
5749  test -n "$UNIQ" && break
5750done
5751
5752
5753    if test "x$UNIQ" = x; then
5754        if test "xuniq" = x; then
5755          PROG_NAME=uniq
5756        else
5757          PROG_NAME=uniq
5758        fi
5759        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5760$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5761        as_fn_error $? "Cannot continue" "$LINENO" 5
5762    fi
5763
5764
5765
5766    for ac_prog in wc
5767do
5768  # Extract the first word of "$ac_prog", so it can be a program name with args.
5769set dummy $ac_prog; ac_word=$2
5770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5771$as_echo_n "checking for $ac_word... " >&6; }
5772if test "${ac_cv_path_WC+set}" = set; then :
5773  $as_echo_n "(cached) " >&6
5774else
5775  case $WC in
5776  [\\/]* | ?:[\\/]*)
5777  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5778  ;;
5779  *)
5780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5781for as_dir in $PATH
5782do
5783  IFS=$as_save_IFS
5784  test -z "$as_dir" && as_dir=.
5785    for ac_exec_ext in '' $ac_executable_extensions; do
5786  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5787    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5789    break 2
5790  fi
5791done
5792  done
5793IFS=$as_save_IFS
5794
5795  ;;
5796esac
5797fi
5798WC=$ac_cv_path_WC
5799if test -n "$WC"; then
5800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5801$as_echo "$WC" >&6; }
5802else
5803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5804$as_echo "no" >&6; }
5805fi
5806
5807
5808  test -n "$WC" && break
5809done
5810
5811
5812    if test "x$WC" = x; then
5813        if test "xwc" = x; then
5814          PROG_NAME=wc
5815        else
5816          PROG_NAME=wc
5817        fi
5818        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5819$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5820        as_fn_error $? "Cannot continue" "$LINENO" 5
5821    fi
5822
5823
5824
5825    for ac_prog in which
5826do
5827  # Extract the first word of "$ac_prog", so it can be a program name with args.
5828set dummy $ac_prog; ac_word=$2
5829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5830$as_echo_n "checking for $ac_word... " >&6; }
5831if test "${ac_cv_path_WHICH+set}" = set; then :
5832  $as_echo_n "(cached) " >&6
5833else
5834  case $WHICH in
5835  [\\/]* | ?:[\\/]*)
5836  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5837  ;;
5838  *)
5839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5840for as_dir in $PATH
5841do
5842  IFS=$as_save_IFS
5843  test -z "$as_dir" && as_dir=.
5844    for ac_exec_ext in '' $ac_executable_extensions; do
5845  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5846    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5848    break 2
5849  fi
5850done
5851  done
5852IFS=$as_save_IFS
5853
5854  ;;
5855esac
5856fi
5857WHICH=$ac_cv_path_WHICH
5858if test -n "$WHICH"; then
5859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5860$as_echo "$WHICH" >&6; }
5861else
5862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5863$as_echo "no" >&6; }
5864fi
5865
5866
5867  test -n "$WHICH" && break
5868done
5869
5870
5871    if test "x$WHICH" = x; then
5872        if test "xwhich" = x; then
5873          PROG_NAME=which
5874        else
5875          PROG_NAME=which
5876        fi
5877        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5878$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5879        as_fn_error $? "Cannot continue" "$LINENO" 5
5880    fi
5881
5882
5883
5884    for ac_prog in xargs
5885do
5886  # Extract the first word of "$ac_prog", so it can be a program name with args.
5887set dummy $ac_prog; ac_word=$2
5888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5889$as_echo_n "checking for $ac_word... " >&6; }
5890if test "${ac_cv_path_XARGS+set}" = set; then :
5891  $as_echo_n "(cached) " >&6
5892else
5893  case $XARGS in
5894  [\\/]* | ?:[\\/]*)
5895  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5896  ;;
5897  *)
5898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5899for as_dir in $PATH
5900do
5901  IFS=$as_save_IFS
5902  test -z "$as_dir" && as_dir=.
5903    for ac_exec_ext in '' $ac_executable_extensions; do
5904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5905    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5907    break 2
5908  fi
5909done
5910  done
5911IFS=$as_save_IFS
5912
5913  ;;
5914esac
5915fi
5916XARGS=$ac_cv_path_XARGS
5917if test -n "$XARGS"; then
5918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5919$as_echo "$XARGS" >&6; }
5920else
5921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5922$as_echo "no" >&6; }
5923fi
5924
5925
5926  test -n "$XARGS" && break
5927done
5928
5929
5930    if test "x$XARGS" = x; then
5931        if test "xxargs" = x; then
5932          PROG_NAME=xargs
5933        else
5934          PROG_NAME=xargs
5935        fi
5936        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5937$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5938        as_fn_error $? "Cannot continue" "$LINENO" 5
5939    fi
5940
5941
5942
5943# Then required tools that require some special treatment.
5944for ac_prog in gawk mawk nawk awk
5945do
5946  # Extract the first word of "$ac_prog", so it can be a program name with args.
5947set dummy $ac_prog; ac_word=$2
5948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5949$as_echo_n "checking for $ac_word... " >&6; }
5950if test "${ac_cv_prog_AWK+set}" = set; then :
5951  $as_echo_n "(cached) " >&6
5952else
5953  if test -n "$AWK"; then
5954  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5955else
5956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5957for as_dir in $PATH
5958do
5959  IFS=$as_save_IFS
5960  test -z "$as_dir" && as_dir=.
5961    for ac_exec_ext in '' $ac_executable_extensions; do
5962  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5963    ac_cv_prog_AWK="$ac_prog"
5964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5965    break 2
5966  fi
5967done
5968  done
5969IFS=$as_save_IFS
5970
5971fi
5972fi
5973AWK=$ac_cv_prog_AWK
5974if test -n "$AWK"; then
5975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5976$as_echo "$AWK" >&6; }
5977else
5978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979$as_echo "no" >&6; }
5980fi
5981
5982
5983  test -n "$AWK" && break
5984done
5985
5986
5987    if test "x$AWK" = x; then
5988        if test "x" = x; then
5989          PROG_NAME=awk
5990        else
5991          PROG_NAME=
5992        fi
5993        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5994$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5995        as_fn_error $? "Cannot continue" "$LINENO" 5
5996    fi
5997
5998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5999$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6000if test "${ac_cv_path_GREP+set}" = set; then :
6001  $as_echo_n "(cached) " >&6
6002else
6003  if test -z "$GREP"; then
6004  ac_path_GREP_found=false
6005  # Loop through the user's path and test for each of PROGNAME-LIST
6006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6007for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6008do
6009  IFS=$as_save_IFS
6010  test -z "$as_dir" && as_dir=.
6011    for ac_prog in grep ggrep; do
6012    for ac_exec_ext in '' $ac_executable_extensions; do
6013      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6014      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6015# Check for GNU ac_path_GREP and select it if it is found.
6016  # Check for GNU $ac_path_GREP
6017case `"$ac_path_GREP" --version 2>&1` in
6018*GNU*)
6019  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6020*)
6021  ac_count=0
6022  $as_echo_n 0123456789 >"conftest.in"
6023  while :
6024  do
6025    cat "conftest.in" "conftest.in" >"conftest.tmp"
6026    mv "conftest.tmp" "conftest.in"
6027    cp "conftest.in" "conftest.nl"
6028    $as_echo 'GREP' >> "conftest.nl"
6029    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6030    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6031    as_fn_arith $ac_count + 1 && ac_count=$as_val
6032    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6033      # Best one so far, save it but keep looking for a better one
6034      ac_cv_path_GREP="$ac_path_GREP"
6035      ac_path_GREP_max=$ac_count
6036    fi
6037    # 10*(2^10) chars as input seems more than enough
6038    test $ac_count -gt 10 && break
6039  done
6040  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6041esac
6042
6043      $ac_path_GREP_found && break 3
6044    done
6045  done
6046  done
6047IFS=$as_save_IFS
6048  if test -z "$ac_cv_path_GREP"; then
6049    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6050  fi
6051else
6052  ac_cv_path_GREP=$GREP
6053fi
6054
6055fi
6056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6057$as_echo "$ac_cv_path_GREP" >&6; }
6058 GREP="$ac_cv_path_GREP"
6059
6060
6061
6062    if test "x$GREP" = x; then
6063        if test "x" = x; then
6064          PROG_NAME=grep
6065        else
6066          PROG_NAME=
6067        fi
6068        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6069$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6070        as_fn_error $? "Cannot continue" "$LINENO" 5
6071    fi
6072
6073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6074$as_echo_n "checking for egrep... " >&6; }
6075if test "${ac_cv_path_EGREP+set}" = set; then :
6076  $as_echo_n "(cached) " >&6
6077else
6078  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6079   then ac_cv_path_EGREP="$GREP -E"
6080   else
6081     if test -z "$EGREP"; then
6082  ac_path_EGREP_found=false
6083  # Loop through the user's path and test for each of PROGNAME-LIST
6084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6085for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6086do
6087  IFS=$as_save_IFS
6088  test -z "$as_dir" && as_dir=.
6089    for ac_prog in egrep; do
6090    for ac_exec_ext in '' $ac_executable_extensions; do
6091      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6092      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6093# Check for GNU ac_path_EGREP and select it if it is found.
6094  # Check for GNU $ac_path_EGREP
6095case `"$ac_path_EGREP" --version 2>&1` in
6096*GNU*)
6097  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6098*)
6099  ac_count=0
6100  $as_echo_n 0123456789 >"conftest.in"
6101  while :
6102  do
6103    cat "conftest.in" "conftest.in" >"conftest.tmp"
6104    mv "conftest.tmp" "conftest.in"
6105    cp "conftest.in" "conftest.nl"
6106    $as_echo 'EGREP' >> "conftest.nl"
6107    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6108    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6109    as_fn_arith $ac_count + 1 && ac_count=$as_val
6110    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6111      # Best one so far, save it but keep looking for a better one
6112      ac_cv_path_EGREP="$ac_path_EGREP"
6113      ac_path_EGREP_max=$ac_count
6114    fi
6115    # 10*(2^10) chars as input seems more than enough
6116    test $ac_count -gt 10 && break
6117  done
6118  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6119esac
6120
6121      $ac_path_EGREP_found && break 3
6122    done
6123  done
6124  done
6125IFS=$as_save_IFS
6126  if test -z "$ac_cv_path_EGREP"; then
6127    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6128  fi
6129else
6130  ac_cv_path_EGREP=$EGREP
6131fi
6132
6133   fi
6134fi
6135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6136$as_echo "$ac_cv_path_EGREP" >&6; }
6137 EGREP="$ac_cv_path_EGREP"
6138
6139
6140
6141    if test "x$EGREP" = x; then
6142        if test "x" = x; then
6143          PROG_NAME=egrep
6144        else
6145          PROG_NAME=
6146        fi
6147        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6148$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6149        as_fn_error $? "Cannot continue" "$LINENO" 5
6150    fi
6151
6152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6153$as_echo_n "checking for fgrep... " >&6; }
6154if test "${ac_cv_path_FGREP+set}" = set; then :
6155  $as_echo_n "(cached) " >&6
6156else
6157  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6158   then ac_cv_path_FGREP="$GREP -F"
6159   else
6160     if test -z "$FGREP"; then
6161  ac_path_FGREP_found=false
6162  # Loop through the user's path and test for each of PROGNAME-LIST
6163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6164for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6165do
6166  IFS=$as_save_IFS
6167  test -z "$as_dir" && as_dir=.
6168    for ac_prog in fgrep; do
6169    for ac_exec_ext in '' $ac_executable_extensions; do
6170      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6171      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6172# Check for GNU ac_path_FGREP and select it if it is found.
6173  # Check for GNU $ac_path_FGREP
6174case `"$ac_path_FGREP" --version 2>&1` in
6175*GNU*)
6176  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6177*)
6178  ac_count=0
6179  $as_echo_n 0123456789 >"conftest.in"
6180  while :
6181  do
6182    cat "conftest.in" "conftest.in" >"conftest.tmp"
6183    mv "conftest.tmp" "conftest.in"
6184    cp "conftest.in" "conftest.nl"
6185    $as_echo 'FGREP' >> "conftest.nl"
6186    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6187    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6188    as_fn_arith $ac_count + 1 && ac_count=$as_val
6189    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6190      # Best one so far, save it but keep looking for a better one
6191      ac_cv_path_FGREP="$ac_path_FGREP"
6192      ac_path_FGREP_max=$ac_count
6193    fi
6194    # 10*(2^10) chars as input seems more than enough
6195    test $ac_count -gt 10 && break
6196  done
6197  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6198esac
6199
6200      $ac_path_FGREP_found && break 3
6201    done
6202  done
6203  done
6204IFS=$as_save_IFS
6205  if test -z "$ac_cv_path_FGREP"; then
6206    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6207  fi
6208else
6209  ac_cv_path_FGREP=$FGREP
6210fi
6211
6212   fi
6213fi
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6215$as_echo "$ac_cv_path_FGREP" >&6; }
6216 FGREP="$ac_cv_path_FGREP"
6217
6218
6219
6220    if test "x$FGREP" = x; then
6221        if test "x" = x; then
6222          PROG_NAME=fgrep
6223        else
6224          PROG_NAME=
6225        fi
6226        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6227$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6228        as_fn_error $? "Cannot continue" "$LINENO" 5
6229    fi
6230
6231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6232$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6233if test "${ac_cv_path_SED+set}" = set; then :
6234  $as_echo_n "(cached) " >&6
6235else
6236            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6237     for ac_i in 1 2 3 4 5 6 7; do
6238       ac_script="$ac_script$as_nl$ac_script"
6239     done
6240     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6241     { ac_script=; unset ac_script;}
6242     if test -z "$SED"; then
6243  ac_path_SED_found=false
6244  # Loop through the user's path and test for each of PROGNAME-LIST
6245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6246for as_dir in $PATH
6247do
6248  IFS=$as_save_IFS
6249  test -z "$as_dir" && as_dir=.
6250    for ac_prog in sed gsed; do
6251    for ac_exec_ext in '' $ac_executable_extensions; do
6252      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6253      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6254# Check for GNU ac_path_SED and select it if it is found.
6255  # Check for GNU $ac_path_SED
6256case `"$ac_path_SED" --version 2>&1` in
6257*GNU*)
6258  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6259*)
6260  ac_count=0
6261  $as_echo_n 0123456789 >"conftest.in"
6262  while :
6263  do
6264    cat "conftest.in" "conftest.in" >"conftest.tmp"
6265    mv "conftest.tmp" "conftest.in"
6266    cp "conftest.in" "conftest.nl"
6267    $as_echo '' >> "conftest.nl"
6268    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6269    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6270    as_fn_arith $ac_count + 1 && ac_count=$as_val
6271    if test $ac_count -gt ${ac_path_SED_max-0}; then
6272      # Best one so far, save it but keep looking for a better one
6273      ac_cv_path_SED="$ac_path_SED"
6274      ac_path_SED_max=$ac_count
6275    fi
6276    # 10*(2^10) chars as input seems more than enough
6277    test $ac_count -gt 10 && break
6278  done
6279  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6280esac
6281
6282      $ac_path_SED_found && break 3
6283    done
6284  done
6285  done
6286IFS=$as_save_IFS
6287  if test -z "$ac_cv_path_SED"; then
6288    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6289  fi
6290else
6291  ac_cv_path_SED=$SED
6292fi
6293
6294fi
6295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6296$as_echo "$ac_cv_path_SED" >&6; }
6297 SED="$ac_cv_path_SED"
6298  rm -f conftest.sed
6299
6300
6301    if test "x$SED" = x; then
6302        if test "x" = x; then
6303          PROG_NAME=sed
6304        else
6305          PROG_NAME=
6306        fi
6307        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6308$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6309        as_fn_error $? "Cannot continue" "$LINENO" 5
6310    fi
6311
6312
6313for ac_prog in nawk gawk awk
6314do
6315  # Extract the first word of "$ac_prog", so it can be a program name with args.
6316set dummy $ac_prog; ac_word=$2
6317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6318$as_echo_n "checking for $ac_word... " >&6; }
6319if test "${ac_cv_path_NAWK+set}" = set; then :
6320  $as_echo_n "(cached) " >&6
6321else
6322  case $NAWK in
6323  [\\/]* | ?:[\\/]*)
6324  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6325  ;;
6326  *)
6327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6328for as_dir in $PATH
6329do
6330  IFS=$as_save_IFS
6331  test -z "$as_dir" && as_dir=.
6332    for ac_exec_ext in '' $ac_executable_extensions; do
6333  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6334    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6336    break 2
6337  fi
6338done
6339  done
6340IFS=$as_save_IFS
6341
6342  ;;
6343esac
6344fi
6345NAWK=$ac_cv_path_NAWK
6346if test -n "$NAWK"; then
6347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6348$as_echo "$NAWK" >&6; }
6349else
6350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6351$as_echo "no" >&6; }
6352fi
6353
6354
6355  test -n "$NAWK" && break
6356done
6357
6358
6359    if test "x$NAWK" = x; then
6360        if test "x" = x; then
6361          PROG_NAME=nawk
6362        else
6363          PROG_NAME=
6364        fi
6365        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6366$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6367        as_fn_error $? "Cannot continue" "$LINENO" 5
6368    fi
6369
6370
6371# Always force rm.
6372RM="$RM -f"
6373
6374# These are not required on all platforms
6375# Extract the first word of "cygpath", so it can be a program name with args.
6376set dummy cygpath; ac_word=$2
6377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6378$as_echo_n "checking for $ac_word... " >&6; }
6379if test "${ac_cv_path_CYGPATH+set}" = set; then :
6380  $as_echo_n "(cached) " >&6
6381else
6382  case $CYGPATH in
6383  [\\/]* | ?:[\\/]*)
6384  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6385  ;;
6386  *)
6387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6388for as_dir in $PATH
6389do
6390  IFS=$as_save_IFS
6391  test -z "$as_dir" && as_dir=.
6392    for ac_exec_ext in '' $ac_executable_extensions; do
6393  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6394    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6396    break 2
6397  fi
6398done
6399  done
6400IFS=$as_save_IFS
6401
6402  ;;
6403esac
6404fi
6405CYGPATH=$ac_cv_path_CYGPATH
6406if test -n "$CYGPATH"; then
6407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6408$as_echo "$CYGPATH" >&6; }
6409else
6410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6411$as_echo "no" >&6; }
6412fi
6413
6414
6415# Extract the first word of "readlink", so it can be a program name with args.
6416set dummy readlink; ac_word=$2
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6418$as_echo_n "checking for $ac_word... " >&6; }
6419if test "${ac_cv_path_READLINK+set}" = set; then :
6420  $as_echo_n "(cached) " >&6
6421else
6422  case $READLINK in
6423  [\\/]* | ?:[\\/]*)
6424  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6425  ;;
6426  *)
6427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428for as_dir in $PATH
6429do
6430  IFS=$as_save_IFS
6431  test -z "$as_dir" && as_dir=.
6432    for ac_exec_ext in '' $ac_executable_extensions; do
6433  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6434    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6436    break 2
6437  fi
6438done
6439  done
6440IFS=$as_save_IFS
6441
6442  ;;
6443esac
6444fi
6445READLINK=$ac_cv_path_READLINK
6446if test -n "$READLINK"; then
6447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6448$as_echo "$READLINK" >&6; }
6449else
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454
6455# Extract the first word of "df", so it can be a program name with args.
6456set dummy df; ac_word=$2
6457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6458$as_echo_n "checking for $ac_word... " >&6; }
6459if test "${ac_cv_path_DF+set}" = set; then :
6460  $as_echo_n "(cached) " >&6
6461else
6462  case $DF in
6463  [\\/]* | ?:[\\/]*)
6464  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6465  ;;
6466  *)
6467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6468for as_dir in $PATH
6469do
6470  IFS=$as_save_IFS
6471  test -z "$as_dir" && as_dir=.
6472    for ac_exec_ext in '' $ac_executable_extensions; do
6473  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6474    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6476    break 2
6477  fi
6478done
6479  done
6480IFS=$as_save_IFS
6481
6482  ;;
6483esac
6484fi
6485DF=$ac_cv_path_DF
6486if test -n "$DF"; then
6487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6488$as_echo "$DF" >&6; }
6489else
6490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6491$as_echo "no" >&6; }
6492fi
6493
6494
6495# Extract the first word of "SetFile", so it can be a program name with args.
6496set dummy SetFile; ac_word=$2
6497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6498$as_echo_n "checking for $ac_word... " >&6; }
6499if test "${ac_cv_path_SETFILE+set}" = set; then :
6500  $as_echo_n "(cached) " >&6
6501else
6502  case $SETFILE in
6503  [\\/]* | ?:[\\/]*)
6504  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6505  ;;
6506  *)
6507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6508for as_dir in $PATH
6509do
6510  IFS=$as_save_IFS
6511  test -z "$as_dir" && as_dir=.
6512    for ac_exec_ext in '' $ac_executable_extensions; do
6513  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6514    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6516    break 2
6517  fi
6518done
6519  done
6520IFS=$as_save_IFS
6521
6522  ;;
6523esac
6524fi
6525SETFILE=$ac_cv_path_SETFILE
6526if test -n "$SETFILE"; then
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6528$as_echo "$SETFILE" >&6; }
6529else
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534
6535
6536
6537# Now we can determine OpenJDK build and target platforms. This is required to
6538# have early on.
6539# Make sure we can run config.sub.
6540$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6541  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6542
6543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6544$as_echo_n "checking build system type... " >&6; }
6545if test "${ac_cv_build+set}" = set; then :
6546  $as_echo_n "(cached) " >&6
6547else
6548  ac_build_alias=$build_alias
6549test "x$ac_build_alias" = x &&
6550  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6551test "x$ac_build_alias" = x &&
6552  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6553ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6554  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6555
6556fi
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6558$as_echo "$ac_cv_build" >&6; }
6559case $ac_cv_build in
6560*-*-*) ;;
6561*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6562esac
6563build=$ac_cv_build
6564ac_save_IFS=$IFS; IFS='-'
6565set x $ac_cv_build
6566shift
6567build_cpu=$1
6568build_vendor=$2
6569shift; shift
6570# Remember, the first character of IFS is used to create $*,
6571# except with old shells:
6572build_os=$*
6573IFS=$ac_save_IFS
6574case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6575
6576
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6578$as_echo_n "checking host system type... " >&6; }
6579if test "${ac_cv_host+set}" = set; then :
6580  $as_echo_n "(cached) " >&6
6581else
6582  if test "x$host_alias" = x; then
6583  ac_cv_host=$ac_cv_build
6584else
6585  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6586    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6587fi
6588
6589fi
6590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6591$as_echo "$ac_cv_host" >&6; }
6592case $ac_cv_host in
6593*-*-*) ;;
6594*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6595esac
6596host=$ac_cv_host
6597ac_save_IFS=$IFS; IFS='-'
6598set x $ac_cv_host
6599shift
6600host_cpu=$1
6601host_vendor=$2
6602shift; shift
6603# Remember, the first character of IFS is used to create $*,
6604# except with old shells:
6605host_os=$*
6606IFS=$ac_save_IFS
6607case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6608
6609
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6611$as_echo_n "checking target system type... " >&6; }
6612if test "${ac_cv_target+set}" = set; then :
6613  $as_echo_n "(cached) " >&6
6614else
6615  if test "x$target_alias" = x; then
6616  ac_cv_target=$ac_cv_host
6617else
6618  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6619    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6620fi
6621
6622fi
6623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6624$as_echo "$ac_cv_target" >&6; }
6625case $ac_cv_target in
6626*-*-*) ;;
6627*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6628esac
6629target=$ac_cv_target
6630ac_save_IFS=$IFS; IFS='-'
6631set x $ac_cv_target
6632shift
6633target_cpu=$1
6634target_vendor=$2
6635shift; shift
6636# Remember, the first character of IFS is used to create $*,
6637# except with old shells:
6638target_os=$*
6639IFS=$ac_save_IFS
6640case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6641
6642
6643# The aliases save the names the user supplied, while $host etc.
6644# will get canonicalized.
6645test -n "$target_alias" &&
6646  test "$program_prefix$program_suffix$program_transform_name" = \
6647    NONENONEs,x,x, &&
6648  program_prefix=${target_alias}-
6649
6650# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6651# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6652# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6653# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6654# to use the configure naming style.
6655
6656
6657
6658
6659
6660    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6661    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6662    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6663    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6664    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6665    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6666
6667
6668
6669    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6670
6671  case "$build_os" in
6672    *linux*)
6673      VAR_OS=linux
6674      VAR_OS_API=posix
6675      VAR_OS_ENV=linux
6676      ;;
6677    *solaris*)
6678      VAR_OS=solaris
6679      VAR_OS_API=posix
6680      VAR_OS_ENV=solaris
6681      ;;
6682    *darwin*)
6683      VAR_OS=macosx
6684      VAR_OS_API=posix
6685      VAR_OS_ENV=macosx
6686      ;;
6687    *bsd*)
6688      VAR_OS=bsd
6689      VAR_OS_API=posix
6690      VAR_OS_ENV=bsd
6691      ;;
6692    *cygwin*)
6693      VAR_OS=windows
6694      VAR_OS_API=winapi
6695      VAR_OS_ENV=windows.cygwin
6696      ;;
6697    *mingw*)
6698      VAR_OS=windows
6699      VAR_OS_API=winapi
6700      VAR_OS_ENV=windows.msys
6701      ;;
6702    *)
6703      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6704      ;;
6705  esac
6706
6707
6708  # First argument is the cpu name from the trip/quad
6709  case "$build_cpu" in
6710    x86_64)
6711      VAR_CPU=x86_64
6712      VAR_CPU_ARCH=x86
6713      VAR_CPU_BITS=64
6714      VAR_CPU_ENDIAN=little
6715      ;;
6716    i?86)
6717      VAR_CPU=x86
6718      VAR_CPU_ARCH=x86
6719      VAR_CPU_BITS=32
6720      VAR_CPU_ENDIAN=little
6721      ;;
6722    arm*)
6723      VAR_CPU=arm
6724      VAR_CPU_ARCH=arm
6725      VAR_CPU_BITS=32
6726      VAR_CPU_ENDIAN=little
6727      ;;
6728    powerpc)
6729      VAR_CPU=ppc
6730      VAR_CPU_ARCH=ppc
6731      VAR_CPU_BITS=32
6732      VAR_CPU_ENDIAN=big
6733       ;;
6734    powerpc64)
6735      VAR_CPU=ppc64
6736      VAR_CPU_ARCH=ppc
6737      VAR_CPU_BITS=64
6738      VAR_CPU_ENDIAN=big
6739       ;;
6740    sparc)
6741      VAR_CPU=sparc
6742      VAR_CPU_ARCH=sparc
6743      VAR_CPU_BITS=32
6744      VAR_CPU_ENDIAN=big
6745       ;;
6746    sparcv9)
6747      VAR_CPU=sparcv9
6748      VAR_CPU_ARCH=sparc
6749      VAR_CPU_BITS=64
6750      VAR_CPU_ENDIAN=big
6751       ;;
6752    *)
6753      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6754      ;;
6755  esac
6756
6757    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6758    OPENJDK_BUILD_OS="$VAR_OS"
6759    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6760    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6761    OPENJDK_BUILD_CPU="$VAR_CPU"
6762    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6763    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6764    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6765
6766
6767
6768
6769
6770
6771
6772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6773$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6775$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6776
6777    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6778
6779  case "$host_os" in
6780    *linux*)
6781      VAR_OS=linux
6782      VAR_OS_API=posix
6783      VAR_OS_ENV=linux
6784      ;;
6785    *solaris*)
6786      VAR_OS=solaris
6787      VAR_OS_API=posix
6788      VAR_OS_ENV=solaris
6789      ;;
6790    *darwin*)
6791      VAR_OS=macosx
6792      VAR_OS_API=posix
6793      VAR_OS_ENV=macosx
6794      ;;
6795    *bsd*)
6796      VAR_OS=bsd
6797      VAR_OS_API=posix
6798      VAR_OS_ENV=bsd
6799      ;;
6800    *cygwin*)
6801      VAR_OS=windows
6802      VAR_OS_API=winapi
6803      VAR_OS_ENV=windows.cygwin
6804      ;;
6805    *mingw*)
6806      VAR_OS=windows
6807      VAR_OS_API=winapi
6808      VAR_OS_ENV=windows.msys
6809      ;;
6810    *)
6811      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6812      ;;
6813  esac
6814
6815
6816  # First argument is the cpu name from the trip/quad
6817  case "$host_cpu" in
6818    x86_64)
6819      VAR_CPU=x86_64
6820      VAR_CPU_ARCH=x86
6821      VAR_CPU_BITS=64
6822      VAR_CPU_ENDIAN=little
6823      ;;
6824    i?86)
6825      VAR_CPU=x86
6826      VAR_CPU_ARCH=x86
6827      VAR_CPU_BITS=32
6828      VAR_CPU_ENDIAN=little
6829      ;;
6830    arm*)
6831      VAR_CPU=arm
6832      VAR_CPU_ARCH=arm
6833      VAR_CPU_BITS=32
6834      VAR_CPU_ENDIAN=little
6835      ;;
6836    powerpc)
6837      VAR_CPU=ppc
6838      VAR_CPU_ARCH=ppc
6839      VAR_CPU_BITS=32
6840      VAR_CPU_ENDIAN=big
6841       ;;
6842    powerpc64)
6843      VAR_CPU=ppc64
6844      VAR_CPU_ARCH=ppc
6845      VAR_CPU_BITS=64
6846      VAR_CPU_ENDIAN=big
6847       ;;
6848    sparc)
6849      VAR_CPU=sparc
6850      VAR_CPU_ARCH=sparc
6851      VAR_CPU_BITS=32
6852      VAR_CPU_ENDIAN=big
6853       ;;
6854    sparcv9)
6855      VAR_CPU=sparcv9
6856      VAR_CPU_ARCH=sparc
6857      VAR_CPU_BITS=64
6858      VAR_CPU_ENDIAN=big
6859       ;;
6860    *)
6861      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6862      ;;
6863  esac
6864
6865    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6866    OPENJDK_TARGET_OS="$VAR_OS"
6867    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6868    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6869    OPENJDK_TARGET_CPU="$VAR_CPU"
6870    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6871    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6872    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6873
6874
6875
6876
6877
6878
6879
6880    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6881$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6882    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6883$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6884
6885
6886
6887# Check whether --with-target-bits was given.
6888if test "${with_target_bits+set}" = set; then :
6889  withval=$with_target_bits;
6890fi
6891
6892
6893  # We have three types of compiles:
6894  # native  == normal compilation, target system == build system
6895  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6896  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6897  #
6898  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6899    # We're doing a proper cross-compilation
6900    COMPILE_TYPE="cross"
6901  else
6902    COMPILE_TYPE="native"
6903  fi
6904
6905  if test "x$with_target_bits" != x; then
6906    if test "x$COMPILE_TYPE" = "xcross"; then
6907      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6908    fi
6909
6910    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6911      # A reduced build is requested
6912      COMPILE_TYPE="reduced"
6913      OPENJDK_TARGET_CPU_BITS=32
6914      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6915        OPENJDK_TARGET_CPU=x86
6916      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6917        OPENJDK_TARGET_CPU=sparc
6918      else
6919        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6920      fi
6921    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6922      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
6923    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6924      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6925$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6926    else
6927      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6928    fi
6929  fi
6930
6931
6932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6933$as_echo_n "checking compilation type... " >&6; }
6934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6935$as_echo "$COMPILE_TYPE" >&6; }
6936
6937
6938    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6939       REQUIRED_OS_NAME=SunOS
6940       REQUIRED_OS_VERSION=5.10
6941    fi
6942    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6943       REQUIRED_OS_NAME=Linux
6944       REQUIRED_OS_VERSION=2.6
6945    fi
6946    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6947        REQUIRED_OS_NAME=Windows
6948        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6949            REQUIRED_OS_VERSION=5.2
6950        else
6951            REQUIRED_OS_VERSION=5.1
6952        fi
6953    fi
6954    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6955        REQUIRED_OS_NAME=Darwin
6956        REQUIRED_OS_VERSION=11.2
6957    fi
6958
6959
6960
6961
6962
6963    # Also store the legacy naming of the cpu.
6964    # Ie i586 and amd64 instead of x86 and x86_64
6965    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6966    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6967      OPENJDK_TARGET_CPU_LEGACY="i586"
6968    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6969      # On all platforms except MacOSX replace x86_64 with amd64.
6970      OPENJDK_TARGET_CPU_LEGACY="amd64"
6971    fi
6972
6973
6974    # And the second legacy naming of the cpu.
6975    # Ie i386 and amd64 instead of x86 and x86_64.
6976    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6977    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6978      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6979    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6980      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6981    fi
6982
6983
6984    # This is the name of the cpu (but using i386 and amd64 instead of
6985    # x86 and x86_64, respectively), preceeded by a /, to be used when
6986    # locating libraries. On macosx, it's empty, though.
6987    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6988    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6989        OPENJDK_TARGET_CPU_LIBDIR=""
6990    fi
6991
6992
6993    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6994    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6995    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6996    OPENJDK_TARGET_CPU_ISADIR=""
6997    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6998      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6999          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7000      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7001          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7002      fi
7003    fi
7004
7005
7006    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7007    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7008    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7009      # On linux only, we replace x86 with i386.
7010      OPENJDK_TARGET_CPU_OSARCH="i386"
7011    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7012      # On all platforms except macosx, we replace x86_64 with amd64.
7013      OPENJDK_TARGET_CPU_OSARCH="amd64"
7014    fi
7015
7016
7017    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7018    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7019      OPENJDK_TARGET_CPU_JLI="i386"
7020    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7021      # On all platforms except macosx, we replace x86_64 with amd64.
7022      OPENJDK_TARGET_CPU_JLI="amd64"
7023    fi
7024    # Now setup the -D flags for building libjli.
7025    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7026    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7027      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7028        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7029      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7030        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7031      fi
7032    fi
7033
7034
7035    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7036    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7037        OPENJDK_TARGET_OS_API_DIR="solaris"
7038    fi
7039    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7040        OPENJDK_TARGET_OS_API_DIR="windows"
7041    fi
7042
7043
7044    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7045        A_LP64="LP64:="
7046        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7047        # unpack200.exe
7048        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7049            ADD_LP64="-D_LP64=1"
7050        fi
7051    fi
7052    LP64=$A_LP64
7053
7054
7055    if test "x$COMPILE_TYPE" = "xcross"; then
7056      # FIXME: ... or should this include reduced builds..?
7057      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7058    else
7059      DEFINE_CROSS_COMPILE_ARCH=""
7060    fi
7061
7062
7063
7064
7065# Continue setting up basic stuff. Most remaining code require fundamental tools.
7066
7067# Locate the directory of this script.
7068SCRIPT="$0"
7069
7070    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7071        # Follow a chain of symbolic links. Use readlink
7072        # where it exists, else fall back to horribly
7073        # complicated shell code.
7074        if test "x$READLINK_TESTED" != yes; then
7075            # On MacOSX there is a readlink tool with a different
7076            # purpose than the GNU readlink tool. Check the found readlink.
7077            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7078            if test "x$ISGNU" = x; then
7079                 # A readlink that we do not know how to use.
7080                 # Are there other non-GNU readlinks out there?
7081                 READLINK_TESTED=yes
7082                 READLINK=
7083            fi
7084        fi
7085
7086        if test "x$READLINK" != x; then
7087            SCRIPT=`$READLINK -f $SCRIPT`
7088        else
7089            # Save the current directory for restoring afterwards
7090            STARTDIR=$PWD
7091            COUNTER=0
7092            sym_link_dir=`$DIRNAME $SCRIPT`
7093            sym_link_file=`$BASENAME $SCRIPT`
7094            # Use the system pwd and not the shell builtin to resolve directory symlinks
7095            cd $sym_link_dir
7096            cd `$THEPWDCMD`
7097            sym_link_dir=`$THEPWDCMD`
7098            # Resolve file symlinks
7099            while test $COUNTER -lt 20; do
7100                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7101                if test "x$ISLINK" == x; then
7102                    # This is not a symbolic link! We are done!
7103                    break
7104                fi
7105                # Again resolve directory symlinks since the target of the just found
7106                # link could be in a different directory
7107                cd `$DIRNAME $ISLINK`
7108                sym_link_dir=`$THEPWDCMD`
7109                sym_link_file=`$BASENAME $ISLINK`
7110                let COUNTER=COUNTER+1
7111            done
7112            cd $STARTDIR
7113            SCRIPT=$sym_link_dir/$sym_link_file
7114        fi
7115    fi
7116
7117AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7118
7119# Where is the source? It is located two levels above the configure script.
7120CURDIR="$PWD"
7121cd "$AUTOCONF_DIR/../.."
7122SRC_ROOT="`$THEPWDCMD`"
7123
7124if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7125  PATH_SEP=";"
7126
7127  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7128  if test $SRC_ROOT_LENGTH -gt 100; then
7129      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7130  fi
7131
7132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7134$as_echo_n "checking cygwin release... " >&6; }
7135    CYGWIN_VERSION=`$UNAME -r`
7136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7137$as_echo "$CYGWIN_VERSION" >&6; }
7138    WINDOWS_ENV_VENDOR='cygwin'
7139    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7140
7141    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7142    if test "x$CYGWIN_VERSION_OK" = x; then
7143      { $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
7144$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;}
7145      as_fn_error $? "Cannot continue" "$LINENO" 5
7146    fi
7147    if test "x$CYGPATH" = x; then
7148        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7149    fi
7150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7151$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7152    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7153    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7154    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7155    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7156    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7157$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7158    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7159    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7160    if test "x$test_cygdrive_prefix" = x; then
7161        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7162    fi
7163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7165$as_echo_n "checking msys release... " >&6; }
7166    MSYS_VERSION=`$UNAME -r`
7167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7168$as_echo "$MSYS_VERSION" >&6; }
7169
7170    WINDOWS_ENV_VENDOR='msys'
7171    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7172
7173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7174$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7175    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7176    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7177
7178  windows_path="$MSYS_ROOT_PATH"
7179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7180    unix_path=`$CYGPATH -u "$windows_path"`
7181    MSYS_ROOT_PATH="$unix_path"
7182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7184    MSYS_ROOT_PATH="$unix_path"
7185  fi
7186
7187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7188$as_echo "$MSYS_ROOT_PATH" >&6; }
7189    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7190  else
7191    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7192  fi
7193
7194  # Test if windows or unix (cygwin/msys) find is first in path.
7195  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7196$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7197  FIND_BINARY_OUTPUT=`find --version 2>&1`
7198  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7200$as_echo "unix style" >&6; }
7201  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7203$as_echo "Windows" >&6; }
7204    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7205$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7206    { $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
7207$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7208    as_fn_error $? "Cannot continue" "$LINENO" 5
7209  else
7210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7211$as_echo "unknown" >&6; }
7212    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7213$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7214  fi
7215
7216else
7217  PATH_SEP=":"
7218fi
7219
7220
7221
7222cd "$CURDIR"
7223
7224
7225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7226
7227  # Input might be given as Windows format, start by converting to
7228  # unix format.
7229  path="$SRC_ROOT"
7230  new_path=`$CYGPATH -u "$path"`
7231
7232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7235  # "foo.exe" is OK but "foo" is an error.
7236  #
7237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7238  # It is also a way to make sure we got the proper file name for the real test later on.
7239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7240  if test "x$test_shortpath" = x; then
7241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7242$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7243    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7244  fi
7245
7246  # Call helper function which possibly converts this using DOS-style short mode.
7247  # If so, the updated path is stored in $new_path.
7248
7249  input_path="$new_path"
7250  # Check if we need to convert this using DOS-style short mode. If the path
7251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7252  # take no chances and rewrite it.
7253  # Note: m4 eats our [], so we need to use [ and ] instead.
7254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7255  if test "x$has_forbidden_chars" != x; then
7256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7260      # Going to short mode and back again did indeed matter. Since short mode is
7261      # case insensitive, let's make it lowercase to improve readability.
7262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7263      # Now convert it back to Unix-stile (cygpath)
7264      input_path=`$CYGPATH -u "$shortmode_path"`
7265      new_path="$input_path"
7266    fi
7267  fi
7268
7269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7270  if test "x$test_cygdrive_prefix" = x; then
7271    # As a simple fix, exclude /usr/bin since it's not a real path.
7272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7274      # a path prefixed by /cygdrive for fixpath to work.
7275      new_path="$CYGWIN_ROOT_PATH$input_path"
7276    fi
7277  fi
7278
7279
7280  if test "x$path" != "x$new_path"; then
7281    SRC_ROOT="$new_path"
7282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7283$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7284  fi
7285
7286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7287
7288  path="$SRC_ROOT"
7289  has_colon=`$ECHO $path | $GREP ^.:`
7290  new_path="$path"
7291  if test "x$has_colon" = x; then
7292    # Not in mixed or Windows style, start by that.
7293    new_path=`cmd //c echo $path`
7294  fi
7295
7296
7297  input_path="$new_path"
7298  # Check if we need to convert this using DOS-style short mode. If the path
7299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7300  # take no chances and rewrite it.
7301  # Note: m4 eats our [], so we need to use [ and ] instead.
7302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7303  if test "x$has_forbidden_chars" != x; then
7304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7306  fi
7307
7308
7309  windows_path="$new_path"
7310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7311    unix_path=`$CYGPATH -u "$windows_path"`
7312    new_path="$unix_path"
7313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7315    new_path="$unix_path"
7316  fi
7317
7318  if test "x$path" != "x$new_path"; then
7319    SRC_ROOT="$new_path"
7320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7321$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7322  fi
7323
7324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7326
7327  else
7328    # We're on a posix platform. Hooray! :)
7329    path="$SRC_ROOT"
7330
7331    if test ! -f "$path" && test ! -d "$path"; then
7332      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7333    fi
7334
7335    has_space=`$ECHO "$path" | $GREP " "`
7336    if test "x$has_space" != x; then
7337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7338$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7339      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7340    fi
7341  fi
7342
7343
7344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7345
7346  # Input might be given as Windows format, start by converting to
7347  # unix format.
7348  path="$CURDIR"
7349  new_path=`$CYGPATH -u "$path"`
7350
7351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7354  # "foo.exe" is OK but "foo" is an error.
7355  #
7356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7357  # It is also a way to make sure we got the proper file name for the real test later on.
7358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7359  if test "x$test_shortpath" = x; then
7360    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7361$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7362    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7363  fi
7364
7365  # Call helper function which possibly converts this using DOS-style short mode.
7366  # If so, the updated path is stored in $new_path.
7367
7368  input_path="$new_path"
7369  # Check if we need to convert this using DOS-style short mode. If the path
7370  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7371  # take no chances and rewrite it.
7372  # Note: m4 eats our [], so we need to use [ and ] instead.
7373  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7374  if test "x$has_forbidden_chars" != x; then
7375    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7376    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7377    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7378    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7379      # Going to short mode and back again did indeed matter. Since short mode is
7380      # case insensitive, let's make it lowercase to improve readability.
7381      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7382      # Now convert it back to Unix-stile (cygpath)
7383      input_path=`$CYGPATH -u "$shortmode_path"`
7384      new_path="$input_path"
7385    fi
7386  fi
7387
7388  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7389  if test "x$test_cygdrive_prefix" = x; then
7390    # As a simple fix, exclude /usr/bin since it's not a real path.
7391    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7392      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7393      # a path prefixed by /cygdrive for fixpath to work.
7394      new_path="$CYGWIN_ROOT_PATH$input_path"
7395    fi
7396  fi
7397
7398
7399  if test "x$path" != "x$new_path"; then
7400    CURDIR="$new_path"
7401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7402$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7403  fi
7404
7405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7406
7407  path="$CURDIR"
7408  has_colon=`$ECHO $path | $GREP ^.:`
7409  new_path="$path"
7410  if test "x$has_colon" = x; then
7411    # Not in mixed or Windows style, start by that.
7412    new_path=`cmd //c echo $path`
7413  fi
7414
7415
7416  input_path="$new_path"
7417  # Check if we need to convert this using DOS-style short mode. If the path
7418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7419  # take no chances and rewrite it.
7420  # Note: m4 eats our [], so we need to use [ and ] instead.
7421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7422  if test "x$has_forbidden_chars" != x; then
7423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7424    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7425  fi
7426
7427
7428  windows_path="$new_path"
7429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7430    unix_path=`$CYGPATH -u "$windows_path"`
7431    new_path="$unix_path"
7432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7434    new_path="$unix_path"
7435  fi
7436
7437  if test "x$path" != "x$new_path"; then
7438    CURDIR="$new_path"
7439    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7440$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7441  fi
7442
7443  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7444  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7445
7446  else
7447    # We're on a posix platform. Hooray! :)
7448    path="$CURDIR"
7449
7450    if test ! -f "$path" && test ! -d "$path"; then
7451      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7452    fi
7453
7454    has_space=`$ECHO "$path" | $GREP " "`
7455    if test "x$has_space" != x; then
7456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7457$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7458      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7459    fi
7460  fi
7461
7462
7463if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7464    # Add extra search paths on solaris for utilities like ar and as etc...
7465    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7466fi
7467
7468# You can force the sys-root if the sys-root encoded into the cross compiler tools
7469# is not correct.
7470
7471# Check whether --with-sys-root was given.
7472if test "${with_sys_root+set}" = set; then :
7473  withval=$with_sys_root;
7474fi
7475
7476
7477if test "x$with_sys_root" != x; then
7478  SYS_ROOT=$with_sys_root
7479else
7480  SYS_ROOT=/
7481fi
7482
7483
7484
7485# Check whether --with-tools-dir was given.
7486if test "${with_tools_dir+set}" = set; then :
7487  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7488fi
7489
7490
7491
7492# Check whether --with-devkit was given.
7493if test "${with_devkit+set}" = set; then :
7494  withval=$with_devkit;
7495    if test "x$with_sys_root" != x; then
7496      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7497    fi
7498    if test "x$with_tools_dir" != x; then
7499      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7500    fi
7501    TOOLS_DIR=$with_devkit/bin
7502    SYS_ROOT=$with_devkit/$host_alias/libc
7503
7504fi
7505
7506
7507
7508
7509# Setup default logging of stdout and stderr to build.log in the output root.
7510BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7511BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7512BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7513
7514
7515
7516
7517
7518# Check if it's a pure open build or if custom sources are to be used.
7519
7520  # Check whether --enable-openjdk-only was given.
7521if test "${enable_openjdk_only+set}" = set; then :
7522  enableval=$enable_openjdk_only;
7523else
7524  enable_openjdk_only="no"
7525fi
7526
7527
7528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7529$as_echo_n "checking for presence of closed sources... " >&6; }
7530  if test -d "$SRC_ROOT/jdk/src/closed"; then
7531    CLOSED_SOURCE_PRESENT=yes
7532  else
7533    CLOSED_SOURCE_PRESENT=no
7534  fi
7535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7536$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7537
7538  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7539$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7540  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7542$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7543
7544  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7545    OPENJDK=true
7546    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7547      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7548$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7549    fi
7550  else
7551    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7552      OPENJDK=true
7553    else
7554      OPENJDK=false
7555    fi
7556  fi
7557
7558  if test "x$OPENJDK" = "xtrue"; then
7559    SET_OPENJDK="OPENJDK=true"
7560  fi
7561
7562
7563
7564
7565# These are needed to be able to create a configuration name (and thus the output directory)
7566
7567###############################################################################
7568#
7569# Check which variant of the JDK that we want to build.
7570# Currently we have:
7571#    normal:   standard edition
7572# but the custom make system may add other variants
7573#
7574# Effectively the JDK variant gives a name to a specific set of
7575# modules to compile into the JDK. In the future, these modules
7576# might even be Jigsaw modules.
7577#
7578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7579$as_echo_n "checking which variant of the JDK to build... " >&6; }
7580
7581# Check whether --with-jdk-variant was given.
7582if test "${with_jdk_variant+set}" = set; then :
7583  withval=$with_jdk_variant;
7584fi
7585
7586
7587if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7588    JDK_VARIANT="normal"
7589else
7590    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7591fi
7592
7593
7594
7595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7596$as_echo "$JDK_VARIANT" >&6; }
7597
7598
7599
7600###############################################################################
7601#
7602# Check which variants of the JVM that we want to build.
7603# Currently we have:
7604#    server: normal interpreter and a tiered C1/C2 compiler
7605#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7606#    minimal1: reduced form of client with optional VM services and features stripped out
7607#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7608#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7609#    zero: no machine code interpreter, no compiler
7610#    zeroshark: zero interpreter and shark/llvm compiler backend
7611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7612$as_echo_n "checking which variants of the JVM to build... " >&6; }
7613
7614# Check whether --with-jvm-variants was given.
7615if test "${with_jvm_variants+set}" = set; then :
7616  withval=$with_jvm_variants;
7617fi
7618
7619
7620if test "x$with_jvm_variants" = x; then
7621     with_jvm_variants="server"
7622fi
7623
7624JVM_VARIANTS=",$with_jvm_variants,"
7625TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7626
7627if test "x$TEST_VARIANTS" != "x,"; then
7628   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7629fi
7630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7631$as_echo "$with_jvm_variants" >&6; }
7632
7633JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7634JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7635JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7636JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7637JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7638JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7639
7640if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7641    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7642        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7643    fi
7644fi
7645if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7646    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7647        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7648    fi
7649fi
7650if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7651    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7652        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7653    fi
7654fi
7655
7656# Replace the commas with AND for use in the build directory name.
7657ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7658COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7659if test "x$COUNT_VARIANTS" != "x,1"; then
7660    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7661else
7662    BUILDING_MULTIPLE_JVM_VARIANTS=no
7663fi
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7674   MACOSX_UNIVERSAL="true"
7675fi
7676
7677
7678
7679
7680
7681###############################################################################
7682#
7683# Set the debug level
7684#    release: no debug information, all optimizations, no asserts.
7685#    fastdebug: debug information (-g), all optimizations, all asserts
7686#    slowdebug: debug information (-g), no optimizations, all asserts
7687#
7688DEBUG_LEVEL="release"
7689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7690$as_echo_n "checking which debug level to use... " >&6; }
7691# Check whether --enable-debug was given.
7692if test "${enable_debug+set}" = set; then :
7693  enableval=$enable_debug;
7694        ENABLE_DEBUG="${enableval}"
7695        DEBUG_LEVEL="fastdebug"
7696
7697else
7698  ENABLE_DEBUG="no"
7699fi
7700
7701
7702
7703# Check whether --with-debug-level was given.
7704if test "${with_debug_level+set}" = set; then :
7705  withval=$with_debug_level;
7706        DEBUG_LEVEL="${withval}"
7707        if test "x$ENABLE_DEBUG" = xyes; then
7708			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7709        fi
7710
7711fi
7712
7713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7714$as_echo "$DEBUG_LEVEL" >&6; }
7715
7716if test "x$DEBUG_LEVEL" != xrelease && \
7717   test "x$DEBUG_LEVEL" != xfastdebug && \
7718   test "x$DEBUG_LEVEL" != xslowdebug; then
7719   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7720fi
7721
7722
7723###############################################################################
7724#
7725# Setup legacy vars/targets and new vars to deal with different debug levels.
7726#
7727
7728case $DEBUG_LEVEL in
7729      release )
7730          VARIANT="OPT"
7731          FASTDEBUG="false"
7732          DEBUG_CLASSFILES="false"
7733          BUILD_VARIANT_RELEASE=""
7734          HOTSPOT_DEBUG_LEVEL="product"
7735          HOTSPOT_EXPORT="product"
7736           ;;
7737      fastdebug )
7738          VARIANT="DBG"
7739          FASTDEBUG="true"
7740          DEBUG_CLASSFILES="true"
7741          BUILD_VARIANT_RELEASE="-fastdebug"
7742          HOTSPOT_DEBUG_LEVEL="fastdebug"
7743          HOTSPOT_EXPORT="fastdebug"
7744           ;;
7745      slowdebug )
7746          VARIANT="DBG"
7747          FASTDEBUG="false"
7748          DEBUG_CLASSFILES="true"
7749          BUILD_VARIANT_RELEASE="-debug"
7750          HOTSPOT_DEBUG_LEVEL="jvmg"
7751          HOTSPOT_EXPORT="debug"
7752           ;;
7753esac
7754
7755#####
7756# Generate the legacy makefile targets for hotspot.
7757# The hotspot api for selecting the build artifacts, really, needs to be improved.
7758# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7759# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7760# But until then ...
7761HOTSPOT_TARGET=""
7762
7763if test "x$JVM_VARIANT_SERVER" = xtrue; then
7764    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7765fi
7766
7767if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7768    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7769fi
7770
7771if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7772    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7773fi
7774
7775if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7776    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7777fi
7778
7779if test "x$JVM_VARIANT_ZERO" = xtrue; then
7780    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7781fi
7782
7783if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7784    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7785fi
7786
7787HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7788
7789# On Macosx universal binaries are produced, but they only contain
7790# 64 bit intel. This invalidates control of which jvms are built
7791# from configure, but only server is valid anyway. Fix this
7792# when hotspot makefiles are rewritten.
7793if test "x$MACOSX_UNIVERSAL" = xtrue; then
7794    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7795fi
7796
7797#####
7798
7799
7800
7801
7802
7803
7804
7805
7806# With basic setup done, call the custom early hook.
7807
7808
7809# To properly create a configuration name, we need to have the OpenJDK target
7810# and options (variants and debug level) parsed.
7811
7812
7813
7814# Check whether --with-conf-name was given.
7815if test "${with_conf_name+set}" = set; then :
7816  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7817fi
7818
7819
7820# Test from where we are running configure, in or outside of src root.
7821# To enable comparison of directories, CURDIR needs to be symlink free
7822# just like SRC_ROOT already is
7823NOSYM_CURDIR="$CURDIR"
7824
7825    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7826        # Follow a chain of symbolic links. Use readlink
7827        # where it exists, else fall back to horribly
7828        # complicated shell code.
7829        if test "x$READLINK_TESTED" != yes; then
7830            # On MacOSX there is a readlink tool with a different
7831            # purpose than the GNU readlink tool. Check the found readlink.
7832            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7833            if test "x$ISGNU" = x; then
7834                 # A readlink that we do not know how to use.
7835                 # Are there other non-GNU readlinks out there?
7836                 READLINK_TESTED=yes
7837                 READLINK=
7838            fi
7839        fi
7840
7841        if test "x$READLINK" != x; then
7842            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7843        else
7844            # Save the current directory for restoring afterwards
7845            STARTDIR=$PWD
7846            COUNTER=0
7847            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7848            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7849            # Use the system pwd and not the shell builtin to resolve directory symlinks
7850            cd $sym_link_dir
7851            cd `$THEPWDCMD`
7852            sym_link_dir=`$THEPWDCMD`
7853            # Resolve file symlinks
7854            while test $COUNTER -lt 20; do
7855                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7856                if test "x$ISLINK" == x; then
7857                    # This is not a symbolic link! We are done!
7858                    break
7859                fi
7860                # Again resolve directory symlinks since the target of the just found
7861                # link could be in a different directory
7862                cd `$DIRNAME $ISLINK`
7863                sym_link_dir=`$THEPWDCMD`
7864                sym_link_file=`$BASENAME $ISLINK`
7865                let COUNTER=COUNTER+1
7866            done
7867            cd $STARTDIR
7868            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7869        fi
7870    fi
7871
7872if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7873        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7874        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7875    # We are running configure from the src root.
7876    # Create a default ./build/target-variant-debuglevel output root.
7877    if test "x${CONF_NAME}" = x; then
7878        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7879    fi
7880    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7881    $MKDIR -p "$OUTPUT_ROOT"
7882    if test ! -d "$OUTPUT_ROOT"; then
7883        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7884    fi
7885else
7886    # We are running configure from outside of the src dir.
7887    # Then use the current directory as output dir!
7888    # If configuration is situated in normal build directory, just use the build
7889    # directory name as configuration name, otherwise use the complete path.
7890    if test "x${CONF_NAME}" = x; then
7891        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7892    fi
7893    OUTPUT_ROOT="$CURDIR"
7894
7895    # WARNING: This might be a bad thing to do. You need to be sure you want to
7896    # have a configuration in this directory. Do some sanity checks!
7897
7898    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7899      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7900      # other files
7901      files_present=`$LS $OUTPUT_ROOT`
7902      # Configure has already touched config.log and confdefs.h in the current dir when this check
7903      # is performed.
7904      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7905                                             | $TR -d '\n'`
7906      if test "x$filtered_files" != x; then
7907        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7908$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7909        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7910$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7911        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7912$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7913        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7914$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7915        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7916$as_echo "$as_me: seriously mess up just about everything." >&6;}
7917        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7918$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7919        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7920$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7921        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7922      fi
7923    fi
7924fi
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7926$as_echo_n "checking what configuration name to use... " >&6; }
7927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7928$as_echo "$CONF_NAME" >&6; }
7929
7930
7931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7932
7933  # Input might be given as Windows format, start by converting to
7934  # unix format.
7935  path="$OUTPUT_ROOT"
7936  new_path=`$CYGPATH -u "$path"`
7937
7938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7941  # "foo.exe" is OK but "foo" is an error.
7942  #
7943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7944  # It is also a way to make sure we got the proper file name for the real test later on.
7945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7946  if test "x$test_shortpath" = x; then
7947    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7948$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7949    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7950  fi
7951
7952  # Call helper function which possibly converts this using DOS-style short mode.
7953  # If so, the updated path is stored in $new_path.
7954
7955  input_path="$new_path"
7956  # Check if we need to convert this using DOS-style short mode. If the path
7957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7958  # take no chances and rewrite it.
7959  # Note: m4 eats our [], so we need to use [ and ] instead.
7960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7961  if test "x$has_forbidden_chars" != x; then
7962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7966      # Going to short mode and back again did indeed matter. Since short mode is
7967      # case insensitive, let's make it lowercase to improve readability.
7968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7969      # Now convert it back to Unix-stile (cygpath)
7970      input_path=`$CYGPATH -u "$shortmode_path"`
7971      new_path="$input_path"
7972    fi
7973  fi
7974
7975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7976  if test "x$test_cygdrive_prefix" = x; then
7977    # As a simple fix, exclude /usr/bin since it's not a real path.
7978    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7980      # a path prefixed by /cygdrive for fixpath to work.
7981      new_path="$CYGWIN_ROOT_PATH$input_path"
7982    fi
7983  fi
7984
7985
7986  if test "x$path" != "x$new_path"; then
7987    OUTPUT_ROOT="$new_path"
7988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7989$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7990  fi
7991
7992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7993
7994  path="$OUTPUT_ROOT"
7995  has_colon=`$ECHO $path | $GREP ^.:`
7996  new_path="$path"
7997  if test "x$has_colon" = x; then
7998    # Not in mixed or Windows style, start by that.
7999    new_path=`cmd //c echo $path`
8000  fi
8001
8002
8003  input_path="$new_path"
8004  # Check if we need to convert this using DOS-style short mode. If the path
8005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8006  # take no chances and rewrite it.
8007  # Note: m4 eats our [], so we need to use [ and ] instead.
8008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8009  if test "x$has_forbidden_chars" != x; then
8010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8012  fi
8013
8014
8015  windows_path="$new_path"
8016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8017    unix_path=`$CYGPATH -u "$windows_path"`
8018    new_path="$unix_path"
8019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8021    new_path="$unix_path"
8022  fi
8023
8024  if test "x$path" != "x$new_path"; then
8025    OUTPUT_ROOT="$new_path"
8026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8027$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8028  fi
8029
8030  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8031  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8032
8033  else
8034    # We're on a posix platform. Hooray! :)
8035    path="$OUTPUT_ROOT"
8036
8037    if test ! -f "$path" && test ! -d "$path"; then
8038      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8039    fi
8040
8041    has_space=`$ECHO "$path" | $GREP " "`
8042    if test "x$has_space" != x; then
8043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8044$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8045      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8046    fi
8047  fi
8048
8049
8050SPEC=$OUTPUT_ROOT/spec.gmk
8051
8052CONF_NAME=$CONF_NAME
8053
8054OUTPUT_ROOT=$OUTPUT_ROOT
8055
8056
8057# Most of the probed defines are put into config.h
8058ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8059
8060# The spec.gmk file contains all variables for the make system.
8061ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8062
8063# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8064ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8065
8066# The bootcycle-spec.gmk file contains support for boot cycle builds.
8067ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8068
8069# The compare.sh is used to compare the build output to other builds.
8070ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8071
8072# Spec.sh is currently used by compare-objects.sh
8073ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8074
8075# The generated Makefile knows where the spec.gmk is and where the source is.
8076# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8077# which will look for generated configurations
8078ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8079
8080
8081# Save the arguments given to us
8082echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8083
8084
8085# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8086
8087    for ac_prog in apt-get yum port pkgutil pkgadd
8088do
8089  # Extract the first word of "$ac_prog", so it can be a program name with args.
8090set dummy $ac_prog; ac_word=$2
8091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8092$as_echo_n "checking for $ac_word... " >&6; }
8093if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8094  $as_echo_n "(cached) " >&6
8095else
8096  if test -n "$PKGHANDLER"; then
8097  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8098else
8099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8100for as_dir in $PATH
8101do
8102  IFS=$as_save_IFS
8103  test -z "$as_dir" && as_dir=.
8104    for ac_exec_ext in '' $ac_executable_extensions; do
8105  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8106    ac_cv_prog_PKGHANDLER="$ac_prog"
8107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8108    break 2
8109  fi
8110done
8111  done
8112IFS=$as_save_IFS
8113
8114fi
8115fi
8116PKGHANDLER=$ac_cv_prog_PKGHANDLER
8117if test -n "$PKGHANDLER"; then
8118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8119$as_echo "$PKGHANDLER" >&6; }
8120else
8121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8122$as_echo "no" >&6; }
8123fi
8124
8125
8126  test -n "$PKGHANDLER" && break
8127done
8128
8129
8130
8131# Setup tools that requires more complex handling, or that is not needed by the configure script.
8132
8133
8134  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8135  if test "x$MAKE" != x; then
8136    # User has supplied a make, test it.
8137    if test ! -f "$MAKE"; then
8138      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8139    fi
8140
8141  MAKE_CANDIDATE=""$MAKE""
8142  DESCRIPTION="user supplied MAKE=$MAKE"
8143  if test "x$MAKE_CANDIDATE" != x; then
8144    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8145$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8146    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8147    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8148    if test "x$IS_GNU_MAKE" = x; then
8149      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8150$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8151    else
8152      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8153      if test "x$IS_MODERN_MAKE" = x; then
8154        { $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
8155$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;}
8156      else
8157        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8158          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8159            MAKE_EXPECTED_ENV='cygwin'
8160          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8161            MAKE_EXPECTED_ENV='msys'
8162          else
8163            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8164          fi
8165          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8166          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8167        else
8168          # Not relevant for non-Windows
8169          IS_MAKE_CORRECT_ENV=true
8170        fi
8171        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8172          { $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
8173$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;}
8174        else
8175          FOUND_MAKE=$MAKE_CANDIDATE
8176
8177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8178
8179  # First separate the path from the arguments. This will split at the first
8180  # space.
8181  complete="$FOUND_MAKE"
8182  path="${complete%% *}"
8183  tmp="$complete EOL"
8184  arguments="${tmp#* }"
8185
8186  # Input might be given as Windows format, start by converting to
8187  # unix format.
8188  new_path=`$CYGPATH -u "$path"`
8189
8190  # Now try to locate executable using which
8191  new_path=`$WHICH "$new_path" 2> /dev/null`
8192  # bat and cmd files are not always considered executable in cygwin causing which
8193  # to not find them
8194  if test "x$new_path" = x \
8195           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8196           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8197    new_path=`$CYGPATH -u "$path"`
8198  fi
8199  if test "x$new_path" = x; then
8200    # Oops. Which didn't find the executable.
8201    # The splitting of arguments from the executable at a space might have been incorrect,
8202    # since paths with space are more likely in Windows. Give it another try with the whole
8203    # argument.
8204    path="$complete"
8205    arguments="EOL"
8206    new_path=`$CYGPATH -u "$path"`
8207    new_path=`$WHICH "$new_path" 2> /dev/null`
8208    # bat and cmd files are not always considered executable in cygwin causing which
8209    # to not find them
8210    if test "x$new_path" = x \
8211             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8212             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8213      new_path=`$CYGPATH -u "$path"`
8214    fi
8215    if test "x$new_path" = x; then
8216      # It's still not found. Now this is an unrecoverable error.
8217      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8218$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8219      has_space=`$ECHO "$complete" | $GREP " "`
8220      if test "x$has_space" != x; then
8221        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8222$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8223      fi
8224      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8225    fi
8226  fi
8227
8228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8231  # "foo.exe" is OK but "foo" is an error.
8232  #
8233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8234  # It is also a way to make sure we got the proper file name for the real test later on.
8235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8236  if test "x$test_shortpath" = x; then
8237    # Short path failed, file does not exist as specified.
8238    # Try adding .exe or .cmd
8239    if test -f "${new_path}.exe"; then
8240       input_to_shortpath="${new_path}.exe"
8241    elif test -f "${new_path}.cmd"; then
8242       input_to_shortpath="${new_path}.cmd"
8243    else
8244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8245$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8246      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8247$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8248      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8249    fi
8250  else
8251    input_to_shortpath="$new_path"
8252  fi
8253
8254  # Call helper function which possibly converts this using DOS-style short mode.
8255  # If so, the updated path is stored in $new_path.
8256  new_path="$input_to_shortpath"
8257
8258  input_path="$input_to_shortpath"
8259  # Check if we need to convert this using DOS-style short mode. If the path
8260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8261  # take no chances and rewrite it.
8262  # Note: m4 eats our [], so we need to use [ and ] instead.
8263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8264  if test "x$has_forbidden_chars" != x; then
8265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8266    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8267    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8268    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8269      # Going to short mode and back again did indeed matter. Since short mode is
8270      # case insensitive, let's make it lowercase to improve readability.
8271      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8272      # Now convert it back to Unix-stile (cygpath)
8273      input_path=`$CYGPATH -u "$shortmode_path"`
8274      new_path="$input_path"
8275    fi
8276  fi
8277
8278  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8279  if test "x$test_cygdrive_prefix" = x; then
8280    # As a simple fix, exclude /usr/bin since it's not a real path.
8281    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8282      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8283      # a path prefixed by /cygdrive for fixpath to work.
8284      new_path="$CYGWIN_ROOT_PATH$input_path"
8285    fi
8286  fi
8287
8288  # remove trailing .exe if any
8289  new_path="${new_path/%.exe/}"
8290
8291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; 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="$path"
8303
8304  windows_path="$new_path"
8305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8306    unix_path=`$CYGPATH -u "$windows_path"`
8307    new_path="$unix_path"
8308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8310    new_path="$unix_path"
8311  fi
8312
8313
8314  # Now try to locate executable using which
8315  new_path=`$WHICH "$new_path" 2> /dev/null`
8316
8317  if test "x$new_path" = x; then
8318    # Oops. Which didn't find the executable.
8319    # The splitting of arguments from the executable at a space might have been incorrect,
8320    # since paths with space are more likely in Windows. Give it another try with the whole
8321    # argument.
8322    path="$complete"
8323    arguments="EOL"
8324    new_path="$path"
8325
8326  windows_path="$new_path"
8327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8328    unix_path=`$CYGPATH -u "$windows_path"`
8329    new_path="$unix_path"
8330  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8331    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8332    new_path="$unix_path"
8333  fi
8334
8335
8336    new_path=`$WHICH "$new_path" 2> /dev/null`
8337
8338    if test "x$new_path" = x; then
8339      # It's still not found. Now this is an unrecoverable error.
8340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8341$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8342      has_space=`$ECHO "$complete" | $GREP " "`
8343      if test "x$has_space" != x; then
8344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8346      fi
8347      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8348    fi
8349  fi
8350
8351  # Now new_path has a complete unix path to the binary
8352  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8353    # Keep paths in /bin as-is, but remove trailing .exe if any
8354    new_path="${new_path/%.exe/}"
8355    # Do not save /bin paths to all_fixpath_prefixes!
8356  else
8357    # Not in mixed or Windows style, start by that.
8358    new_path=`cmd //c echo $new_path`
8359
8360  input_path="$new_path"
8361  # Check if we need to convert this using DOS-style short mode. If the path
8362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8363  # take no chances and rewrite it.
8364  # Note: m4 eats our [], so we need to use [ and ] instead.
8365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8366  if test "x$has_forbidden_chars" != x; then
8367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8369  fi
8370
8371    # Output is in $new_path
8372
8373  windows_path="$new_path"
8374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8375    unix_path=`$CYGPATH -u "$windows_path"`
8376    new_path="$unix_path"
8377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8379    new_path="$unix_path"
8380  fi
8381
8382    # remove trailing .exe if any
8383    new_path="${new_path/%.exe/}"
8384
8385    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8386    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8387  fi
8388
8389  else
8390    # We're on a posix platform. Hooray! :)
8391    # First separate the path from the arguments. This will split at the first
8392    # space.
8393    complete="$FOUND_MAKE"
8394    path="${complete%% *}"
8395    tmp="$complete EOL"
8396    arguments="${tmp#* }"
8397
8398    # Cannot rely on the command "which" here since it doesn't always work.
8399    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8400    if test -z "$is_absolute_path"; then
8401      # Path to executable is not absolute. Find it.
8402      IFS_save="$IFS"
8403      IFS=:
8404      for p in $PATH; do
8405        if test -f "$p/$path" && test -x "$p/$path"; then
8406          new_path="$p/$path"
8407          break
8408        fi
8409      done
8410      IFS="$IFS_save"
8411    else
8412      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8413$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8414      new_path="$path"
8415    fi
8416
8417    if test "x$new_path" = x; then
8418        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8419$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8420        has_space=`$ECHO "$complete" | $GREP " "`
8421        if test "x$has_space" != x; then
8422          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8423$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8424        fi
8425        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8426      fi
8427  fi
8428
8429      # Now join together the path and the arguments once again
8430      if test "x$arguments" != xEOL; then
8431        new_complete="$new_path ${arguments% *}"
8432      else
8433        new_complete="$new_path"
8434      fi
8435
8436  if test "x$complete" != "x$new_complete"; then
8437      FOUND_MAKE="$new_complete"
8438      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8439$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8440    fi
8441
8442        fi
8443      fi
8444    fi
8445  fi
8446
8447    if test "x$FOUND_MAKE" = x; then
8448      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8449    fi
8450  else
8451    # Try our hardest to locate a correct version of GNU make
8452    for ac_prog in gmake
8453do
8454  # Extract the first word of "$ac_prog", so it can be a program name with args.
8455set dummy $ac_prog; ac_word=$2
8456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8457$as_echo_n "checking for $ac_word... " >&6; }
8458if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8459  $as_echo_n "(cached) " >&6
8460else
8461  case $CHECK_GMAKE in
8462  [\\/]* | ?:[\\/]*)
8463  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8464  ;;
8465  *)
8466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8467for as_dir in $PATH
8468do
8469  IFS=$as_save_IFS
8470  test -z "$as_dir" && as_dir=.
8471    for ac_exec_ext in '' $ac_executable_extensions; do
8472  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8473    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8475    break 2
8476  fi
8477done
8478  done
8479IFS=$as_save_IFS
8480
8481  ;;
8482esac
8483fi
8484CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8485if test -n "$CHECK_GMAKE"; then
8486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8487$as_echo "$CHECK_GMAKE" >&6; }
8488else
8489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8490$as_echo "no" >&6; }
8491fi
8492
8493
8494  test -n "$CHECK_GMAKE" && break
8495done
8496
8497
8498  MAKE_CANDIDATE=""$CHECK_GMAKE""
8499  DESCRIPTION="gmake in PATH"
8500  if test "x$MAKE_CANDIDATE" != x; then
8501    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8502$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8503    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8504    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8505    if test "x$IS_GNU_MAKE" = x; then
8506      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8507$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8508    else
8509      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8510      if test "x$IS_MODERN_MAKE" = x; then
8511        { $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
8512$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;}
8513      else
8514        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8515          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8516            MAKE_EXPECTED_ENV='cygwin'
8517          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8518            MAKE_EXPECTED_ENV='msys'
8519          else
8520            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8521          fi
8522          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8523          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8524        else
8525          # Not relevant for non-Windows
8526          IS_MAKE_CORRECT_ENV=true
8527        fi
8528        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8529          { $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
8530$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;}
8531        else
8532          FOUND_MAKE=$MAKE_CANDIDATE
8533
8534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8535
8536  # First separate the path from the arguments. This will split at the first
8537  # space.
8538  complete="$FOUND_MAKE"
8539  path="${complete%% *}"
8540  tmp="$complete EOL"
8541  arguments="${tmp#* }"
8542
8543  # Input might be given as Windows format, start by converting to
8544  # unix format.
8545  new_path=`$CYGPATH -u "$path"`
8546
8547  # Now try to locate executable using which
8548  new_path=`$WHICH "$new_path" 2> /dev/null`
8549  # bat and cmd files are not always considered executable in cygwin causing which
8550  # to not find them
8551  if test "x$new_path" = x \
8552           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8553           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8554    new_path=`$CYGPATH -u "$path"`
8555  fi
8556  if test "x$new_path" = x; then
8557    # Oops. Which didn't find the executable.
8558    # The splitting of arguments from the executable at a space might have been incorrect,
8559    # since paths with space are more likely in Windows. Give it another try with the whole
8560    # argument.
8561    path="$complete"
8562    arguments="EOL"
8563    new_path=`$CYGPATH -u "$path"`
8564    new_path=`$WHICH "$new_path" 2> /dev/null`
8565    # bat and cmd files are not always considered executable in cygwin causing which
8566    # to not find them
8567    if test "x$new_path" = x \
8568             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8569             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8570      new_path=`$CYGPATH -u "$path"`
8571    fi
8572    if test "x$new_path" = x; then
8573      # It's still not found. Now this is an unrecoverable error.
8574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8575$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8576      has_space=`$ECHO "$complete" | $GREP " "`
8577      if test "x$has_space" != x; then
8578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8580      fi
8581      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8582    fi
8583  fi
8584
8585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8588  # "foo.exe" is OK but "foo" is an error.
8589  #
8590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8591  # It is also a way to make sure we got the proper file name for the real test later on.
8592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8593  if test "x$test_shortpath" = x; then
8594    # Short path failed, file does not exist as specified.
8595    # Try adding .exe or .cmd
8596    if test -f "${new_path}.exe"; then
8597       input_to_shortpath="${new_path}.exe"
8598    elif test -f "${new_path}.cmd"; then
8599       input_to_shortpath="${new_path}.cmd"
8600    else
8601      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8602$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8603      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8604$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8605      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8606    fi
8607  else
8608    input_to_shortpath="$new_path"
8609  fi
8610
8611  # Call helper function which possibly converts this using DOS-style short mode.
8612  # If so, the updated path is stored in $new_path.
8613  new_path="$input_to_shortpath"
8614
8615  input_path="$input_to_shortpath"
8616  # Check if we need to convert this using DOS-style short mode. If the path
8617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8618  # take no chances and rewrite it.
8619  # Note: m4 eats our [], so we need to use [ and ] instead.
8620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8621  if test "x$has_forbidden_chars" != x; then
8622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8626      # Going to short mode and back again did indeed matter. Since short mode is
8627      # case insensitive, let's make it lowercase to improve readability.
8628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8629      # Now convert it back to Unix-stile (cygpath)
8630      input_path=`$CYGPATH -u "$shortmode_path"`
8631      new_path="$input_path"
8632    fi
8633  fi
8634
8635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8636  if test "x$test_cygdrive_prefix" = x; then
8637    # As a simple fix, exclude /usr/bin since it's not a real path.
8638    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8640      # a path prefixed by /cygdrive for fixpath to work.
8641      new_path="$CYGWIN_ROOT_PATH$input_path"
8642    fi
8643  fi
8644
8645  # remove trailing .exe if any
8646  new_path="${new_path/%.exe/}"
8647
8648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8649
8650  # First separate the path from the arguments. This will split at the first
8651  # space.
8652  complete="$FOUND_MAKE"
8653  path="${complete%% *}"
8654  tmp="$complete EOL"
8655  arguments="${tmp#* }"
8656
8657  # Input might be given as Windows format, start by converting to
8658  # unix format.
8659  new_path="$path"
8660
8661  windows_path="$new_path"
8662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8663    unix_path=`$CYGPATH -u "$windows_path"`
8664    new_path="$unix_path"
8665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8667    new_path="$unix_path"
8668  fi
8669
8670
8671  # Now try to locate executable using which
8672  new_path=`$WHICH "$new_path" 2> /dev/null`
8673
8674  if test "x$new_path" = x; then
8675    # Oops. Which didn't find the executable.
8676    # The splitting of arguments from the executable at a space might have been incorrect,
8677    # since paths with space are more likely in Windows. Give it another try with the whole
8678    # argument.
8679    path="$complete"
8680    arguments="EOL"
8681    new_path="$path"
8682
8683  windows_path="$new_path"
8684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8685    unix_path=`$CYGPATH -u "$windows_path"`
8686    new_path="$unix_path"
8687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8689    new_path="$unix_path"
8690  fi
8691
8692
8693    new_path=`$WHICH "$new_path" 2> /dev/null`
8694
8695    if test "x$new_path" = x; then
8696      # It's still not found. Now this is an unrecoverable error.
8697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8698$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8699      has_space=`$ECHO "$complete" | $GREP " "`
8700      if test "x$has_space" != x; then
8701        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8702$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8703      fi
8704      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8705    fi
8706  fi
8707
8708  # Now new_path has a complete unix path to the binary
8709  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8710    # Keep paths in /bin as-is, but remove trailing .exe if any
8711    new_path="${new_path/%.exe/}"
8712    # Do not save /bin paths to all_fixpath_prefixes!
8713  else
8714    # Not in mixed or Windows style, start by that.
8715    new_path=`cmd //c echo $new_path`
8716
8717  input_path="$new_path"
8718  # Check if we need to convert this using DOS-style short mode. If the path
8719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8720  # take no chances and rewrite it.
8721  # Note: m4 eats our [], so we need to use [ and ] instead.
8722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8723  if test "x$has_forbidden_chars" != x; then
8724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8725    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8726  fi
8727
8728    # Output is in $new_path
8729
8730  windows_path="$new_path"
8731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8732    unix_path=`$CYGPATH -u "$windows_path"`
8733    new_path="$unix_path"
8734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8736    new_path="$unix_path"
8737  fi
8738
8739    # remove trailing .exe if any
8740    new_path="${new_path/%.exe/}"
8741
8742    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8743    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8744  fi
8745
8746  else
8747    # We're on a posix platform. Hooray! :)
8748    # First separate the path from the arguments. This will split at the first
8749    # space.
8750    complete="$FOUND_MAKE"
8751    path="${complete%% *}"
8752    tmp="$complete EOL"
8753    arguments="${tmp#* }"
8754
8755    # Cannot rely on the command "which" here since it doesn't always work.
8756    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8757    if test -z "$is_absolute_path"; then
8758      # Path to executable is not absolute. Find it.
8759      IFS_save="$IFS"
8760      IFS=:
8761      for p in $PATH; do
8762        if test -f "$p/$path" && test -x "$p/$path"; then
8763          new_path="$p/$path"
8764          break
8765        fi
8766      done
8767      IFS="$IFS_save"
8768    else
8769      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8770$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8771      new_path="$path"
8772    fi
8773
8774    if test "x$new_path" = x; then
8775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8776$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8777        has_space=`$ECHO "$complete" | $GREP " "`
8778        if test "x$has_space" != x; then
8779          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8780$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8781        fi
8782        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8783      fi
8784  fi
8785
8786      # Now join together the path and the arguments once again
8787      if test "x$arguments" != xEOL; then
8788        new_complete="$new_path ${arguments% *}"
8789      else
8790        new_complete="$new_path"
8791      fi
8792
8793  if test "x$complete" != "x$new_complete"; then
8794      FOUND_MAKE="$new_complete"
8795      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8796$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8797    fi
8798
8799        fi
8800      fi
8801    fi
8802  fi
8803
8804
8805    if test "x$FOUND_MAKE" = x; then
8806      for ac_prog in make
8807do
8808  # Extract the first word of "$ac_prog", so it can be a program name with args.
8809set dummy $ac_prog; ac_word=$2
8810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8811$as_echo_n "checking for $ac_word... " >&6; }
8812if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8813  $as_echo_n "(cached) " >&6
8814else
8815  case $CHECK_MAKE in
8816  [\\/]* | ?:[\\/]*)
8817  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8818  ;;
8819  *)
8820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8821for as_dir in $PATH
8822do
8823  IFS=$as_save_IFS
8824  test -z "$as_dir" && as_dir=.
8825    for ac_exec_ext in '' $ac_executable_extensions; do
8826  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8827    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8829    break 2
8830  fi
8831done
8832  done
8833IFS=$as_save_IFS
8834
8835  ;;
8836esac
8837fi
8838CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8839if test -n "$CHECK_MAKE"; then
8840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8841$as_echo "$CHECK_MAKE" >&6; }
8842else
8843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8844$as_echo "no" >&6; }
8845fi
8846
8847
8848  test -n "$CHECK_MAKE" && break
8849done
8850
8851
8852  MAKE_CANDIDATE=""$CHECK_MAKE""
8853  DESCRIPTION="make in PATH"
8854  if test "x$MAKE_CANDIDATE" != x; then
8855    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8856$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8857    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8858    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8859    if test "x$IS_GNU_MAKE" = x; then
8860      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8861$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8862    else
8863      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8864      if test "x$IS_MODERN_MAKE" = x; then
8865        { $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
8866$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;}
8867      else
8868        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8869          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8870            MAKE_EXPECTED_ENV='cygwin'
8871          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8872            MAKE_EXPECTED_ENV='msys'
8873          else
8874            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8875          fi
8876          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8877          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8878        else
8879          # Not relevant for non-Windows
8880          IS_MAKE_CORRECT_ENV=true
8881        fi
8882        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8883          { $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
8884$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;}
8885        else
8886          FOUND_MAKE=$MAKE_CANDIDATE
8887
8888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8889
8890  # First separate the path from the arguments. This will split at the first
8891  # space.
8892  complete="$FOUND_MAKE"
8893  path="${complete%% *}"
8894  tmp="$complete EOL"
8895  arguments="${tmp#* }"
8896
8897  # Input might be given as Windows format, start by converting to
8898  # unix format.
8899  new_path=`$CYGPATH -u "$path"`
8900
8901  # Now try to locate executable using which
8902  new_path=`$WHICH "$new_path" 2> /dev/null`
8903  # bat and cmd files are not always considered executable in cygwin causing which
8904  # to not find them
8905  if test "x$new_path" = x \
8906           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8907           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8908    new_path=`$CYGPATH -u "$path"`
8909  fi
8910  if test "x$new_path" = x; then
8911    # Oops. Which didn't find the executable.
8912    # The splitting of arguments from the executable at a space might have been incorrect,
8913    # since paths with space are more likely in Windows. Give it another try with the whole
8914    # argument.
8915    path="$complete"
8916    arguments="EOL"
8917    new_path=`$CYGPATH -u "$path"`
8918    new_path=`$WHICH "$new_path" 2> /dev/null`
8919    # bat and cmd files are not always considered executable in cygwin causing which
8920    # to not find them
8921    if test "x$new_path" = x \
8922             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8923             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8924      new_path=`$CYGPATH -u "$path"`
8925    fi
8926    if test "x$new_path" = x; then
8927      # It's still not found. Now this is an unrecoverable error.
8928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8929$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8930      has_space=`$ECHO "$complete" | $GREP " "`
8931      if test "x$has_space" != x; then
8932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8934      fi
8935      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8936    fi
8937  fi
8938
8939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8942  # "foo.exe" is OK but "foo" is an error.
8943  #
8944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8945  # It is also a way to make sure we got the proper file name for the real test later on.
8946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8947  if test "x$test_shortpath" = x; then
8948    # Short path failed, file does not exist as specified.
8949    # Try adding .exe or .cmd
8950    if test -f "${new_path}.exe"; then
8951       input_to_shortpath="${new_path}.exe"
8952    elif test -f "${new_path}.cmd"; then
8953       input_to_shortpath="${new_path}.cmd"
8954    else
8955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8956$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8957      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8958$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8959      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8960    fi
8961  else
8962    input_to_shortpath="$new_path"
8963  fi
8964
8965  # Call helper function which possibly converts this using DOS-style short mode.
8966  # If so, the updated path is stored in $new_path.
8967  new_path="$input_to_shortpath"
8968
8969  input_path="$input_to_shortpath"
8970  # Check if we need to convert this using DOS-style short mode. If the path
8971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8972  # take no chances and rewrite it.
8973  # Note: m4 eats our [], so we need to use [ and ] instead.
8974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8975  if test "x$has_forbidden_chars" != x; then
8976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8980      # Going to short mode and back again did indeed matter. Since short mode is
8981      # case insensitive, let's make it lowercase to improve readability.
8982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8983      # Now convert it back to Unix-stile (cygpath)
8984      input_path=`$CYGPATH -u "$shortmode_path"`
8985      new_path="$input_path"
8986    fi
8987  fi
8988
8989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8990  if test "x$test_cygdrive_prefix" = x; then
8991    # As a simple fix, exclude /usr/bin since it's not a real path.
8992    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8994      # a path prefixed by /cygdrive for fixpath to work.
8995      new_path="$CYGWIN_ROOT_PATH$input_path"
8996    fi
8997  fi
8998
8999  # remove trailing .exe if any
9000  new_path="${new_path/%.exe/}"
9001
9002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9003
9004  # First separate the path from the arguments. This will split at the first
9005  # space.
9006  complete="$FOUND_MAKE"
9007  path="${complete%% *}"
9008  tmp="$complete EOL"
9009  arguments="${tmp#* }"
9010
9011  # Input might be given as Windows format, start by converting to
9012  # unix format.
9013  new_path="$path"
9014
9015  windows_path="$new_path"
9016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9017    unix_path=`$CYGPATH -u "$windows_path"`
9018    new_path="$unix_path"
9019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9021    new_path="$unix_path"
9022  fi
9023
9024
9025  # Now try to locate executable using which
9026  new_path=`$WHICH "$new_path" 2> /dev/null`
9027
9028  if test "x$new_path" = x; then
9029    # Oops. Which didn't find the executable.
9030    # The splitting of arguments from the executable at a space might have been incorrect,
9031    # since paths with space are more likely in Windows. Give it another try with the whole
9032    # argument.
9033    path="$complete"
9034    arguments="EOL"
9035    new_path="$path"
9036
9037  windows_path="$new_path"
9038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9039    unix_path=`$CYGPATH -u "$windows_path"`
9040    new_path="$unix_path"
9041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9043    new_path="$unix_path"
9044  fi
9045
9046
9047    new_path=`$WHICH "$new_path" 2> /dev/null`
9048
9049    if test "x$new_path" = x; then
9050      # It's still not found. Now this is an unrecoverable error.
9051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9052$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9053      has_space=`$ECHO "$complete" | $GREP " "`
9054      if test "x$has_space" != x; then
9055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9057      fi
9058      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9059    fi
9060  fi
9061
9062  # Now new_path has a complete unix path to the binary
9063  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9064    # Keep paths in /bin as-is, but remove trailing .exe if any
9065    new_path="${new_path/%.exe/}"
9066    # Do not save /bin paths to all_fixpath_prefixes!
9067  else
9068    # Not in mixed or Windows style, start by that.
9069    new_path=`cmd //c echo $new_path`
9070
9071  input_path="$new_path"
9072  # Check if we need to convert this using DOS-style short mode. If the path
9073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9074  # take no chances and rewrite it.
9075  # Note: m4 eats our [], so we need to use [ and ] instead.
9076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9077  if test "x$has_forbidden_chars" != x; then
9078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9080  fi
9081
9082    # Output is in $new_path
9083
9084  windows_path="$new_path"
9085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9086    unix_path=`$CYGPATH -u "$windows_path"`
9087    new_path="$unix_path"
9088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9090    new_path="$unix_path"
9091  fi
9092
9093    # remove trailing .exe if any
9094    new_path="${new_path/%.exe/}"
9095
9096    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9097    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9098  fi
9099
9100  else
9101    # We're on a posix platform. Hooray! :)
9102    # First separate the path from the arguments. This will split at the first
9103    # space.
9104    complete="$FOUND_MAKE"
9105    path="${complete%% *}"
9106    tmp="$complete EOL"
9107    arguments="${tmp#* }"
9108
9109    # Cannot rely on the command "which" here since it doesn't always work.
9110    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9111    if test -z "$is_absolute_path"; then
9112      # Path to executable is not absolute. Find it.
9113      IFS_save="$IFS"
9114      IFS=:
9115      for p in $PATH; do
9116        if test -f "$p/$path" && test -x "$p/$path"; then
9117          new_path="$p/$path"
9118          break
9119        fi
9120      done
9121      IFS="$IFS_save"
9122    else
9123      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9124$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9125      new_path="$path"
9126    fi
9127
9128    if test "x$new_path" = x; then
9129        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9130$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9131        has_space=`$ECHO "$complete" | $GREP " "`
9132        if test "x$has_space" != x; then
9133          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9134$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9135        fi
9136        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9137      fi
9138  fi
9139
9140      # Now join together the path and the arguments once again
9141      if test "x$arguments" != xEOL; then
9142        new_complete="$new_path ${arguments% *}"
9143      else
9144        new_complete="$new_path"
9145      fi
9146
9147  if test "x$complete" != "x$new_complete"; then
9148      FOUND_MAKE="$new_complete"
9149      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9150$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9151    fi
9152
9153        fi
9154      fi
9155    fi
9156  fi
9157
9158    fi
9159
9160    if test "x$FOUND_MAKE" = x; then
9161      if test "x$TOOLS_DIR" != x; then
9162        # We have a tools-dir, check that as well before giving up.
9163        OLD_PATH=$PATH
9164        PATH=$TOOLS_DIR:$PATH
9165        for ac_prog in gmake
9166do
9167  # Extract the first word of "$ac_prog", so it can be a program name with args.
9168set dummy $ac_prog; ac_word=$2
9169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9170$as_echo_n "checking for $ac_word... " >&6; }
9171if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9172  $as_echo_n "(cached) " >&6
9173else
9174  case $CHECK_TOOLSDIR_GMAKE in
9175  [\\/]* | ?:[\\/]*)
9176  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9177  ;;
9178  *)
9179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9180for as_dir in $PATH
9181do
9182  IFS=$as_save_IFS
9183  test -z "$as_dir" && as_dir=.
9184    for ac_exec_ext in '' $ac_executable_extensions; do
9185  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9186    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9188    break 2
9189  fi
9190done
9191  done
9192IFS=$as_save_IFS
9193
9194  ;;
9195esac
9196fi
9197CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9198if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9200$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9201else
9202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203$as_echo "no" >&6; }
9204fi
9205
9206
9207  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9208done
9209
9210
9211  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9212  DESCRIPTION="gmake in tools-dir"
9213  if test "x$MAKE_CANDIDATE" != x; then
9214    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9215$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9216    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9217    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9218    if test "x$IS_GNU_MAKE" = x; then
9219      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9220$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9221    else
9222      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9223      if test "x$IS_MODERN_MAKE" = x; then
9224        { $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
9225$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;}
9226      else
9227        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9228          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9229            MAKE_EXPECTED_ENV='cygwin'
9230          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9231            MAKE_EXPECTED_ENV='msys'
9232          else
9233            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9234          fi
9235          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9236          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9237        else
9238          # Not relevant for non-Windows
9239          IS_MAKE_CORRECT_ENV=true
9240        fi
9241        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9242          { $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
9243$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;}
9244        else
9245          FOUND_MAKE=$MAKE_CANDIDATE
9246
9247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9248
9249  # First separate the path from the arguments. This will split at the first
9250  # space.
9251  complete="$FOUND_MAKE"
9252  path="${complete%% *}"
9253  tmp="$complete EOL"
9254  arguments="${tmp#* }"
9255
9256  # Input might be given as Windows format, start by converting to
9257  # unix format.
9258  new_path=`$CYGPATH -u "$path"`
9259
9260  # Now try to locate executable using which
9261  new_path=`$WHICH "$new_path" 2> /dev/null`
9262  # bat and cmd files are not always considered executable in cygwin causing which
9263  # to not find them
9264  if test "x$new_path" = x \
9265           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9266           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9267    new_path=`$CYGPATH -u "$path"`
9268  fi
9269  if test "x$new_path" = x; then
9270    # Oops. Which didn't find the executable.
9271    # The splitting of arguments from the executable at a space might have been incorrect,
9272    # since paths with space are more likely in Windows. Give it another try with the whole
9273    # argument.
9274    path="$complete"
9275    arguments="EOL"
9276    new_path=`$CYGPATH -u "$path"`
9277    new_path=`$WHICH "$new_path" 2> /dev/null`
9278    # bat and cmd files are not always considered executable in cygwin causing which
9279    # to not find them
9280    if test "x$new_path" = x \
9281             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9282             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9283      new_path=`$CYGPATH -u "$path"`
9284    fi
9285    if test "x$new_path" = x; then
9286      # It's still not found. Now this is an unrecoverable error.
9287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9288$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9289      has_space=`$ECHO "$complete" | $GREP " "`
9290      if test "x$has_space" != x; then
9291        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9292$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9293      fi
9294      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9295    fi
9296  fi
9297
9298  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9299  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9300  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9301  # "foo.exe" is OK but "foo" is an error.
9302  #
9303  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9304  # It is also a way to make sure we got the proper file name for the real test later on.
9305  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9306  if test "x$test_shortpath" = x; then
9307    # Short path failed, file does not exist as specified.
9308    # Try adding .exe or .cmd
9309    if test -f "${new_path}.exe"; then
9310       input_to_shortpath="${new_path}.exe"
9311    elif test -f "${new_path}.cmd"; then
9312       input_to_shortpath="${new_path}.cmd"
9313    else
9314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9315$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9316      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9317$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9318      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9319    fi
9320  else
9321    input_to_shortpath="$new_path"
9322  fi
9323
9324  # Call helper function which possibly converts this using DOS-style short mode.
9325  # If so, the updated path is stored in $new_path.
9326  new_path="$input_to_shortpath"
9327
9328  input_path="$input_to_shortpath"
9329  # Check if we need to convert this using DOS-style short mode. If the path
9330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9331  # take no chances and rewrite it.
9332  # Note: m4 eats our [], so we need to use [ and ] instead.
9333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9334  if test "x$has_forbidden_chars" != x; then
9335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9339      # Going to short mode and back again did indeed matter. Since short mode is
9340      # case insensitive, let's make it lowercase to improve readability.
9341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9342      # Now convert it back to Unix-stile (cygpath)
9343      input_path=`$CYGPATH -u "$shortmode_path"`
9344      new_path="$input_path"
9345    fi
9346  fi
9347
9348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9349  if test "x$test_cygdrive_prefix" = x; then
9350    # As a simple fix, exclude /usr/bin since it's not a real path.
9351    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9353      # a path prefixed by /cygdrive for fixpath to work.
9354      new_path="$CYGWIN_ROOT_PATH$input_path"
9355    fi
9356  fi
9357
9358  # remove trailing .exe if any
9359  new_path="${new_path/%.exe/}"
9360
9361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9362
9363  # First separate the path from the arguments. This will split at the first
9364  # space.
9365  complete="$FOUND_MAKE"
9366  path="${complete%% *}"
9367  tmp="$complete EOL"
9368  arguments="${tmp#* }"
9369
9370  # Input might be given as Windows format, start by converting to
9371  # unix format.
9372  new_path="$path"
9373
9374  windows_path="$new_path"
9375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9376    unix_path=`$CYGPATH -u "$windows_path"`
9377    new_path="$unix_path"
9378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9380    new_path="$unix_path"
9381  fi
9382
9383
9384  # Now try to locate executable using which
9385  new_path=`$WHICH "$new_path" 2> /dev/null`
9386
9387  if test "x$new_path" = x; then
9388    # Oops. Which didn't find the executable.
9389    # The splitting of arguments from the executable at a space might have been incorrect,
9390    # since paths with space are more likely in Windows. Give it another try with the whole
9391    # argument.
9392    path="$complete"
9393    arguments="EOL"
9394    new_path="$path"
9395
9396  windows_path="$new_path"
9397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9398    unix_path=`$CYGPATH -u "$windows_path"`
9399    new_path="$unix_path"
9400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9402    new_path="$unix_path"
9403  fi
9404
9405
9406    new_path=`$WHICH "$new_path" 2> /dev/null`
9407
9408    if test "x$new_path" = x; then
9409      # It's still not found. Now this is an unrecoverable error.
9410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9412      has_space=`$ECHO "$complete" | $GREP " "`
9413      if test "x$has_space" != x; then
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9416      fi
9417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9418    fi
9419  fi
9420
9421  # Now new_path has a complete unix path to the binary
9422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9423    # Keep paths in /bin as-is, but remove trailing .exe if any
9424    new_path="${new_path/%.exe/}"
9425    # Do not save /bin paths to all_fixpath_prefixes!
9426  else
9427    # Not in mixed or Windows style, start by that.
9428    new_path=`cmd //c echo $new_path`
9429
9430  input_path="$new_path"
9431  # Check if we need to convert this using DOS-style short mode. If the path
9432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9433  # take no chances and rewrite it.
9434  # Note: m4 eats our [], so we need to use [ and ] instead.
9435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9436  if test "x$has_forbidden_chars" != x; then
9437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9439  fi
9440
9441    # Output is in $new_path
9442
9443  windows_path="$new_path"
9444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9445    unix_path=`$CYGPATH -u "$windows_path"`
9446    new_path="$unix_path"
9447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9449    new_path="$unix_path"
9450  fi
9451
9452    # remove trailing .exe if any
9453    new_path="${new_path/%.exe/}"
9454
9455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9457  fi
9458
9459  else
9460    # We're on a posix platform. Hooray! :)
9461    # First separate the path from the arguments. This will split at the first
9462    # space.
9463    complete="$FOUND_MAKE"
9464    path="${complete%% *}"
9465    tmp="$complete EOL"
9466    arguments="${tmp#* }"
9467
9468    # Cannot rely on the command "which" here since it doesn't always work.
9469    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9470    if test -z "$is_absolute_path"; then
9471      # Path to executable is not absolute. Find it.
9472      IFS_save="$IFS"
9473      IFS=:
9474      for p in $PATH; do
9475        if test -f "$p/$path" && test -x "$p/$path"; then
9476          new_path="$p/$path"
9477          break
9478        fi
9479      done
9480      IFS="$IFS_save"
9481    else
9482      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9483$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9484      new_path="$path"
9485    fi
9486
9487    if test "x$new_path" = x; then
9488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9490        has_space=`$ECHO "$complete" | $GREP " "`
9491        if test "x$has_space" != x; then
9492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9494        fi
9495        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9496      fi
9497  fi
9498
9499      # Now join together the path and the arguments once again
9500      if test "x$arguments" != xEOL; then
9501        new_complete="$new_path ${arguments% *}"
9502      else
9503        new_complete="$new_path"
9504      fi
9505
9506  if test "x$complete" != "x$new_complete"; then
9507      FOUND_MAKE="$new_complete"
9508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9509$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9510    fi
9511
9512        fi
9513      fi
9514    fi
9515  fi
9516
9517        if test "x$FOUND_MAKE" = x; then
9518          for ac_prog in make
9519do
9520  # Extract the first word of "$ac_prog", so it can be a program name with args.
9521set dummy $ac_prog; ac_word=$2
9522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9523$as_echo_n "checking for $ac_word... " >&6; }
9524if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9525  $as_echo_n "(cached) " >&6
9526else
9527  case $CHECK_TOOLSDIR_MAKE in
9528  [\\/]* | ?:[\\/]*)
9529  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9530  ;;
9531  *)
9532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9533for as_dir in $PATH
9534do
9535  IFS=$as_save_IFS
9536  test -z "$as_dir" && as_dir=.
9537    for ac_exec_ext in '' $ac_executable_extensions; do
9538  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9539    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9541    break 2
9542  fi
9543done
9544  done
9545IFS=$as_save_IFS
9546
9547  ;;
9548esac
9549fi
9550CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9551if test -n "$CHECK_TOOLSDIR_MAKE"; then
9552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9553$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9554else
9555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9556$as_echo "no" >&6; }
9557fi
9558
9559
9560  test -n "$CHECK_TOOLSDIR_MAKE" && break
9561done
9562
9563
9564  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9565  DESCRIPTION="make in tools-dir"
9566  if test "x$MAKE_CANDIDATE" != x; then
9567    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9568$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9569    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9570    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9571    if test "x$IS_GNU_MAKE" = x; then
9572      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9573$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9574    else
9575      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9576      if test "x$IS_MODERN_MAKE" = x; then
9577        { $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
9578$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;}
9579      else
9580        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9581          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9582            MAKE_EXPECTED_ENV='cygwin'
9583          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9584            MAKE_EXPECTED_ENV='msys'
9585          else
9586            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9587          fi
9588          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9589          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9590        else
9591          # Not relevant for non-Windows
9592          IS_MAKE_CORRECT_ENV=true
9593        fi
9594        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9595          { $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
9596$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;}
9597        else
9598          FOUND_MAKE=$MAKE_CANDIDATE
9599
9600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9601
9602  # First separate the path from the arguments. This will split at the first
9603  # space.
9604  complete="$FOUND_MAKE"
9605  path="${complete%% *}"
9606  tmp="$complete EOL"
9607  arguments="${tmp#* }"
9608
9609  # Input might be given as Windows format, start by converting to
9610  # unix format.
9611  new_path=`$CYGPATH -u "$path"`
9612
9613  # Now try to locate executable using which
9614  new_path=`$WHICH "$new_path" 2> /dev/null`
9615  # bat and cmd files are not always considered executable in cygwin causing which
9616  # to not find them
9617  if test "x$new_path" = x \
9618           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9619           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9620    new_path=`$CYGPATH -u "$path"`
9621  fi
9622  if test "x$new_path" = x; then
9623    # Oops. Which didn't find the executable.
9624    # The splitting of arguments from the executable at a space might have been incorrect,
9625    # since paths with space are more likely in Windows. Give it another try with the whole
9626    # argument.
9627    path="$complete"
9628    arguments="EOL"
9629    new_path=`$CYGPATH -u "$path"`
9630    new_path=`$WHICH "$new_path" 2> /dev/null`
9631    # bat and cmd files are not always considered executable in cygwin causing which
9632    # to not find them
9633    if test "x$new_path" = x \
9634             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9635             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9636      new_path=`$CYGPATH -u "$path"`
9637    fi
9638    if test "x$new_path" = x; then
9639      # It's still not found. Now this is an unrecoverable error.
9640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9641$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9642      has_space=`$ECHO "$complete" | $GREP " "`
9643      if test "x$has_space" != x; then
9644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9646      fi
9647      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9648    fi
9649  fi
9650
9651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9654  # "foo.exe" is OK but "foo" is an error.
9655  #
9656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9657  # It is also a way to make sure we got the proper file name for the real test later on.
9658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9659  if test "x$test_shortpath" = x; then
9660    # Short path failed, file does not exist as specified.
9661    # Try adding .exe or .cmd
9662    if test -f "${new_path}.exe"; then
9663       input_to_shortpath="${new_path}.exe"
9664    elif test -f "${new_path}.cmd"; then
9665       input_to_shortpath="${new_path}.cmd"
9666    else
9667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9668$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9669      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9670$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9671      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9672    fi
9673  else
9674    input_to_shortpath="$new_path"
9675  fi
9676
9677  # Call helper function which possibly converts this using DOS-style short mode.
9678  # If so, the updated path is stored in $new_path.
9679  new_path="$input_to_shortpath"
9680
9681  input_path="$input_to_shortpath"
9682  # Check if we need to convert this using DOS-style short mode. If the path
9683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9684  # take no chances and rewrite it.
9685  # Note: m4 eats our [], so we need to use [ and ] instead.
9686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9687  if test "x$has_forbidden_chars" != x; then
9688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9692      # Going to short mode and back again did indeed matter. Since short mode is
9693      # case insensitive, let's make it lowercase to improve readability.
9694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9695      # Now convert it back to Unix-stile (cygpath)
9696      input_path=`$CYGPATH -u "$shortmode_path"`
9697      new_path="$input_path"
9698    fi
9699  fi
9700
9701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9702  if test "x$test_cygdrive_prefix" = x; then
9703    # As a simple fix, exclude /usr/bin since it's not a real path.
9704    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9706      # a path prefixed by /cygdrive for fixpath to work.
9707      new_path="$CYGWIN_ROOT_PATH$input_path"
9708    fi
9709  fi
9710
9711  # remove trailing .exe if any
9712  new_path="${new_path/%.exe/}"
9713
9714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9715
9716  # First separate the path from the arguments. This will split at the first
9717  # space.
9718  complete="$FOUND_MAKE"
9719  path="${complete%% *}"
9720  tmp="$complete EOL"
9721  arguments="${tmp#* }"
9722
9723  # Input might be given as Windows format, start by converting to
9724  # unix format.
9725  new_path="$path"
9726
9727  windows_path="$new_path"
9728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9729    unix_path=`$CYGPATH -u "$windows_path"`
9730    new_path="$unix_path"
9731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9733    new_path="$unix_path"
9734  fi
9735
9736
9737  # Now try to locate executable using which
9738  new_path=`$WHICH "$new_path" 2> /dev/null`
9739
9740  if test "x$new_path" = x; then
9741    # Oops. Which didn't find the executable.
9742    # The splitting of arguments from the executable at a space might have been incorrect,
9743    # since paths with space are more likely in Windows. Give it another try with the whole
9744    # argument.
9745    path="$complete"
9746    arguments="EOL"
9747    new_path="$path"
9748
9749  windows_path="$new_path"
9750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9751    unix_path=`$CYGPATH -u "$windows_path"`
9752    new_path="$unix_path"
9753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9755    new_path="$unix_path"
9756  fi
9757
9758
9759    new_path=`$WHICH "$new_path" 2> /dev/null`
9760
9761    if test "x$new_path" = x; then
9762      # It's still not found. Now this is an unrecoverable error.
9763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9764$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9765      has_space=`$ECHO "$complete" | $GREP " "`
9766      if test "x$has_space" != x; then
9767        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9768$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9769      fi
9770      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9771    fi
9772  fi
9773
9774  # Now new_path has a complete unix path to the binary
9775  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9776    # Keep paths in /bin as-is, but remove trailing .exe if any
9777    new_path="${new_path/%.exe/}"
9778    # Do not save /bin paths to all_fixpath_prefixes!
9779  else
9780    # Not in mixed or Windows style, start by that.
9781    new_path=`cmd //c echo $new_path`
9782
9783  input_path="$new_path"
9784  # Check if we need to convert this using DOS-style short mode. If the path
9785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9786  # take no chances and rewrite it.
9787  # Note: m4 eats our [], so we need to use [ and ] instead.
9788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9789  if test "x$has_forbidden_chars" != x; then
9790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9792  fi
9793
9794    # Output is in $new_path
9795
9796  windows_path="$new_path"
9797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9798    unix_path=`$CYGPATH -u "$windows_path"`
9799    new_path="$unix_path"
9800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9802    new_path="$unix_path"
9803  fi
9804
9805    # remove trailing .exe if any
9806    new_path="${new_path/%.exe/}"
9807
9808    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9809    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9810  fi
9811
9812  else
9813    # We're on a posix platform. Hooray! :)
9814    # First separate the path from the arguments. This will split at the first
9815    # space.
9816    complete="$FOUND_MAKE"
9817    path="${complete%% *}"
9818    tmp="$complete EOL"
9819    arguments="${tmp#* }"
9820
9821    # Cannot rely on the command "which" here since it doesn't always work.
9822    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9823    if test -z "$is_absolute_path"; then
9824      # Path to executable is not absolute. Find it.
9825      IFS_save="$IFS"
9826      IFS=:
9827      for p in $PATH; do
9828        if test -f "$p/$path" && test -x "$p/$path"; then
9829          new_path="$p/$path"
9830          break
9831        fi
9832      done
9833      IFS="$IFS_save"
9834    else
9835      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9836$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9837      new_path="$path"
9838    fi
9839
9840    if test "x$new_path" = x; then
9841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9842$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9843        has_space=`$ECHO "$complete" | $GREP " "`
9844        if test "x$has_space" != x; then
9845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9847        fi
9848        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9849      fi
9850  fi
9851
9852      # Now join together the path and the arguments once again
9853      if test "x$arguments" != xEOL; then
9854        new_complete="$new_path ${arguments% *}"
9855      else
9856        new_complete="$new_path"
9857      fi
9858
9859  if test "x$complete" != "x$new_complete"; then
9860      FOUND_MAKE="$new_complete"
9861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9862$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9863    fi
9864
9865        fi
9866      fi
9867    fi
9868  fi
9869
9870        fi
9871        PATH=$OLD_PATH
9872      fi
9873    fi
9874
9875    if test "x$FOUND_MAKE" = x; then
9876      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
9877    fi
9878  fi
9879
9880  MAKE=$FOUND_MAKE
9881
9882  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9883$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9884
9885
9886
9887    # Test if find supports -delete
9888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9889$as_echo_n "checking if find supports -delete... " >&6; }
9890    FIND_DELETE="-delete"
9891
9892    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9893
9894    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9895
9896    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9897    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9898        # No, it does not.
9899        rm $DELETEDIR/TestIfFindSupportsDelete
9900        FIND_DELETE="-exec rm \{\} \+"
9901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9902$as_echo "no" >&6; }
9903    else
9904        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9905$as_echo "yes" >&6; }
9906    fi
9907    rmdir $DELETEDIR
9908
9909
9910
9911# These tools might not be installed by default,
9912# need hint on how to install them.
9913
9914    for ac_prog in unzip
9915do
9916  # Extract the first word of "$ac_prog", so it can be a program name with args.
9917set dummy $ac_prog; ac_word=$2
9918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9919$as_echo_n "checking for $ac_word... " >&6; }
9920if test "${ac_cv_path_UNZIP+set}" = set; then :
9921  $as_echo_n "(cached) " >&6
9922else
9923  case $UNZIP in
9924  [\\/]* | ?:[\\/]*)
9925  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9926  ;;
9927  *)
9928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9929for as_dir in $PATH
9930do
9931  IFS=$as_save_IFS
9932  test -z "$as_dir" && as_dir=.
9933    for ac_exec_ext in '' $ac_executable_extensions; do
9934  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9935    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9937    break 2
9938  fi
9939done
9940  done
9941IFS=$as_save_IFS
9942
9943  ;;
9944esac
9945fi
9946UNZIP=$ac_cv_path_UNZIP
9947if test -n "$UNZIP"; then
9948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9949$as_echo "$UNZIP" >&6; }
9950else
9951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9952$as_echo "no" >&6; }
9953fi
9954
9955
9956  test -n "$UNZIP" && break
9957done
9958
9959
9960    if test "x$UNZIP" = x; then
9961        if test "xunzip" = x; then
9962          PROG_NAME=unzip
9963        else
9964          PROG_NAME=unzip
9965        fi
9966        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9967$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9968        as_fn_error $? "Cannot continue" "$LINENO" 5
9969    fi
9970
9971
9972
9973    for ac_prog in zip
9974do
9975  # Extract the first word of "$ac_prog", so it can be a program name with args.
9976set dummy $ac_prog; ac_word=$2
9977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9978$as_echo_n "checking for $ac_word... " >&6; }
9979if test "${ac_cv_path_ZIP+set}" = set; then :
9980  $as_echo_n "(cached) " >&6
9981else
9982  case $ZIP in
9983  [\\/]* | ?:[\\/]*)
9984  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9985  ;;
9986  *)
9987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9988for as_dir in $PATH
9989do
9990  IFS=$as_save_IFS
9991  test -z "$as_dir" && as_dir=.
9992    for ac_exec_ext in '' $ac_executable_extensions; do
9993  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9994    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9996    break 2
9997  fi
9998done
9999  done
10000IFS=$as_save_IFS
10001
10002  ;;
10003esac
10004fi
10005ZIP=$ac_cv_path_ZIP
10006if test -n "$ZIP"; then
10007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10008$as_echo "$ZIP" >&6; }
10009else
10010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10011$as_echo "no" >&6; }
10012fi
10013
10014
10015  test -n "$ZIP" && break
10016done
10017
10018
10019    if test "x$ZIP" = x; then
10020        if test "xzip" = x; then
10021          PROG_NAME=zip
10022        else
10023          PROG_NAME=zip
10024        fi
10025        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10026$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10027        as_fn_error $? "Cannot continue" "$LINENO" 5
10028    fi
10029
10030
10031
10032# Non-required basic tools
10033
10034# Extract the first word of "ldd", so it can be a program name with args.
10035set dummy ldd; ac_word=$2
10036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10037$as_echo_n "checking for $ac_word... " >&6; }
10038if test "${ac_cv_path_LDD+set}" = set; then :
10039  $as_echo_n "(cached) " >&6
10040else
10041  case $LDD in
10042  [\\/]* | ?:[\\/]*)
10043  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10044  ;;
10045  *)
10046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10047for as_dir in $PATH
10048do
10049  IFS=$as_save_IFS
10050  test -z "$as_dir" && as_dir=.
10051    for ac_exec_ext in '' $ac_executable_extensions; do
10052  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10053    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10055    break 2
10056  fi
10057done
10058  done
10059IFS=$as_save_IFS
10060
10061  ;;
10062esac
10063fi
10064LDD=$ac_cv_path_LDD
10065if test -n "$LDD"; then
10066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10067$as_echo "$LDD" >&6; }
10068else
10069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10070$as_echo "no" >&6; }
10071fi
10072
10073
10074if test "x$LDD" = "x"; then
10075    # List shared lib dependencies is used for
10076    # debug output and checking for forbidden dependencies.
10077    # We can build without it.
10078    LDD="true"
10079fi
10080# Extract the first word of "otool", so it can be a program name with args.
10081set dummy otool; ac_word=$2
10082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10083$as_echo_n "checking for $ac_word... " >&6; }
10084if test "${ac_cv_path_OTOOL+set}" = set; then :
10085  $as_echo_n "(cached) " >&6
10086else
10087  case $OTOOL in
10088  [\\/]* | ?:[\\/]*)
10089  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10090  ;;
10091  *)
10092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10093for as_dir in $PATH
10094do
10095  IFS=$as_save_IFS
10096  test -z "$as_dir" && as_dir=.
10097    for ac_exec_ext in '' $ac_executable_extensions; do
10098  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10099    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10101    break 2
10102  fi
10103done
10104  done
10105IFS=$as_save_IFS
10106
10107  ;;
10108esac
10109fi
10110OTOOL=$ac_cv_path_OTOOL
10111if test -n "$OTOOL"; then
10112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10113$as_echo "$OTOOL" >&6; }
10114else
10115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10116$as_echo "no" >&6; }
10117fi
10118
10119
10120if test "x$OTOOL" = "x"; then
10121   OTOOL="true"
10122fi
10123for ac_prog in readelf greadelf
10124do
10125  # Extract the first word of "$ac_prog", so it can be a program name with args.
10126set dummy $ac_prog; ac_word=$2
10127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10128$as_echo_n "checking for $ac_word... " >&6; }
10129if test "${ac_cv_path_READELF+set}" = set; then :
10130  $as_echo_n "(cached) " >&6
10131else
10132  case $READELF in
10133  [\\/]* | ?:[\\/]*)
10134  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10135  ;;
10136  *)
10137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10138for as_dir in $PATH
10139do
10140  IFS=$as_save_IFS
10141  test -z "$as_dir" && as_dir=.
10142    for ac_exec_ext in '' $ac_executable_extensions; do
10143  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10144    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10146    break 2
10147  fi
10148done
10149  done
10150IFS=$as_save_IFS
10151
10152  ;;
10153esac
10154fi
10155READELF=$ac_cv_path_READELF
10156if test -n "$READELF"; then
10157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10158$as_echo "$READELF" >&6; }
10159else
10160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10161$as_echo "no" >&6; }
10162fi
10163
10164
10165  test -n "$READELF" && break
10166done
10167
10168# Extract the first word of "hg", so it can be a program name with args.
10169set dummy hg; ac_word=$2
10170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10171$as_echo_n "checking for $ac_word... " >&6; }
10172if test "${ac_cv_path_HG+set}" = set; then :
10173  $as_echo_n "(cached) " >&6
10174else
10175  case $HG in
10176  [\\/]* | ?:[\\/]*)
10177  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10178  ;;
10179  *)
10180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10181for as_dir in $PATH
10182do
10183  IFS=$as_save_IFS
10184  test -z "$as_dir" && as_dir=.
10185    for ac_exec_ext in '' $ac_executable_extensions; do
10186  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10187    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10189    break 2
10190  fi
10191done
10192  done
10193IFS=$as_save_IFS
10194
10195  ;;
10196esac
10197fi
10198HG=$ac_cv_path_HG
10199if test -n "$HG"; then
10200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10201$as_echo "$HG" >&6; }
10202else
10203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10204$as_echo "no" >&6; }
10205fi
10206
10207
10208# Extract the first word of "stat", so it can be a program name with args.
10209set dummy stat; ac_word=$2
10210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10211$as_echo_n "checking for $ac_word... " >&6; }
10212if test "${ac_cv_path_STAT+set}" = set; then :
10213  $as_echo_n "(cached) " >&6
10214else
10215  case $STAT in
10216  [\\/]* | ?:[\\/]*)
10217  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10218  ;;
10219  *)
10220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10221for as_dir in $PATH
10222do
10223  IFS=$as_save_IFS
10224  test -z "$as_dir" && as_dir=.
10225    for ac_exec_ext in '' $ac_executable_extensions; do
10226  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10227    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10229    break 2
10230  fi
10231done
10232  done
10233IFS=$as_save_IFS
10234
10235  ;;
10236esac
10237fi
10238STAT=$ac_cv_path_STAT
10239if test -n "$STAT"; then
10240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10241$as_echo "$STAT" >&6; }
10242else
10243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244$as_echo "no" >&6; }
10245fi
10246
10247
10248# Extract the first word of "time", so it can be a program name with args.
10249set dummy time; ac_word=$2
10250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10251$as_echo_n "checking for $ac_word... " >&6; }
10252if test "${ac_cv_path_TIME+set}" = set; then :
10253  $as_echo_n "(cached) " >&6
10254else
10255  case $TIME in
10256  [\\/]* | ?:[\\/]*)
10257  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10258  ;;
10259  *)
10260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10261for as_dir in $PATH
10262do
10263  IFS=$as_save_IFS
10264  test -z "$as_dir" && as_dir=.
10265    for ac_exec_ext in '' $ac_executable_extensions; do
10266  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10267    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10269    break 2
10270  fi
10271done
10272  done
10273IFS=$as_save_IFS
10274
10275  ;;
10276esac
10277fi
10278TIME=$ac_cv_path_TIME
10279if test -n "$TIME"; then
10280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10281$as_echo "$TIME" >&6; }
10282else
10283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10284$as_echo "no" >&6; }
10285fi
10286
10287
10288
10289if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10290
10291    for ac_prog in comm
10292do
10293  # Extract the first word of "$ac_prog", so it can be a program name with args.
10294set dummy $ac_prog; ac_word=$2
10295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10296$as_echo_n "checking for $ac_word... " >&6; }
10297if test "${ac_cv_path_COMM+set}" = set; then :
10298  $as_echo_n "(cached) " >&6
10299else
10300  case $COMM in
10301  [\\/]* | ?:[\\/]*)
10302  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10303  ;;
10304  *)
10305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10306for as_dir in $PATH
10307do
10308  IFS=$as_save_IFS
10309  test -z "$as_dir" && as_dir=.
10310    for ac_exec_ext in '' $ac_executable_extensions; do
10311  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10312    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10314    break 2
10315  fi
10316done
10317  done
10318IFS=$as_save_IFS
10319
10320  ;;
10321esac
10322fi
10323COMM=$ac_cv_path_COMM
10324if test -n "$COMM"; then
10325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10326$as_echo "$COMM" >&6; }
10327else
10328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
10330fi
10331
10332
10333  test -n "$COMM" && break
10334done
10335
10336
10337    if test "x$COMM" = x; then
10338        if test "xcomm" = x; then
10339          PROG_NAME=comm
10340        else
10341          PROG_NAME=comm
10342        fi
10343        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10344$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10345        as_fn_error $? "Cannot continue" "$LINENO" 5
10346    fi
10347
10348
10349fi
10350
10351
10352# Check if pkg-config is available.
10353
10354
10355if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10356	if test -n "$ac_tool_prefix"; then
10357  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10358set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10360$as_echo_n "checking for $ac_word... " >&6; }
10361if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10362  $as_echo_n "(cached) " >&6
10363else
10364  case $PKG_CONFIG in
10365  [\\/]* | ?:[\\/]*)
10366  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10367  ;;
10368  *)
10369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10370for as_dir in $PATH
10371do
10372  IFS=$as_save_IFS
10373  test -z "$as_dir" && as_dir=.
10374    for ac_exec_ext in '' $ac_executable_extensions; do
10375  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10376    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10378    break 2
10379  fi
10380done
10381  done
10382IFS=$as_save_IFS
10383
10384  ;;
10385esac
10386fi
10387PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10388if test -n "$PKG_CONFIG"; then
10389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10390$as_echo "$PKG_CONFIG" >&6; }
10391else
10392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393$as_echo "no" >&6; }
10394fi
10395
10396
10397fi
10398if test -z "$ac_cv_path_PKG_CONFIG"; then
10399  ac_pt_PKG_CONFIG=$PKG_CONFIG
10400  # Extract the first word of "pkg-config", so it can be a program name with args.
10401set dummy pkg-config; ac_word=$2
10402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10403$as_echo_n "checking for $ac_word... " >&6; }
10404if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10405  $as_echo_n "(cached) " >&6
10406else
10407  case $ac_pt_PKG_CONFIG in
10408  [\\/]* | ?:[\\/]*)
10409  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10410  ;;
10411  *)
10412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10413for as_dir in $PATH
10414do
10415  IFS=$as_save_IFS
10416  test -z "$as_dir" && as_dir=.
10417    for ac_exec_ext in '' $ac_executable_extensions; do
10418  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10419    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10421    break 2
10422  fi
10423done
10424  done
10425IFS=$as_save_IFS
10426
10427  ;;
10428esac
10429fi
10430ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10431if test -n "$ac_pt_PKG_CONFIG"; then
10432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10433$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10434else
10435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10436$as_echo "no" >&6; }
10437fi
10438
10439  if test "x$ac_pt_PKG_CONFIG" = x; then
10440    PKG_CONFIG=""
10441  else
10442    case $cross_compiling:$ac_tool_warned in
10443yes:)
10444{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10445$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10446ac_tool_warned=yes ;;
10447esac
10448    PKG_CONFIG=$ac_pt_PKG_CONFIG
10449  fi
10450else
10451  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10452fi
10453
10454fi
10455if test -n "$PKG_CONFIG"; then
10456	_pkg_min_version=0.9.0
10457	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10458$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10459	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10460		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10461$as_echo "yes" >&6; }
10462	else
10463		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10464$as_echo "no" >&6; }
10465		PKG_CONFIG=""
10466	fi
10467
10468fi
10469
10470# After basic tools have been setup, we can check build os specific details.
10471
10472###############################################################################
10473
10474# Note that this is the build platform OS version!
10475
10476OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10477OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10478OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10479OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10480
10481
10482
10483
10484
10485# Setup builddeps, for automatic downloading of tools we need.
10486# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10487# boot-jdk setup, but we need to have basic tools setup first.
10488
10489
10490# Check whether --with-builddeps-conf was given.
10491if test "${with_builddeps_conf+set}" = set; then :
10492  withval=$with_builddeps_conf;
10493fi
10494
10495
10496
10497# Check whether --with-builddeps-server was given.
10498if test "${with_builddeps_server+set}" = set; then :
10499  withval=$with_builddeps_server;
10500fi
10501
10502
10503
10504# Check whether --with-builddeps-dir was given.
10505if test "${with_builddeps_dir+set}" = set; then :
10506  withval=$with_builddeps_dir;
10507else
10508  with_builddeps_dir=/localhome/builddeps
10509fi
10510
10511
10512
10513# Check whether --with-builddeps-group was given.
10514if test "${with_builddeps_group+set}" = set; then :
10515  withval=$with_builddeps_group;
10516fi
10517
10518
10519
10520
10521    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10522        if test "x$with_builddeps_conf" != x; then
10523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10524$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10525            builddepsfile=$with_builddeps_conf
10526            if test -s $builddepsfile; then
10527                . $builddepsfile
10528                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10529$as_echo "loaded!" >&6; }
10530            else
10531               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10532           fi
10533        else
10534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10535$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10536            builddepsfile=`mktemp`
10537            touch $builddepsfile
10538            # Put all found confs into a single file.
10539            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10540            # Source the file to acquire the variables
10541            if test -s $builddepsfile; then
10542                . $builddepsfile
10543                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10544$as_echo "found at least one!" >&6; }
10545            else
10546               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10547           fi
10548        fi
10549        # Create build and target names that use _ instead of "-" and ".".
10550        # This is necessary to use them in variable names.
10551        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10552        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10553        # Extract rewrite information for build and target
10554        eval rewritten_build=\${REWRITE_${build_var}}
10555        if test "x$rewritten_build" = x; then
10556            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10557            echo Build stays the same $rewritten_build
10558        else
10559            echo Rewriting build for builddeps into $rewritten_build
10560        fi
10561        eval rewritten_target=\${REWRITE_${target_var}}
10562        if test "x$rewritten_target" = x; then
10563            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10564            echo Target stays the same $rewritten_target
10565        else
10566            echo Rewriting target for builddeps into $rewritten_target
10567        fi
10568        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10569        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10570    fi
10571    for ac_prog in 7z unzip
10572do
10573  # Extract the first word of "$ac_prog", so it can be a program name with args.
10574set dummy $ac_prog; ac_word=$2
10575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10576$as_echo_n "checking for $ac_word... " >&6; }
10577if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10578  $as_echo_n "(cached) " >&6
10579else
10580  if test -n "$BDEPS_UNZIP"; then
10581  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10582else
10583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10584for as_dir in $PATH
10585do
10586  IFS=$as_save_IFS
10587  test -z "$as_dir" && as_dir=.
10588    for ac_exec_ext in '' $ac_executable_extensions; do
10589  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10590    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10592    break 2
10593  fi
10594done
10595  done
10596IFS=$as_save_IFS
10597
10598fi
10599fi
10600BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10601if test -n "$BDEPS_UNZIP"; then
10602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10603$as_echo "$BDEPS_UNZIP" >&6; }
10604else
10605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10606$as_echo "no" >&6; }
10607fi
10608
10609
10610  test -n "$BDEPS_UNZIP" && break
10611done
10612
10613    if test "x$BDEPS_UNZIP" = x7z; then
10614        BDEPS_UNZIP="7z x"
10615    fi
10616
10617    for ac_prog in wget lftp ftp
10618do
10619  # Extract the first word of "$ac_prog", so it can be a program name with args.
10620set dummy $ac_prog; ac_word=$2
10621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10622$as_echo_n "checking for $ac_word... " >&6; }
10623if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10624  $as_echo_n "(cached) " >&6
10625else
10626  if test -n "$BDEPS_FTP"; then
10627  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10628else
10629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10630for as_dir in $PATH
10631do
10632  IFS=$as_save_IFS
10633  test -z "$as_dir" && as_dir=.
10634    for ac_exec_ext in '' $ac_executable_extensions; do
10635  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10636    ac_cv_prog_BDEPS_FTP="$ac_prog"
10637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10638    break 2
10639  fi
10640done
10641  done
10642IFS=$as_save_IFS
10643
10644fi
10645fi
10646BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10647if test -n "$BDEPS_FTP"; then
10648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10649$as_echo "$BDEPS_FTP" >&6; }
10650else
10651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10652$as_echo "no" >&6; }
10653fi
10654
10655
10656  test -n "$BDEPS_FTP" && break
10657done
10658
10659
10660
10661###############################################################################
10662#
10663# Determine OpenJDK variants, options and version numbers.
10664#
10665###############################################################################
10666
10667# We need build & target for this.
10668
10669
10670###############################################################################
10671#
10672# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10673# We always build headless support.
10674#
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10676$as_echo_n "checking headful support... " >&6; }
10677# Check whether --enable-headful was given.
10678if test "${enable_headful+set}" = set; then :
10679  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10680else
10681  SUPPORT_HEADFUL=yes
10682fi
10683
10684
10685SUPPORT_HEADLESS=yes
10686BUILD_HEADLESS="BUILD_HEADLESS:=true"
10687
10688if test "x$SUPPORT_HEADFUL" = xyes; then
10689    # We are building both headful and headless.
10690    headful_msg="inlude support for both headful and headless"
10691fi
10692
10693if test "x$SUPPORT_HEADFUL" = xno; then
10694    # Thus we are building headless only.
10695    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10696    headful_msg="headless only"
10697fi
10698
10699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10700$as_echo "$headful_msg" >&6; }
10701
10702
10703
10704
10705
10706# Control wether Hotspot runs Queens test after build.
10707# Check whether --enable-hotspot-test-in-build was given.
10708if test "${enable_hotspot_test_in_build+set}" = set; then :
10709  enableval=$enable_hotspot_test_in_build;
10710else
10711  enable_hotspot_test_in_build=no
10712fi
10713
10714if test "x$enable_hotspot_test_in_build" = "xyes"; then
10715    TEST_IN_BUILD=true
10716else
10717    TEST_IN_BUILD=false
10718fi
10719
10720
10721###############################################################################
10722#
10723# Choose cacerts source file
10724#
10725
10726# Check whether --with-cacerts-file was given.
10727if test "${with_cacerts_file+set}" = set; then :
10728  withval=$with_cacerts_file;
10729fi
10730
10731if test "x$with_cacerts_file" != x; then
10732    CACERTS_FILE=$with_cacerts_file
10733else
10734    if test "x$OPENJDK" = "xtrue"; then
10735        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10736    else
10737        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10738    fi
10739fi
10740
10741
10742###############################################################################
10743#
10744# Enable or disable unlimited crypto
10745#
10746# Check whether --enable-unlimited-crypto was given.
10747if test "${enable_unlimited_crypto+set}" = set; then :
10748  enableval=$enable_unlimited_crypto;
10749else
10750  enable_unlimited_crypto=no
10751fi
10752
10753if test "x$enable_unlimited_crypto" = "xyes"; then
10754    UNLIMITED_CRYPTO=true
10755else
10756    UNLIMITED_CRYPTO=false
10757fi
10758
10759
10760###############################################################################
10761#
10762# Compress jars
10763#
10764COMPRESS_JARS=false
10765
10766
10767
10768
10769# Source the version numbers
10770. $AUTOCONF_DIR/version-numbers
10771
10772# Get the settings from parameters
10773
10774# Check whether --with-milestone was given.
10775if test "${with_milestone+set}" = set; then :
10776  withval=$with_milestone;
10777fi
10778
10779if test "x$with_milestone" = xyes; then
10780  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10781elif test "x$with_milestone" != x; then
10782    MILESTONE="$with_milestone"
10783fi
10784if test "x$MILESTONE" = x; then
10785  MILESTONE=internal
10786fi
10787
10788
10789# Check whether --with-build-number was given.
10790if test "${with_build_number+set}" = set; then :
10791  withval=$with_build_number;
10792fi
10793
10794if test "x$with_build_number" = xyes; then
10795  as_fn_error $? "Build number must have a value" "$LINENO" 5
10796elif test "x$with_build_number" != x; then
10797  JDK_BUILD_NUMBER="$with_build_number"
10798fi
10799if test "x$JDK_BUILD_NUMBER" = x; then
10800  JDK_BUILD_NUMBER=b00
10801fi
10802
10803
10804# Check whether --with-user-release-suffix was given.
10805if test "${with_user_release_suffix+set}" = set; then :
10806  withval=$with_user_release_suffix;
10807fi
10808
10809if test "x$with_user_release_suffix" = xyes; then
10810  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10811elif test "x$with_user_release_suffix" != x; then
10812  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10813else
10814  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10815  # Avoid [:alnum:] since it depends on the locale.
10816  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10817  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10818fi
10819
10820
10821# Now set the JDK version, milestone, build number etc.
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836COPYRIGHT_YEAR=`date +'%Y'`
10837
10838
10839if test "x$JDK_UPDATE_VERSION" != x; then
10840  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10841else
10842  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10843fi
10844
10845
10846COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10847
10848
10849
10850###############################################################################
10851#
10852# Setup BootJDK, used to bootstrap the build.
10853#
10854###############################################################################
10855
10856
10857BOOT_JDK_FOUND=no
10858
10859# Check whether --with-boot-jdk was given.
10860if test "${with_boot_jdk+set}" = set; then :
10861  withval=$with_boot_jdk;
10862fi
10863
10864
10865# We look for the Boot JDK through various means, going from more certain to
10866# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10867# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10868# must check if this is indeed valid; otherwise we'll continue looking.
10869
10870# Test: Is bootjdk explicitely set by command line arguments?
10871
10872  if test "x$BOOT_JDK_FOUND" = xno; then
10873    # Now execute the test
10874
10875if test "x$with_boot_jdk" != x; then
10876    BOOT_JDK=$with_boot_jdk
10877    BOOT_JDK_FOUND=maybe
10878    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10879$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10880fi
10881
10882
10883    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10884    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10885      # Do we have a bin/java?
10886      if test ! -x "$BOOT_JDK/bin/java"; then
10887        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10888$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10889        BOOT_JDK_FOUND=no
10890      else
10891        # Do we have a bin/javac?
10892        if test ! -x "$BOOT_JDK/bin/javac"; then
10893          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10894$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10895          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10896$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10897          BOOT_JDK_FOUND=no
10898        else
10899          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10900          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10901            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10903            BOOT_JDK_FOUND=no
10904          else
10905            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10906            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10907
10908            # Extra M4 quote needed to protect [] in grep expression.
10909            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10910            if test "x$FOUND_VERSION_78" = x; then
10911              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10913              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10914$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10915              BOOT_JDK_FOUND=no
10916            else
10917              # We're done! :-)
10918              BOOT_JDK_FOUND=yes
10919
10920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10921
10922  # Input might be given as Windows format, start by converting to
10923  # unix format.
10924  path="$BOOT_JDK"
10925  new_path=`$CYGPATH -u "$path"`
10926
10927  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10928  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10929  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10930  # "foo.exe" is OK but "foo" is an error.
10931  #
10932  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10933  # It is also a way to make sure we got the proper file name for the real test later on.
10934  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10935  if test "x$test_shortpath" = x; then
10936    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10938    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10939  fi
10940
10941  # Call helper function which possibly converts this using DOS-style short mode.
10942  # If so, the updated path is stored in $new_path.
10943
10944  input_path="$new_path"
10945  # Check if we need to convert this using DOS-style short mode. If the path
10946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10947  # take no chances and rewrite it.
10948  # Note: m4 eats our [], so we need to use [ and ] instead.
10949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10950  if test "x$has_forbidden_chars" != x; then
10951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10952    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10953    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10954    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10955      # Going to short mode and back again did indeed matter. Since short mode is
10956      # case insensitive, let's make it lowercase to improve readability.
10957      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10958      # Now convert it back to Unix-stile (cygpath)
10959      input_path=`$CYGPATH -u "$shortmode_path"`
10960      new_path="$input_path"
10961    fi
10962  fi
10963
10964  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10965  if test "x$test_cygdrive_prefix" = x; then
10966    # As a simple fix, exclude /usr/bin since it's not a real path.
10967    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10968      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10969      # a path prefixed by /cygdrive for fixpath to work.
10970      new_path="$CYGWIN_ROOT_PATH$input_path"
10971    fi
10972  fi
10973
10974
10975  if test "x$path" != "x$new_path"; then
10976    BOOT_JDK="$new_path"
10977    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10978$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10979  fi
10980
10981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10982
10983  path="$BOOT_JDK"
10984  has_colon=`$ECHO $path | $GREP ^.:`
10985  new_path="$path"
10986  if test "x$has_colon" = x; then
10987    # Not in mixed or Windows style, start by that.
10988    new_path=`cmd //c echo $path`
10989  fi
10990
10991
10992  input_path="$new_path"
10993  # Check if we need to convert this using DOS-style short mode. If the path
10994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10995  # take no chances and rewrite it.
10996  # Note: m4 eats our [], so we need to use [ and ] instead.
10997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10998  if test "x$has_forbidden_chars" != x; then
10999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11001  fi
11002
11003
11004  windows_path="$new_path"
11005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11006    unix_path=`$CYGPATH -u "$windows_path"`
11007    new_path="$unix_path"
11008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11010    new_path="$unix_path"
11011  fi
11012
11013  if test "x$path" != "x$new_path"; then
11014    BOOT_JDK="$new_path"
11015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11016$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11017  fi
11018
11019  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11020  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11021
11022  else
11023    # We're on a posix platform. Hooray! :)
11024    path="$BOOT_JDK"
11025
11026    if test ! -f "$path" && test ! -d "$path"; then
11027      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11028    fi
11029
11030    has_space=`$ECHO "$path" | $GREP " "`
11031    if test "x$has_space" != x; then
11032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11034      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11035    fi
11036  fi
11037
11038              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11039$as_echo_n "checking for Boot JDK... " >&6; }
11040              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11041$as_echo "$BOOT_JDK" >&6; }
11042              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11043$as_echo_n "checking Boot JDK version... " >&6; }
11044              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11045              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11046$as_echo "$BOOT_JDK_VERSION" >&6; }
11047            fi # end check jdk version
11048          fi # end check rt.jar
11049        fi # end check javac
11050      fi # end check java
11051    fi # end check boot jdk found
11052  fi
11053
11054if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11055  # Having specified an argument which is incorrect will produce an instant failure;
11056  # we should not go on looking
11057  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11058fi
11059
11060# Test: Is bootjdk available from builddeps?
11061
11062  if test "x$BOOT_JDK_FOUND" = xno; then
11063    # Now execute the test
11064
11065
11066
11067    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11068        # Source the builddeps file again, to make sure it uses the latest variables!
11069        . $builddepsfile
11070        # Look for a target and build machine specific resource!
11071        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11072        if test "x$resource" = x; then
11073            # Ok, lets instead look for a target specific resource
11074            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11075        fi
11076        if test "x$resource" = x; then
11077            # Ok, lets instead look for a build specific resource
11078            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11079        fi
11080        if test "x$resource" = x; then
11081            # Ok, lets instead look for a generic resource
11082            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11083            resource=${builddep_bootjdk}
11084        fi
11085        if test "x$resource" != x; then
11086            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11087$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11088	    # If the resource in the builddeps.conf file is an existing directory,
11089	    # for example /java/linux/cups
11090	    if test -d ${resource}; then
11091	       depdir=${resource}
11092	    else
11093
11094# bootjdk is for example mymodule
11095# $resource is for example libs/general/libmymod_1_2_3.zip
11096# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11097# $with_builddeps_dir is for example /localhome/builddeps
11098# depdir is the name of the variable into which we store the depdir, eg MYMOD
11099# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11100# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11101    filename=`basename $resource`
11102    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11103    filebase=${filename%%.*}
11104    extension=${filename#*.}
11105    installdir=$with_builddeps_dir/$filebase
11106    if test ! -f $installdir/$filename.unpacked; then
11107        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11108$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11109        if test ! -d $installdir; then
11110            mkdir -p $installdir
11111        fi
11112        if test ! -d $installdir; then
11113            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11114        fi
11115        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11116        touch $tmpfile
11117        if test ! -f $tmpfile; then
11118            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11119        fi
11120
11121    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11122    # $tmpfile is the local file name for the downloaded file.
11123    VALID_TOOL=no
11124    if test "x$BDEPS_FTP" = xwget; then
11125       VALID_TOOL=yes
11126       wget -O $tmpfile $with_builddeps_server/$resource
11127    fi
11128    if test "x$BDEPS_FTP" = xlftp; then
11129       VALID_TOOL=yes
11130       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11131    fi
11132    if test "x$BDEPS_FTP" = xftp; then
11133        VALID_TOOL=yes
11134        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11135        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11136        FTPUSERPWD=${FTPSERVER%%@*}
11137        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11138            FTPUSER=${userpwd%%:*}
11139            FTPPWD=${userpwd#*@}
11140            FTPSERVER=${FTPSERVER#*@}
11141        else
11142            FTPUSER=ftp
11143            FTPPWD=ftp
11144        fi
11145        # the "pass" command does not work on some
11146        # ftp clients (read ftp.exe) but if it works,
11147        # passive mode is better!
11148        (\
11149            echo "user $FTPUSER $FTPPWD"        ;\
11150            echo "pass"                         ;\
11151            echo "bin"                          ;\
11152            echo "get $FTPPATH $tmpfile"              ;\
11153        ) | ftp -in $FTPSERVER
11154    fi
11155    if test "x$VALID_TOOL" != xyes; then
11156       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11157    fi
11158
11159        mv $tmpfile $installdir/$filename
11160        if test ! -s $installdir/$filename; then
11161            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11162        fi
11163        case "$extension" in
11164            zip)  echo "Unzipping $installdir/$filename..."
11165               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11166            ;;
11167            tar.gz) echo "Untaring $installdir/$filename..."
11168               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11169            ;;
11170            tgz) echo "Untaring $installdir/$filename..."
11171               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11172            ;;
11173            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11174            ;;
11175        esac
11176    fi
11177    if test -f $installdir/$filename.unpacked; then
11178        depdir=$installdir
11179    fi
11180
11181	    fi
11182            # Source the builddeps file again, because in the previous command, the depdir
11183            # was updated to point at the current build dependency install directory.
11184            . $builddepsfile
11185            # Now extract variables from the builddeps.conf files.
11186            theroot=${builddep_bootjdk_ROOT}
11187            thecflags=${builddep_bootjdk_CFLAGS}
11188            thelibs=${builddep_bootjdk_LIBS}
11189            if test "x$depdir" = x; then
11190                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11191            fi
11192            BOOT_JDK=$depdir
11193            if test "x$theroot" != x; then
11194               BOOT_JDK="$theroot"
11195            fi
11196            if test "x$thecflags" != x; then
11197               BOOT_JDK_CFLAGS="$thecflags"
11198            fi
11199            if test "x$thelibs" != x; then
11200               BOOT_JDK_LIBS="$thelibs"
11201            fi
11202            BOOT_JDK_FOUND=maybe
11203            else BOOT_JDK_FOUND=no
11204
11205        fi
11206        else BOOT_JDK_FOUND=no
11207
11208    fi
11209
11210
11211
11212    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11213    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11214      # Do we have a bin/java?
11215      if test ! -x "$BOOT_JDK/bin/java"; then
11216        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11218        BOOT_JDK_FOUND=no
11219      else
11220        # Do we have a bin/javac?
11221        if test ! -x "$BOOT_JDK/bin/javac"; then
11222          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11224          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11225$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11226          BOOT_JDK_FOUND=no
11227        else
11228          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11229          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11230            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11232            BOOT_JDK_FOUND=no
11233          else
11234            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11235            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11236
11237            # Extra M4 quote needed to protect [] in grep expression.
11238            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11239            if test "x$FOUND_VERSION_78" = x; then
11240              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11242              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11243$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11244              BOOT_JDK_FOUND=no
11245            else
11246              # We're done! :-)
11247              BOOT_JDK_FOUND=yes
11248
11249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11250
11251  # Input might be given as Windows format, start by converting to
11252  # unix format.
11253  path="$BOOT_JDK"
11254  new_path=`$CYGPATH -u "$path"`
11255
11256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11259  # "foo.exe" is OK but "foo" is an error.
11260  #
11261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11262  # It is also a way to make sure we got the proper file name for the real test later on.
11263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11264  if test "x$test_shortpath" = x; then
11265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11266$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11267    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11268  fi
11269
11270  # Call helper function which possibly converts this using DOS-style short mode.
11271  # If so, the updated path is stored in $new_path.
11272
11273  input_path="$new_path"
11274  # Check if we need to convert this using DOS-style short mode. If the path
11275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11276  # take no chances and rewrite it.
11277  # Note: m4 eats our [], so we need to use [ and ] instead.
11278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11279  if test "x$has_forbidden_chars" != x; then
11280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11284      # Going to short mode and back again did indeed matter. Since short mode is
11285      # case insensitive, let's make it lowercase to improve readability.
11286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11287      # Now convert it back to Unix-stile (cygpath)
11288      input_path=`$CYGPATH -u "$shortmode_path"`
11289      new_path="$input_path"
11290    fi
11291  fi
11292
11293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11294  if test "x$test_cygdrive_prefix" = x; then
11295    # As a simple fix, exclude /usr/bin since it's not a real path.
11296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11298      # a path prefixed by /cygdrive for fixpath to work.
11299      new_path="$CYGWIN_ROOT_PATH$input_path"
11300    fi
11301  fi
11302
11303
11304  if test "x$path" != "x$new_path"; then
11305    BOOT_JDK="$new_path"
11306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11307$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11308  fi
11309
11310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11311
11312  path="$BOOT_JDK"
11313  has_colon=`$ECHO $path | $GREP ^.:`
11314  new_path="$path"
11315  if test "x$has_colon" = x; then
11316    # Not in mixed or Windows style, start by that.
11317    new_path=`cmd //c echo $path`
11318  fi
11319
11320
11321  input_path="$new_path"
11322  # Check if we need to convert this using DOS-style short mode. If the path
11323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11324  # take no chances and rewrite it.
11325  # Note: m4 eats our [], so we need to use [ and ] instead.
11326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11327  if test "x$has_forbidden_chars" != x; then
11328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11330  fi
11331
11332
11333  windows_path="$new_path"
11334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11335    unix_path=`$CYGPATH -u "$windows_path"`
11336    new_path="$unix_path"
11337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11339    new_path="$unix_path"
11340  fi
11341
11342  if test "x$path" != "x$new_path"; then
11343    BOOT_JDK="$new_path"
11344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11346  fi
11347
11348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11350
11351  else
11352    # We're on a posix platform. Hooray! :)
11353    path="$BOOT_JDK"
11354
11355    if test ! -f "$path" && test ! -d "$path"; then
11356      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11357    fi
11358
11359    has_space=`$ECHO "$path" | $GREP " "`
11360    if test "x$has_space" != x; then
11361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11362$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11363      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11364    fi
11365  fi
11366
11367              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11368$as_echo_n "checking for Boot JDK... " >&6; }
11369              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11370$as_echo "$BOOT_JDK" >&6; }
11371              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11372$as_echo_n "checking Boot JDK version... " >&6; }
11373              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11374              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11375$as_echo "$BOOT_JDK_VERSION" >&6; }
11376            fi # end check jdk version
11377          fi # end check rt.jar
11378        fi # end check javac
11379      fi # end check java
11380    fi # end check boot jdk found
11381  fi
11382
11383
11384# Test: Is $JAVA_HOME set?
11385
11386  if test "x$BOOT_JDK_FOUND" = xno; then
11387    # Now execute the test
11388
11389    if test "x$JAVA_HOME" != x; then
11390        JAVA_HOME_PROCESSED="$JAVA_HOME"
11391
11392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11393
11394  # Input might be given as Windows format, start by converting to
11395  # unix format.
11396  path="$JAVA_HOME_PROCESSED"
11397  new_path=`$CYGPATH -u "$path"`
11398
11399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11402  # "foo.exe" is OK but "foo" is an error.
11403  #
11404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11405  # It is also a way to make sure we got the proper file name for the real test later on.
11406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11407  if test "x$test_shortpath" = x; then
11408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11409$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11410    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11411  fi
11412
11413  # Call helper function which possibly converts this using DOS-style short mode.
11414  # If so, the updated path is stored in $new_path.
11415
11416  input_path="$new_path"
11417  # Check if we need to convert this using DOS-style short mode. If the path
11418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11419  # take no chances and rewrite it.
11420  # Note: m4 eats our [], so we need to use [ and ] instead.
11421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11422  if test "x$has_forbidden_chars" != x; then
11423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11427      # Going to short mode and back again did indeed matter. Since short mode is
11428      # case insensitive, let's make it lowercase to improve readability.
11429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11430      # Now convert it back to Unix-stile (cygpath)
11431      input_path=`$CYGPATH -u "$shortmode_path"`
11432      new_path="$input_path"
11433    fi
11434  fi
11435
11436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11437  if test "x$test_cygdrive_prefix" = x; then
11438    # As a simple fix, exclude /usr/bin since it's not a real path.
11439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11441      # a path prefixed by /cygdrive for fixpath to work.
11442      new_path="$CYGWIN_ROOT_PATH$input_path"
11443    fi
11444  fi
11445
11446
11447  if test "x$path" != "x$new_path"; then
11448    JAVA_HOME_PROCESSED="$new_path"
11449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11450$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11451  fi
11452
11453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11454
11455  path="$JAVA_HOME_PROCESSED"
11456  has_colon=`$ECHO $path | $GREP ^.:`
11457  new_path="$path"
11458  if test "x$has_colon" = x; then
11459    # Not in mixed or Windows style, start by that.
11460    new_path=`cmd //c echo $path`
11461  fi
11462
11463
11464  input_path="$new_path"
11465  # Check if we need to convert this using DOS-style short mode. If the path
11466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11467  # take no chances and rewrite it.
11468  # Note: m4 eats our [], so we need to use [ and ] instead.
11469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11470  if test "x$has_forbidden_chars" != x; then
11471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11473  fi
11474
11475
11476  windows_path="$new_path"
11477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11478    unix_path=`$CYGPATH -u "$windows_path"`
11479    new_path="$unix_path"
11480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11482    new_path="$unix_path"
11483  fi
11484
11485  if test "x$path" != "x$new_path"; then
11486    JAVA_HOME_PROCESSED="$new_path"
11487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11488$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11489  fi
11490
11491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11493
11494  else
11495    # We're on a posix platform. Hooray! :)
11496    path="$JAVA_HOME_PROCESSED"
11497
11498    if test ! -f "$path" && test ! -d "$path"; then
11499      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11500    fi
11501
11502    has_space=`$ECHO "$path" | $GREP " "`
11503    if test "x$has_space" != x; then
11504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11505$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11506      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11507    fi
11508  fi
11509
11510        if test ! -d "$JAVA_HOME_PROCESSED"; then
11511            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11512$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11513        else
11514          # Aha, the user has set a JAVA_HOME
11515          # let us use that as the Boot JDK.
11516          BOOT_JDK="$JAVA_HOME_PROCESSED"
11517          BOOT_JDK_FOUND=maybe
11518          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11519$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11520        fi
11521    fi
11522
11523
11524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11526      # Do we have a bin/java?
11527      if test ! -x "$BOOT_JDK/bin/java"; then
11528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11530        BOOT_JDK_FOUND=no
11531      else
11532        # Do we have a bin/javac?
11533        if test ! -x "$BOOT_JDK/bin/javac"; then
11534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11538          BOOT_JDK_FOUND=no
11539        else
11540          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11541          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11544            BOOT_JDK_FOUND=no
11545          else
11546            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11547            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11548
11549            # Extra M4 quote needed to protect [] in grep expression.
11550            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11551            if test "x$FOUND_VERSION_78" = x; then
11552              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11554              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11555$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11556              BOOT_JDK_FOUND=no
11557            else
11558              # We're done! :-)
11559              BOOT_JDK_FOUND=yes
11560
11561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11562
11563  # Input might be given as Windows format, start by converting to
11564  # unix format.
11565  path="$BOOT_JDK"
11566  new_path=`$CYGPATH -u "$path"`
11567
11568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11571  # "foo.exe" is OK but "foo" is an error.
11572  #
11573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11574  # It is also a way to make sure we got the proper file name for the real test later on.
11575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11576  if test "x$test_shortpath" = x; then
11577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11579    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11580  fi
11581
11582  # Call helper function which possibly converts this using DOS-style short mode.
11583  # If so, the updated path is stored in $new_path.
11584
11585  input_path="$new_path"
11586  # Check if we need to convert this using DOS-style short mode. If the path
11587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11588  # take no chances and rewrite it.
11589  # Note: m4 eats our [], so we need to use [ and ] instead.
11590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11591  if test "x$has_forbidden_chars" != x; then
11592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11596      # Going to short mode and back again did indeed matter. Since short mode is
11597      # case insensitive, let's make it lowercase to improve readability.
11598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11599      # Now convert it back to Unix-stile (cygpath)
11600      input_path=`$CYGPATH -u "$shortmode_path"`
11601      new_path="$input_path"
11602    fi
11603  fi
11604
11605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11606  if test "x$test_cygdrive_prefix" = x; then
11607    # As a simple fix, exclude /usr/bin since it's not a real path.
11608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11610      # a path prefixed by /cygdrive for fixpath to work.
11611      new_path="$CYGWIN_ROOT_PATH$input_path"
11612    fi
11613  fi
11614
11615
11616  if test "x$path" != "x$new_path"; then
11617    BOOT_JDK="$new_path"
11618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11620  fi
11621
11622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11623
11624  path="$BOOT_JDK"
11625  has_colon=`$ECHO $path | $GREP ^.:`
11626  new_path="$path"
11627  if test "x$has_colon" = x; then
11628    # Not in mixed or Windows style, start by that.
11629    new_path=`cmd //c echo $path`
11630  fi
11631
11632
11633  input_path="$new_path"
11634  # Check if we need to convert this using DOS-style short mode. If the path
11635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11636  # take no chances and rewrite it.
11637  # Note: m4 eats our [], so we need to use [ and ] instead.
11638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11639  if test "x$has_forbidden_chars" != x; then
11640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11642  fi
11643
11644
11645  windows_path="$new_path"
11646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11647    unix_path=`$CYGPATH -u "$windows_path"`
11648    new_path="$unix_path"
11649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11651    new_path="$unix_path"
11652  fi
11653
11654  if test "x$path" != "x$new_path"; then
11655    BOOT_JDK="$new_path"
11656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11658  fi
11659
11660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11662
11663  else
11664    # We're on a posix platform. Hooray! :)
11665    path="$BOOT_JDK"
11666
11667    if test ! -f "$path" && test ! -d "$path"; then
11668      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11669    fi
11670
11671    has_space=`$ECHO "$path" | $GREP " "`
11672    if test "x$has_space" != x; then
11673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11674$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11675      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11676    fi
11677  fi
11678
11679              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11680$as_echo_n "checking for Boot JDK... " >&6; }
11681              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11682$as_echo "$BOOT_JDK" >&6; }
11683              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11684$as_echo_n "checking Boot JDK version... " >&6; }
11685              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11686              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11687$as_echo "$BOOT_JDK_VERSION" >&6; }
11688            fi # end check jdk version
11689          fi # end check rt.jar
11690        fi # end check javac
11691      fi # end check java
11692    fi # end check boot jdk found
11693  fi
11694
11695
11696# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11697
11698  if test "x$BOOT_JDK_FOUND" = xno; then
11699    # Now execute the test
11700
11701    if test -x /usr/libexec/java_home; then
11702        BOOT_JDK=`/usr/libexec/java_home`
11703        BOOT_JDK_FOUND=maybe
11704        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11705$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11706    fi
11707
11708
11709    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11710    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11711      # Do we have a bin/java?
11712      if test ! -x "$BOOT_JDK/bin/java"; then
11713        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11715        BOOT_JDK_FOUND=no
11716      else
11717        # Do we have a bin/javac?
11718        if test ! -x "$BOOT_JDK/bin/javac"; then
11719          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11720$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11721          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11722$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11723          BOOT_JDK_FOUND=no
11724        else
11725          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11726          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11727            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11729            BOOT_JDK_FOUND=no
11730          else
11731            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11732            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11733
11734            # Extra M4 quote needed to protect [] in grep expression.
11735            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11736            if test "x$FOUND_VERSION_78" = x; then
11737              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11739              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11740$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11741              BOOT_JDK_FOUND=no
11742            else
11743              # We're done! :-)
11744              BOOT_JDK_FOUND=yes
11745
11746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11747
11748  # Input might be given as Windows format, start by converting to
11749  # unix format.
11750  path="$BOOT_JDK"
11751  new_path=`$CYGPATH -u "$path"`
11752
11753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11756  # "foo.exe" is OK but "foo" is an error.
11757  #
11758  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11759  # It is also a way to make sure we got the proper file name for the real test later on.
11760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11761  if test "x$test_shortpath" = x; then
11762    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11763$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11764    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11765  fi
11766
11767  # Call helper function which possibly converts this using DOS-style short mode.
11768  # If so, the updated path is stored in $new_path.
11769
11770  input_path="$new_path"
11771  # Check if we need to convert this using DOS-style short mode. If the path
11772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11773  # take no chances and rewrite it.
11774  # Note: m4 eats our [], so we need to use [ and ] instead.
11775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11776  if test "x$has_forbidden_chars" != x; then
11777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11781      # Going to short mode and back again did indeed matter. Since short mode is
11782      # case insensitive, let's make it lowercase to improve readability.
11783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11784      # Now convert it back to Unix-stile (cygpath)
11785      input_path=`$CYGPATH -u "$shortmode_path"`
11786      new_path="$input_path"
11787    fi
11788  fi
11789
11790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11791  if test "x$test_cygdrive_prefix" = x; then
11792    # As a simple fix, exclude /usr/bin since it's not a real path.
11793    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11795      # a path prefixed by /cygdrive for fixpath to work.
11796      new_path="$CYGWIN_ROOT_PATH$input_path"
11797    fi
11798  fi
11799
11800
11801  if test "x$path" != "x$new_path"; then
11802    BOOT_JDK="$new_path"
11803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11805  fi
11806
11807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11808
11809  path="$BOOT_JDK"
11810  has_colon=`$ECHO $path | $GREP ^.:`
11811  new_path="$path"
11812  if test "x$has_colon" = x; then
11813    # Not in mixed or Windows style, start by that.
11814    new_path=`cmd //c echo $path`
11815  fi
11816
11817
11818  input_path="$new_path"
11819  # Check if we need to convert this using DOS-style short mode. If the path
11820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11821  # take no chances and rewrite it.
11822  # Note: m4 eats our [], so we need to use [ and ] instead.
11823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11824  if test "x$has_forbidden_chars" != x; then
11825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11827  fi
11828
11829
11830  windows_path="$new_path"
11831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11832    unix_path=`$CYGPATH -u "$windows_path"`
11833    new_path="$unix_path"
11834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11836    new_path="$unix_path"
11837  fi
11838
11839  if test "x$path" != "x$new_path"; then
11840    BOOT_JDK="$new_path"
11841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11843  fi
11844
11845  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11846  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11847
11848  else
11849    # We're on a posix platform. Hooray! :)
11850    path="$BOOT_JDK"
11851
11852    if test ! -f "$path" && test ! -d "$path"; then
11853      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11854    fi
11855
11856    has_space=`$ECHO "$path" | $GREP " "`
11857    if test "x$has_space" != x; then
11858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11860      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11861    fi
11862  fi
11863
11864              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11865$as_echo_n "checking for Boot JDK... " >&6; }
11866              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11867$as_echo "$BOOT_JDK" >&6; }
11868              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11869$as_echo_n "checking Boot JDK version... " >&6; }
11870              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11871              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11872$as_echo "$BOOT_JDK_VERSION" >&6; }
11873            fi # end check jdk version
11874          fi # end check rt.jar
11875        fi # end check javac
11876      fi # end check java
11877    fi # end check boot jdk found
11878  fi
11879
11880
11881# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11882
11883  if test "x$BOOT_JDK_FOUND" = xno; then
11884    # Now execute the test
11885
11886    # Extract the first word of "javac", so it can be a program name with args.
11887set dummy javac; ac_word=$2
11888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11889$as_echo_n "checking for $ac_word... " >&6; }
11890if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11891  $as_echo_n "(cached) " >&6
11892else
11893  case $JAVAC_CHECK in
11894  [\\/]* | ?:[\\/]*)
11895  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11896  ;;
11897  *)
11898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11899for as_dir in $PATH
11900do
11901  IFS=$as_save_IFS
11902  test -z "$as_dir" && as_dir=.
11903    for ac_exec_ext in '' $ac_executable_extensions; do
11904  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11905    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11907    break 2
11908  fi
11909done
11910  done
11911IFS=$as_save_IFS
11912
11913  ;;
11914esac
11915fi
11916JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11917if test -n "$JAVAC_CHECK"; then
11918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11919$as_echo "$JAVAC_CHECK" >&6; }
11920else
11921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11922$as_echo "no" >&6; }
11923fi
11924
11925
11926    # Extract the first word of "java", so it can be a program name with args.
11927set dummy java; ac_word=$2
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11929$as_echo_n "checking for $ac_word... " >&6; }
11930if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11931  $as_echo_n "(cached) " >&6
11932else
11933  case $JAVA_CHECK in
11934  [\\/]* | ?:[\\/]*)
11935  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11936  ;;
11937  *)
11938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11939for as_dir in $PATH
11940do
11941  IFS=$as_save_IFS
11942  test -z "$as_dir" && as_dir=.
11943    for ac_exec_ext in '' $ac_executable_extensions; do
11944  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11945    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11947    break 2
11948  fi
11949done
11950  done
11951IFS=$as_save_IFS
11952
11953  ;;
11954esac
11955fi
11956JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11957if test -n "$JAVA_CHECK"; then
11958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11959$as_echo "$JAVA_CHECK" >&6; }
11960else
11961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11962$as_echo "no" >&6; }
11963fi
11964
11965
11966    BINARY="$JAVAC_CHECK"
11967    if test "x$JAVAC_CHECK" = x; then
11968        BINARY="$JAVA_CHECK"
11969    fi
11970    if test "x$BINARY" != x; then
11971        # So there is a java(c) binary, it might be part of a JDK.
11972        # Lets find the JDK/JRE directory by following symbolic links.
11973        # Linux/GNU systems often have links from /usr/bin/java to
11974        # /etc/alternatives/java to the real JDK binary.
11975
11976    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11977        # Follow a chain of symbolic links. Use readlink
11978        # where it exists, else fall back to horribly
11979        # complicated shell code.
11980        if test "x$READLINK_TESTED" != yes; then
11981            # On MacOSX there is a readlink tool with a different
11982            # purpose than the GNU readlink tool. Check the found readlink.
11983            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11984            if test "x$ISGNU" = x; then
11985                 # A readlink that we do not know how to use.
11986                 # Are there other non-GNU readlinks out there?
11987                 READLINK_TESTED=yes
11988                 READLINK=
11989            fi
11990        fi
11991
11992        if test "x$READLINK" != x; then
11993            BINARY=`$READLINK -f $BINARY`
11994        else
11995            # Save the current directory for restoring afterwards
11996            STARTDIR=$PWD
11997            COUNTER=0
11998            sym_link_dir=`$DIRNAME $BINARY`
11999            sym_link_file=`$BASENAME $BINARY`
12000            # Use the system pwd and not the shell builtin to resolve directory symlinks
12001            cd $sym_link_dir
12002            cd `$THEPWDCMD`
12003            sym_link_dir=`$THEPWDCMD`
12004            # Resolve file symlinks
12005            while test $COUNTER -lt 20; do
12006                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12007                if test "x$ISLINK" == x; then
12008                    # This is not a symbolic link! We are done!
12009                    break
12010                fi
12011                # Again resolve directory symlinks since the target of the just found
12012                # link could be in a different directory
12013                cd `$DIRNAME $ISLINK`
12014                sym_link_dir=`$THEPWDCMD`
12015                sym_link_file=`$BASENAME $ISLINK`
12016                let COUNTER=COUNTER+1
12017            done
12018            cd $STARTDIR
12019            BINARY=$sym_link_dir/$sym_link_file
12020        fi
12021    fi
12022
12023        BOOT_JDK=`dirname "$BINARY"`
12024        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12025        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12026            # Looks like we found ourselves an JDK
12027            BOOT_JDK_FOUND=maybe
12028            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12029$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12030        fi
12031    fi
12032
12033
12034    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12035    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12036      # Do we have a bin/java?
12037      if test ! -x "$BOOT_JDK/bin/java"; then
12038        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12040        BOOT_JDK_FOUND=no
12041      else
12042        # Do we have a bin/javac?
12043        if test ! -x "$BOOT_JDK/bin/javac"; then
12044          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12045$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12046          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12047$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12048          BOOT_JDK_FOUND=no
12049        else
12050          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12051          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12052            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12053$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12054            BOOT_JDK_FOUND=no
12055          else
12056            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12057            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12058
12059            # Extra M4 quote needed to protect [] in grep expression.
12060            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12061            if test "x$FOUND_VERSION_78" = x; then
12062              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12063$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12064              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12065$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12066              BOOT_JDK_FOUND=no
12067            else
12068              # We're done! :-)
12069              BOOT_JDK_FOUND=yes
12070
12071  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12072
12073  # Input might be given as Windows format, start by converting to
12074  # unix format.
12075  path="$BOOT_JDK"
12076  new_path=`$CYGPATH -u "$path"`
12077
12078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12081  # "foo.exe" is OK but "foo" is an error.
12082  #
12083  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12084  # It is also a way to make sure we got the proper file name for the real test later on.
12085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12086  if test "x$test_shortpath" = x; then
12087    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12088$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12089    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12090  fi
12091
12092  # Call helper function which possibly converts this using DOS-style short mode.
12093  # If so, the updated path is stored in $new_path.
12094
12095  input_path="$new_path"
12096  # Check if we need to convert this using DOS-style short mode. If the path
12097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12098  # take no chances and rewrite it.
12099  # Note: m4 eats our [], so we need to use [ and ] instead.
12100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12101  if test "x$has_forbidden_chars" != x; then
12102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12106      # Going to short mode and back again did indeed matter. Since short mode is
12107      # case insensitive, let's make it lowercase to improve readability.
12108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12109      # Now convert it back to Unix-stile (cygpath)
12110      input_path=`$CYGPATH -u "$shortmode_path"`
12111      new_path="$input_path"
12112    fi
12113  fi
12114
12115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12116  if test "x$test_cygdrive_prefix" = x; then
12117    # As a simple fix, exclude /usr/bin since it's not a real path.
12118    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12120      # a path prefixed by /cygdrive for fixpath to work.
12121      new_path="$CYGWIN_ROOT_PATH$input_path"
12122    fi
12123  fi
12124
12125
12126  if test "x$path" != "x$new_path"; then
12127    BOOT_JDK="$new_path"
12128    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12129$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12130  fi
12131
12132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12133
12134  path="$BOOT_JDK"
12135  has_colon=`$ECHO $path | $GREP ^.:`
12136  new_path="$path"
12137  if test "x$has_colon" = x; then
12138    # Not in mixed or Windows style, start by that.
12139    new_path=`cmd //c echo $path`
12140  fi
12141
12142
12143  input_path="$new_path"
12144  # Check if we need to convert this using DOS-style short mode. If the path
12145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12146  # take no chances and rewrite it.
12147  # Note: m4 eats our [], so we need to use [ and ] instead.
12148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12149  if test "x$has_forbidden_chars" != x; then
12150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12151    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12152  fi
12153
12154
12155  windows_path="$new_path"
12156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12157    unix_path=`$CYGPATH -u "$windows_path"`
12158    new_path="$unix_path"
12159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12161    new_path="$unix_path"
12162  fi
12163
12164  if test "x$path" != "x$new_path"; then
12165    BOOT_JDK="$new_path"
12166    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12167$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12168  fi
12169
12170  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12171  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12172
12173  else
12174    # We're on a posix platform. Hooray! :)
12175    path="$BOOT_JDK"
12176
12177    if test ! -f "$path" && test ! -d "$path"; then
12178      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12179    fi
12180
12181    has_space=`$ECHO "$path" | $GREP " "`
12182    if test "x$has_space" != x; then
12183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12184$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12185      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12186    fi
12187  fi
12188
12189              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12190$as_echo_n "checking for Boot JDK... " >&6; }
12191              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12192$as_echo "$BOOT_JDK" >&6; }
12193              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12194$as_echo_n "checking Boot JDK version... " >&6; }
12195              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12196              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12197$as_echo "$BOOT_JDK_VERSION" >&6; }
12198            fi # end check jdk version
12199          fi # end check rt.jar
12200        fi # end check javac
12201      fi # end check java
12202    fi # end check boot jdk found
12203  fi
12204
12205
12206# Test: Is there a JDK installed in default, well-known locations?
12207
12208  if test "x$BOOT_JDK_FOUND" = xno; then
12209    # Now execute the test
12210
12211  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12212
12213  if test "x$BOOT_JDK_FOUND" = xno; then
12214    # Now execute the test
12215
12216  if test "x$ProgramW6432" != x; then
12217    VIRTUAL_DIR="$ProgramW6432/Java"
12218
12219  windows_path="$VIRTUAL_DIR"
12220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12221    unix_path=`$CYGPATH -u "$windows_path"`
12222    VIRTUAL_DIR="$unix_path"
12223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12225    VIRTUAL_DIR="$unix_path"
12226  fi
12227
12228
12229  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12230  BOOT_JDK_SUFFIX=""
12231  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12232  if test "x$ALL_JDKS_FOUND" != x; then
12233    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12234
12235  if test "x$BOOT_JDK_FOUND" = xno; then
12236    # Now execute the test
12237
12238        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12239        if test -d "$BOOT_JDK"; then
12240          BOOT_JDK_FOUND=maybe
12241          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12242$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12243        fi
12244
12245
12246    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12247    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12248      # Do we have a bin/java?
12249      if test ! -x "$BOOT_JDK/bin/java"; then
12250        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12252        BOOT_JDK_FOUND=no
12253      else
12254        # Do we have a bin/javac?
12255        if test ! -x "$BOOT_JDK/bin/javac"; then
12256          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12258          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12259$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12260          BOOT_JDK_FOUND=no
12261        else
12262          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12263          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12264            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12265$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12266            BOOT_JDK_FOUND=no
12267          else
12268            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12269            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12270
12271            # Extra M4 quote needed to protect [] in grep expression.
12272            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12273            if test "x$FOUND_VERSION_78" = x; then
12274              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12276              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12277$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12278              BOOT_JDK_FOUND=no
12279            else
12280              # We're done! :-)
12281              BOOT_JDK_FOUND=yes
12282
12283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12284
12285  # Input might be given as Windows format, start by converting to
12286  # unix format.
12287  path="$BOOT_JDK"
12288  new_path=`$CYGPATH -u "$path"`
12289
12290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12293  # "foo.exe" is OK but "foo" is an error.
12294  #
12295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12296  # It is also a way to make sure we got the proper file name for the real test later on.
12297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12298  if test "x$test_shortpath" = x; then
12299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12300$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12301    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12302  fi
12303
12304  # Call helper function which possibly converts this using DOS-style short mode.
12305  # If so, the updated path is stored in $new_path.
12306
12307  input_path="$new_path"
12308  # Check if we need to convert this using DOS-style short mode. If the path
12309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12310  # take no chances and rewrite it.
12311  # Note: m4 eats our [], so we need to use [ and ] instead.
12312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12313  if test "x$has_forbidden_chars" != x; then
12314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12318      # Going to short mode and back again did indeed matter. Since short mode is
12319      # case insensitive, let's make it lowercase to improve readability.
12320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12321      # Now convert it back to Unix-stile (cygpath)
12322      input_path=`$CYGPATH -u "$shortmode_path"`
12323      new_path="$input_path"
12324    fi
12325  fi
12326
12327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12328  if test "x$test_cygdrive_prefix" = x; then
12329    # As a simple fix, exclude /usr/bin since it's not a real path.
12330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12332      # a path prefixed by /cygdrive for fixpath to work.
12333      new_path="$CYGWIN_ROOT_PATH$input_path"
12334    fi
12335  fi
12336
12337
12338  if test "x$path" != "x$new_path"; then
12339    BOOT_JDK="$new_path"
12340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12341$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12342  fi
12343
12344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12345
12346  path="$BOOT_JDK"
12347  has_colon=`$ECHO $path | $GREP ^.:`
12348  new_path="$path"
12349  if test "x$has_colon" = x; then
12350    # Not in mixed or Windows style, start by that.
12351    new_path=`cmd //c echo $path`
12352  fi
12353
12354
12355  input_path="$new_path"
12356  # Check if we need to convert this using DOS-style short mode. If the path
12357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12358  # take no chances and rewrite it.
12359  # Note: m4 eats our [], so we need to use [ and ] instead.
12360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12361  if test "x$has_forbidden_chars" != x; then
12362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12364  fi
12365
12366
12367  windows_path="$new_path"
12368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12369    unix_path=`$CYGPATH -u "$windows_path"`
12370    new_path="$unix_path"
12371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12373    new_path="$unix_path"
12374  fi
12375
12376  if test "x$path" != "x$new_path"; then
12377    BOOT_JDK="$new_path"
12378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12379$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12380  fi
12381
12382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12384
12385  else
12386    # We're on a posix platform. Hooray! :)
12387    path="$BOOT_JDK"
12388
12389    if test ! -f "$path" && test ! -d "$path"; then
12390      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12391    fi
12392
12393    has_space=`$ECHO "$path" | $GREP " "`
12394    if test "x$has_space" != x; then
12395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12396$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12397      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12398    fi
12399  fi
12400
12401              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12402$as_echo_n "checking for Boot JDK... " >&6; }
12403              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12404$as_echo "$BOOT_JDK" >&6; }
12405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12406$as_echo_n "checking Boot JDK version... " >&6; }
12407              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12408              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12409$as_echo "$BOOT_JDK_VERSION" >&6; }
12410            fi # end check jdk version
12411          fi # end check rt.jar
12412        fi # end check javac
12413      fi # end check java
12414    fi # end check boot jdk found
12415  fi
12416
12417    done
12418  fi
12419
12420  fi
12421
12422
12423    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12424    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12425      # Do we have a bin/java?
12426      if test ! -x "$BOOT_JDK/bin/java"; then
12427        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12429        BOOT_JDK_FOUND=no
12430      else
12431        # Do we have a bin/javac?
12432        if test ! -x "$BOOT_JDK/bin/javac"; then
12433          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12435          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12436$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12437          BOOT_JDK_FOUND=no
12438        else
12439          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12440          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12441            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12442$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12443            BOOT_JDK_FOUND=no
12444          else
12445            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12446            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12447
12448            # Extra M4 quote needed to protect [] in grep expression.
12449            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12450            if test "x$FOUND_VERSION_78" = x; then
12451              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12453              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12454$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12455              BOOT_JDK_FOUND=no
12456            else
12457              # We're done! :-)
12458              BOOT_JDK_FOUND=yes
12459
12460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12461
12462  # Input might be given as Windows format, start by converting to
12463  # unix format.
12464  path="$BOOT_JDK"
12465  new_path=`$CYGPATH -u "$path"`
12466
12467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12470  # "foo.exe" is OK but "foo" is an error.
12471  #
12472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12473  # It is also a way to make sure we got the proper file name for the real test later on.
12474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12475  if test "x$test_shortpath" = x; then
12476    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12477$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12478    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12479  fi
12480
12481  # Call helper function which possibly converts this using DOS-style short mode.
12482  # If so, the updated path is stored in $new_path.
12483
12484  input_path="$new_path"
12485  # Check if we need to convert this using DOS-style short mode. If the path
12486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12487  # take no chances and rewrite it.
12488  # Note: m4 eats our [], so we need to use [ and ] instead.
12489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12490  if test "x$has_forbidden_chars" != x; then
12491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12495      # Going to short mode and back again did indeed matter. Since short mode is
12496      # case insensitive, let's make it lowercase to improve readability.
12497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12498      # Now convert it back to Unix-stile (cygpath)
12499      input_path=`$CYGPATH -u "$shortmode_path"`
12500      new_path="$input_path"
12501    fi
12502  fi
12503
12504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12505  if test "x$test_cygdrive_prefix" = x; then
12506    # As a simple fix, exclude /usr/bin since it's not a real path.
12507    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12509      # a path prefixed by /cygdrive for fixpath to work.
12510      new_path="$CYGWIN_ROOT_PATH$input_path"
12511    fi
12512  fi
12513
12514
12515  if test "x$path" != "x$new_path"; then
12516    BOOT_JDK="$new_path"
12517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12518$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12519  fi
12520
12521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12522
12523  path="$BOOT_JDK"
12524  has_colon=`$ECHO $path | $GREP ^.:`
12525  new_path="$path"
12526  if test "x$has_colon" = x; then
12527    # Not in mixed or Windows style, start by that.
12528    new_path=`cmd //c echo $path`
12529  fi
12530
12531
12532  input_path="$new_path"
12533  # Check if we need to convert this using DOS-style short mode. If the path
12534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12535  # take no chances and rewrite it.
12536  # Note: m4 eats our [], so we need to use [ and ] instead.
12537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12538  if test "x$has_forbidden_chars" != x; then
12539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12541  fi
12542
12543
12544  windows_path="$new_path"
12545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12546    unix_path=`$CYGPATH -u "$windows_path"`
12547    new_path="$unix_path"
12548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12550    new_path="$unix_path"
12551  fi
12552
12553  if test "x$path" != "x$new_path"; then
12554    BOOT_JDK="$new_path"
12555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12556$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12557  fi
12558
12559  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12560  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12561
12562  else
12563    # We're on a posix platform. Hooray! :)
12564    path="$BOOT_JDK"
12565
12566    if test ! -f "$path" && test ! -d "$path"; then
12567      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12568    fi
12569
12570    has_space=`$ECHO "$path" | $GREP " "`
12571    if test "x$has_space" != x; then
12572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12573$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12574      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12575    fi
12576  fi
12577
12578              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12579$as_echo_n "checking for Boot JDK... " >&6; }
12580              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12581$as_echo "$BOOT_JDK" >&6; }
12582              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12583$as_echo_n "checking Boot JDK version... " >&6; }
12584              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12585              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12586$as_echo "$BOOT_JDK_VERSION" >&6; }
12587            fi # end check jdk version
12588          fi # end check rt.jar
12589        fi # end check javac
12590      fi # end check java
12591    fi # end check boot jdk found
12592  fi
12593
12594
12595  if test "x$BOOT_JDK_FOUND" = xno; then
12596    # Now execute the test
12597
12598  if test "x$PROGRAMW6432" != x; then
12599    VIRTUAL_DIR="$PROGRAMW6432/Java"
12600
12601  windows_path="$VIRTUAL_DIR"
12602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12603    unix_path=`$CYGPATH -u "$windows_path"`
12604    VIRTUAL_DIR="$unix_path"
12605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12607    VIRTUAL_DIR="$unix_path"
12608  fi
12609
12610
12611  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12612  BOOT_JDK_SUFFIX=""
12613  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12614  if test "x$ALL_JDKS_FOUND" != x; then
12615    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12616
12617  if test "x$BOOT_JDK_FOUND" = xno; then
12618    # Now execute the test
12619
12620        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12621        if test -d "$BOOT_JDK"; then
12622          BOOT_JDK_FOUND=maybe
12623          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12624$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12625        fi
12626
12627
12628    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12629    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12630      # Do we have a bin/java?
12631      if test ! -x "$BOOT_JDK/bin/java"; then
12632        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12633$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12634        BOOT_JDK_FOUND=no
12635      else
12636        # Do we have a bin/javac?
12637        if test ! -x "$BOOT_JDK/bin/javac"; then
12638          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12640          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12641$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12642          BOOT_JDK_FOUND=no
12643        else
12644          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12645          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12646            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12647$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12648            BOOT_JDK_FOUND=no
12649          else
12650            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12651            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12652
12653            # Extra M4 quote needed to protect [] in grep expression.
12654            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12655            if test "x$FOUND_VERSION_78" = x; then
12656              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12657$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12658              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12659$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12660              BOOT_JDK_FOUND=no
12661            else
12662              # We're done! :-)
12663              BOOT_JDK_FOUND=yes
12664
12665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12666
12667  # Input might be given as Windows format, start by converting to
12668  # unix format.
12669  path="$BOOT_JDK"
12670  new_path=`$CYGPATH -u "$path"`
12671
12672  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12673  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12674  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12675  # "foo.exe" is OK but "foo" is an error.
12676  #
12677  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12678  # It is also a way to make sure we got the proper file name for the real test later on.
12679  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12680  if test "x$test_shortpath" = x; then
12681    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12682$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12683    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12684  fi
12685
12686  # Call helper function which possibly converts this using DOS-style short mode.
12687  # If so, the updated path is stored in $new_path.
12688
12689  input_path="$new_path"
12690  # Check if we need to convert this using DOS-style short mode. If the path
12691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12692  # take no chances and rewrite it.
12693  # Note: m4 eats our [], so we need to use [ and ] instead.
12694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12695  if test "x$has_forbidden_chars" != x; then
12696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12697    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12698    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12699    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12700      # Going to short mode and back again did indeed matter. Since short mode is
12701      # case insensitive, let's make it lowercase to improve readability.
12702      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12703      # Now convert it back to Unix-stile (cygpath)
12704      input_path=`$CYGPATH -u "$shortmode_path"`
12705      new_path="$input_path"
12706    fi
12707  fi
12708
12709  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12710  if test "x$test_cygdrive_prefix" = x; then
12711    # As a simple fix, exclude /usr/bin since it's not a real path.
12712    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12713      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12714      # a path prefixed by /cygdrive for fixpath to work.
12715      new_path="$CYGWIN_ROOT_PATH$input_path"
12716    fi
12717  fi
12718
12719
12720  if test "x$path" != "x$new_path"; then
12721    BOOT_JDK="$new_path"
12722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12724  fi
12725
12726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12727
12728  path="$BOOT_JDK"
12729  has_colon=`$ECHO $path | $GREP ^.:`
12730  new_path="$path"
12731  if test "x$has_colon" = x; then
12732    # Not in mixed or Windows style, start by that.
12733    new_path=`cmd //c echo $path`
12734  fi
12735
12736
12737  input_path="$new_path"
12738  # Check if we need to convert this using DOS-style short mode. If the path
12739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12740  # take no chances and rewrite it.
12741  # Note: m4 eats our [], so we need to use [ and ] instead.
12742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12743  if test "x$has_forbidden_chars" != x; then
12744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12745    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12746  fi
12747
12748
12749  windows_path="$new_path"
12750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12751    unix_path=`$CYGPATH -u "$windows_path"`
12752    new_path="$unix_path"
12753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12755    new_path="$unix_path"
12756  fi
12757
12758  if test "x$path" != "x$new_path"; then
12759    BOOT_JDK="$new_path"
12760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12761$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12762  fi
12763
12764  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12765  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12766
12767  else
12768    # We're on a posix platform. Hooray! :)
12769    path="$BOOT_JDK"
12770
12771    if test ! -f "$path" && test ! -d "$path"; then
12772      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12773    fi
12774
12775    has_space=`$ECHO "$path" | $GREP " "`
12776    if test "x$has_space" != x; then
12777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12779      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12780    fi
12781  fi
12782
12783              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12784$as_echo_n "checking for Boot JDK... " >&6; }
12785              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12786$as_echo "$BOOT_JDK" >&6; }
12787              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12788$as_echo_n "checking Boot JDK version... " >&6; }
12789              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12790              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12791$as_echo "$BOOT_JDK_VERSION" >&6; }
12792            fi # end check jdk version
12793          fi # end check rt.jar
12794        fi # end check javac
12795      fi # end check java
12796    fi # end check boot jdk found
12797  fi
12798
12799    done
12800  fi
12801
12802  fi
12803
12804
12805    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12806    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12807      # Do we have a bin/java?
12808      if test ! -x "$BOOT_JDK/bin/java"; then
12809        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12811        BOOT_JDK_FOUND=no
12812      else
12813        # Do we have a bin/javac?
12814        if test ! -x "$BOOT_JDK/bin/javac"; then
12815          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12817          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12818$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12819          BOOT_JDK_FOUND=no
12820        else
12821          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12822          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12825            BOOT_JDK_FOUND=no
12826          else
12827            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12828            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12829
12830            # Extra M4 quote needed to protect [] in grep expression.
12831            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12832            if test "x$FOUND_VERSION_78" = x; then
12833              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12835              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12836$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12837              BOOT_JDK_FOUND=no
12838            else
12839              # We're done! :-)
12840              BOOT_JDK_FOUND=yes
12841
12842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12843
12844  # Input might be given as Windows format, start by converting to
12845  # unix format.
12846  path="$BOOT_JDK"
12847  new_path=`$CYGPATH -u "$path"`
12848
12849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12852  # "foo.exe" is OK but "foo" is an error.
12853  #
12854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12855  # It is also a way to make sure we got the proper file name for the real test later on.
12856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12857  if test "x$test_shortpath" = x; then
12858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12860    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12861  fi
12862
12863  # Call helper function which possibly converts this using DOS-style short mode.
12864  # If so, the updated path is stored in $new_path.
12865
12866  input_path="$new_path"
12867  # Check if we need to convert this using DOS-style short mode. If the path
12868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12869  # take no chances and rewrite it.
12870  # Note: m4 eats our [], so we need to use [ and ] instead.
12871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12872  if test "x$has_forbidden_chars" != x; then
12873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12877      # Going to short mode and back again did indeed matter. Since short mode is
12878      # case insensitive, let's make it lowercase to improve readability.
12879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12880      # Now convert it back to Unix-stile (cygpath)
12881      input_path=`$CYGPATH -u "$shortmode_path"`
12882      new_path="$input_path"
12883    fi
12884  fi
12885
12886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12887  if test "x$test_cygdrive_prefix" = x; then
12888    # As a simple fix, exclude /usr/bin since it's not a real path.
12889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12891      # a path prefixed by /cygdrive for fixpath to work.
12892      new_path="$CYGWIN_ROOT_PATH$input_path"
12893    fi
12894  fi
12895
12896
12897  if test "x$path" != "x$new_path"; then
12898    BOOT_JDK="$new_path"
12899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12900$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12901  fi
12902
12903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12904
12905  path="$BOOT_JDK"
12906  has_colon=`$ECHO $path | $GREP ^.:`
12907  new_path="$path"
12908  if test "x$has_colon" = x; then
12909    # Not in mixed or Windows style, start by that.
12910    new_path=`cmd //c echo $path`
12911  fi
12912
12913
12914  input_path="$new_path"
12915  # Check if we need to convert this using DOS-style short mode. If the path
12916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12917  # take no chances and rewrite it.
12918  # Note: m4 eats our [], so we need to use [ and ] instead.
12919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12920  if test "x$has_forbidden_chars" != x; then
12921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12923  fi
12924
12925
12926  windows_path="$new_path"
12927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12928    unix_path=`$CYGPATH -u "$windows_path"`
12929    new_path="$unix_path"
12930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12932    new_path="$unix_path"
12933  fi
12934
12935  if test "x$path" != "x$new_path"; then
12936    BOOT_JDK="$new_path"
12937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12938$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12939  fi
12940
12941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12943
12944  else
12945    # We're on a posix platform. Hooray! :)
12946    path="$BOOT_JDK"
12947
12948    if test ! -f "$path" && test ! -d "$path"; then
12949      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12950    fi
12951
12952    has_space=`$ECHO "$path" | $GREP " "`
12953    if test "x$has_space" != x; then
12954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12956      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12957    fi
12958  fi
12959
12960              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12961$as_echo_n "checking for Boot JDK... " >&6; }
12962              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12963$as_echo "$BOOT_JDK" >&6; }
12964              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12965$as_echo_n "checking Boot JDK version... " >&6; }
12966              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12967              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12968$as_echo "$BOOT_JDK_VERSION" >&6; }
12969            fi # end check jdk version
12970          fi # end check rt.jar
12971        fi # end check javac
12972      fi # end check java
12973    fi # end check boot jdk found
12974  fi
12975
12976
12977  if test "x$BOOT_JDK_FOUND" = xno; then
12978    # Now execute the test
12979
12980  if test "x$PROGRAMFILES" != x; then
12981    VIRTUAL_DIR="$PROGRAMFILES/Java"
12982
12983  windows_path="$VIRTUAL_DIR"
12984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12985    unix_path=`$CYGPATH -u "$windows_path"`
12986    VIRTUAL_DIR="$unix_path"
12987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12989    VIRTUAL_DIR="$unix_path"
12990  fi
12991
12992
12993  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12994  BOOT_JDK_SUFFIX=""
12995  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12996  if test "x$ALL_JDKS_FOUND" != x; then
12997    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12998
12999  if test "x$BOOT_JDK_FOUND" = xno; then
13000    # Now execute the test
13001
13002        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13003        if test -d "$BOOT_JDK"; then
13004          BOOT_JDK_FOUND=maybe
13005          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13006$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13007        fi
13008
13009
13010    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13011    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13012      # Do we have a bin/java?
13013      if test ! -x "$BOOT_JDK/bin/java"; then
13014        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13015$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13016        BOOT_JDK_FOUND=no
13017      else
13018        # Do we have a bin/javac?
13019        if test ! -x "$BOOT_JDK/bin/javac"; then
13020          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13022          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13023$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13024          BOOT_JDK_FOUND=no
13025        else
13026          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13027          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13028            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13030            BOOT_JDK_FOUND=no
13031          else
13032            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13033            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13034
13035            # Extra M4 quote needed to protect [] in grep expression.
13036            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13037            if test "x$FOUND_VERSION_78" = x; then
13038              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13040              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13041$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13042              BOOT_JDK_FOUND=no
13043            else
13044              # We're done! :-)
13045              BOOT_JDK_FOUND=yes
13046
13047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13048
13049  # Input might be given as Windows format, start by converting to
13050  # unix format.
13051  path="$BOOT_JDK"
13052  new_path=`$CYGPATH -u "$path"`
13053
13054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13057  # "foo.exe" is OK but "foo" is an error.
13058  #
13059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13060  # It is also a way to make sure we got the proper file name for the real test later on.
13061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13062  if test "x$test_shortpath" = x; then
13063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13065    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13066  fi
13067
13068  # Call helper function which possibly converts this using DOS-style short mode.
13069  # If so, the updated path is stored in $new_path.
13070
13071  input_path="$new_path"
13072  # Check if we need to convert this using DOS-style short mode. If the path
13073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13074  # take no chances and rewrite it.
13075  # Note: m4 eats our [], so we need to use [ and ] instead.
13076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13077  if test "x$has_forbidden_chars" != x; then
13078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13082      # Going to short mode and back again did indeed matter. Since short mode is
13083      # case insensitive, let's make it lowercase to improve readability.
13084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13085      # Now convert it back to Unix-stile (cygpath)
13086      input_path=`$CYGPATH -u "$shortmode_path"`
13087      new_path="$input_path"
13088    fi
13089  fi
13090
13091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13092  if test "x$test_cygdrive_prefix" = x; then
13093    # As a simple fix, exclude /usr/bin since it's not a real path.
13094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13096      # a path prefixed by /cygdrive for fixpath to work.
13097      new_path="$CYGWIN_ROOT_PATH$input_path"
13098    fi
13099  fi
13100
13101
13102  if test "x$path" != "x$new_path"; then
13103    BOOT_JDK="$new_path"
13104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13106  fi
13107
13108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13109
13110  path="$BOOT_JDK"
13111  has_colon=`$ECHO $path | $GREP ^.:`
13112  new_path="$path"
13113  if test "x$has_colon" = x; then
13114    # Not in mixed or Windows style, start by that.
13115    new_path=`cmd //c echo $path`
13116  fi
13117
13118
13119  input_path="$new_path"
13120  # Check if we need to convert this using DOS-style short mode. If the path
13121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13122  # take no chances and rewrite it.
13123  # Note: m4 eats our [], so we need to use [ and ] instead.
13124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13125  if test "x$has_forbidden_chars" != x; then
13126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13128  fi
13129
13130
13131  windows_path="$new_path"
13132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13133    unix_path=`$CYGPATH -u "$windows_path"`
13134    new_path="$unix_path"
13135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13137    new_path="$unix_path"
13138  fi
13139
13140  if test "x$path" != "x$new_path"; then
13141    BOOT_JDK="$new_path"
13142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13144  fi
13145
13146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13148
13149  else
13150    # We're on a posix platform. Hooray! :)
13151    path="$BOOT_JDK"
13152
13153    if test ! -f "$path" && test ! -d "$path"; then
13154      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13155    fi
13156
13157    has_space=`$ECHO "$path" | $GREP " "`
13158    if test "x$has_space" != x; then
13159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13161      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13162    fi
13163  fi
13164
13165              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13166$as_echo_n "checking for Boot JDK... " >&6; }
13167              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13168$as_echo "$BOOT_JDK" >&6; }
13169              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13170$as_echo_n "checking Boot JDK version... " >&6; }
13171              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13172              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13173$as_echo "$BOOT_JDK_VERSION" >&6; }
13174            fi # end check jdk version
13175          fi # end check rt.jar
13176        fi # end check javac
13177      fi # end check java
13178    fi # end check boot jdk found
13179  fi
13180
13181    done
13182  fi
13183
13184  fi
13185
13186
13187    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13188    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13189      # Do we have a bin/java?
13190      if test ! -x "$BOOT_JDK/bin/java"; then
13191        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13193        BOOT_JDK_FOUND=no
13194      else
13195        # Do we have a bin/javac?
13196        if test ! -x "$BOOT_JDK/bin/javac"; then
13197          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13199          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13200$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13201          BOOT_JDK_FOUND=no
13202        else
13203          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13204          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13205            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13207            BOOT_JDK_FOUND=no
13208          else
13209            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13210            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13211
13212            # Extra M4 quote needed to protect [] in grep expression.
13213            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13214            if test "x$FOUND_VERSION_78" = x; then
13215              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13216$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13217              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13218$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13219              BOOT_JDK_FOUND=no
13220            else
13221              # We're done! :-)
13222              BOOT_JDK_FOUND=yes
13223
13224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13225
13226  # Input might be given as Windows format, start by converting to
13227  # unix format.
13228  path="$BOOT_JDK"
13229  new_path=`$CYGPATH -u "$path"`
13230
13231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13234  # "foo.exe" is OK but "foo" is an error.
13235  #
13236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13237  # It is also a way to make sure we got the proper file name for the real test later on.
13238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13239  if test "x$test_shortpath" = x; then
13240    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13242    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13243  fi
13244
13245  # Call helper function which possibly converts this using DOS-style short mode.
13246  # If so, the updated path is stored in $new_path.
13247
13248  input_path="$new_path"
13249  # Check if we need to convert this using DOS-style short mode. If the path
13250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13251  # take no chances and rewrite it.
13252  # Note: m4 eats our [], so we need to use [ and ] instead.
13253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13254  if test "x$has_forbidden_chars" != x; then
13255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13259      # Going to short mode and back again did indeed matter. Since short mode is
13260      # case insensitive, let's make it lowercase to improve readability.
13261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13262      # Now convert it back to Unix-stile (cygpath)
13263      input_path=`$CYGPATH -u "$shortmode_path"`
13264      new_path="$input_path"
13265    fi
13266  fi
13267
13268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13269  if test "x$test_cygdrive_prefix" = x; then
13270    # As a simple fix, exclude /usr/bin since it's not a real path.
13271    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13273      # a path prefixed by /cygdrive for fixpath to work.
13274      new_path="$CYGWIN_ROOT_PATH$input_path"
13275    fi
13276  fi
13277
13278
13279  if test "x$path" != "x$new_path"; then
13280    BOOT_JDK="$new_path"
13281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13282$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13283  fi
13284
13285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13286
13287  path="$BOOT_JDK"
13288  has_colon=`$ECHO $path | $GREP ^.:`
13289  new_path="$path"
13290  if test "x$has_colon" = x; then
13291    # Not in mixed or Windows style, start by that.
13292    new_path=`cmd //c echo $path`
13293  fi
13294
13295
13296  input_path="$new_path"
13297  # Check if we need to convert this using DOS-style short mode. If the path
13298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13299  # take no chances and rewrite it.
13300  # Note: m4 eats our [], so we need to use [ and ] instead.
13301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13302  if test "x$has_forbidden_chars" != x; then
13303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13305  fi
13306
13307
13308  windows_path="$new_path"
13309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13310    unix_path=`$CYGPATH -u "$windows_path"`
13311    new_path="$unix_path"
13312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13314    new_path="$unix_path"
13315  fi
13316
13317  if test "x$path" != "x$new_path"; then
13318    BOOT_JDK="$new_path"
13319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13320$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13321  fi
13322
13323  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13324  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13325
13326  else
13327    # We're on a posix platform. Hooray! :)
13328    path="$BOOT_JDK"
13329
13330    if test ! -f "$path" && test ! -d "$path"; then
13331      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13332    fi
13333
13334    has_space=`$ECHO "$path" | $GREP " "`
13335    if test "x$has_space" != x; then
13336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13338      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13339    fi
13340  fi
13341
13342              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13343$as_echo_n "checking for Boot JDK... " >&6; }
13344              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13345$as_echo "$BOOT_JDK" >&6; }
13346              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13347$as_echo_n "checking Boot JDK version... " >&6; }
13348              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13349              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13350$as_echo "$BOOT_JDK_VERSION" >&6; }
13351            fi # end check jdk version
13352          fi # end check rt.jar
13353        fi # end check javac
13354      fi # end check java
13355    fi # end check boot jdk found
13356  fi
13357
13358
13359  if test "x$BOOT_JDK_FOUND" = xno; then
13360    # Now execute the test
13361
13362  if test "x$ProgramFiles" != x; then
13363    VIRTUAL_DIR="$ProgramFiles/Java"
13364
13365  windows_path="$VIRTUAL_DIR"
13366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13367    unix_path=`$CYGPATH -u "$windows_path"`
13368    VIRTUAL_DIR="$unix_path"
13369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13371    VIRTUAL_DIR="$unix_path"
13372  fi
13373
13374
13375  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13376  BOOT_JDK_SUFFIX=""
13377  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13378  if test "x$ALL_JDKS_FOUND" != x; then
13379    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13380
13381  if test "x$BOOT_JDK_FOUND" = xno; then
13382    # Now execute the test
13383
13384        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13385        if test -d "$BOOT_JDK"; then
13386          BOOT_JDK_FOUND=maybe
13387          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13388$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13389        fi
13390
13391
13392    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13393    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13394      # Do we have a bin/java?
13395      if test ! -x "$BOOT_JDK/bin/java"; then
13396        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13398        BOOT_JDK_FOUND=no
13399      else
13400        # Do we have a bin/javac?
13401        if test ! -x "$BOOT_JDK/bin/javac"; then
13402          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13404          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13405$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13406          BOOT_JDK_FOUND=no
13407        else
13408          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13409          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13410            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13411$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13412            BOOT_JDK_FOUND=no
13413          else
13414            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13415            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13416
13417            # Extra M4 quote needed to protect [] in grep expression.
13418            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13419            if test "x$FOUND_VERSION_78" = x; then
13420              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13422              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13423$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13424              BOOT_JDK_FOUND=no
13425            else
13426              # We're done! :-)
13427              BOOT_JDK_FOUND=yes
13428
13429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13430
13431  # Input might be given as Windows format, start by converting to
13432  # unix format.
13433  path="$BOOT_JDK"
13434  new_path=`$CYGPATH -u "$path"`
13435
13436  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13437  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13438  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13439  # "foo.exe" is OK but "foo" is an error.
13440  #
13441  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13442  # It is also a way to make sure we got the proper file name for the real test later on.
13443  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13444  if test "x$test_shortpath" = x; then
13445    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13447    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13448  fi
13449
13450  # Call helper function which possibly converts this using DOS-style short mode.
13451  # If so, the updated path is stored in $new_path.
13452
13453  input_path="$new_path"
13454  # Check if we need to convert this using DOS-style short mode. If the path
13455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13456  # take no chances and rewrite it.
13457  # Note: m4 eats our [], so we need to use [ and ] instead.
13458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13459  if test "x$has_forbidden_chars" != x; then
13460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13461    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13462    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13463    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13464      # Going to short mode and back again did indeed matter. Since short mode is
13465      # case insensitive, let's make it lowercase to improve readability.
13466      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13467      # Now convert it back to Unix-stile (cygpath)
13468      input_path=`$CYGPATH -u "$shortmode_path"`
13469      new_path="$input_path"
13470    fi
13471  fi
13472
13473  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13474  if test "x$test_cygdrive_prefix" = x; then
13475    # As a simple fix, exclude /usr/bin since it's not a real path.
13476    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13477      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13478      # a path prefixed by /cygdrive for fixpath to work.
13479      new_path="$CYGWIN_ROOT_PATH$input_path"
13480    fi
13481  fi
13482
13483
13484  if test "x$path" != "x$new_path"; then
13485    BOOT_JDK="$new_path"
13486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13487$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13488  fi
13489
13490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13491
13492  path="$BOOT_JDK"
13493  has_colon=`$ECHO $path | $GREP ^.:`
13494  new_path="$path"
13495  if test "x$has_colon" = x; then
13496    # Not in mixed or Windows style, start by that.
13497    new_path=`cmd //c echo $path`
13498  fi
13499
13500
13501  input_path="$new_path"
13502  # Check if we need to convert this using DOS-style short mode. If the path
13503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13504  # take no chances and rewrite it.
13505  # Note: m4 eats our [], so we need to use [ and ] instead.
13506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13507  if test "x$has_forbidden_chars" != x; then
13508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13510  fi
13511
13512
13513  windows_path="$new_path"
13514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13515    unix_path=`$CYGPATH -u "$windows_path"`
13516    new_path="$unix_path"
13517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13519    new_path="$unix_path"
13520  fi
13521
13522  if test "x$path" != "x$new_path"; then
13523    BOOT_JDK="$new_path"
13524    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13525$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13526  fi
13527
13528  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13529  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13530
13531  else
13532    # We're on a posix platform. Hooray! :)
13533    path="$BOOT_JDK"
13534
13535    if test ! -f "$path" && test ! -d "$path"; then
13536      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13537    fi
13538
13539    has_space=`$ECHO "$path" | $GREP " "`
13540    if test "x$has_space" != x; then
13541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13542$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13543      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13544    fi
13545  fi
13546
13547              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13548$as_echo_n "checking for Boot JDK... " >&6; }
13549              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13550$as_echo "$BOOT_JDK" >&6; }
13551              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13552$as_echo_n "checking Boot JDK version... " >&6; }
13553              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13554              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13555$as_echo "$BOOT_JDK_VERSION" >&6; }
13556            fi # end check jdk version
13557          fi # end check rt.jar
13558        fi # end check javac
13559      fi # end check java
13560    fi # end check boot jdk found
13561  fi
13562
13563    done
13564  fi
13565
13566  fi
13567
13568
13569    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13570    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13571      # Do we have a bin/java?
13572      if test ! -x "$BOOT_JDK/bin/java"; then
13573        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13574$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13575        BOOT_JDK_FOUND=no
13576      else
13577        # Do we have a bin/javac?
13578        if test ! -x "$BOOT_JDK/bin/javac"; then
13579          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13581          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13582$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13583          BOOT_JDK_FOUND=no
13584        else
13585          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13586          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13589            BOOT_JDK_FOUND=no
13590          else
13591            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13592            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13593
13594            # Extra M4 quote needed to protect [] in grep expression.
13595            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13596            if test "x$FOUND_VERSION_78" = x; then
13597              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13599              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13600$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13601              BOOT_JDK_FOUND=no
13602            else
13603              # We're done! :-)
13604              BOOT_JDK_FOUND=yes
13605
13606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13607
13608  # Input might be given as Windows format, start by converting to
13609  # unix format.
13610  path="$BOOT_JDK"
13611  new_path=`$CYGPATH -u "$path"`
13612
13613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13616  # "foo.exe" is OK but "foo" is an error.
13617  #
13618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13619  # It is also a way to make sure we got the proper file name for the real test later on.
13620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13621  if test "x$test_shortpath" = x; then
13622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13623$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13624    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13625  fi
13626
13627  # Call helper function which possibly converts this using DOS-style short mode.
13628  # If so, the updated path is stored in $new_path.
13629
13630  input_path="$new_path"
13631  # Check if we need to convert this using DOS-style short mode. If the path
13632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13633  # take no chances and rewrite it.
13634  # Note: m4 eats our [], so we need to use [ and ] instead.
13635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13636  if test "x$has_forbidden_chars" != x; then
13637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13641      # Going to short mode and back again did indeed matter. Since short mode is
13642      # case insensitive, let's make it lowercase to improve readability.
13643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13644      # Now convert it back to Unix-stile (cygpath)
13645      input_path=`$CYGPATH -u "$shortmode_path"`
13646      new_path="$input_path"
13647    fi
13648  fi
13649
13650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13651  if test "x$test_cygdrive_prefix" = x; then
13652    # As a simple fix, exclude /usr/bin since it's not a real path.
13653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13655      # a path prefixed by /cygdrive for fixpath to work.
13656      new_path="$CYGWIN_ROOT_PATH$input_path"
13657    fi
13658  fi
13659
13660
13661  if test "x$path" != "x$new_path"; then
13662    BOOT_JDK="$new_path"
13663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13664$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13665  fi
13666
13667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13668
13669  path="$BOOT_JDK"
13670  has_colon=`$ECHO $path | $GREP ^.:`
13671  new_path="$path"
13672  if test "x$has_colon" = x; then
13673    # Not in mixed or Windows style, start by that.
13674    new_path=`cmd //c echo $path`
13675  fi
13676
13677
13678  input_path="$new_path"
13679  # Check if we need to convert this using DOS-style short mode. If the path
13680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13681  # take no chances and rewrite it.
13682  # Note: m4 eats our [], so we need to use [ and ] instead.
13683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13684  if test "x$has_forbidden_chars" != x; then
13685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13687  fi
13688
13689
13690  windows_path="$new_path"
13691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13692    unix_path=`$CYGPATH -u "$windows_path"`
13693    new_path="$unix_path"
13694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13696    new_path="$unix_path"
13697  fi
13698
13699  if test "x$path" != "x$new_path"; then
13700    BOOT_JDK="$new_path"
13701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13702$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13703  fi
13704
13705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13707
13708  else
13709    # We're on a posix platform. Hooray! :)
13710    path="$BOOT_JDK"
13711
13712    if test ! -f "$path" && test ! -d "$path"; then
13713      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13714    fi
13715
13716    has_space=`$ECHO "$path" | $GREP " "`
13717    if test "x$has_space" != x; then
13718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13719$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13720      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13721    fi
13722  fi
13723
13724              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13725$as_echo_n "checking for Boot JDK... " >&6; }
13726              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13727$as_echo "$BOOT_JDK" >&6; }
13728              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13729$as_echo_n "checking Boot JDK version... " >&6; }
13730              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13731              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13732$as_echo "$BOOT_JDK_VERSION" >&6; }
13733            fi # end check jdk version
13734          fi # end check rt.jar
13735        fi # end check javac
13736      fi # end check java
13737    fi # end check boot jdk found
13738  fi
13739
13740
13741  if test "x$BOOT_JDK_FOUND" = xno; then
13742    # Now execute the test
13743
13744  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13745  BOOT_JDK_SUFFIX=""
13746  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13747  if test "x$ALL_JDKS_FOUND" != x; then
13748    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13749
13750  if test "x$BOOT_JDK_FOUND" = xno; then
13751    # Now execute the test
13752
13753        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13754        if test -d "$BOOT_JDK"; then
13755          BOOT_JDK_FOUND=maybe
13756          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13757$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13758        fi
13759
13760
13761    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13762    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13763      # Do we have a bin/java?
13764      if test ! -x "$BOOT_JDK/bin/java"; then
13765        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13767        BOOT_JDK_FOUND=no
13768      else
13769        # Do we have a bin/javac?
13770        if test ! -x "$BOOT_JDK/bin/javac"; then
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13773          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13774$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13775          BOOT_JDK_FOUND=no
13776        else
13777          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13778          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13779            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13781            BOOT_JDK_FOUND=no
13782          else
13783            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13784            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13785
13786            # Extra M4 quote needed to protect [] in grep expression.
13787            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13788            if test "x$FOUND_VERSION_78" = x; then
13789              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13791              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13792$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13793              BOOT_JDK_FOUND=no
13794            else
13795              # We're done! :-)
13796              BOOT_JDK_FOUND=yes
13797
13798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13799
13800  # Input might be given as Windows format, start by converting to
13801  # unix format.
13802  path="$BOOT_JDK"
13803  new_path=`$CYGPATH -u "$path"`
13804
13805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13808  # "foo.exe" is OK but "foo" is an error.
13809  #
13810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13811  # It is also a way to make sure we got the proper file name for the real test later on.
13812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13813  if test "x$test_shortpath" = x; then
13814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13815$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13816    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13817  fi
13818
13819  # Call helper function which possibly converts this using DOS-style short mode.
13820  # If so, the updated path is stored in $new_path.
13821
13822  input_path="$new_path"
13823  # Check if we need to convert this using DOS-style short mode. If the path
13824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13825  # take no chances and rewrite it.
13826  # Note: m4 eats our [], so we need to use [ and ] instead.
13827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13828  if test "x$has_forbidden_chars" != x; then
13829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13833      # Going to short mode and back again did indeed matter. Since short mode is
13834      # case insensitive, let's make it lowercase to improve readability.
13835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13836      # Now convert it back to Unix-stile (cygpath)
13837      input_path=`$CYGPATH -u "$shortmode_path"`
13838      new_path="$input_path"
13839    fi
13840  fi
13841
13842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13843  if test "x$test_cygdrive_prefix" = x; then
13844    # As a simple fix, exclude /usr/bin since it's not a real path.
13845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13847      # a path prefixed by /cygdrive for fixpath to work.
13848      new_path="$CYGWIN_ROOT_PATH$input_path"
13849    fi
13850  fi
13851
13852
13853  if test "x$path" != "x$new_path"; then
13854    BOOT_JDK="$new_path"
13855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13856$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13857  fi
13858
13859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13860
13861  path="$BOOT_JDK"
13862  has_colon=`$ECHO $path | $GREP ^.:`
13863  new_path="$path"
13864  if test "x$has_colon" = x; then
13865    # Not in mixed or Windows style, start by that.
13866    new_path=`cmd //c echo $path`
13867  fi
13868
13869
13870  input_path="$new_path"
13871  # Check if we need to convert this using DOS-style short mode. If the path
13872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13873  # take no chances and rewrite it.
13874  # Note: m4 eats our [], so we need to use [ and ] instead.
13875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13876  if test "x$has_forbidden_chars" != x; then
13877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13879  fi
13880
13881
13882  windows_path="$new_path"
13883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13884    unix_path=`$CYGPATH -u "$windows_path"`
13885    new_path="$unix_path"
13886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13888    new_path="$unix_path"
13889  fi
13890
13891  if test "x$path" != "x$new_path"; then
13892    BOOT_JDK="$new_path"
13893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13895  fi
13896
13897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13899
13900  else
13901    # We're on a posix platform. Hooray! :)
13902    path="$BOOT_JDK"
13903
13904    if test ! -f "$path" && test ! -d "$path"; then
13905      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13906    fi
13907
13908    has_space=`$ECHO "$path" | $GREP " "`
13909    if test "x$has_space" != x; then
13910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13911$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13912      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13913    fi
13914  fi
13915
13916              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13917$as_echo_n "checking for Boot JDK... " >&6; }
13918              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13919$as_echo "$BOOT_JDK" >&6; }
13920              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13921$as_echo_n "checking Boot JDK version... " >&6; }
13922              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13923              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13924$as_echo "$BOOT_JDK_VERSION" >&6; }
13925            fi # end check jdk version
13926          fi # end check rt.jar
13927        fi # end check javac
13928      fi # end check java
13929    fi # end check boot jdk found
13930  fi
13931
13932    done
13933  fi
13934
13935
13936    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13937    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13938      # Do we have a bin/java?
13939      if test ! -x "$BOOT_JDK/bin/java"; then
13940        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13942        BOOT_JDK_FOUND=no
13943      else
13944        # Do we have a bin/javac?
13945        if test ! -x "$BOOT_JDK/bin/javac"; then
13946          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13948          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13949$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13950          BOOT_JDK_FOUND=no
13951        else
13952          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13953          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13954            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13956            BOOT_JDK_FOUND=no
13957          else
13958            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13959            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13960
13961            # Extra M4 quote needed to protect [] in grep expression.
13962            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13963            if test "x$FOUND_VERSION_78" = x; then
13964              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13966              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13967$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13968              BOOT_JDK_FOUND=no
13969            else
13970              # We're done! :-)
13971              BOOT_JDK_FOUND=yes
13972
13973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13974
13975  # Input might be given as Windows format, start by converting to
13976  # unix format.
13977  path="$BOOT_JDK"
13978  new_path=`$CYGPATH -u "$path"`
13979
13980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13983  # "foo.exe" is OK but "foo" is an error.
13984  #
13985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13986  # It is also a way to make sure we got the proper file name for the real test later on.
13987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13988  if test "x$test_shortpath" = x; then
13989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13991    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13992  fi
13993
13994  # Call helper function which possibly converts this using DOS-style short mode.
13995  # If so, the updated path is stored in $new_path.
13996
13997  input_path="$new_path"
13998  # Check if we need to convert this using DOS-style short mode. If the path
13999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14000  # take no chances and rewrite it.
14001  # Note: m4 eats our [], so we need to use [ and ] instead.
14002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14003  if test "x$has_forbidden_chars" != x; then
14004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14008      # Going to short mode and back again did indeed matter. Since short mode is
14009      # case insensitive, let's make it lowercase to improve readability.
14010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14011      # Now convert it back to Unix-stile (cygpath)
14012      input_path=`$CYGPATH -u "$shortmode_path"`
14013      new_path="$input_path"
14014    fi
14015  fi
14016
14017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14018  if test "x$test_cygdrive_prefix" = x; then
14019    # As a simple fix, exclude /usr/bin since it's not a real path.
14020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14022      # a path prefixed by /cygdrive for fixpath to work.
14023      new_path="$CYGWIN_ROOT_PATH$input_path"
14024    fi
14025  fi
14026
14027
14028  if test "x$path" != "x$new_path"; then
14029    BOOT_JDK="$new_path"
14030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14032  fi
14033
14034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14035
14036  path="$BOOT_JDK"
14037  has_colon=`$ECHO $path | $GREP ^.:`
14038  new_path="$path"
14039  if test "x$has_colon" = x; then
14040    # Not in mixed or Windows style, start by that.
14041    new_path=`cmd //c echo $path`
14042  fi
14043
14044
14045  input_path="$new_path"
14046  # Check if we need to convert this using DOS-style short mode. If the path
14047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14048  # take no chances and rewrite it.
14049  # Note: m4 eats our [], so we need to use [ and ] instead.
14050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14051  if test "x$has_forbidden_chars" != x; then
14052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14054  fi
14055
14056
14057  windows_path="$new_path"
14058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14059    unix_path=`$CYGPATH -u "$windows_path"`
14060    new_path="$unix_path"
14061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14063    new_path="$unix_path"
14064  fi
14065
14066  if test "x$path" != "x$new_path"; then
14067    BOOT_JDK="$new_path"
14068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14070  fi
14071
14072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14074
14075  else
14076    # We're on a posix platform. Hooray! :)
14077    path="$BOOT_JDK"
14078
14079    if test ! -f "$path" && test ! -d "$path"; then
14080      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14081    fi
14082
14083    has_space=`$ECHO "$path" | $GREP " "`
14084    if test "x$has_space" != x; then
14085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14087      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14088    fi
14089  fi
14090
14091              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14092$as_echo_n "checking for Boot JDK... " >&6; }
14093              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14094$as_echo "$BOOT_JDK" >&6; }
14095              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14096$as_echo_n "checking Boot JDK version... " >&6; }
14097              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14098              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14099$as_echo "$BOOT_JDK_VERSION" >&6; }
14100            fi # end check jdk version
14101          fi # end check rt.jar
14102        fi # end check javac
14103      fi # end check java
14104    fi # end check boot jdk found
14105  fi
14106
14107  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14108
14109  if test "x$BOOT_JDK_FOUND" = xno; then
14110    # Now execute the test
14111
14112  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14113  BOOT_JDK_SUFFIX="/Contents/Home"
14114  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14115  if test "x$ALL_JDKS_FOUND" != x; then
14116    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14117
14118  if test "x$BOOT_JDK_FOUND" = xno; then
14119    # Now execute the test
14120
14121        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14122        if test -d "$BOOT_JDK"; then
14123          BOOT_JDK_FOUND=maybe
14124          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14125$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14126        fi
14127
14128
14129    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14130    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14131      # Do we have a bin/java?
14132      if test ! -x "$BOOT_JDK/bin/java"; then
14133        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14134$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14135        BOOT_JDK_FOUND=no
14136      else
14137        # Do we have a bin/javac?
14138        if test ! -x "$BOOT_JDK/bin/javac"; then
14139          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14140$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14141          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14142$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14143          BOOT_JDK_FOUND=no
14144        else
14145          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14146          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14147            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14148$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14149            BOOT_JDK_FOUND=no
14150          else
14151            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14152            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14153
14154            # Extra M4 quote needed to protect [] in grep expression.
14155            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14156            if test "x$FOUND_VERSION_78" = x; then
14157              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14158$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14159              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14160$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14161              BOOT_JDK_FOUND=no
14162            else
14163              # We're done! :-)
14164              BOOT_JDK_FOUND=yes
14165
14166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14167
14168  # Input might be given as Windows format, start by converting to
14169  # unix format.
14170  path="$BOOT_JDK"
14171  new_path=`$CYGPATH -u "$path"`
14172
14173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14176  # "foo.exe" is OK but "foo" is an error.
14177  #
14178  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14179  # It is also a way to make sure we got the proper file name for the real test later on.
14180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14181  if test "x$test_shortpath" = x; then
14182    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14183$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14184    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14185  fi
14186
14187  # Call helper function which possibly converts this using DOS-style short mode.
14188  # If so, the updated path is stored in $new_path.
14189
14190  input_path="$new_path"
14191  # Check if we need to convert this using DOS-style short mode. If the path
14192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14193  # take no chances and rewrite it.
14194  # Note: m4 eats our [], so we need to use [ and ] instead.
14195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14196  if test "x$has_forbidden_chars" != x; then
14197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14201      # Going to short mode and back again did indeed matter. Since short mode is
14202      # case insensitive, let's make it lowercase to improve readability.
14203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14204      # Now convert it back to Unix-stile (cygpath)
14205      input_path=`$CYGPATH -u "$shortmode_path"`
14206      new_path="$input_path"
14207    fi
14208  fi
14209
14210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14211  if test "x$test_cygdrive_prefix" = x; then
14212    # As a simple fix, exclude /usr/bin since it's not a real path.
14213    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14215      # a path prefixed by /cygdrive for fixpath to work.
14216      new_path="$CYGWIN_ROOT_PATH$input_path"
14217    fi
14218  fi
14219
14220
14221  if test "x$path" != "x$new_path"; then
14222    BOOT_JDK="$new_path"
14223    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14224$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14225  fi
14226
14227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14228
14229  path="$BOOT_JDK"
14230  has_colon=`$ECHO $path | $GREP ^.:`
14231  new_path="$path"
14232  if test "x$has_colon" = x; then
14233    # Not in mixed or Windows style, start by that.
14234    new_path=`cmd //c echo $path`
14235  fi
14236
14237
14238  input_path="$new_path"
14239  # Check if we need to convert this using DOS-style short mode. If the path
14240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14241  # take no chances and rewrite it.
14242  # Note: m4 eats our [], so we need to use [ and ] instead.
14243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14244  if test "x$has_forbidden_chars" != x; then
14245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14246    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14247  fi
14248
14249
14250  windows_path="$new_path"
14251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14252    unix_path=`$CYGPATH -u "$windows_path"`
14253    new_path="$unix_path"
14254  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14255    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14256    new_path="$unix_path"
14257  fi
14258
14259  if test "x$path" != "x$new_path"; then
14260    BOOT_JDK="$new_path"
14261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14262$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14263  fi
14264
14265  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14266  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14267
14268  else
14269    # We're on a posix platform. Hooray! :)
14270    path="$BOOT_JDK"
14271
14272    if test ! -f "$path" && test ! -d "$path"; then
14273      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14274    fi
14275
14276    has_space=`$ECHO "$path" | $GREP " "`
14277    if test "x$has_space" != x; then
14278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14280      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14281    fi
14282  fi
14283
14284              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14285$as_echo_n "checking for Boot JDK... " >&6; }
14286              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14287$as_echo "$BOOT_JDK" >&6; }
14288              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14289$as_echo_n "checking Boot JDK version... " >&6; }
14290              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14291              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14292$as_echo "$BOOT_JDK_VERSION" >&6; }
14293            fi # end check jdk version
14294          fi # end check rt.jar
14295        fi # end check javac
14296      fi # end check java
14297    fi # end check boot jdk found
14298  fi
14299
14300    done
14301  fi
14302
14303
14304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14306      # Do we have a bin/java?
14307      if test ! -x "$BOOT_JDK/bin/java"; then
14308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14310        BOOT_JDK_FOUND=no
14311      else
14312        # Do we have a bin/javac?
14313        if test ! -x "$BOOT_JDK/bin/javac"; then
14314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14318          BOOT_JDK_FOUND=no
14319        else
14320          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14321          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14322            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14323$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14324            BOOT_JDK_FOUND=no
14325          else
14326            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14327            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14328
14329            # Extra M4 quote needed to protect [] in grep expression.
14330            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14331            if test "x$FOUND_VERSION_78" = x; then
14332              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14334              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14335$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14336              BOOT_JDK_FOUND=no
14337            else
14338              # We're done! :-)
14339              BOOT_JDK_FOUND=yes
14340
14341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14342
14343  # Input might be given as Windows format, start by converting to
14344  # unix format.
14345  path="$BOOT_JDK"
14346  new_path=`$CYGPATH -u "$path"`
14347
14348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14351  # "foo.exe" is OK but "foo" is an error.
14352  #
14353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14354  # It is also a way to make sure we got the proper file name for the real test later on.
14355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14356  if test "x$test_shortpath" = x; then
14357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14358$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14359    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14360  fi
14361
14362  # Call helper function which possibly converts this using DOS-style short mode.
14363  # If so, the updated path is stored in $new_path.
14364
14365  input_path="$new_path"
14366  # Check if we need to convert this using DOS-style short mode. If the path
14367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14368  # take no chances and rewrite it.
14369  # Note: m4 eats our [], so we need to use [ and ] instead.
14370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14371  if test "x$has_forbidden_chars" != x; then
14372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14376      # Going to short mode and back again did indeed matter. Since short mode is
14377      # case insensitive, let's make it lowercase to improve readability.
14378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14379      # Now convert it back to Unix-stile (cygpath)
14380      input_path=`$CYGPATH -u "$shortmode_path"`
14381      new_path="$input_path"
14382    fi
14383  fi
14384
14385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14386  if test "x$test_cygdrive_prefix" = x; then
14387    # As a simple fix, exclude /usr/bin since it's not a real path.
14388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14390      # a path prefixed by /cygdrive for fixpath to work.
14391      new_path="$CYGWIN_ROOT_PATH$input_path"
14392    fi
14393  fi
14394
14395
14396  if test "x$path" != "x$new_path"; then
14397    BOOT_JDK="$new_path"
14398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14399$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14400  fi
14401
14402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14403
14404  path="$BOOT_JDK"
14405  has_colon=`$ECHO $path | $GREP ^.:`
14406  new_path="$path"
14407  if test "x$has_colon" = x; then
14408    # Not in mixed or Windows style, start by that.
14409    new_path=`cmd //c echo $path`
14410  fi
14411
14412
14413  input_path="$new_path"
14414  # Check if we need to convert this using DOS-style short mode. If the path
14415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14416  # take no chances and rewrite it.
14417  # Note: m4 eats our [], so we need to use [ and ] instead.
14418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14419  if test "x$has_forbidden_chars" != x; then
14420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14422  fi
14423
14424
14425  windows_path="$new_path"
14426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14427    unix_path=`$CYGPATH -u "$windows_path"`
14428    new_path="$unix_path"
14429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14431    new_path="$unix_path"
14432  fi
14433
14434  if test "x$path" != "x$new_path"; then
14435    BOOT_JDK="$new_path"
14436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14437$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14438  fi
14439
14440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14442
14443  else
14444    # We're on a posix platform. Hooray! :)
14445    path="$BOOT_JDK"
14446
14447    if test ! -f "$path" && test ! -d "$path"; then
14448      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14449    fi
14450
14451    has_space=`$ECHO "$path" | $GREP " "`
14452    if test "x$has_space" != x; then
14453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14455      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14456    fi
14457  fi
14458
14459              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14460$as_echo_n "checking for Boot JDK... " >&6; }
14461              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14462$as_echo "$BOOT_JDK" >&6; }
14463              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14464$as_echo_n "checking Boot JDK version... " >&6; }
14465              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14466              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14467$as_echo "$BOOT_JDK_VERSION" >&6; }
14468            fi # end check jdk version
14469          fi # end check rt.jar
14470        fi # end check javac
14471      fi # end check java
14472    fi # end check boot jdk found
14473  fi
14474
14475
14476  if test "x$BOOT_JDK_FOUND" = xno; then
14477    # Now execute the test
14478
14479  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14480  BOOT_JDK_SUFFIX="/Contents/Home"
14481  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14482  if test "x$ALL_JDKS_FOUND" != x; then
14483    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14484
14485  if test "x$BOOT_JDK_FOUND" = xno; then
14486    # Now execute the test
14487
14488        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14489        if test -d "$BOOT_JDK"; then
14490          BOOT_JDK_FOUND=maybe
14491          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14492$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14493        fi
14494
14495
14496    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14497    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14498      # Do we have a bin/java?
14499      if test ! -x "$BOOT_JDK/bin/java"; then
14500        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14502        BOOT_JDK_FOUND=no
14503      else
14504        # Do we have a bin/javac?
14505        if test ! -x "$BOOT_JDK/bin/javac"; then
14506          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14508          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14509$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14510          BOOT_JDK_FOUND=no
14511        else
14512          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14513          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14514            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14516            BOOT_JDK_FOUND=no
14517          else
14518            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14519            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14520
14521            # Extra M4 quote needed to protect [] in grep expression.
14522            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14523            if test "x$FOUND_VERSION_78" = x; then
14524              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14526              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14527$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14528              BOOT_JDK_FOUND=no
14529            else
14530              # We're done! :-)
14531              BOOT_JDK_FOUND=yes
14532
14533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14534
14535  # Input might be given as Windows format, start by converting to
14536  # unix format.
14537  path="$BOOT_JDK"
14538  new_path=`$CYGPATH -u "$path"`
14539
14540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14543  # "foo.exe" is OK but "foo" is an error.
14544  #
14545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14546  # It is also a way to make sure we got the proper file name for the real test later on.
14547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14548  if test "x$test_shortpath" = x; then
14549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14551    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14552  fi
14553
14554  # Call helper function which possibly converts this using DOS-style short mode.
14555  # If so, the updated path is stored in $new_path.
14556
14557  input_path="$new_path"
14558  # Check if we need to convert this using DOS-style short mode. If the path
14559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14560  # take no chances and rewrite it.
14561  # Note: m4 eats our [], so we need to use [ and ] instead.
14562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14563  if test "x$has_forbidden_chars" != x; then
14564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14568      # Going to short mode and back again did indeed matter. Since short mode is
14569      # case insensitive, let's make it lowercase to improve readability.
14570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14571      # Now convert it back to Unix-stile (cygpath)
14572      input_path=`$CYGPATH -u "$shortmode_path"`
14573      new_path="$input_path"
14574    fi
14575  fi
14576
14577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14578  if test "x$test_cygdrive_prefix" = x; then
14579    # As a simple fix, exclude /usr/bin since it's not a real path.
14580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14582      # a path prefixed by /cygdrive for fixpath to work.
14583      new_path="$CYGWIN_ROOT_PATH$input_path"
14584    fi
14585  fi
14586
14587
14588  if test "x$path" != "x$new_path"; then
14589    BOOT_JDK="$new_path"
14590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14592  fi
14593
14594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14595
14596  path="$BOOT_JDK"
14597  has_colon=`$ECHO $path | $GREP ^.:`
14598  new_path="$path"
14599  if test "x$has_colon" = x; then
14600    # Not in mixed or Windows style, start by that.
14601    new_path=`cmd //c echo $path`
14602  fi
14603
14604
14605  input_path="$new_path"
14606  # Check if we need to convert this using DOS-style short mode. If the path
14607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14608  # take no chances and rewrite it.
14609  # Note: m4 eats our [], so we need to use [ and ] instead.
14610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14611  if test "x$has_forbidden_chars" != x; then
14612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14614  fi
14615
14616
14617  windows_path="$new_path"
14618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14619    unix_path=`$CYGPATH -u "$windows_path"`
14620    new_path="$unix_path"
14621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14623    new_path="$unix_path"
14624  fi
14625
14626  if test "x$path" != "x$new_path"; then
14627    BOOT_JDK="$new_path"
14628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14630  fi
14631
14632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14634
14635  else
14636    # We're on a posix platform. Hooray! :)
14637    path="$BOOT_JDK"
14638
14639    if test ! -f "$path" && test ! -d "$path"; then
14640      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14641    fi
14642
14643    has_space=`$ECHO "$path" | $GREP " "`
14644    if test "x$has_space" != x; then
14645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14646$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14647      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14648    fi
14649  fi
14650
14651              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14652$as_echo_n "checking for Boot JDK... " >&6; }
14653              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14654$as_echo "$BOOT_JDK" >&6; }
14655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14656$as_echo_n "checking Boot JDK version... " >&6; }
14657              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14658              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14659$as_echo "$BOOT_JDK_VERSION" >&6; }
14660            fi # end check jdk version
14661          fi # end check rt.jar
14662        fi # end check javac
14663      fi # end check java
14664    fi # end check boot jdk found
14665  fi
14666
14667    done
14668  fi
14669
14670
14671    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14672    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14673      # Do we have a bin/java?
14674      if test ! -x "$BOOT_JDK/bin/java"; then
14675        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14677        BOOT_JDK_FOUND=no
14678      else
14679        # Do we have a bin/javac?
14680        if test ! -x "$BOOT_JDK/bin/javac"; then
14681          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14683          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14684$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14685          BOOT_JDK_FOUND=no
14686        else
14687          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14688          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14689            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14690$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14691            BOOT_JDK_FOUND=no
14692          else
14693            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14694            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14695
14696            # Extra M4 quote needed to protect [] in grep expression.
14697            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14698            if test "x$FOUND_VERSION_78" = x; then
14699              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14701              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14702$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14703              BOOT_JDK_FOUND=no
14704            else
14705              # We're done! :-)
14706              BOOT_JDK_FOUND=yes
14707
14708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14709
14710  # Input might be given as Windows format, start by converting to
14711  # unix format.
14712  path="$BOOT_JDK"
14713  new_path=`$CYGPATH -u "$path"`
14714
14715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14718  # "foo.exe" is OK but "foo" is an error.
14719  #
14720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14721  # It is also a way to make sure we got the proper file name for the real test later on.
14722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14723  if test "x$test_shortpath" = x; then
14724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14725$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14726    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14727  fi
14728
14729  # Call helper function which possibly converts this using DOS-style short mode.
14730  # If so, the updated path is stored in $new_path.
14731
14732  input_path="$new_path"
14733  # Check if we need to convert this using DOS-style short mode. If the path
14734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14735  # take no chances and rewrite it.
14736  # Note: m4 eats our [], so we need to use [ and ] instead.
14737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14738  if test "x$has_forbidden_chars" != x; then
14739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14743      # Going to short mode and back again did indeed matter. Since short mode is
14744      # case insensitive, let's make it lowercase to improve readability.
14745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14746      # Now convert it back to Unix-stile (cygpath)
14747      input_path=`$CYGPATH -u "$shortmode_path"`
14748      new_path="$input_path"
14749    fi
14750  fi
14751
14752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14753  if test "x$test_cygdrive_prefix" = x; then
14754    # As a simple fix, exclude /usr/bin since it's not a real path.
14755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14757      # a path prefixed by /cygdrive for fixpath to work.
14758      new_path="$CYGWIN_ROOT_PATH$input_path"
14759    fi
14760  fi
14761
14762
14763  if test "x$path" != "x$new_path"; then
14764    BOOT_JDK="$new_path"
14765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14766$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14767  fi
14768
14769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14770
14771  path="$BOOT_JDK"
14772  has_colon=`$ECHO $path | $GREP ^.:`
14773  new_path="$path"
14774  if test "x$has_colon" = x; then
14775    # Not in mixed or Windows style, start by that.
14776    new_path=`cmd //c echo $path`
14777  fi
14778
14779
14780  input_path="$new_path"
14781  # Check if we need to convert this using DOS-style short mode. If the path
14782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14783  # take no chances and rewrite it.
14784  # Note: m4 eats our [], so we need to use [ and ] instead.
14785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14786  if test "x$has_forbidden_chars" != x; then
14787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14789  fi
14790
14791
14792  windows_path="$new_path"
14793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14794    unix_path=`$CYGPATH -u "$windows_path"`
14795    new_path="$unix_path"
14796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14798    new_path="$unix_path"
14799  fi
14800
14801  if test "x$path" != "x$new_path"; then
14802    BOOT_JDK="$new_path"
14803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14805  fi
14806
14807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14809
14810  else
14811    # We're on a posix platform. Hooray! :)
14812    path="$BOOT_JDK"
14813
14814    if test ! -f "$path" && test ! -d "$path"; then
14815      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14816    fi
14817
14818    has_space=`$ECHO "$path" | $GREP " "`
14819    if test "x$has_space" != x; then
14820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14821$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14822      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14823    fi
14824  fi
14825
14826              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14827$as_echo_n "checking for Boot JDK... " >&6; }
14828              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14829$as_echo "$BOOT_JDK" >&6; }
14830              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14831$as_echo_n "checking Boot JDK version... " >&6; }
14832              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14833              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14834$as_echo "$BOOT_JDK_VERSION" >&6; }
14835            fi # end check jdk version
14836          fi # end check rt.jar
14837        fi # end check javac
14838      fi # end check java
14839    fi # end check boot jdk found
14840  fi
14841
14842  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14843
14844  if test "x$BOOT_JDK_FOUND" = xno; then
14845    # Now execute the test
14846
14847  BOOT_JDK_PREFIX="/usr/lib/jvm"
14848  BOOT_JDK_SUFFIX=""
14849  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14850  if test "x$ALL_JDKS_FOUND" != x; then
14851    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14852
14853  if test "x$BOOT_JDK_FOUND" = xno; then
14854    # Now execute the test
14855
14856        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14857        if test -d "$BOOT_JDK"; then
14858          BOOT_JDK_FOUND=maybe
14859          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14860$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14861        fi
14862
14863
14864    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14865    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14866      # Do we have a bin/java?
14867      if test ! -x "$BOOT_JDK/bin/java"; then
14868        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14870        BOOT_JDK_FOUND=no
14871      else
14872        # Do we have a bin/javac?
14873        if test ! -x "$BOOT_JDK/bin/javac"; then
14874          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14876          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14877$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14878          BOOT_JDK_FOUND=no
14879        else
14880          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14881          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14882            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14884            BOOT_JDK_FOUND=no
14885          else
14886            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14887            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14888
14889            # Extra M4 quote needed to protect [] in grep expression.
14890            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14891            if test "x$FOUND_VERSION_78" = x; then
14892              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14894              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14895$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14896              BOOT_JDK_FOUND=no
14897            else
14898              # We're done! :-)
14899              BOOT_JDK_FOUND=yes
14900
14901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14902
14903  # Input might be given as Windows format, start by converting to
14904  # unix format.
14905  path="$BOOT_JDK"
14906  new_path=`$CYGPATH -u "$path"`
14907
14908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14911  # "foo.exe" is OK but "foo" is an error.
14912  #
14913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14914  # It is also a way to make sure we got the proper file name for the real test later on.
14915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14916  if test "x$test_shortpath" = x; then
14917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14918$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14919    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14920  fi
14921
14922  # Call helper function which possibly converts this using DOS-style short mode.
14923  # If so, the updated path is stored in $new_path.
14924
14925  input_path="$new_path"
14926  # Check if we need to convert this using DOS-style short mode. If the path
14927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14928  # take no chances and rewrite it.
14929  # Note: m4 eats our [], so we need to use [ and ] instead.
14930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14931  if test "x$has_forbidden_chars" != x; then
14932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14936      # Going to short mode and back again did indeed matter. Since short mode is
14937      # case insensitive, let's make it lowercase to improve readability.
14938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14939      # Now convert it back to Unix-stile (cygpath)
14940      input_path=`$CYGPATH -u "$shortmode_path"`
14941      new_path="$input_path"
14942    fi
14943  fi
14944
14945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14946  if test "x$test_cygdrive_prefix" = x; then
14947    # As a simple fix, exclude /usr/bin since it's not a real path.
14948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14950      # a path prefixed by /cygdrive for fixpath to work.
14951      new_path="$CYGWIN_ROOT_PATH$input_path"
14952    fi
14953  fi
14954
14955
14956  if test "x$path" != "x$new_path"; then
14957    BOOT_JDK="$new_path"
14958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14959$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14960  fi
14961
14962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14963
14964  path="$BOOT_JDK"
14965  has_colon=`$ECHO $path | $GREP ^.:`
14966  new_path="$path"
14967  if test "x$has_colon" = x; then
14968    # Not in mixed or Windows style, start by that.
14969    new_path=`cmd //c echo $path`
14970  fi
14971
14972
14973  input_path="$new_path"
14974  # Check if we need to convert this using DOS-style short mode. If the path
14975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14976  # take no chances and rewrite it.
14977  # Note: m4 eats our [], so we need to use [ and ] instead.
14978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14979  if test "x$has_forbidden_chars" != x; then
14980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14982  fi
14983
14984
14985  windows_path="$new_path"
14986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14987    unix_path=`$CYGPATH -u "$windows_path"`
14988    new_path="$unix_path"
14989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14991    new_path="$unix_path"
14992  fi
14993
14994  if test "x$path" != "x$new_path"; then
14995    BOOT_JDK="$new_path"
14996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14998  fi
14999
15000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15002
15003  else
15004    # We're on a posix platform. Hooray! :)
15005    path="$BOOT_JDK"
15006
15007    if test ! -f "$path" && test ! -d "$path"; then
15008      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15009    fi
15010
15011    has_space=`$ECHO "$path" | $GREP " "`
15012    if test "x$has_space" != x; then
15013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15015      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15016    fi
15017  fi
15018
15019              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15020$as_echo_n "checking for Boot JDK... " >&6; }
15021              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15022$as_echo "$BOOT_JDK" >&6; }
15023              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15024$as_echo_n "checking Boot JDK version... " >&6; }
15025              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15026              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15027$as_echo "$BOOT_JDK_VERSION" >&6; }
15028            fi # end check jdk version
15029          fi # end check rt.jar
15030        fi # end check javac
15031      fi # end check java
15032    fi # end check boot jdk found
15033  fi
15034
15035    done
15036  fi
15037
15038
15039    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15040    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15041      # Do we have a bin/java?
15042      if test ! -x "$BOOT_JDK/bin/java"; then
15043        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15045        BOOT_JDK_FOUND=no
15046      else
15047        # Do we have a bin/javac?
15048        if test ! -x "$BOOT_JDK/bin/javac"; then
15049          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15051          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15052$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15053          BOOT_JDK_FOUND=no
15054        else
15055          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15056          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15059            BOOT_JDK_FOUND=no
15060          else
15061            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15063
15064            # Extra M4 quote needed to protect [] in grep expression.
15065            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15066            if test "x$FOUND_VERSION_78" = x; then
15067              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15069              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15070$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15071              BOOT_JDK_FOUND=no
15072            else
15073              # We're done! :-)
15074              BOOT_JDK_FOUND=yes
15075
15076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15077
15078  # Input might be given as Windows format, start by converting to
15079  # unix format.
15080  path="$BOOT_JDK"
15081  new_path=`$CYGPATH -u "$path"`
15082
15083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15086  # "foo.exe" is OK but "foo" is an error.
15087  #
15088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15089  # It is also a way to make sure we got the proper file name for the real test later on.
15090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15091  if test "x$test_shortpath" = x; then
15092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15093$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15094    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15095  fi
15096
15097  # Call helper function which possibly converts this using DOS-style short mode.
15098  # If so, the updated path is stored in $new_path.
15099
15100  input_path="$new_path"
15101  # Check if we need to convert this using DOS-style short mode. If the path
15102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15103  # take no chances and rewrite it.
15104  # Note: m4 eats our [], so we need to use [ and ] instead.
15105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15106  if test "x$has_forbidden_chars" != x; then
15107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15111      # Going to short mode and back again did indeed matter. Since short mode is
15112      # case insensitive, let's make it lowercase to improve readability.
15113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15114      # Now convert it back to Unix-stile (cygpath)
15115      input_path=`$CYGPATH -u "$shortmode_path"`
15116      new_path="$input_path"
15117    fi
15118  fi
15119
15120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15121  if test "x$test_cygdrive_prefix" = x; then
15122    # As a simple fix, exclude /usr/bin since it's not a real path.
15123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15125      # a path prefixed by /cygdrive for fixpath to work.
15126      new_path="$CYGWIN_ROOT_PATH$input_path"
15127    fi
15128  fi
15129
15130
15131  if test "x$path" != "x$new_path"; then
15132    BOOT_JDK="$new_path"
15133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15134$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15135  fi
15136
15137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15138
15139  path="$BOOT_JDK"
15140  has_colon=`$ECHO $path | $GREP ^.:`
15141  new_path="$path"
15142  if test "x$has_colon" = x; then
15143    # Not in mixed or Windows style, start by that.
15144    new_path=`cmd //c echo $path`
15145  fi
15146
15147
15148  input_path="$new_path"
15149  # Check if we need to convert this using DOS-style short mode. If the path
15150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15151  # take no chances and rewrite it.
15152  # Note: m4 eats our [], so we need to use [ and ] instead.
15153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15154  if test "x$has_forbidden_chars" != x; then
15155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15157  fi
15158
15159
15160  windows_path="$new_path"
15161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15162    unix_path=`$CYGPATH -u "$windows_path"`
15163    new_path="$unix_path"
15164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15166    new_path="$unix_path"
15167  fi
15168
15169  if test "x$path" != "x$new_path"; then
15170    BOOT_JDK="$new_path"
15171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15173  fi
15174
15175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15177
15178  else
15179    # We're on a posix platform. Hooray! :)
15180    path="$BOOT_JDK"
15181
15182    if test ! -f "$path" && test ! -d "$path"; then
15183      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15184    fi
15185
15186    has_space=`$ECHO "$path" | $GREP " "`
15187    if test "x$has_space" != x; then
15188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15189$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15191    fi
15192  fi
15193
15194              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15195$as_echo_n "checking for Boot JDK... " >&6; }
15196              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15197$as_echo "$BOOT_JDK" >&6; }
15198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15199$as_echo_n "checking Boot JDK version... " >&6; }
15200              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15202$as_echo "$BOOT_JDK_VERSION" >&6; }
15203            fi # end check jdk version
15204          fi # end check rt.jar
15205        fi # end check javac
15206      fi # end check java
15207    fi # end check boot jdk found
15208  fi
15209
15210  fi
15211
15212
15213    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15214    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15215      # Do we have a bin/java?
15216      if test ! -x "$BOOT_JDK/bin/java"; then
15217        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15219        BOOT_JDK_FOUND=no
15220      else
15221        # Do we have a bin/javac?
15222        if test ! -x "$BOOT_JDK/bin/javac"; then
15223          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15225          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15226$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15227          BOOT_JDK_FOUND=no
15228        else
15229          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15230          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15231            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15232$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15233            BOOT_JDK_FOUND=no
15234          else
15235            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15236            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15237
15238            # Extra M4 quote needed to protect [] in grep expression.
15239            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15240            if test "x$FOUND_VERSION_78" = x; then
15241              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15242$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15243              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15244$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15245              BOOT_JDK_FOUND=no
15246            else
15247              # We're done! :-)
15248              BOOT_JDK_FOUND=yes
15249
15250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15251
15252  # Input might be given as Windows format, start by converting to
15253  # unix format.
15254  path="$BOOT_JDK"
15255  new_path=`$CYGPATH -u "$path"`
15256
15257  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15258  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15259  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15260  # "foo.exe" is OK but "foo" is an error.
15261  #
15262  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15263  # It is also a way to make sure we got the proper file name for the real test later on.
15264  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15265  if test "x$test_shortpath" = x; then
15266    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15267$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15268    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15269  fi
15270
15271  # Call helper function which possibly converts this using DOS-style short mode.
15272  # If so, the updated path is stored in $new_path.
15273
15274  input_path="$new_path"
15275  # Check if we need to convert this using DOS-style short mode. If the path
15276  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15277  # take no chances and rewrite it.
15278  # Note: m4 eats our [], so we need to use [ and ] instead.
15279  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15280  if test "x$has_forbidden_chars" != x; then
15281    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15282    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15283    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15284    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15285      # Going to short mode and back again did indeed matter. Since short mode is
15286      # case insensitive, let's make it lowercase to improve readability.
15287      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15288      # Now convert it back to Unix-stile (cygpath)
15289      input_path=`$CYGPATH -u "$shortmode_path"`
15290      new_path="$input_path"
15291    fi
15292  fi
15293
15294  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15295  if test "x$test_cygdrive_prefix" = x; then
15296    # As a simple fix, exclude /usr/bin since it's not a real path.
15297    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15298      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15299      # a path prefixed by /cygdrive for fixpath to work.
15300      new_path="$CYGWIN_ROOT_PATH$input_path"
15301    fi
15302  fi
15303
15304
15305  if test "x$path" != "x$new_path"; then
15306    BOOT_JDK="$new_path"
15307    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15308$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15309  fi
15310
15311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15312
15313  path="$BOOT_JDK"
15314  has_colon=`$ECHO $path | $GREP ^.:`
15315  new_path="$path"
15316  if test "x$has_colon" = x; then
15317    # Not in mixed or Windows style, start by that.
15318    new_path=`cmd //c echo $path`
15319  fi
15320
15321
15322  input_path="$new_path"
15323  # Check if we need to convert this using DOS-style short mode. If the path
15324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15325  # take no chances and rewrite it.
15326  # Note: m4 eats our [], so we need to use [ and ] instead.
15327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15328  if test "x$has_forbidden_chars" != x; then
15329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15331  fi
15332
15333
15334  windows_path="$new_path"
15335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15336    unix_path=`$CYGPATH -u "$windows_path"`
15337    new_path="$unix_path"
15338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15340    new_path="$unix_path"
15341  fi
15342
15343  if test "x$path" != "x$new_path"; then
15344    BOOT_JDK="$new_path"
15345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15346$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15347  fi
15348
15349  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15350  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15351
15352  else
15353    # We're on a posix platform. Hooray! :)
15354    path="$BOOT_JDK"
15355
15356    if test ! -f "$path" && test ! -d "$path"; then
15357      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15358    fi
15359
15360    has_space=`$ECHO "$path" | $GREP " "`
15361    if test "x$has_space" != x; then
15362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15364      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15365    fi
15366  fi
15367
15368              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15369$as_echo_n "checking for Boot JDK... " >&6; }
15370              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15371$as_echo "$BOOT_JDK" >&6; }
15372              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15373$as_echo_n "checking Boot JDK version... " >&6; }
15374              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15375              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15376$as_echo "$BOOT_JDK_VERSION" >&6; }
15377            fi # end check jdk version
15378          fi # end check rt.jar
15379        fi # end check javac
15380      fi # end check java
15381    fi # end check boot jdk found
15382  fi
15383
15384
15385# If we haven't found anything yet, we've truly lost. Give up.
15386if test "x$BOOT_JDK_FOUND" = xno; then
15387
15388    # Print a helpful message on how to acquire the necessary build dependency.
15389    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15390    MISSING_DEPENDENCY=openjdk
15391    PKGHANDLER_COMMAND=
15392
15393    case $PKGHANDLER in
15394	apt-get)
15395                apt_help     $MISSING_DEPENDENCY ;;
15396    yum)
15397                yum_help     $MISSING_DEPENDENCY ;;
15398	port)
15399                port_help    $MISSING_DEPENDENCY ;;
15400	pkgutil)
15401                pkgutil_help $MISSING_DEPENDENCY ;;
15402	pkgadd)
15403                pkgadd_help  $MISSING_DEPENDENCY ;;
15404    * )
15405      break ;;
15406    esac
15407
15408    if test "x$PKGHANDLER_COMMAND" != x; then
15409        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15410    fi
15411
15412  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15413$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15414  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15415$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15416  as_fn_error $? "Cannot continue" "$LINENO" 5
15417fi
15418
15419# Setup proper paths for what we found
15420BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15421if test ! -f "$BOOT_RTJAR"; then
15422    # On MacOSX it is called classes.jar
15423    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15424    if test -f "$BOOT_RTJAR"; then
15425      # Remove the ..
15426      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15427    fi
15428fi
15429BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15430BOOT_JDK="$BOOT_JDK"
15431
15432
15433
15434
15435# Setup tools from the Boot JDK.
15436
15437  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15438$as_echo_n "checking for java in Boot JDK... " >&6; }
15439  JAVA=$BOOT_JDK/bin/java
15440  if test ! -x $JAVA; then
15441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15442$as_echo "not found" >&6; }
15443      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15444$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15445      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15446  fi
15447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15448$as_echo "ok" >&6; }
15449
15450
15451  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15452$as_echo_n "checking for javac in Boot JDK... " >&6; }
15453  JAVAC=$BOOT_JDK/bin/javac
15454  if test ! -x $JAVAC; then
15455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15456$as_echo "not found" >&6; }
15457      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15458$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15459      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15460  fi
15461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15462$as_echo "ok" >&6; }
15463
15464
15465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15466$as_echo_n "checking for javah in Boot JDK... " >&6; }
15467  JAVAH=$BOOT_JDK/bin/javah
15468  if test ! -x $JAVAH; then
15469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15470$as_echo "not found" >&6; }
15471      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15472$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15473      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15474  fi
15475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15476$as_echo "ok" >&6; }
15477
15478
15479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15480$as_echo_n "checking for javap in Boot JDK... " >&6; }
15481  JAVAP=$BOOT_JDK/bin/javap
15482  if test ! -x $JAVAP; then
15483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15484$as_echo "not found" >&6; }
15485      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15486$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15487      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15488  fi
15489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15490$as_echo "ok" >&6; }
15491
15492
15493  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15494$as_echo_n "checking for jar in Boot JDK... " >&6; }
15495  JAR=$BOOT_JDK/bin/jar
15496  if test ! -x $JAR; then
15497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15498$as_echo "not found" >&6; }
15499      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15500$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15501      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15502  fi
15503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15504$as_echo "ok" >&6; }
15505
15506
15507  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15508$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15509  RMIC=$BOOT_JDK/bin/rmic
15510  if test ! -x $RMIC; then
15511      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15512$as_echo "not found" >&6; }
15513      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15514$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15515      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15516  fi
15517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15518$as_echo "ok" >&6; }
15519
15520
15521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15522$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15523  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15524  if test ! -x $NATIVE2ASCII; then
15525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15526$as_echo "not found" >&6; }
15527      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15528$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15529      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15530  fi
15531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15532$as_echo "ok" >&6; }
15533
15534
15535# Finally, set some other options...
15536
15537# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15538BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15539
15540
15541
15542
15543##############################################################################
15544#
15545# Specify options for anything that is run with the Boot JDK.
15546#
15547
15548# Check whether --with-boot-jdk-jvmargs was given.
15549if test "${with_boot_jdk_jvmargs+set}" = set; then :
15550  withval=$with_boot_jdk_jvmargs;
15551fi
15552
15553
15554if test "x$with_boot_jdk_jvmargs" = x; then
15555    # Not all JVM:s accept the same arguments on the command line.
15556    # OpenJDK specific increase in thread stack for JDK build,
15557    # well more specifically, when running javac.
15558    if test "x$BUILD_NUM_BITS" = x32; then
15559       STACK_SIZE=768
15560    else
15561       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15562       # since 64-bit pointers are pushed on the stach. Apparently, we need
15563       # to increase the stack space when javacing the JDK....
15564       STACK_SIZE=1536
15565    fi
15566
15567    # Minimum amount of heap memory.
15568
15569    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15570    # If so, then append -Xms64M to boot_jdk_jvmargs
15571    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15572    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15573    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15574        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15575    fi
15576
15577    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15578        # Why does macosx need more heap? Its the huge JDK batch.
15579
15580    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15581    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15582    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15583    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15584    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15585        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15586    fi
15587
15588    else
15589
15590    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15591    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15592    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15593    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15594    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15595        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15596    fi
15597
15598    fi
15599    # When is adding -client something that speeds up the JVM?
15600    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15601
15602    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15603    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15604    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15605    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15606    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15607        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15608    fi
15609
15610
15611    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15612    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15613    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15614    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15615    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15616        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15617    fi
15618
15619
15620    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15621    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15622    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15623    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15624    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15625        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15626    fi
15627
15628    # Disable special log output when a debug build is used as Boot JDK...
15629
15630    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15631    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15632    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15633    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15634    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15635        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15636    fi
15637
15638fi
15639
15640BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15641
15642
15643
15644###############################################################################
15645#
15646# Configure the sources to use. We can add or override individual directories.
15647#
15648###############################################################################
15649
15650
15651
15652# Where are the sources. Any of these can be overridden
15653# using --with-override-corba and the likes.
15654LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15655CORBA_TOPDIR="$SRC_ROOT/corba"
15656JAXP_TOPDIR="$SRC_ROOT/jaxp"
15657JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15658HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15659NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15660JDK_TOPDIR="$SRC_ROOT/jdk"
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671###############################################################################
15672#
15673# Pickup additional source for a component from outside of the source root
15674# or override source for a component.
15675#
15676
15677# Check whether --with-add-source-root was given.
15678if test "${with_add_source_root+set}" = set; then :
15679  withval=$with_add_source_root;
15680fi
15681
15682
15683
15684# Check whether --with-override-source-root was given.
15685if test "${with_override_source_root+set}" = set; then :
15686  withval=$with_override_source_root;
15687fi
15688
15689
15690
15691# Check whether --with-adds-and-overrides was given.
15692if test "${with_adds_and_overrides+set}" = set; then :
15693  withval=$with_adds_and_overrides;
15694fi
15695
15696
15697if test "x$with_adds_and_overrides" != x; then
15698    with_add_source_root="$with_adds_and_overrides/adds"
15699    with_override_source_root="$with_adds_and_overrides/overrides"
15700fi
15701
15702if test "x$with_add_source_root" != x; then
15703    if ! test -d $with_add_source_root; then
15704       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15705    fi
15706    CURDIR="$PWD"
15707    cd "$with_add_source_root"
15708    ADD_SRC_ROOT="`pwd`"
15709    cd "$CURDIR"
15710    # Verify that the addon source root does not have any root makefiles.
15711    # If it does, then it is usually an error, prevent this.
15712    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15713       test -f $with_add_source_root/langtools/make/Makefile; then
15714        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
15715    fi
15716    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15717       test -f $with_add_source_root/corba/make/Makefile; then
15718        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
15719    fi
15720    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15721       test -f $with_add_source_root/jaxp/make/Makefile; then
15722        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
15723    fi
15724    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15725       test -f $with_add_source_root/jaxws/make/Makefile; then
15726        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
15727    fi
15728    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15729       test -f $with_add_source_root/hotspot/make/Makefile; then
15730        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
15731    fi
15732    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15733       test -f $with_add_source_root/jdk/make/Makefile; then
15734        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
15735    fi
15736fi
15737
15738
15739if test "x$with_override_source_root" != x; then
15740    if ! test -d $with_override_source_root; then
15741       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15742    fi
15743    CURDIR="$PWD"
15744    cd "$with_override_source_root"
15745    OVERRIDE_SRC_ROOT="`pwd`"
15746    cd "$CURDIR"
15747    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15748       test -f $with_override_source_root/langtools/make/Makefile; then
15749        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
15750    fi
15751    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15752       test -f $with_override_source_root/corba/make/Makefile; then
15753        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
15754    fi
15755    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15756       test -f $with_override_source_root/jaxp/make/Makefile; then
15757        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
15758    fi
15759    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15760       test -f $with_override_source_root/jaxws/make/Makefile; then
15761        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
15762    fi
15763    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15764       test -f $with_override_source_root/hotspot/make/Makefile; then
15765        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
15766    fi
15767    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15768       test -f $with_override_source_root/jdk/make/Makefile; then
15769        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
15770    fi
15771fi
15772
15773
15774###############################################################################
15775#
15776# Override a repo completely, this is used for example when you have 3 small
15777# development sandboxes of the langtools sources and want to avoid having 3 full
15778# OpenJDK sources checked out on disk.
15779#
15780# Assuming that the 3 langtools sandboxes are located here:
15781# /home/fredrik/sandbox1/langtools
15782# /home/fredrik/sandbox2/langtools
15783# /home/fredrik/sandbox3/langtools
15784#
15785# From the source root you create build subdirs manually:
15786#     mkdir -p build1 build2 build3
15787# in each build directory run:
15788#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15789#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15790#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15791#
15792
15793
15794# Check whether --with-override-langtools was given.
15795if test "${with_override_langtools+set}" = set; then :
15796  withval=$with_override_langtools;
15797fi
15798
15799
15800
15801# Check whether --with-override-corba was given.
15802if test "${with_override_corba+set}" = set; then :
15803  withval=$with_override_corba;
15804fi
15805
15806
15807
15808# Check whether --with-override-jaxp was given.
15809if test "${with_override_jaxp+set}" = set; then :
15810  withval=$with_override_jaxp;
15811fi
15812
15813
15814
15815# Check whether --with-override-jaxws was given.
15816if test "${with_override_jaxws+set}" = set; then :
15817  withval=$with_override_jaxws;
15818fi
15819
15820
15821
15822# Check whether --with-override-hotspot was given.
15823if test "${with_override_hotspot+set}" = set; then :
15824  withval=$with_override_hotspot;
15825fi
15826
15827
15828
15829# Check whether --with-override-jdk was given.
15830if test "${with_override_jdk+set}" = set; then :
15831  withval=$with_override_jdk;
15832fi
15833
15834
15835if test "x$with_override_langtools" != x; then
15836    CURDIR="$PWD"
15837    cd "$with_override_langtools"
15838    LANGTOOLS_TOPDIR="`pwd`"
15839    cd "$CURDIR"
15840    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15841        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15842    fi
15843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15844$as_echo_n "checking if langtools should be overridden... " >&6; }
15845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15846$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15847fi
15848if test "x$with_override_corba" != x; then
15849    CURDIR="$PWD"
15850    cd "$with_override_corba"
15851    CORBA_TOPDIR="`pwd`"
15852    cd "$CURDIR"
15853    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15854        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15855    fi
15856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15857$as_echo_n "checking if corba should be overridden... " >&6; }
15858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15859$as_echo "yes with $CORBA_TOPDIR" >&6; }
15860fi
15861if test "x$with_override_jaxp" != x; then
15862    CURDIR="$PWD"
15863    cd "$with_override_jaxp"
15864    JAXP_TOPDIR="`pwd`"
15865    cd "$CURDIR"
15866    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15867        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15868    fi
15869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15870$as_echo_n "checking if jaxp should be overridden... " >&6; }
15871    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15872$as_echo "yes with $JAXP_TOPDIR" >&6; }
15873fi
15874if test "x$with_override_jaxws" != x; then
15875    CURDIR="$PWD"
15876    cd "$with_override_jaxws"
15877    JAXWS_TOPDIR="`pwd`"
15878    cd "$CURDIR"
15879    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15880        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15881    fi
15882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15883$as_echo_n "checking if jaxws should be overridden... " >&6; }
15884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15885$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15886fi
15887if test "x$with_override_hotspot" != x; then
15888    CURDIR="$PWD"
15889    cd "$with_override_hotspot"
15890    HOTSPOT_TOPDIR="`pwd`"
15891    cd "$CURDIR"
15892    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15893       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15894        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15895    fi
15896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15897$as_echo_n "checking if hotspot should be overridden... " >&6; }
15898    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15899$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15900fi
15901if test "x$with_override_nashorn" != x; then
15902    CURDIR="$PWD"
15903    cd "$with_override_nashorn"
15904    NASHORN_TOPDIR="`pwd`"
15905    cd "$CURDIR"
15906    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
15907        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
15908    fi
15909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
15910$as_echo_n "checking if nashorn should be overridden... " >&6; }
15911    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
15912$as_echo "yes with $NASHORN_TOPDIR" >&6; }
15913fi
15914if test "x$with_override_jdk" != x; then
15915    CURDIR="$PWD"
15916    cd "$with_override_jdk"
15917    JDK_TOPDIR="`pwd`"
15918    cd "$CURDIR"
15919    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15920        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15921    fi
15922    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15923$as_echo_n "checking if JDK should be overridden... " >&6; }
15924    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15925$as_echo "yes with $JDK_TOPDIR" >&6; }
15926fi
15927
15928
15929
15930BUILD_OUTPUT="$OUTPUT_ROOT"
15931
15932
15933HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15934BUILD_HOTSPOT=true
15935
15936
15937
15938# Check whether --with-import-hotspot was given.
15939if test "${with_import_hotspot+set}" = set; then :
15940  withval=$with_import_hotspot;
15941fi
15942
15943if test "x$with_import_hotspot" != x; then
15944    CURDIR="$PWD"
15945    cd "$with_import_hotspot"
15946    HOTSPOT_DIST="`pwd`"
15947    cd "$CURDIR"
15948    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15949        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15950    fi
15951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15952$as_echo_n "checking if hotspot should be imported... " >&6; }
15953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15954$as_echo "yes from $HOTSPOT_DIST" >&6; }
15955    BUILD_HOTSPOT=false
15956fi
15957
15958JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15959
15960
15961###############################################################################
15962#
15963# Setup the toolchain (compilers etc), i.e. the tools that need to be
15964# cross-compilation aware.
15965#
15966###############################################################################
15967
15968
15969###############################################################################
15970#
15971# Configure the development tool paths and potential sysroot.
15972#
15973ac_ext=cpp
15974ac_cpp='$CXXCPP $CPPFLAGS'
15975ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15976ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15977ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15978
15979
15980# The option used to specify the target .o,.a or .so file.
15981# When compiling, how to specify the to be created object file.
15982CC_OUT_OPTION='-o$(SPACE)'
15983# When linking, how to specify the to be created executable.
15984EXE_OUT_OPTION='-o$(SPACE)'
15985# When linking, how to specify the to be created dynamically linkable library.
15986LD_OUT_OPTION='-o$(SPACE)'
15987# When archiving, how to specify the to be create static archive for object files.
15988AR_OUT_OPTION='rcs$(SPACE)'
15989
15990
15991
15992
15993
15994# Locate the actual tools
15995
15996if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15997
15998  # Store path to cygwin link.exe to help excluding it when searching for
15999  # VS linker. This must be done before changing the PATH when looking for VS.
16000  # Extract the first word of "link", so it can be a program name with args.
16001set dummy link; ac_word=$2
16002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16003$as_echo_n "checking for $ac_word... " >&6; }
16004if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16005  $as_echo_n "(cached) " >&6
16006else
16007  case $CYGWIN_LINK in
16008  [\\/]* | ?:[\\/]*)
16009  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16010  ;;
16011  *)
16012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16013for as_dir in $PATH
16014do
16015  IFS=$as_save_IFS
16016  test -z "$as_dir" && as_dir=.
16017    for ac_exec_ext in '' $ac_executable_extensions; do
16018  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16019    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16021    break 2
16022  fi
16023done
16024  done
16025IFS=$as_save_IFS
16026
16027  ;;
16028esac
16029fi
16030CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16031if test -n "$CYGWIN_LINK"; then
16032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16033$as_echo "$CYGWIN_LINK" >&6; }
16034else
16035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16036$as_echo "no" >&6; }
16037fi
16038
16039
16040  if test "x$CYGWIN_LINK" != x; then
16041    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16042$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16043    "$CYGWIN_LINK" --version > /dev/null
16044    if test $? -eq 0 ; then
16045      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16046$as_echo "yes" >&6; }
16047    else
16048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16049$as_echo "no" >&6; }
16050      # This might be the VS linker. Don't exclude it later on.
16051      CYGWIN_LINK=""
16052    fi
16053  fi
16054
16055  # First-hand choice is to locate and run the vsvars bat file.
16056
16057  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16058    VCVARSFILE="vc/bin/vcvars32.bat"
16059  else
16060    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16061  fi
16062
16063  VS_ENV_CMD=""
16064  VS_ENV_ARGS=""
16065  if test "x$with_toolsdir" != x; then
16066
16067  if test "x$VS_ENV_CMD" = x; then
16068    VS100BASE="$with_toolsdir/../.."
16069    METHOD="--with-tools-dir"
16070
16071  windows_path="$VS100BASE"
16072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16073    unix_path=`$CYGPATH -u "$windows_path"`
16074    VS100BASE="$unix_path"
16075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16077    VS100BASE="$unix_path"
16078  fi
16079
16080    if test -d "$VS100BASE"; then
16081      if test -f "$VS100BASE/$VCVARSFILE"; then
16082        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16083$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16084        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16085      else
16086        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16087$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16088        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16089$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16090      fi
16091    fi
16092  fi
16093
16094  fi
16095
16096  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16097    # Having specified an argument which is incorrect will produce an instant failure;
16098    # we should not go on looking
16099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16100$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16101    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16102$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16103    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16104  fi
16105
16106  if test "x$ProgramW6432" != x; then
16107
16108  if test "x$VS_ENV_CMD" = x; then
16109    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16110    METHOD="well-known name"
16111
16112  windows_path="$WIN_SDK_BASE"
16113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16114    unix_path=`$CYGPATH -u "$windows_path"`
16115    WIN_SDK_BASE="$unix_path"
16116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16118    WIN_SDK_BASE="$unix_path"
16119  fi
16120
16121    if test -d "$WIN_SDK_BASE"; then
16122      # There have been cases of partial or broken SDK installations. A missing
16123      # lib dir is not going to work.
16124      if test ! -d "$WIN_SDK_BASE/../lib"; then
16125        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16126$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16127        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16128$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16129      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16130        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16131$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16132        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16133        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16134          VS_ENV_ARGS="/x86"
16135        else
16136          VS_ENV_ARGS="/x64"
16137        fi
16138      else
16139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16142$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16143      fi
16144    fi
16145  fi
16146
16147  fi
16148  if test "x$PROGRAMW6432" != x; then
16149
16150  if test "x$VS_ENV_CMD" = x; then
16151    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16152    METHOD="well-known name"
16153
16154  windows_path="$WIN_SDK_BASE"
16155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16156    unix_path=`$CYGPATH -u "$windows_path"`
16157    WIN_SDK_BASE="$unix_path"
16158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16160    WIN_SDK_BASE="$unix_path"
16161  fi
16162
16163    if test -d "$WIN_SDK_BASE"; then
16164      # There have been cases of partial or broken SDK installations. A missing
16165      # lib dir is not going to work.
16166      if test ! -d "$WIN_SDK_BASE/../lib"; then
16167        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16168$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16169        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16170$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16171      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16173$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16174        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16175        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16176          VS_ENV_ARGS="/x86"
16177        else
16178          VS_ENV_ARGS="/x64"
16179        fi
16180      else
16181        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16182$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16183        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16184$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16185      fi
16186    fi
16187  fi
16188
16189  fi
16190  if test "x$PROGRAMFILES" != x; then
16191
16192  if test "x$VS_ENV_CMD" = x; then
16193    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16194    METHOD="well-known name"
16195
16196  windows_path="$WIN_SDK_BASE"
16197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16198    unix_path=`$CYGPATH -u "$windows_path"`
16199    WIN_SDK_BASE="$unix_path"
16200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16202    WIN_SDK_BASE="$unix_path"
16203  fi
16204
16205    if test -d "$WIN_SDK_BASE"; then
16206      # There have been cases of partial or broken SDK installations. A missing
16207      # lib dir is not going to work.
16208      if test ! -d "$WIN_SDK_BASE/../lib"; then
16209        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16210$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16211        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16212$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16213      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16214        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16215$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16216        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16217        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16218          VS_ENV_ARGS="/x86"
16219        else
16220          VS_ENV_ARGS="/x64"
16221        fi
16222      else
16223        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16224$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16225        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16226$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16227      fi
16228    fi
16229  fi
16230
16231  fi
16232
16233  if test "x$VS_ENV_CMD" = x; then
16234    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16235    METHOD="well-known name"
16236
16237  windows_path="$WIN_SDK_BASE"
16238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16239    unix_path=`$CYGPATH -u "$windows_path"`
16240    WIN_SDK_BASE="$unix_path"
16241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16243    WIN_SDK_BASE="$unix_path"
16244  fi
16245
16246    if test -d "$WIN_SDK_BASE"; then
16247      # There have been cases of partial or broken SDK installations. A missing
16248      # lib dir is not going to work.
16249      if test ! -d "$WIN_SDK_BASE/../lib"; then
16250        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16251$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16252        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16253$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16254      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16255        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16256$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16257        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16258        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16259          VS_ENV_ARGS="/x86"
16260        else
16261          VS_ENV_ARGS="/x64"
16262        fi
16263      else
16264        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16265$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16266        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16267$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16268      fi
16269    fi
16270  fi
16271
16272
16273  if test "x$VS_ENV_CMD" = x; then
16274    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16275    METHOD="well-known name"
16276
16277  windows_path="$WIN_SDK_BASE"
16278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16279    unix_path=`$CYGPATH -u "$windows_path"`
16280    WIN_SDK_BASE="$unix_path"
16281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16283    WIN_SDK_BASE="$unix_path"
16284  fi
16285
16286    if test -d "$WIN_SDK_BASE"; then
16287      # There have been cases of partial or broken SDK installations. A missing
16288      # lib dir is not going to work.
16289      if test ! -d "$WIN_SDK_BASE/../lib"; then
16290        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16291$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16292        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16293$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16294      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16295        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16296$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16297        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16298        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16299          VS_ENV_ARGS="/x86"
16300        else
16301          VS_ENV_ARGS="/x64"
16302        fi
16303      else
16304        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16305$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16306        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16307$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16308      fi
16309    fi
16310  fi
16311
16312
16313  if test "x$VS100COMNTOOLS" != x; then
16314
16315  if test "x$VS_ENV_CMD" = x; then
16316    VS100BASE="$VS100COMNTOOLS/../.."
16317    METHOD="VS100COMNTOOLS variable"
16318
16319  windows_path="$VS100BASE"
16320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16321    unix_path=`$CYGPATH -u "$windows_path"`
16322    VS100BASE="$unix_path"
16323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16325    VS100BASE="$unix_path"
16326  fi
16327
16328    if test -d "$VS100BASE"; then
16329      if test -f "$VS100BASE/$VCVARSFILE"; then
16330        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16331$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16332        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16333      else
16334        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16335$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16336        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16337$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16338      fi
16339    fi
16340  fi
16341
16342  fi
16343  if test "x$PROGRAMFILES" != x; then
16344
16345  if test "x$VS_ENV_CMD" = x; then
16346    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16347    METHOD="well-known name"
16348
16349  windows_path="$VS100BASE"
16350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16351    unix_path=`$CYGPATH -u "$windows_path"`
16352    VS100BASE="$unix_path"
16353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16355    VS100BASE="$unix_path"
16356  fi
16357
16358    if test -d "$VS100BASE"; then
16359      if test -f "$VS100BASE/$VCVARSFILE"; then
16360        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16361$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16362        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16363      else
16364        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16365$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16366        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16367$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16368      fi
16369    fi
16370  fi
16371
16372  fi
16373
16374  if test "x$VS_ENV_CMD" = x; then
16375    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16376    METHOD="well-known name"
16377
16378  windows_path="$VS100BASE"
16379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16380    unix_path=`$CYGPATH -u "$windows_path"`
16381    VS100BASE="$unix_path"
16382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16384    VS100BASE="$unix_path"
16385  fi
16386
16387    if test -d "$VS100BASE"; then
16388      if test -f "$VS100BASE/$VCVARSFILE"; then
16389        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16390$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16391        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16392      else
16393        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16394$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16395        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16396$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16397      fi
16398    fi
16399  fi
16400
16401
16402  if test "x$VS_ENV_CMD" = x; then
16403    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16404    METHOD="well-known name"
16405
16406  windows_path="$VS100BASE"
16407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16408    unix_path=`$CYGPATH -u "$windows_path"`
16409    VS100BASE="$unix_path"
16410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16412    VS100BASE="$unix_path"
16413  fi
16414
16415    if test -d "$VS100BASE"; then
16416      if test -f "$VS100BASE/$VCVARSFILE"; then
16417        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16418$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16419        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16420      else
16421        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16422$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16423        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16424$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16425      fi
16426    fi
16427  fi
16428
16429
16430  if test "x$VS_ENV_CMD" != x; then
16431    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16432
16433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16434
16435  # First separate the path from the arguments. This will split at the first
16436  # space.
16437  complete="$VS_ENV_CMD"
16438  path="${complete%% *}"
16439  tmp="$complete EOL"
16440  arguments="${tmp#* }"
16441
16442  # Input might be given as Windows format, start by converting to
16443  # unix format.
16444  new_path=`$CYGPATH -u "$path"`
16445
16446  # Now try to locate executable using which
16447  new_path=`$WHICH "$new_path" 2> /dev/null`
16448  # bat and cmd files are not always considered executable in cygwin causing which
16449  # to not find them
16450  if test "x$new_path" = x \
16451           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16452           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16453    new_path=`$CYGPATH -u "$path"`
16454  fi
16455  if test "x$new_path" = x; then
16456    # Oops. Which didn't find the executable.
16457    # The splitting of arguments from the executable at a space might have been incorrect,
16458    # since paths with space are more likely in Windows. Give it another try with the whole
16459    # argument.
16460    path="$complete"
16461    arguments="EOL"
16462    new_path=`$CYGPATH -u "$path"`
16463    new_path=`$WHICH "$new_path" 2> /dev/null`
16464    # bat and cmd files are not always considered executable in cygwin causing which
16465    # to not find them
16466    if test "x$new_path" = x \
16467             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16468             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16469      new_path=`$CYGPATH -u "$path"`
16470    fi
16471    if test "x$new_path" = x; then
16472      # It's still not found. Now this is an unrecoverable error.
16473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16474$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16475      has_space=`$ECHO "$complete" | $GREP " "`
16476      if test "x$has_space" != x; then
16477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16479      fi
16480      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16481    fi
16482  fi
16483
16484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16487  # "foo.exe" is OK but "foo" is an error.
16488  #
16489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16490  # It is also a way to make sure we got the proper file name for the real test later on.
16491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16492  if test "x$test_shortpath" = x; then
16493    # Short path failed, file does not exist as specified.
16494    # Try adding .exe or .cmd
16495    if test -f "${new_path}.exe"; then
16496       input_to_shortpath="${new_path}.exe"
16497    elif test -f "${new_path}.cmd"; then
16498       input_to_shortpath="${new_path}.cmd"
16499    else
16500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16501$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16502      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16503$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16504      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16505    fi
16506  else
16507    input_to_shortpath="$new_path"
16508  fi
16509
16510  # Call helper function which possibly converts this using DOS-style short mode.
16511  # If so, the updated path is stored in $new_path.
16512  new_path="$input_to_shortpath"
16513
16514  input_path="$input_to_shortpath"
16515  # Check if we need to convert this using DOS-style short mode. If the path
16516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16517  # take no chances and rewrite it.
16518  # Note: m4 eats our [], so we need to use [ and ] instead.
16519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16520  if test "x$has_forbidden_chars" != x; then
16521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16525      # Going to short mode and back again did indeed matter. Since short mode is
16526      # case insensitive, let's make it lowercase to improve readability.
16527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16528      # Now convert it back to Unix-stile (cygpath)
16529      input_path=`$CYGPATH -u "$shortmode_path"`
16530      new_path="$input_path"
16531    fi
16532  fi
16533
16534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16535  if test "x$test_cygdrive_prefix" = x; then
16536    # As a simple fix, exclude /usr/bin since it's not a real path.
16537    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16539      # a path prefixed by /cygdrive for fixpath to work.
16540      new_path="$CYGWIN_ROOT_PATH$input_path"
16541    fi
16542  fi
16543
16544  # remove trailing .exe if any
16545  new_path="${new_path/%.exe/}"
16546
16547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16548
16549  # First separate the path from the arguments. This will split at the first
16550  # space.
16551  complete="$VS_ENV_CMD"
16552  path="${complete%% *}"
16553  tmp="$complete EOL"
16554  arguments="${tmp#* }"
16555
16556  # Input might be given as Windows format, start by converting to
16557  # unix format.
16558  new_path="$path"
16559
16560  windows_path="$new_path"
16561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16562    unix_path=`$CYGPATH -u "$windows_path"`
16563    new_path="$unix_path"
16564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16566    new_path="$unix_path"
16567  fi
16568
16569
16570  # Now try to locate executable using which
16571  new_path=`$WHICH "$new_path" 2> /dev/null`
16572
16573  if test "x$new_path" = x; then
16574    # Oops. Which didn't find the executable.
16575    # The splitting of arguments from the executable at a space might have been incorrect,
16576    # since paths with space are more likely in Windows. Give it another try with the whole
16577    # argument.
16578    path="$complete"
16579    arguments="EOL"
16580    new_path="$path"
16581
16582  windows_path="$new_path"
16583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16584    unix_path=`$CYGPATH -u "$windows_path"`
16585    new_path="$unix_path"
16586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16588    new_path="$unix_path"
16589  fi
16590
16591
16592    new_path=`$WHICH "$new_path" 2> /dev/null`
16593
16594    if test "x$new_path" = x; then
16595      # It's still not found. Now this is an unrecoverable error.
16596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16597$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16598      has_space=`$ECHO "$complete" | $GREP " "`
16599      if test "x$has_space" != x; then
16600        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16601$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16602      fi
16603      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16604    fi
16605  fi
16606
16607  # Now new_path has a complete unix path to the binary
16608  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16609    # Keep paths in /bin as-is, but remove trailing .exe if any
16610    new_path="${new_path/%.exe/}"
16611    # Do not save /bin paths to all_fixpath_prefixes!
16612  else
16613    # Not in mixed or Windows style, start by that.
16614    new_path=`cmd //c echo $new_path`
16615
16616  input_path="$new_path"
16617  # Check if we need to convert this using DOS-style short mode. If the path
16618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16619  # take no chances and rewrite it.
16620  # Note: m4 eats our [], so we need to use [ and ] instead.
16621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16622  if test "x$has_forbidden_chars" != x; then
16623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16625  fi
16626
16627    # Output is in $new_path
16628
16629  windows_path="$new_path"
16630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16631    unix_path=`$CYGPATH -u "$windows_path"`
16632    new_path="$unix_path"
16633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16635    new_path="$unix_path"
16636  fi
16637
16638    # remove trailing .exe if any
16639    new_path="${new_path/%.exe/}"
16640
16641    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16642    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16643  fi
16644
16645  else
16646    # We're on a posix platform. Hooray! :)
16647    # First separate the path from the arguments. This will split at the first
16648    # space.
16649    complete="$VS_ENV_CMD"
16650    path="${complete%% *}"
16651    tmp="$complete EOL"
16652    arguments="${tmp#* }"
16653
16654    # Cannot rely on the command "which" here since it doesn't always work.
16655    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16656    if test -z "$is_absolute_path"; then
16657      # Path to executable is not absolute. Find it.
16658      IFS_save="$IFS"
16659      IFS=:
16660      for p in $PATH; do
16661        if test -f "$p/$path" && test -x "$p/$path"; then
16662          new_path="$p/$path"
16663          break
16664        fi
16665      done
16666      IFS="$IFS_save"
16667    else
16668      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16669$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16670      new_path="$path"
16671    fi
16672
16673    if test "x$new_path" = x; then
16674        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16675$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16676        has_space=`$ECHO "$complete" | $GREP " "`
16677        if test "x$has_space" != x; then
16678          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16679$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16680        fi
16681        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16682      fi
16683  fi
16684
16685      # Now join together the path and the arguments once again
16686      if test "x$arguments" != xEOL; then
16687        new_complete="$new_path ${arguments% *}"
16688      else
16689        new_complete="$new_path"
16690      fi
16691
16692  if test "x$complete" != "x$new_complete"; then
16693      VS_ENV_CMD="$new_complete"
16694      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16695$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16696    fi
16697
16698
16699    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16700    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16701$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16702    cd $OUTPUT_ROOT
16703    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16704    # to autoconf standards.
16705
16706    #----
16707
16708    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16709    # but calculate the difference in Cygwin environment before/after running it and then
16710    # apply the diff.
16711
16712    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16713      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16714      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16715      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16716    else
16717      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16718      _dosbash=`cmd //c echo \`which bash\``
16719    fi
16720
16721    # generate the set of exported vars before/after the vs10 setup
16722    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16723    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16724    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16725    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16726
16727    # Now execute the newly created bat file.
16728    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16729    cmd /c localdevenvtmp.bat | cat
16730
16731    # apply the diff (less some non-vs10 vars named by "!")
16732    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16733    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16734    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16735
16736    # cleanup
16737    $RM localdevenvtmp*
16738    #----
16739    cd $CURDIR
16740    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16741      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16742$as_echo "no" >&6; }
16743      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16744$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16745      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16746$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16747      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16748$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16749      as_fn_error $? "Cannot continue" "$LINENO" 5
16750    fi
16751
16752    # Now set all paths and other env variables. This will allow the rest of
16753    # the configure script to find and run the compiler in the proper way.
16754    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16755$as_echo "$as_me: Setting extracted environment variables" >&6;}
16756    . $OUTPUT_ROOT/localdevenv.sh
16757  else
16758    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16759    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16760$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16761  fi
16762
16763  # At this point, we should have corrent variables in the environment, or we can't continue.
16764  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16765$as_echo_n "checking for Visual Studio variables... " >&6; }
16766
16767  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16768    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16769      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16770$as_echo "present but broken" >&6; }
16771      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16772    else
16773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16774$as_echo "ok" >&6; }
16775      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16776      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16777      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16778      VS_PATH="$PATH"
16779
16780
16781
16782    fi
16783  else
16784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16785$as_echo "not found" >&6; }
16786
16787    if test "x$VS_ENV_CMD" = x; then
16788      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16789$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16790      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16791$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16792    else
16793      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16794$as_echo "$as_me: Running the extraction script failed." >&6;}
16795    fi
16796    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16797$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16798    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16799$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16800    as_fn_error $? "Cannot continue" "$LINENO" 5
16801  fi
16802
16803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16804$as_echo_n "checking for msvcr100.dll... " >&6; }
16805
16806# Check whether --with-msvcr-dll was given.
16807if test "${with_msvcr_dll+set}" = set; then :
16808  withval=$with_msvcr_dll;
16809fi
16810
16811  if test "x$with_msvcr_dll" != x; then
16812    MSVCR_DLL="$with_msvcr_dll"
16813  else
16814    if test "x$VCINSTALLDIR" != x; then
16815      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16816        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16817      else
16818        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16819        if test "x$MSVCR_DLL" = x; then
16820          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16821        fi
16822      fi
16823      if test "x$MSVCR_DLL" != x; then
16824        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16825$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16826      else
16827        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16828$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16829      fi
16830    fi
16831    if test "x$MSVCR_DLL" = x; then
16832      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16833        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16834$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16835        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16836      fi
16837    fi
16838  fi
16839  if test "x$MSVCR_DLL" = x; then
16840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16841$as_echo "no" >&6; }
16842    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16843  fi
16844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16845$as_echo "$MSVCR_DLL" >&6; }
16846
16847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16848
16849  # Input might be given as Windows format, start by converting to
16850  # unix format.
16851  path="$MSVCR_DLL"
16852  new_path=`$CYGPATH -u "$path"`
16853
16854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16857  # "foo.exe" is OK but "foo" is an error.
16858  #
16859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16860  # It is also a way to make sure we got the proper file name for the real test later on.
16861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16862  if test "x$test_shortpath" = x; then
16863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16864$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16865    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16866  fi
16867
16868  # Call helper function which possibly converts this using DOS-style short mode.
16869  # If so, the updated path is stored in $new_path.
16870
16871  input_path="$new_path"
16872  # Check if we need to convert this using DOS-style short mode. If the path
16873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16874  # take no chances and rewrite it.
16875  # Note: m4 eats our [], so we need to use [ and ] instead.
16876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16877  if test "x$has_forbidden_chars" != x; then
16878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16882      # Going to short mode and back again did indeed matter. Since short mode is
16883      # case insensitive, let's make it lowercase to improve readability.
16884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16885      # Now convert it back to Unix-stile (cygpath)
16886      input_path=`$CYGPATH -u "$shortmode_path"`
16887      new_path="$input_path"
16888    fi
16889  fi
16890
16891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16892  if test "x$test_cygdrive_prefix" = x; then
16893    # As a simple fix, exclude /usr/bin since it's not a real path.
16894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16896      # a path prefixed by /cygdrive for fixpath to work.
16897      new_path="$CYGWIN_ROOT_PATH$input_path"
16898    fi
16899  fi
16900
16901
16902  if test "x$path" != "x$new_path"; then
16903    MSVCR_DLL="$new_path"
16904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16905$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16906  fi
16907
16908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16909
16910  path="$MSVCR_DLL"
16911  has_colon=`$ECHO $path | $GREP ^.:`
16912  new_path="$path"
16913  if test "x$has_colon" = x; then
16914    # Not in mixed or Windows style, start by that.
16915    new_path=`cmd //c echo $path`
16916  fi
16917
16918
16919  input_path="$new_path"
16920  # Check if we need to convert this using DOS-style short mode. If the path
16921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16922  # take no chances and rewrite it.
16923  # Note: m4 eats our [], so we need to use [ and ] instead.
16924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16925  if test "x$has_forbidden_chars" != x; then
16926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16928  fi
16929
16930
16931  windows_path="$new_path"
16932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16933    unix_path=`$CYGPATH -u "$windows_path"`
16934    new_path="$unix_path"
16935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16937    new_path="$unix_path"
16938  fi
16939
16940  if test "x$path" != "x$new_path"; then
16941    MSVCR_DLL="$new_path"
16942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16943$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16944  fi
16945
16946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16948
16949  else
16950    # We're on a posix platform. Hooray! :)
16951    path="$MSVCR_DLL"
16952
16953    if test ! -f "$path" && test ! -d "$path"; then
16954      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16955    fi
16956
16957    has_space=`$ECHO "$path" | $GREP " "`
16958    if test "x$has_space" != x; then
16959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16960$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16961      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16962    fi
16963  fi
16964
16965
16966fi
16967
16968
16969
16970# If --build AND --host is set, then the configure script will find any
16971# cross compilation tools in the PATH. Cross compilation tools
16972# follows the cross compilation standard where they are prefixed with ${host}.
16973# For example the binary i686-sun-solaris2.10-gcc
16974# will cross compile for i686-sun-solaris2.10
16975# If neither of build and host is not set, then build=host and the
16976# default compiler found in the path will be used.
16977# Setting only --host, does not seem to be really supported.
16978# Please set both --build and --host if you want to cross compile.
16979
16980if test "x$COMPILE_TYPE" = "xcross"; then
16981    # Now we to find a C/C++ compiler that can build executables for the build
16982    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16983    # once. Also, we need to do this before adding a tools dir to the path,
16984    # otherwise we might pick up cross-compilers which don't use standard naming.
16985    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16986    # to wait until they are properly discovered.
16987    for ac_prog in cl cc gcc
16988do
16989  # Extract the first word of "$ac_prog", so it can be a program name with args.
16990set dummy $ac_prog; ac_word=$2
16991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16992$as_echo_n "checking for $ac_word... " >&6; }
16993if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16994  $as_echo_n "(cached) " >&6
16995else
16996  case $BUILD_CC in
16997  [\\/]* | ?:[\\/]*)
16998  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16999  ;;
17000  *)
17001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17002for as_dir in $PATH
17003do
17004  IFS=$as_save_IFS
17005  test -z "$as_dir" && as_dir=.
17006    for ac_exec_ext in '' $ac_executable_extensions; do
17007  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17008    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17010    break 2
17011  fi
17012done
17013  done
17014IFS=$as_save_IFS
17015
17016  ;;
17017esac
17018fi
17019BUILD_CC=$ac_cv_path_BUILD_CC
17020if test -n "$BUILD_CC"; then
17021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17022$as_echo "$BUILD_CC" >&6; }
17023else
17024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17025$as_echo "no" >&6; }
17026fi
17027
17028
17029  test -n "$BUILD_CC" && break
17030done
17031
17032
17033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17034
17035  # First separate the path from the arguments. This will split at the first
17036  # space.
17037  complete="$BUILD_CC"
17038  path="${complete%% *}"
17039  tmp="$complete EOL"
17040  arguments="${tmp#* }"
17041
17042  # Input might be given as Windows format, start by converting to
17043  # unix format.
17044  new_path=`$CYGPATH -u "$path"`
17045
17046  # Now try to locate executable using which
17047  new_path=`$WHICH "$new_path" 2> /dev/null`
17048  # bat and cmd files are not always considered executable in cygwin causing which
17049  # to not find them
17050  if test "x$new_path" = x \
17051           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17052           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17053    new_path=`$CYGPATH -u "$path"`
17054  fi
17055  if test "x$new_path" = x; then
17056    # Oops. Which didn't find the executable.
17057    # The splitting of arguments from the executable at a space might have been incorrect,
17058    # since paths with space are more likely in Windows. Give it another try with the whole
17059    # argument.
17060    path="$complete"
17061    arguments="EOL"
17062    new_path=`$CYGPATH -u "$path"`
17063    new_path=`$WHICH "$new_path" 2> /dev/null`
17064    # bat and cmd files are not always considered executable in cygwin causing which
17065    # to not find them
17066    if test "x$new_path" = x \
17067             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17068             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17069      new_path=`$CYGPATH -u "$path"`
17070    fi
17071    if test "x$new_path" = x; then
17072      # It's still not found. Now this is an unrecoverable error.
17073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17074$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17075      has_space=`$ECHO "$complete" | $GREP " "`
17076      if test "x$has_space" != x; then
17077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17079      fi
17080      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17081    fi
17082  fi
17083
17084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17087  # "foo.exe" is OK but "foo" is an error.
17088  #
17089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17090  # It is also a way to make sure we got the proper file name for the real test later on.
17091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17092  if test "x$test_shortpath" = x; then
17093    # Short path failed, file does not exist as specified.
17094    # Try adding .exe or .cmd
17095    if test -f "${new_path}.exe"; then
17096       input_to_shortpath="${new_path}.exe"
17097    elif test -f "${new_path}.cmd"; then
17098       input_to_shortpath="${new_path}.cmd"
17099    else
17100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17101$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17102      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17103$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17104      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17105    fi
17106  else
17107    input_to_shortpath="$new_path"
17108  fi
17109
17110  # Call helper function which possibly converts this using DOS-style short mode.
17111  # If so, the updated path is stored in $new_path.
17112  new_path="$input_to_shortpath"
17113
17114  input_path="$input_to_shortpath"
17115  # Check if we need to convert this using DOS-style short mode. If the path
17116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17117  # take no chances and rewrite it.
17118  # Note: m4 eats our [], so we need to use [ and ] instead.
17119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17120  if test "x$has_forbidden_chars" != x; then
17121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17125      # Going to short mode and back again did indeed matter. Since short mode is
17126      # case insensitive, let's make it lowercase to improve readability.
17127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17128      # Now convert it back to Unix-stile (cygpath)
17129      input_path=`$CYGPATH -u "$shortmode_path"`
17130      new_path="$input_path"
17131    fi
17132  fi
17133
17134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17135  if test "x$test_cygdrive_prefix" = x; then
17136    # As a simple fix, exclude /usr/bin since it's not a real path.
17137    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17139      # a path prefixed by /cygdrive for fixpath to work.
17140      new_path="$CYGWIN_ROOT_PATH$input_path"
17141    fi
17142  fi
17143
17144  # remove trailing .exe if any
17145  new_path="${new_path/%.exe/}"
17146
17147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17148
17149  # First separate the path from the arguments. This will split at the first
17150  # space.
17151  complete="$BUILD_CC"
17152  path="${complete%% *}"
17153  tmp="$complete EOL"
17154  arguments="${tmp#* }"
17155
17156  # Input might be given as Windows format, start by converting to
17157  # unix format.
17158  new_path="$path"
17159
17160  windows_path="$new_path"
17161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17162    unix_path=`$CYGPATH -u "$windows_path"`
17163    new_path="$unix_path"
17164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17166    new_path="$unix_path"
17167  fi
17168
17169
17170  # Now try to locate executable using which
17171  new_path=`$WHICH "$new_path" 2> /dev/null`
17172
17173  if test "x$new_path" = x; then
17174    # Oops. Which didn't find the executable.
17175    # The splitting of arguments from the executable at a space might have been incorrect,
17176    # since paths with space are more likely in Windows. Give it another try with the whole
17177    # argument.
17178    path="$complete"
17179    arguments="EOL"
17180    new_path="$path"
17181
17182  windows_path="$new_path"
17183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17184    unix_path=`$CYGPATH -u "$windows_path"`
17185    new_path="$unix_path"
17186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17188    new_path="$unix_path"
17189  fi
17190
17191
17192    new_path=`$WHICH "$new_path" 2> /dev/null`
17193
17194    if test "x$new_path" = x; then
17195      # It's still not found. Now this is an unrecoverable error.
17196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17197$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17198      has_space=`$ECHO "$complete" | $GREP " "`
17199      if test "x$has_space" != x; then
17200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17202      fi
17203      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17204    fi
17205  fi
17206
17207  # Now new_path has a complete unix path to the binary
17208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17209    # Keep paths in /bin as-is, but remove trailing .exe if any
17210    new_path="${new_path/%.exe/}"
17211    # Do not save /bin paths to all_fixpath_prefixes!
17212  else
17213    # Not in mixed or Windows style, start by that.
17214    new_path=`cmd //c echo $new_path`
17215
17216  input_path="$new_path"
17217  # Check if we need to convert this using DOS-style short mode. If the path
17218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17219  # take no chances and rewrite it.
17220  # Note: m4 eats our [], so we need to use [ and ] instead.
17221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17222  if test "x$has_forbidden_chars" != x; then
17223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17225  fi
17226
17227    # Output is in $new_path
17228
17229  windows_path="$new_path"
17230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17231    unix_path=`$CYGPATH -u "$windows_path"`
17232    new_path="$unix_path"
17233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17235    new_path="$unix_path"
17236  fi
17237
17238    # remove trailing .exe if any
17239    new_path="${new_path/%.exe/}"
17240
17241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17243  fi
17244
17245  else
17246    # We're on a posix platform. Hooray! :)
17247    # First separate the path from the arguments. This will split at the first
17248    # space.
17249    complete="$BUILD_CC"
17250    path="${complete%% *}"
17251    tmp="$complete EOL"
17252    arguments="${tmp#* }"
17253
17254    # Cannot rely on the command "which" here since it doesn't always work.
17255    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17256    if test -z "$is_absolute_path"; then
17257      # Path to executable is not absolute. Find it.
17258      IFS_save="$IFS"
17259      IFS=:
17260      for p in $PATH; do
17261        if test -f "$p/$path" && test -x "$p/$path"; then
17262          new_path="$p/$path"
17263          break
17264        fi
17265      done
17266      IFS="$IFS_save"
17267    else
17268      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17269$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17270      new_path="$path"
17271    fi
17272
17273    if test "x$new_path" = x; then
17274        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17275$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17276        has_space=`$ECHO "$complete" | $GREP " "`
17277        if test "x$has_space" != x; then
17278          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17279$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17280        fi
17281        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17282      fi
17283  fi
17284
17285      # Now join together the path and the arguments once again
17286      if test "x$arguments" != xEOL; then
17287        new_complete="$new_path ${arguments% *}"
17288      else
17289        new_complete="$new_path"
17290      fi
17291
17292  if test "x$complete" != "x$new_complete"; then
17293      BUILD_CC="$new_complete"
17294      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17295$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17296    fi
17297
17298    for ac_prog in cl CC g++
17299do
17300  # Extract the first word of "$ac_prog", so it can be a program name with args.
17301set dummy $ac_prog; ac_word=$2
17302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17303$as_echo_n "checking for $ac_word... " >&6; }
17304if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17305  $as_echo_n "(cached) " >&6
17306else
17307  case $BUILD_CXX in
17308  [\\/]* | ?:[\\/]*)
17309  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17310  ;;
17311  *)
17312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17313for as_dir in $PATH
17314do
17315  IFS=$as_save_IFS
17316  test -z "$as_dir" && as_dir=.
17317    for ac_exec_ext in '' $ac_executable_extensions; do
17318  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17319    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17321    break 2
17322  fi
17323done
17324  done
17325IFS=$as_save_IFS
17326
17327  ;;
17328esac
17329fi
17330BUILD_CXX=$ac_cv_path_BUILD_CXX
17331if test -n "$BUILD_CXX"; then
17332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17333$as_echo "$BUILD_CXX" >&6; }
17334else
17335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17336$as_echo "no" >&6; }
17337fi
17338
17339
17340  test -n "$BUILD_CXX" && break
17341done
17342
17343
17344  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17345
17346  # First separate the path from the arguments. This will split at the first
17347  # space.
17348  complete="$BUILD_CXX"
17349  path="${complete%% *}"
17350  tmp="$complete EOL"
17351  arguments="${tmp#* }"
17352
17353  # Input might be given as Windows format, start by converting to
17354  # unix format.
17355  new_path=`$CYGPATH -u "$path"`
17356
17357  # Now try to locate executable using which
17358  new_path=`$WHICH "$new_path" 2> /dev/null`
17359  # bat and cmd files are not always considered executable in cygwin causing which
17360  # to not find them
17361  if test "x$new_path" = x \
17362           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17363           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17364    new_path=`$CYGPATH -u "$path"`
17365  fi
17366  if test "x$new_path" = x; then
17367    # Oops. Which didn't find the executable.
17368    # The splitting of arguments from the executable at a space might have been incorrect,
17369    # since paths with space are more likely in Windows. Give it another try with the whole
17370    # argument.
17371    path="$complete"
17372    arguments="EOL"
17373    new_path=`$CYGPATH -u "$path"`
17374    new_path=`$WHICH "$new_path" 2> /dev/null`
17375    # bat and cmd files are not always considered executable in cygwin causing which
17376    # to not find them
17377    if test "x$new_path" = x \
17378             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17379             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17380      new_path=`$CYGPATH -u "$path"`
17381    fi
17382    if test "x$new_path" = x; then
17383      # It's still not found. Now this is an unrecoverable error.
17384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17385$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17386      has_space=`$ECHO "$complete" | $GREP " "`
17387      if test "x$has_space" != x; then
17388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17390      fi
17391      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17392    fi
17393  fi
17394
17395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17398  # "foo.exe" is OK but "foo" is an error.
17399  #
17400  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17401  # It is also a way to make sure we got the proper file name for the real test later on.
17402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17403  if test "x$test_shortpath" = x; then
17404    # Short path failed, file does not exist as specified.
17405    # Try adding .exe or .cmd
17406    if test -f "${new_path}.exe"; then
17407       input_to_shortpath="${new_path}.exe"
17408    elif test -f "${new_path}.cmd"; then
17409       input_to_shortpath="${new_path}.cmd"
17410    else
17411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17412$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17415      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17416    fi
17417  else
17418    input_to_shortpath="$new_path"
17419  fi
17420
17421  # Call helper function which possibly converts this using DOS-style short mode.
17422  # If so, the updated path is stored in $new_path.
17423  new_path="$input_to_shortpath"
17424
17425  input_path="$input_to_shortpath"
17426  # Check if we need to convert this using DOS-style short mode. If the path
17427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17428  # take no chances and rewrite it.
17429  # Note: m4 eats our [], so we need to use [ and ] instead.
17430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17431  if test "x$has_forbidden_chars" != x; then
17432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17436      # Going to short mode and back again did indeed matter. Since short mode is
17437      # case insensitive, let's make it lowercase to improve readability.
17438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17439      # Now convert it back to Unix-stile (cygpath)
17440      input_path=`$CYGPATH -u "$shortmode_path"`
17441      new_path="$input_path"
17442    fi
17443  fi
17444
17445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17446  if test "x$test_cygdrive_prefix" = x; then
17447    # As a simple fix, exclude /usr/bin since it's not a real path.
17448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17450      # a path prefixed by /cygdrive for fixpath to work.
17451      new_path="$CYGWIN_ROOT_PATH$input_path"
17452    fi
17453  fi
17454
17455  # remove trailing .exe if any
17456  new_path="${new_path/%.exe/}"
17457
17458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17459
17460  # First separate the path from the arguments. This will split at the first
17461  # space.
17462  complete="$BUILD_CXX"
17463  path="${complete%% *}"
17464  tmp="$complete EOL"
17465  arguments="${tmp#* }"
17466
17467  # Input might be given as Windows format, start by converting to
17468  # unix format.
17469  new_path="$path"
17470
17471  windows_path="$new_path"
17472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17473    unix_path=`$CYGPATH -u "$windows_path"`
17474    new_path="$unix_path"
17475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17477    new_path="$unix_path"
17478  fi
17479
17480
17481  # Now try to locate executable using which
17482  new_path=`$WHICH "$new_path" 2> /dev/null`
17483
17484  if test "x$new_path" = x; then
17485    # Oops. Which didn't find the executable.
17486    # The splitting of arguments from the executable at a space might have been incorrect,
17487    # since paths with space are more likely in Windows. Give it another try with the whole
17488    # argument.
17489    path="$complete"
17490    arguments="EOL"
17491    new_path="$path"
17492
17493  windows_path="$new_path"
17494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17495    unix_path=`$CYGPATH -u "$windows_path"`
17496    new_path="$unix_path"
17497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17499    new_path="$unix_path"
17500  fi
17501
17502
17503    new_path=`$WHICH "$new_path" 2> /dev/null`
17504
17505    if test "x$new_path" = x; then
17506      # It's still not found. Now this is an unrecoverable error.
17507      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17508$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17509      has_space=`$ECHO "$complete" | $GREP " "`
17510      if test "x$has_space" != x; then
17511        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17512$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17513      fi
17514      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17515    fi
17516  fi
17517
17518  # Now new_path has a complete unix path to the binary
17519  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17520    # Keep paths in /bin as-is, but remove trailing .exe if any
17521    new_path="${new_path/%.exe/}"
17522    # Do not save /bin paths to all_fixpath_prefixes!
17523  else
17524    # Not in mixed or Windows style, start by that.
17525    new_path=`cmd //c echo $new_path`
17526
17527  input_path="$new_path"
17528  # Check if we need to convert this using DOS-style short mode. If the path
17529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17530  # take no chances and rewrite it.
17531  # Note: m4 eats our [], so we need to use [ and ] instead.
17532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17533  if test "x$has_forbidden_chars" != x; then
17534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17536  fi
17537
17538    # Output is in $new_path
17539
17540  windows_path="$new_path"
17541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17542    unix_path=`$CYGPATH -u "$windows_path"`
17543    new_path="$unix_path"
17544  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17545    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17546    new_path="$unix_path"
17547  fi
17548
17549    # remove trailing .exe if any
17550    new_path="${new_path/%.exe/}"
17551
17552    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17553    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17554  fi
17555
17556  else
17557    # We're on a posix platform. Hooray! :)
17558    # First separate the path from the arguments. This will split at the first
17559    # space.
17560    complete="$BUILD_CXX"
17561    path="${complete%% *}"
17562    tmp="$complete EOL"
17563    arguments="${tmp#* }"
17564
17565    # Cannot rely on the command "which" here since it doesn't always work.
17566    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17567    if test -z "$is_absolute_path"; then
17568      # Path to executable is not absolute. Find it.
17569      IFS_save="$IFS"
17570      IFS=:
17571      for p in $PATH; do
17572        if test -f "$p/$path" && test -x "$p/$path"; then
17573          new_path="$p/$path"
17574          break
17575        fi
17576      done
17577      IFS="$IFS_save"
17578    else
17579      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17580$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17581      new_path="$path"
17582    fi
17583
17584    if test "x$new_path" = x; then
17585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17586$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17587        has_space=`$ECHO "$complete" | $GREP " "`
17588        if test "x$has_space" != x; then
17589          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17590$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17591        fi
17592        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17593      fi
17594  fi
17595
17596      # Now join together the path and the arguments once again
17597      if test "x$arguments" != xEOL; then
17598        new_complete="$new_path ${arguments% *}"
17599      else
17600        new_complete="$new_path"
17601      fi
17602
17603  if test "x$complete" != "x$new_complete"; then
17604      BUILD_CXX="$new_complete"
17605      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17606$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17607    fi
17608
17609    # Extract the first word of "ld", so it can be a program name with args.
17610set dummy ld; ac_word=$2
17611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17612$as_echo_n "checking for $ac_word... " >&6; }
17613if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17614  $as_echo_n "(cached) " >&6
17615else
17616  case $BUILD_LD in
17617  [\\/]* | ?:[\\/]*)
17618  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17619  ;;
17620  *)
17621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17622for as_dir in $PATH
17623do
17624  IFS=$as_save_IFS
17625  test -z "$as_dir" && as_dir=.
17626    for ac_exec_ext in '' $ac_executable_extensions; do
17627  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17628    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17630    break 2
17631  fi
17632done
17633  done
17634IFS=$as_save_IFS
17635
17636  ;;
17637esac
17638fi
17639BUILD_LD=$ac_cv_path_BUILD_LD
17640if test -n "$BUILD_LD"; then
17641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17642$as_echo "$BUILD_LD" >&6; }
17643else
17644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17645$as_echo "no" >&6; }
17646fi
17647
17648
17649
17650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17651
17652  # First separate the path from the arguments. This will split at the first
17653  # space.
17654  complete="$BUILD_LD"
17655  path="${complete%% *}"
17656  tmp="$complete EOL"
17657  arguments="${tmp#* }"
17658
17659  # Input might be given as Windows format, start by converting to
17660  # unix format.
17661  new_path=`$CYGPATH -u "$path"`
17662
17663  # Now try to locate executable using which
17664  new_path=`$WHICH "$new_path" 2> /dev/null`
17665  # bat and cmd files are not always considered executable in cygwin causing which
17666  # to not find them
17667  if test "x$new_path" = x \
17668           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17669           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17670    new_path=`$CYGPATH -u "$path"`
17671  fi
17672  if test "x$new_path" = x; then
17673    # Oops. Which didn't find the executable.
17674    # The splitting of arguments from the executable at a space might have been incorrect,
17675    # since paths with space are more likely in Windows. Give it another try with the whole
17676    # argument.
17677    path="$complete"
17678    arguments="EOL"
17679    new_path=`$CYGPATH -u "$path"`
17680    new_path=`$WHICH "$new_path" 2> /dev/null`
17681    # bat and cmd files are not always considered executable in cygwin causing which
17682    # to not find them
17683    if test "x$new_path" = x \
17684             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17685             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17686      new_path=`$CYGPATH -u "$path"`
17687    fi
17688    if test "x$new_path" = x; then
17689      # It's still not found. Now this is an unrecoverable error.
17690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17691$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17692      has_space=`$ECHO "$complete" | $GREP " "`
17693      if test "x$has_space" != x; then
17694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17696      fi
17697      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17698    fi
17699  fi
17700
17701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17704  # "foo.exe" is OK but "foo" is an error.
17705  #
17706  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17707  # It is also a way to make sure we got the proper file name for the real test later on.
17708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17709  if test "x$test_shortpath" = x; then
17710    # Short path failed, file does not exist as specified.
17711    # Try adding .exe or .cmd
17712    if test -f "${new_path}.exe"; then
17713       input_to_shortpath="${new_path}.exe"
17714    elif test -f "${new_path}.cmd"; then
17715       input_to_shortpath="${new_path}.cmd"
17716    else
17717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17718$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17719      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17720$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17721      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17722    fi
17723  else
17724    input_to_shortpath="$new_path"
17725  fi
17726
17727  # Call helper function which possibly converts this using DOS-style short mode.
17728  # If so, the updated path is stored in $new_path.
17729  new_path="$input_to_shortpath"
17730
17731  input_path="$input_to_shortpath"
17732  # Check if we need to convert this using DOS-style short mode. If the path
17733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17734  # take no chances and rewrite it.
17735  # Note: m4 eats our [], so we need to use [ and ] instead.
17736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17737  if test "x$has_forbidden_chars" != x; then
17738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17742      # Going to short mode and back again did indeed matter. Since short mode is
17743      # case insensitive, let's make it lowercase to improve readability.
17744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17745      # Now convert it back to Unix-stile (cygpath)
17746      input_path=`$CYGPATH -u "$shortmode_path"`
17747      new_path="$input_path"
17748    fi
17749  fi
17750
17751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17752  if test "x$test_cygdrive_prefix" = x; then
17753    # As a simple fix, exclude /usr/bin since it's not a real path.
17754    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17756      # a path prefixed by /cygdrive for fixpath to work.
17757      new_path="$CYGWIN_ROOT_PATH$input_path"
17758    fi
17759  fi
17760
17761  # remove trailing .exe if any
17762  new_path="${new_path/%.exe/}"
17763
17764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17765
17766  # First separate the path from the arguments. This will split at the first
17767  # space.
17768  complete="$BUILD_LD"
17769  path="${complete%% *}"
17770  tmp="$complete EOL"
17771  arguments="${tmp#* }"
17772
17773  # Input might be given as Windows format, start by converting to
17774  # unix format.
17775  new_path="$path"
17776
17777  windows_path="$new_path"
17778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17779    unix_path=`$CYGPATH -u "$windows_path"`
17780    new_path="$unix_path"
17781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17783    new_path="$unix_path"
17784  fi
17785
17786
17787  # Now try to locate executable using which
17788  new_path=`$WHICH "$new_path" 2> /dev/null`
17789
17790  if test "x$new_path" = x; then
17791    # Oops. Which didn't find the executable.
17792    # The splitting of arguments from the executable at a space might have been incorrect,
17793    # since paths with space are more likely in Windows. Give it another try with the whole
17794    # argument.
17795    path="$complete"
17796    arguments="EOL"
17797    new_path="$path"
17798
17799  windows_path="$new_path"
17800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17801    unix_path=`$CYGPATH -u "$windows_path"`
17802    new_path="$unix_path"
17803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17805    new_path="$unix_path"
17806  fi
17807
17808
17809    new_path=`$WHICH "$new_path" 2> /dev/null`
17810
17811    if test "x$new_path" = x; then
17812      # It's still not found. Now this is an unrecoverable error.
17813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17814$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17815      has_space=`$ECHO "$complete" | $GREP " "`
17816      if test "x$has_space" != x; then
17817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17819      fi
17820      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17821    fi
17822  fi
17823
17824  # Now new_path has a complete unix path to the binary
17825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17826    # Keep paths in /bin as-is, but remove trailing .exe if any
17827    new_path="${new_path/%.exe/}"
17828    # Do not save /bin paths to all_fixpath_prefixes!
17829  else
17830    # Not in mixed or Windows style, start by that.
17831    new_path=`cmd //c echo $new_path`
17832
17833  input_path="$new_path"
17834  # Check if we need to convert this using DOS-style short mode. If the path
17835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17836  # take no chances and rewrite it.
17837  # Note: m4 eats our [], so we need to use [ and ] instead.
17838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17839  if test "x$has_forbidden_chars" != x; then
17840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17842  fi
17843
17844    # Output is in $new_path
17845
17846  windows_path="$new_path"
17847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17848    unix_path=`$CYGPATH -u "$windows_path"`
17849    new_path="$unix_path"
17850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17852    new_path="$unix_path"
17853  fi
17854
17855    # remove trailing .exe if any
17856    new_path="${new_path/%.exe/}"
17857
17858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17860  fi
17861
17862  else
17863    # We're on a posix platform. Hooray! :)
17864    # First separate the path from the arguments. This will split at the first
17865    # space.
17866    complete="$BUILD_LD"
17867    path="${complete%% *}"
17868    tmp="$complete EOL"
17869    arguments="${tmp#* }"
17870
17871    # Cannot rely on the command "which" here since it doesn't always work.
17872    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17873    if test -z "$is_absolute_path"; then
17874      # Path to executable is not absolute. Find it.
17875      IFS_save="$IFS"
17876      IFS=:
17877      for p in $PATH; do
17878        if test -f "$p/$path" && test -x "$p/$path"; then
17879          new_path="$p/$path"
17880          break
17881        fi
17882      done
17883      IFS="$IFS_save"
17884    else
17885      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17886$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17887      new_path="$path"
17888    fi
17889
17890    if test "x$new_path" = x; then
17891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17892$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17893        has_space=`$ECHO "$complete" | $GREP " "`
17894        if test "x$has_space" != x; then
17895          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17896$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17897        fi
17898        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17899      fi
17900  fi
17901
17902      # Now join together the path and the arguments once again
17903      if test "x$arguments" != xEOL; then
17904        new_complete="$new_path ${arguments% *}"
17905      else
17906        new_complete="$new_path"
17907      fi
17908
17909  if test "x$complete" != "x$new_complete"; then
17910      BUILD_LD="$new_complete"
17911      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17912$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17913    fi
17914
17915fi
17916
17917
17918
17919
17920# If a devkit is found on the builddeps server, then prepend its path to the
17921# PATH variable. If there are cross compilers available in the devkit, these
17922# will be found by AC_PROG_CC et al.
17923DEVKIT=
17924
17925
17926    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17927        # Source the builddeps file again, to make sure it uses the latest variables!
17928        . $builddepsfile
17929        # Look for a target and build machine specific resource!
17930        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17931        if test "x$resource" = x; then
17932            # Ok, lets instead look for a target specific resource
17933            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17934        fi
17935        if test "x$resource" = x; then
17936            # Ok, lets instead look for a build specific resource
17937            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17938        fi
17939        if test "x$resource" = x; then
17940            # Ok, lets instead look for a generic resource
17941            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17942            resource=${builddep_devkit}
17943        fi
17944        if test "x$resource" != x; then
17945            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17946$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17947	    # If the resource in the builddeps.conf file is an existing directory,
17948	    # for example /java/linux/cups
17949	    if test -d ${resource}; then
17950	       depdir=${resource}
17951	    else
17952
17953# devkit is for example mymodule
17954# $resource is for example libs/general/libmymod_1_2_3.zip
17955# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17956# $with_builddeps_dir is for example /localhome/builddeps
17957# depdir is the name of the variable into which we store the depdir, eg MYMOD
17958# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17959# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17960    filename=`basename $resource`
17961    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17962    filebase=${filename%%.*}
17963    extension=${filename#*.}
17964    installdir=$with_builddeps_dir/$filebase
17965    if test ! -f $installdir/$filename.unpacked; then
17966        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17967$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17968        if test ! -d $installdir; then
17969            mkdir -p $installdir
17970        fi
17971        if test ! -d $installdir; then
17972            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17973        fi
17974        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17975        touch $tmpfile
17976        if test ! -f $tmpfile; then
17977            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17978        fi
17979
17980    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17981    # $tmpfile is the local file name for the downloaded file.
17982    VALID_TOOL=no
17983    if test "x$BDEPS_FTP" = xwget; then
17984       VALID_TOOL=yes
17985       wget -O $tmpfile $with_builddeps_server/$resource
17986    fi
17987    if test "x$BDEPS_FTP" = xlftp; then
17988       VALID_TOOL=yes
17989       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17990    fi
17991    if test "x$BDEPS_FTP" = xftp; then
17992        VALID_TOOL=yes
17993        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17994        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17995        FTPUSERPWD=${FTPSERVER%%@*}
17996        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17997            FTPUSER=${userpwd%%:*}
17998            FTPPWD=${userpwd#*@}
17999            FTPSERVER=${FTPSERVER#*@}
18000        else
18001            FTPUSER=ftp
18002            FTPPWD=ftp
18003        fi
18004        # the "pass" command does not work on some
18005        # ftp clients (read ftp.exe) but if it works,
18006        # passive mode is better!
18007        (\
18008            echo "user $FTPUSER $FTPPWD"        ;\
18009            echo "pass"                         ;\
18010            echo "bin"                          ;\
18011            echo "get $FTPPATH $tmpfile"              ;\
18012        ) | ftp -in $FTPSERVER
18013    fi
18014    if test "x$VALID_TOOL" != xyes; then
18015       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18016    fi
18017
18018        mv $tmpfile $installdir/$filename
18019        if test ! -s $installdir/$filename; then
18020            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18021        fi
18022        case "$extension" in
18023            zip)  echo "Unzipping $installdir/$filename..."
18024               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18025            ;;
18026            tar.gz) echo "Untaring $installdir/$filename..."
18027               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18028            ;;
18029            tgz) echo "Untaring $installdir/$filename..."
18030               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18031            ;;
18032            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18033            ;;
18034        esac
18035    fi
18036    if test -f $installdir/$filename.unpacked; then
18037        depdir=$installdir
18038    fi
18039
18040	    fi
18041            # Source the builddeps file again, because in the previous command, the depdir
18042            # was updated to point at the current build dependency install directory.
18043            . $builddepsfile
18044            # Now extract variables from the builddeps.conf files.
18045            theroot=${builddep_devkit_ROOT}
18046            thecflags=${builddep_devkit_CFLAGS}
18047            thelibs=${builddep_devkit_LIBS}
18048            if test "x$depdir" = x; then
18049                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18050            fi
18051            DEVKIT=$depdir
18052            if test "x$theroot" != x; then
18053               DEVKIT="$theroot"
18054            fi
18055            if test "x$thecflags" != x; then
18056               DEVKIT_CFLAGS="$thecflags"
18057            fi
18058            if test "x$thelibs" != x; then
18059               DEVKIT_LIBS="$thelibs"
18060            fi
18061            # Found devkit
18062                     PATH="$DEVKIT/bin:$PATH"
18063                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18064                     if test "x$x_includes" = "xNONE"; then
18065                         x_includes="$SYS_ROOT/usr/include/X11"
18066                     fi
18067                     if test "x$x_libraries" = "xNONE"; then
18068                         x_libraries="$SYS_ROOT/usr/lib"
18069                     fi
18070
18071
18072        fi
18073
18074    fi
18075
18076
18077if test "x$SYS_ROOT" != "x/" ; then
18078    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18079    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18080    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18081    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18082    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18083    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18084fi
18085
18086# Store the CFLAGS etal passed to the configure script.
18087ORG_CFLAGS="$CFLAGS"
18088ORG_CXXFLAGS="$CXXFLAGS"
18089ORG_OBJCFLAGS="$OBJCFLAGS"
18090
18091# autoconf magic only relies on PATH, so update it if tools dir is specified
18092OLD_PATH="$PATH"
18093if test "x$TOOLS_DIR" != x; then
18094  PATH=$TOOLS_DIR:$PATH
18095fi
18096
18097
18098### Locate C compiler (CC)
18099
18100# gcc is almost always present, but on Windows we
18101# prefer cl.exe and on Solaris we prefer CC.
18102# Thus test for them in this order.
18103if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18104  # Do not probe for cc on MacOSX.
18105  COMPILER_CHECK_LIST="cl gcc"
18106else
18107  COMPILER_CHECK_LIST="cl cc gcc"
18108fi
18109
18110
18111  COMPILER_NAME=C
18112
18113  CC=
18114  # If TOOLS_DIR is set, check for all compiler names in there first
18115  # before checking the rest of the PATH.
18116  if test -n "$TOOLS_DIR"; then
18117    PATH_save="$PATH"
18118    PATH="$TOOLS_DIR"
18119    for ac_prog in $COMPILER_CHECK_LIST
18120do
18121  # Extract the first word of "$ac_prog", so it can be a program name with args.
18122set dummy $ac_prog; ac_word=$2
18123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18124$as_echo_n "checking for $ac_word... " >&6; }
18125if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18126  $as_echo_n "(cached) " >&6
18127else
18128  case $TOOLS_DIR_CC in
18129  [\\/]* | ?:[\\/]*)
18130  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18131  ;;
18132  *)
18133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18134for as_dir in $PATH
18135do
18136  IFS=$as_save_IFS
18137  test -z "$as_dir" && as_dir=.
18138    for ac_exec_ext in '' $ac_executable_extensions; do
18139  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18140    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18142    break 2
18143  fi
18144done
18145  done
18146IFS=$as_save_IFS
18147
18148  ;;
18149esac
18150fi
18151TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18152if test -n "$TOOLS_DIR_CC"; then
18153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18154$as_echo "$TOOLS_DIR_CC" >&6; }
18155else
18156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18157$as_echo "no" >&6; }
18158fi
18159
18160
18161  test -n "$TOOLS_DIR_CC" && break
18162done
18163
18164    CC=$TOOLS_DIR_CC
18165    PATH="$PATH_save"
18166  fi
18167
18168  # AC_PATH_PROGS can't be run multiple times with the same variable,
18169  # so create a new name for this run.
18170  if test "x$CC" = x; then
18171    for ac_prog in $COMPILER_CHECK_LIST
18172do
18173  # Extract the first word of "$ac_prog", so it can be a program name with args.
18174set dummy $ac_prog; ac_word=$2
18175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18176$as_echo_n "checking for $ac_word... " >&6; }
18177if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18178  $as_echo_n "(cached) " >&6
18179else
18180  case $POTENTIAL_CC in
18181  [\\/]* | ?:[\\/]*)
18182  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18183  ;;
18184  *)
18185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18186for as_dir in $PATH
18187do
18188  IFS=$as_save_IFS
18189  test -z "$as_dir" && as_dir=.
18190    for ac_exec_ext in '' $ac_executable_extensions; do
18191  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18192    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18194    break 2
18195  fi
18196done
18197  done
18198IFS=$as_save_IFS
18199
18200  ;;
18201esac
18202fi
18203POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18204if test -n "$POTENTIAL_CC"; then
18205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18206$as_echo "$POTENTIAL_CC" >&6; }
18207else
18208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18209$as_echo "no" >&6; }
18210fi
18211
18212
18213  test -n "$POTENTIAL_CC" && break
18214done
18215
18216    CC=$POTENTIAL_CC
18217  fi
18218
18219  if test "x$CC" = x; then
18220
18221    # Print a helpful message on how to acquire the necessary build dependency.
18222    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18223    MISSING_DEPENDENCY=devkit
18224    PKGHANDLER_COMMAND=
18225
18226    case $PKGHANDLER in
18227	apt-get)
18228                apt_help     $MISSING_DEPENDENCY ;;
18229    yum)
18230                yum_help     $MISSING_DEPENDENCY ;;
18231	port)
18232                port_help    $MISSING_DEPENDENCY ;;
18233	pkgutil)
18234                pkgutil_help $MISSING_DEPENDENCY ;;
18235	pkgadd)
18236                pkgadd_help  $MISSING_DEPENDENCY ;;
18237    * )
18238      break ;;
18239    esac
18240
18241    if test "x$PKGHANDLER_COMMAND" != x; then
18242        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18243    fi
18244
18245      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18246  fi
18247
18248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18249
18250  # First separate the path from the arguments. This will split at the first
18251  # space.
18252  complete="$CC"
18253  path="${complete%% *}"
18254  tmp="$complete EOL"
18255  arguments="${tmp#* }"
18256
18257  # Input might be given as Windows format, start by converting to
18258  # unix format.
18259  new_path=`$CYGPATH -u "$path"`
18260
18261  # Now try to locate executable using which
18262  new_path=`$WHICH "$new_path" 2> /dev/null`
18263  # bat and cmd files are not always considered executable in cygwin causing which
18264  # to not find them
18265  if test "x$new_path" = x \
18266           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18267           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18268    new_path=`$CYGPATH -u "$path"`
18269  fi
18270  if test "x$new_path" = x; then
18271    # Oops. Which didn't find the executable.
18272    # The splitting of arguments from the executable at a space might have been incorrect,
18273    # since paths with space are more likely in Windows. Give it another try with the whole
18274    # argument.
18275    path="$complete"
18276    arguments="EOL"
18277    new_path=`$CYGPATH -u "$path"`
18278    new_path=`$WHICH "$new_path" 2> /dev/null`
18279    # bat and cmd files are not always considered executable in cygwin causing which
18280    # to not find them
18281    if test "x$new_path" = x \
18282             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18283             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18284      new_path=`$CYGPATH -u "$path"`
18285    fi
18286    if test "x$new_path" = x; then
18287      # It's still not found. Now this is an unrecoverable error.
18288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18289$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18290      has_space=`$ECHO "$complete" | $GREP " "`
18291      if test "x$has_space" != x; then
18292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18294      fi
18295      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18296    fi
18297  fi
18298
18299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18302  # "foo.exe" is OK but "foo" is an error.
18303  #
18304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18305  # It is also a way to make sure we got the proper file name for the real test later on.
18306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18307  if test "x$test_shortpath" = x; then
18308    # Short path failed, file does not exist as specified.
18309    # Try adding .exe or .cmd
18310    if test -f "${new_path}.exe"; then
18311       input_to_shortpath="${new_path}.exe"
18312    elif test -f "${new_path}.cmd"; then
18313       input_to_shortpath="${new_path}.cmd"
18314    else
18315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18316$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18319      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18320    fi
18321  else
18322    input_to_shortpath="$new_path"
18323  fi
18324
18325  # Call helper function which possibly converts this using DOS-style short mode.
18326  # If so, the updated path is stored in $new_path.
18327  new_path="$input_to_shortpath"
18328
18329  input_path="$input_to_shortpath"
18330  # Check if we need to convert this using DOS-style short mode. If the path
18331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18332  # take no chances and rewrite it.
18333  # Note: m4 eats our [], so we need to use [ and ] instead.
18334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18335  if test "x$has_forbidden_chars" != x; then
18336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18340      # Going to short mode and back again did indeed matter. Since short mode is
18341      # case insensitive, let's make it lowercase to improve readability.
18342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18343      # Now convert it back to Unix-stile (cygpath)
18344      input_path=`$CYGPATH -u "$shortmode_path"`
18345      new_path="$input_path"
18346    fi
18347  fi
18348
18349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18350  if test "x$test_cygdrive_prefix" = x; then
18351    # As a simple fix, exclude /usr/bin since it's not a real path.
18352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18354      # a path prefixed by /cygdrive for fixpath to work.
18355      new_path="$CYGWIN_ROOT_PATH$input_path"
18356    fi
18357  fi
18358
18359  # remove trailing .exe if any
18360  new_path="${new_path/%.exe/}"
18361
18362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18363
18364  # First separate the path from the arguments. This will split at the first
18365  # space.
18366  complete="$CC"
18367  path="${complete%% *}"
18368  tmp="$complete EOL"
18369  arguments="${tmp#* }"
18370
18371  # Input might be given as Windows format, start by converting to
18372  # unix format.
18373  new_path="$path"
18374
18375  windows_path="$new_path"
18376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18377    unix_path=`$CYGPATH -u "$windows_path"`
18378    new_path="$unix_path"
18379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18381    new_path="$unix_path"
18382  fi
18383
18384
18385  # Now try to locate executable using which
18386  new_path=`$WHICH "$new_path" 2> /dev/null`
18387
18388  if test "x$new_path" = x; then
18389    # Oops. Which didn't find the executable.
18390    # The splitting of arguments from the executable at a space might have been incorrect,
18391    # since paths with space are more likely in Windows. Give it another try with the whole
18392    # argument.
18393    path="$complete"
18394    arguments="EOL"
18395    new_path="$path"
18396
18397  windows_path="$new_path"
18398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18399    unix_path=`$CYGPATH -u "$windows_path"`
18400    new_path="$unix_path"
18401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18403    new_path="$unix_path"
18404  fi
18405
18406
18407    new_path=`$WHICH "$new_path" 2> /dev/null`
18408
18409    if test "x$new_path" = x; then
18410      # It's still not found. Now this is an unrecoverable error.
18411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18412$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18413      has_space=`$ECHO "$complete" | $GREP " "`
18414      if test "x$has_space" != x; then
18415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18417      fi
18418      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18419    fi
18420  fi
18421
18422  # Now new_path has a complete unix path to the binary
18423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18424    # Keep paths in /bin as-is, but remove trailing .exe if any
18425    new_path="${new_path/%.exe/}"
18426    # Do not save /bin paths to all_fixpath_prefixes!
18427  else
18428    # Not in mixed or Windows style, start by that.
18429    new_path=`cmd //c echo $new_path`
18430
18431  input_path="$new_path"
18432  # Check if we need to convert this using DOS-style short mode. If the path
18433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18434  # take no chances and rewrite it.
18435  # Note: m4 eats our [], so we need to use [ and ] instead.
18436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18437  if test "x$has_forbidden_chars" != x; then
18438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18440  fi
18441
18442    # Output is in $new_path
18443
18444  windows_path="$new_path"
18445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18446    unix_path=`$CYGPATH -u "$windows_path"`
18447    new_path="$unix_path"
18448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18450    new_path="$unix_path"
18451  fi
18452
18453    # remove trailing .exe if any
18454    new_path="${new_path/%.exe/}"
18455
18456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18458  fi
18459
18460  else
18461    # We're on a posix platform. Hooray! :)
18462    # First separate the path from the arguments. This will split at the first
18463    # space.
18464    complete="$CC"
18465    path="${complete%% *}"
18466    tmp="$complete EOL"
18467    arguments="${tmp#* }"
18468
18469    # Cannot rely on the command "which" here since it doesn't always work.
18470    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18471    if test -z "$is_absolute_path"; then
18472      # Path to executable is not absolute. Find it.
18473      IFS_save="$IFS"
18474      IFS=:
18475      for p in $PATH; do
18476        if test -f "$p/$path" && test -x "$p/$path"; then
18477          new_path="$p/$path"
18478          break
18479        fi
18480      done
18481      IFS="$IFS_save"
18482    else
18483      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18484$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18485      new_path="$path"
18486    fi
18487
18488    if test "x$new_path" = x; then
18489        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18490$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18491        has_space=`$ECHO "$complete" | $GREP " "`
18492        if test "x$has_space" != x; then
18493          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18494$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18495        fi
18496        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18497      fi
18498  fi
18499
18500      # Now join together the path and the arguments once again
18501      if test "x$arguments" != xEOL; then
18502        new_complete="$new_path ${arguments% *}"
18503      else
18504        new_complete="$new_path"
18505      fi
18506
18507  if test "x$complete" != "x$new_complete"; then
18508      CC="$new_complete"
18509      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18510$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18511    fi
18512
18513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18514$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18515  TEST_COMPILER="$CC"
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            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18535        else
18536            # Save the current directory for restoring afterwards
18537            STARTDIR=$PWD
18538            COUNTER=0
18539            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18540            sym_link_file=`$BASENAME $TEST_COMPILER`
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            TEST_COMPILER=$sym_link_dir/$sym_link_file
18561        fi
18562    fi
18563
18564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18565$as_echo "$TEST_COMPILER" >&6; }
18566  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18567$as_echo_n "checking if CC is disguised ccache... " >&6; }
18568
18569  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18570  if test "x$COMPILER_BASENAME" = "xccache"; then
18571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18572$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18573    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18574    # We want to control ccache invocation ourselves, so ignore this cc and try
18575    # searching again.
18576
18577    # Remove the path to the fake ccache cc from the PATH
18578    RETRY_COMPILER_SAVED_PATH="$PATH"
18579    COMPILER_DIRNAME=`$DIRNAME $CC`
18580    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18581
18582    # Try again looking for our compiler
18583    if test -n "$ac_tool_prefix"; then
18584  for ac_prog in $COMPILER_CHECK_LIST
18585  do
18586    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18587set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18589$as_echo_n "checking for $ac_word... " >&6; }
18590if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18591  $as_echo_n "(cached) " >&6
18592else
18593  if test -n "$PROPER_COMPILER_CC"; then
18594  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18595else
18596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18597for as_dir in $PATH
18598do
18599  IFS=$as_save_IFS
18600  test -z "$as_dir" && as_dir=.
18601    for ac_exec_ext in '' $ac_executable_extensions; do
18602  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18603    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18605    break 2
18606  fi
18607done
18608  done
18609IFS=$as_save_IFS
18610
18611fi
18612fi
18613PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18614if test -n "$PROPER_COMPILER_CC"; then
18615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18616$as_echo "$PROPER_COMPILER_CC" >&6; }
18617else
18618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18619$as_echo "no" >&6; }
18620fi
18621
18622
18623    test -n "$PROPER_COMPILER_CC" && break
18624  done
18625fi
18626if test -z "$PROPER_COMPILER_CC"; then
18627  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18628  for ac_prog in $COMPILER_CHECK_LIST
18629do
18630  # Extract the first word of "$ac_prog", so it can be a program name with args.
18631set dummy $ac_prog; ac_word=$2
18632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18633$as_echo_n "checking for $ac_word... " >&6; }
18634if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18635  $as_echo_n "(cached) " >&6
18636else
18637  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18638  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18639else
18640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18641for as_dir in $PATH
18642do
18643  IFS=$as_save_IFS
18644  test -z "$as_dir" && as_dir=.
18645    for ac_exec_ext in '' $ac_executable_extensions; do
18646  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18647    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18649    break 2
18650  fi
18651done
18652  done
18653IFS=$as_save_IFS
18654
18655fi
18656fi
18657ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18658if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18660$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18661else
18662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18663$as_echo "no" >&6; }
18664fi
18665
18666
18667  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18668done
18669
18670  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18671    PROPER_COMPILER_CC=""
18672  else
18673    case $cross_compiling:$ac_tool_warned in
18674yes:)
18675{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18676$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18677ac_tool_warned=yes ;;
18678esac
18679    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18680  fi
18681fi
18682
18683
18684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18685
18686  # First separate the path from the arguments. This will split at the first
18687  # space.
18688  complete="$PROPER_COMPILER_CC"
18689  path="${complete%% *}"
18690  tmp="$complete EOL"
18691  arguments="${tmp#* }"
18692
18693  # Input might be given as Windows format, start by converting to
18694  # unix format.
18695  new_path=`$CYGPATH -u "$path"`
18696
18697  # Now try to locate executable using which
18698  new_path=`$WHICH "$new_path" 2> /dev/null`
18699  # bat and cmd files are not always considered executable in cygwin causing which
18700  # to not find them
18701  if test "x$new_path" = x \
18702           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18703           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18704    new_path=`$CYGPATH -u "$path"`
18705  fi
18706  if test "x$new_path" = x; then
18707    # Oops. Which didn't find the executable.
18708    # The splitting of arguments from the executable at a space might have been incorrect,
18709    # since paths with space are more likely in Windows. Give it another try with the whole
18710    # argument.
18711    path="$complete"
18712    arguments="EOL"
18713    new_path=`$CYGPATH -u "$path"`
18714    new_path=`$WHICH "$new_path" 2> /dev/null`
18715    # bat and cmd files are not always considered executable in cygwin causing which
18716    # to not find them
18717    if test "x$new_path" = x \
18718             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18719             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18720      new_path=`$CYGPATH -u "$path"`
18721    fi
18722    if test "x$new_path" = x; then
18723      # It's still not found. Now this is an unrecoverable error.
18724      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18725$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18726      has_space=`$ECHO "$complete" | $GREP " "`
18727      if test "x$has_space" != x; then
18728        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18729$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18730      fi
18731      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18732    fi
18733  fi
18734
18735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18738  # "foo.exe" is OK but "foo" is an error.
18739  #
18740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18741  # It is also a way to make sure we got the proper file name for the real test later on.
18742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18743  if test "x$test_shortpath" = x; then
18744    # Short path failed, file does not exist as specified.
18745    # Try adding .exe or .cmd
18746    if test -f "${new_path}.exe"; then
18747       input_to_shortpath="${new_path}.exe"
18748    elif test -f "${new_path}.cmd"; then
18749       input_to_shortpath="${new_path}.cmd"
18750    else
18751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18752$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18753      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18754$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18755      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18756    fi
18757  else
18758    input_to_shortpath="$new_path"
18759  fi
18760
18761  # Call helper function which possibly converts this using DOS-style short mode.
18762  # If so, the updated path is stored in $new_path.
18763  new_path="$input_to_shortpath"
18764
18765  input_path="$input_to_shortpath"
18766  # Check if we need to convert this using DOS-style short mode. If the path
18767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18768  # take no chances and rewrite it.
18769  # Note: m4 eats our [], so we need to use [ and ] instead.
18770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18771  if test "x$has_forbidden_chars" != x; then
18772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18773    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18774    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18775    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18776      # Going to short mode and back again did indeed matter. Since short mode is
18777      # case insensitive, let's make it lowercase to improve readability.
18778      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18779      # Now convert it back to Unix-stile (cygpath)
18780      input_path=`$CYGPATH -u "$shortmode_path"`
18781      new_path="$input_path"
18782    fi
18783  fi
18784
18785  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18786  if test "x$test_cygdrive_prefix" = x; then
18787    # As a simple fix, exclude /usr/bin since it's not a real path.
18788    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18789      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18790      # a path prefixed by /cygdrive for fixpath to work.
18791      new_path="$CYGWIN_ROOT_PATH$input_path"
18792    fi
18793  fi
18794
18795  # remove trailing .exe if any
18796  new_path="${new_path/%.exe/}"
18797
18798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18799
18800  # First separate the path from the arguments. This will split at the first
18801  # space.
18802  complete="$PROPER_COMPILER_CC"
18803  path="${complete%% *}"
18804  tmp="$complete EOL"
18805  arguments="${tmp#* }"
18806
18807  # Input might be given as Windows format, start by converting to
18808  # unix format.
18809  new_path="$path"
18810
18811  windows_path="$new_path"
18812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18813    unix_path=`$CYGPATH -u "$windows_path"`
18814    new_path="$unix_path"
18815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18817    new_path="$unix_path"
18818  fi
18819
18820
18821  # Now try to locate executable using which
18822  new_path=`$WHICH "$new_path" 2> /dev/null`
18823
18824  if test "x$new_path" = x; then
18825    # Oops. Which didn't find the executable.
18826    # The splitting of arguments from the executable at a space might have been incorrect,
18827    # since paths with space are more likely in Windows. Give it another try with the whole
18828    # argument.
18829    path="$complete"
18830    arguments="EOL"
18831    new_path="$path"
18832
18833  windows_path="$new_path"
18834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18835    unix_path=`$CYGPATH -u "$windows_path"`
18836    new_path="$unix_path"
18837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18839    new_path="$unix_path"
18840  fi
18841
18842
18843    new_path=`$WHICH "$new_path" 2> /dev/null`
18844
18845    if test "x$new_path" = x; then
18846      # It's still not found. Now this is an unrecoverable error.
18847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18848$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18849      has_space=`$ECHO "$complete" | $GREP " "`
18850      if test "x$has_space" != x; then
18851        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18852$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18853      fi
18854      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18855    fi
18856  fi
18857
18858  # Now new_path has a complete unix path to the binary
18859  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18860    # Keep paths in /bin as-is, but remove trailing .exe if any
18861    new_path="${new_path/%.exe/}"
18862    # Do not save /bin paths to all_fixpath_prefixes!
18863  else
18864    # Not in mixed or Windows style, start by that.
18865    new_path=`cmd //c echo $new_path`
18866
18867  input_path="$new_path"
18868  # Check if we need to convert this using DOS-style short mode. If the path
18869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18870  # take no chances and rewrite it.
18871  # Note: m4 eats our [], so we need to use [ and ] instead.
18872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18873  if test "x$has_forbidden_chars" != x; then
18874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18876  fi
18877
18878    # Output is in $new_path
18879
18880  windows_path="$new_path"
18881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18882    unix_path=`$CYGPATH -u "$windows_path"`
18883    new_path="$unix_path"
18884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18886    new_path="$unix_path"
18887  fi
18888
18889    # remove trailing .exe if any
18890    new_path="${new_path/%.exe/}"
18891
18892    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18893    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18894  fi
18895
18896  else
18897    # We're on a posix platform. Hooray! :)
18898    # First separate the path from the arguments. This will split at the first
18899    # space.
18900    complete="$PROPER_COMPILER_CC"
18901    path="${complete%% *}"
18902    tmp="$complete EOL"
18903    arguments="${tmp#* }"
18904
18905    # Cannot rely on the command "which" here since it doesn't always work.
18906    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18907    if test -z "$is_absolute_path"; then
18908      # Path to executable is not absolute. Find it.
18909      IFS_save="$IFS"
18910      IFS=:
18911      for p in $PATH; do
18912        if test -f "$p/$path" && test -x "$p/$path"; then
18913          new_path="$p/$path"
18914          break
18915        fi
18916      done
18917      IFS="$IFS_save"
18918    else
18919      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18920$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18921      new_path="$path"
18922    fi
18923
18924    if test "x$new_path" = x; then
18925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18926$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18927        has_space=`$ECHO "$complete" | $GREP " "`
18928        if test "x$has_space" != x; then
18929          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18930$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18931        fi
18932        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18933      fi
18934  fi
18935
18936      # Now join together the path and the arguments once again
18937      if test "x$arguments" != xEOL; then
18938        new_complete="$new_path ${arguments% *}"
18939      else
18940        new_complete="$new_path"
18941      fi
18942
18943  if test "x$complete" != "x$new_complete"; then
18944      PROPER_COMPILER_CC="$new_complete"
18945      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18946$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18947    fi
18948
18949    PATH="$RETRY_COMPILER_SAVED_PATH"
18950
18951    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18952$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18953
18954    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18955        # Follow a chain of symbolic links. Use readlink
18956        # where it exists, else fall back to horribly
18957        # complicated shell code.
18958        if test "x$READLINK_TESTED" != yes; then
18959            # On MacOSX there is a readlink tool with a different
18960            # purpose than the GNU readlink tool. Check the found readlink.
18961            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18962            if test "x$ISGNU" = x; then
18963                 # A readlink that we do not know how to use.
18964                 # Are there other non-GNU readlinks out there?
18965                 READLINK_TESTED=yes
18966                 READLINK=
18967            fi
18968        fi
18969
18970        if test "x$READLINK" != x; then
18971            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18972        else
18973            # Save the current directory for restoring afterwards
18974            STARTDIR=$PWD
18975            COUNTER=0
18976            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18977            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18978            # Use the system pwd and not the shell builtin to resolve directory symlinks
18979            cd $sym_link_dir
18980            cd `$THEPWDCMD`
18981            sym_link_dir=`$THEPWDCMD`
18982            # Resolve file symlinks
18983            while test $COUNTER -lt 20; do
18984                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18985                if test "x$ISLINK" == x; then
18986                    # This is not a symbolic link! We are done!
18987                    break
18988                fi
18989                # Again resolve directory symlinks since the target of the just found
18990                # link could be in a different directory
18991                cd `$DIRNAME $ISLINK`
18992                sym_link_dir=`$THEPWDCMD`
18993                sym_link_file=`$BASENAME $ISLINK`
18994                let COUNTER=COUNTER+1
18995            done
18996            cd $STARTDIR
18997            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18998        fi
18999    fi
19000
19001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19002$as_echo "$PROPER_COMPILER_CC" >&6; }
19003    CC="$PROPER_COMPILER_CC"
19004  else
19005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19006$as_echo "no, keeping CC" >&6; }
19007    CC="$TEST_COMPILER"
19008  fi
19009
19010  COMPILER=$CC
19011  COMPILER_NAME=$COMPILER_NAME
19012
19013  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19014    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19015    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19016    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19017    if test $? -ne 0; then
19018      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19019
19020      { $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
19021$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19022      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19023$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19024      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19025    else
19026      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19027      COMPILER_VENDOR="Sun Studio"
19028    fi
19029  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19030    # First line typically looks something like:
19031    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19032    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19033    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19034    COMPILER_VENDOR="Microsoft CL.EXE"
19035    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19036    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19037      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19038        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19039      fi
19040    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19041      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19042        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19043      fi
19044    fi
19045  else
19046    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19047    # Check that this is likely to be GCC.
19048    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19049    if test $? -ne 0; then
19050      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19051$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19052      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19053$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19054      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19055    fi
19056
19057    # First line typically looks something like:
19058    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19059    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19060    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19061  fi
19062  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19063  CC_VERSION="$COMPILER_VERSION"
19064  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19065  CC_VENDOR="$COMPILER_VENDOR"
19066
19067  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19068$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19069
19070
19071# Now that we have resolved CC ourself, let autoconf have it's go at it
19072ac_ext=c
19073ac_cpp='$CPP $CPPFLAGS'
19074ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19075ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19076ac_compiler_gnu=$ac_cv_c_compiler_gnu
19077if test -n "$ac_tool_prefix"; then
19078  for ac_prog in $CC
19079  do
19080    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19083$as_echo_n "checking for $ac_word... " >&6; }
19084if test "${ac_cv_prog_CC+set}" = set; then :
19085  $as_echo_n "(cached) " >&6
19086else
19087  if test -n "$CC"; then
19088  ac_cv_prog_CC="$CC" # Let the user override the test.
19089else
19090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19091for as_dir in $PATH
19092do
19093  IFS=$as_save_IFS
19094  test -z "$as_dir" && as_dir=.
19095    for ac_exec_ext in '' $ac_executable_extensions; do
19096  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19097    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19099    break 2
19100  fi
19101done
19102  done
19103IFS=$as_save_IFS
19104
19105fi
19106fi
19107CC=$ac_cv_prog_CC
19108if test -n "$CC"; then
19109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19110$as_echo "$CC" >&6; }
19111else
19112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19113$as_echo "no" >&6; }
19114fi
19115
19116
19117    test -n "$CC" && break
19118  done
19119fi
19120if test -z "$CC"; then
19121  ac_ct_CC=$CC
19122  for ac_prog in $CC
19123do
19124  # Extract the first word of "$ac_prog", so it can be a program name with args.
19125set dummy $ac_prog; ac_word=$2
19126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19127$as_echo_n "checking for $ac_word... " >&6; }
19128if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19129  $as_echo_n "(cached) " >&6
19130else
19131  if test -n "$ac_ct_CC"; then
19132  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19133else
19134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19135for as_dir in $PATH
19136do
19137  IFS=$as_save_IFS
19138  test -z "$as_dir" && as_dir=.
19139    for ac_exec_ext in '' $ac_executable_extensions; do
19140  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19141    ac_cv_prog_ac_ct_CC="$ac_prog"
19142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19143    break 2
19144  fi
19145done
19146  done
19147IFS=$as_save_IFS
19148
19149fi
19150fi
19151ac_ct_CC=$ac_cv_prog_ac_ct_CC
19152if test -n "$ac_ct_CC"; then
19153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19154$as_echo "$ac_ct_CC" >&6; }
19155else
19156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19157$as_echo "no" >&6; }
19158fi
19159
19160
19161  test -n "$ac_ct_CC" && break
19162done
19163
19164  if test "x$ac_ct_CC" = x; then
19165    CC=""
19166  else
19167    case $cross_compiling:$ac_tool_warned in
19168yes:)
19169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19171ac_tool_warned=yes ;;
19172esac
19173    CC=$ac_ct_CC
19174  fi
19175fi
19176
19177
19178test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19179$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19180as_fn_error $? "no acceptable C compiler found in \$PATH
19181See \`config.log' for more details" "$LINENO" 5 ; }
19182
19183# Provide some information about the compiler.
19184$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19185set X $ac_compile
19186ac_compiler=$2
19187for ac_option in --version -v -V -qversion; do
19188  { { ac_try="$ac_compiler $ac_option >&5"
19189case "(($ac_try" in
19190  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19191  *) ac_try_echo=$ac_try;;
19192esac
19193eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19194$as_echo "$ac_try_echo"; } >&5
19195  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19196  ac_status=$?
19197  if test -s conftest.err; then
19198    sed '10a\
19199... rest of stderr output deleted ...
19200         10q' conftest.err >conftest.er1
19201    cat conftest.er1 >&5
19202  fi
19203  rm -f conftest.er1 conftest.err
19204  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19205  test $ac_status = 0; }
19206done
19207
19208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19209/* end confdefs.h.  */
19210
19211int
19212main ()
19213{
19214
19215  ;
19216  return 0;
19217}
19218_ACEOF
19219ac_clean_files_save=$ac_clean_files
19220ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19221# Try to create an executable without -o first, disregard a.out.
19222# It will help us diagnose broken compilers, and finding out an intuition
19223# of exeext.
19224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19225$as_echo_n "checking whether the C compiler works... " >&6; }
19226ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19227
19228# The possible output files:
19229ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19230
19231ac_rmfiles=
19232for ac_file in $ac_files
19233do
19234  case $ac_file in
19235    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19236    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19237  esac
19238done
19239rm -f $ac_rmfiles
19240
19241if { { ac_try="$ac_link_default"
19242case "(($ac_try" in
19243  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19244  *) ac_try_echo=$ac_try;;
19245esac
19246eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19247$as_echo "$ac_try_echo"; } >&5
19248  (eval "$ac_link_default") 2>&5
19249  ac_status=$?
19250  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19251  test $ac_status = 0; }; then :
19252  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19253# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19254# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19255# so that the user can short-circuit this test for compilers unknown to
19256# Autoconf.
19257for ac_file in $ac_files ''
19258do
19259  test -f "$ac_file" || continue
19260  case $ac_file in
19261    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19262	;;
19263    [ab].out )
19264	# We found the default executable, but exeext='' is most
19265	# certainly right.
19266	break;;
19267    *.* )
19268	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19269	then :; else
19270	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19271	fi
19272	# We set ac_cv_exeext here because the later test for it is not
19273	# safe: cross compilers may not add the suffix if given an `-o'
19274	# argument, so we may need to know it at that point already.
19275	# Even if this section looks crufty: it has the advantage of
19276	# actually working.
19277	break;;
19278    * )
19279	break;;
19280  esac
19281done
19282test "$ac_cv_exeext" = no && ac_cv_exeext=
19283
19284else
19285  ac_file=''
19286fi
19287if test -z "$ac_file"; then :
19288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19289$as_echo "no" >&6; }
19290$as_echo "$as_me: failed program was:" >&5
19291sed 's/^/| /' conftest.$ac_ext >&5
19292
19293{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19295as_fn_error 77 "C compiler cannot create executables
19296See \`config.log' for more details" "$LINENO" 5 ; }
19297else
19298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19299$as_echo "yes" >&6; }
19300fi
19301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19302$as_echo_n "checking for C compiler default output file name... " >&6; }
19303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19304$as_echo "$ac_file" >&6; }
19305ac_exeext=$ac_cv_exeext
19306
19307rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19308ac_clean_files=$ac_clean_files_save
19309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19310$as_echo_n "checking for suffix of executables... " >&6; }
19311if { { ac_try="$ac_link"
19312case "(($ac_try" in
19313  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19314  *) ac_try_echo=$ac_try;;
19315esac
19316eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19317$as_echo "$ac_try_echo"; } >&5
19318  (eval "$ac_link") 2>&5
19319  ac_status=$?
19320  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19321  test $ac_status = 0; }; then :
19322  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19323# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19324# work properly (i.e., refer to `conftest.exe'), while it won't with
19325# `rm'.
19326for ac_file in conftest.exe conftest conftest.*; do
19327  test -f "$ac_file" || continue
19328  case $ac_file in
19329    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19330    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19331	  break;;
19332    * ) break;;
19333  esac
19334done
19335else
19336  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19337$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19338as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19339See \`config.log' for more details" "$LINENO" 5 ; }
19340fi
19341rm -f conftest conftest$ac_cv_exeext
19342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19343$as_echo "$ac_cv_exeext" >&6; }
19344
19345rm -f conftest.$ac_ext
19346EXEEXT=$ac_cv_exeext
19347ac_exeext=$EXEEXT
19348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19349/* end confdefs.h.  */
19350#include <stdio.h>
19351int
19352main ()
19353{
19354FILE *f = fopen ("conftest.out", "w");
19355 return ferror (f) || fclose (f) != 0;
19356
19357  ;
19358  return 0;
19359}
19360_ACEOF
19361ac_clean_files="$ac_clean_files conftest.out"
19362# Check that the compiler produces executables we can run.  If not, either
19363# the compiler is broken, or we cross compile.
19364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19365$as_echo_n "checking whether we are cross compiling... " >&6; }
19366if test "$cross_compiling" != yes; then
19367  { { ac_try="$ac_link"
19368case "(($ac_try" in
19369  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19370  *) ac_try_echo=$ac_try;;
19371esac
19372eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19373$as_echo "$ac_try_echo"; } >&5
19374  (eval "$ac_link") 2>&5
19375  ac_status=$?
19376  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19377  test $ac_status = 0; }
19378  if { ac_try='./conftest$ac_cv_exeext'
19379  { { case "(($ac_try" in
19380  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19381  *) ac_try_echo=$ac_try;;
19382esac
19383eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19384$as_echo "$ac_try_echo"; } >&5
19385  (eval "$ac_try") 2>&5
19386  ac_status=$?
19387  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19388  test $ac_status = 0; }; }; then
19389    cross_compiling=no
19390  else
19391    if test "$cross_compiling" = maybe; then
19392	cross_compiling=yes
19393    else
19394	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19395$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19396as_fn_error $? "cannot run C compiled programs.
19397If you meant to cross compile, use \`--host'.
19398See \`config.log' for more details" "$LINENO" 5 ; }
19399    fi
19400  fi
19401fi
19402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19403$as_echo "$cross_compiling" >&6; }
19404
19405rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19406ac_clean_files=$ac_clean_files_save
19407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19408$as_echo_n "checking for suffix of object files... " >&6; }
19409if test "${ac_cv_objext+set}" = set; then :
19410  $as_echo_n "(cached) " >&6
19411else
19412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19413/* end confdefs.h.  */
19414
19415int
19416main ()
19417{
19418
19419  ;
19420  return 0;
19421}
19422_ACEOF
19423rm -f conftest.o conftest.obj
19424if { { ac_try="$ac_compile"
19425case "(($ac_try" in
19426  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19427  *) ac_try_echo=$ac_try;;
19428esac
19429eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19430$as_echo "$ac_try_echo"; } >&5
19431  (eval "$ac_compile") 2>&5
19432  ac_status=$?
19433  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19434  test $ac_status = 0; }; then :
19435  for ac_file in conftest.o conftest.obj conftest.*; do
19436  test -f "$ac_file" || continue;
19437  case $ac_file in
19438    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19439    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19440       break;;
19441  esac
19442done
19443else
19444  $as_echo "$as_me: failed program was:" >&5
19445sed 's/^/| /' conftest.$ac_ext >&5
19446
19447{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19448$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19449as_fn_error $? "cannot compute suffix of object files: cannot compile
19450See \`config.log' for more details" "$LINENO" 5 ; }
19451fi
19452rm -f conftest.$ac_cv_objext conftest.$ac_ext
19453fi
19454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19455$as_echo "$ac_cv_objext" >&6; }
19456OBJEXT=$ac_cv_objext
19457ac_objext=$OBJEXT
19458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19459$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19460if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19461  $as_echo_n "(cached) " >&6
19462else
19463  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19464/* end confdefs.h.  */
19465
19466int
19467main ()
19468{
19469#ifndef __GNUC__
19470       choke me
19471#endif
19472
19473  ;
19474  return 0;
19475}
19476_ACEOF
19477if ac_fn_c_try_compile "$LINENO"; then :
19478  ac_compiler_gnu=yes
19479else
19480  ac_compiler_gnu=no
19481fi
19482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19483ac_cv_c_compiler_gnu=$ac_compiler_gnu
19484
19485fi
19486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19487$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19488if test $ac_compiler_gnu = yes; then
19489  GCC=yes
19490else
19491  GCC=
19492fi
19493ac_test_CFLAGS=${CFLAGS+set}
19494ac_save_CFLAGS=$CFLAGS
19495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19496$as_echo_n "checking whether $CC accepts -g... " >&6; }
19497if test "${ac_cv_prog_cc_g+set}" = set; then :
19498  $as_echo_n "(cached) " >&6
19499else
19500  ac_save_c_werror_flag=$ac_c_werror_flag
19501   ac_c_werror_flag=yes
19502   ac_cv_prog_cc_g=no
19503   CFLAGS="-g"
19504   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19505/* end confdefs.h.  */
19506
19507int
19508main ()
19509{
19510
19511  ;
19512  return 0;
19513}
19514_ACEOF
19515if ac_fn_c_try_compile "$LINENO"; then :
19516  ac_cv_prog_cc_g=yes
19517else
19518  CFLAGS=""
19519      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19520/* end confdefs.h.  */
19521
19522int
19523main ()
19524{
19525
19526  ;
19527  return 0;
19528}
19529_ACEOF
19530if ac_fn_c_try_compile "$LINENO"; then :
19531
19532else
19533  ac_c_werror_flag=$ac_save_c_werror_flag
19534	 CFLAGS="-g"
19535	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19536/* end confdefs.h.  */
19537
19538int
19539main ()
19540{
19541
19542  ;
19543  return 0;
19544}
19545_ACEOF
19546if ac_fn_c_try_compile "$LINENO"; then :
19547  ac_cv_prog_cc_g=yes
19548fi
19549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19550fi
19551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19552fi
19553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19554   ac_c_werror_flag=$ac_save_c_werror_flag
19555fi
19556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19557$as_echo "$ac_cv_prog_cc_g" >&6; }
19558if test "$ac_test_CFLAGS" = set; then
19559  CFLAGS=$ac_save_CFLAGS
19560elif test $ac_cv_prog_cc_g = yes; then
19561  if test "$GCC" = yes; then
19562    CFLAGS="-g -O2"
19563  else
19564    CFLAGS="-g"
19565  fi
19566else
19567  if test "$GCC" = yes; then
19568    CFLAGS="-O2"
19569  else
19570    CFLAGS=
19571  fi
19572fi
19573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19574$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19575if test "${ac_cv_prog_cc_c89+set}" = set; then :
19576  $as_echo_n "(cached) " >&6
19577else
19578  ac_cv_prog_cc_c89=no
19579ac_save_CC=$CC
19580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19581/* end confdefs.h.  */
19582#include <stdarg.h>
19583#include <stdio.h>
19584#include <sys/types.h>
19585#include <sys/stat.h>
19586/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19587struct buf { int x; };
19588FILE * (*rcsopen) (struct buf *, struct stat *, int);
19589static char *e (p, i)
19590     char **p;
19591     int i;
19592{
19593  return p[i];
19594}
19595static char *f (char * (*g) (char **, int), char **p, ...)
19596{
19597  char *s;
19598  va_list v;
19599  va_start (v,p);
19600  s = g (p, va_arg (v,int));
19601  va_end (v);
19602  return s;
19603}
19604
19605/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19606   function prototypes and stuff, but not '\xHH' hex character constants.
19607   These don't provoke an error unfortunately, instead are silently treated
19608   as 'x'.  The following induces an error, until -std is added to get
19609   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19610   array size at least.  It's necessary to write '\x00'==0 to get something
19611   that's true only with -std.  */
19612int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19613
19614/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19615   inside strings and character constants.  */
19616#define FOO(x) 'x'
19617int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19618
19619int test (int i, double x);
19620struct s1 {int (*f) (int a);};
19621struct s2 {int (*f) (double a);};
19622int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19623int argc;
19624char **argv;
19625int
19626main ()
19627{
19628return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19629  ;
19630  return 0;
19631}
19632_ACEOF
19633for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19634	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19635do
19636  CC="$ac_save_CC $ac_arg"
19637  if ac_fn_c_try_compile "$LINENO"; then :
19638  ac_cv_prog_cc_c89=$ac_arg
19639fi
19640rm -f core conftest.err conftest.$ac_objext
19641  test "x$ac_cv_prog_cc_c89" != "xno" && break
19642done
19643rm -f conftest.$ac_ext
19644CC=$ac_save_CC
19645
19646fi
19647# AC_CACHE_VAL
19648case "x$ac_cv_prog_cc_c89" in
19649  x)
19650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19651$as_echo "none needed" >&6; } ;;
19652  xno)
19653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19654$as_echo "unsupported" >&6; } ;;
19655  *)
19656    CC="$CC $ac_cv_prog_cc_c89"
19657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19658$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19659esac
19660if test "x$ac_cv_prog_cc_c89" != xno; then :
19661
19662fi
19663
19664ac_ext=cpp
19665ac_cpp='$CXXCPP $CPPFLAGS'
19666ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19667ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19668ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19669
19670
19671### Locate C++ compiler (CXX)
19672
19673if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19674  # Do not probe for CC on MacOSX.
19675  COMPILER_CHECK_LIST="cl g++"
19676else
19677  COMPILER_CHECK_LIST="cl CC g++"
19678fi
19679
19680  COMPILER_NAME=C++
19681
19682  CXX=
19683  # If TOOLS_DIR is set, check for all compiler names in there first
19684  # before checking the rest of the PATH.
19685  if test -n "$TOOLS_DIR"; then
19686    PATH_save="$PATH"
19687    PATH="$TOOLS_DIR"
19688    for ac_prog in $COMPILER_CHECK_LIST
19689do
19690  # Extract the first word of "$ac_prog", so it can be a program name with args.
19691set dummy $ac_prog; ac_word=$2
19692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19693$as_echo_n "checking for $ac_word... " >&6; }
19694if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19695  $as_echo_n "(cached) " >&6
19696else
19697  case $TOOLS_DIR_CXX in
19698  [\\/]* | ?:[\\/]*)
19699  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19700  ;;
19701  *)
19702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19703for as_dir in $PATH
19704do
19705  IFS=$as_save_IFS
19706  test -z "$as_dir" && as_dir=.
19707    for ac_exec_ext in '' $ac_executable_extensions; do
19708  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19709    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19711    break 2
19712  fi
19713done
19714  done
19715IFS=$as_save_IFS
19716
19717  ;;
19718esac
19719fi
19720TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19721if test -n "$TOOLS_DIR_CXX"; then
19722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19723$as_echo "$TOOLS_DIR_CXX" >&6; }
19724else
19725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19726$as_echo "no" >&6; }
19727fi
19728
19729
19730  test -n "$TOOLS_DIR_CXX" && break
19731done
19732
19733    CXX=$TOOLS_DIR_CXX
19734    PATH="$PATH_save"
19735  fi
19736
19737  # AC_PATH_PROGS can't be run multiple times with the same variable,
19738  # so create a new name for this run.
19739  if test "x$CXX" = x; then
19740    for ac_prog in $COMPILER_CHECK_LIST
19741do
19742  # Extract the first word of "$ac_prog", so it can be a program name with args.
19743set dummy $ac_prog; ac_word=$2
19744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19745$as_echo_n "checking for $ac_word... " >&6; }
19746if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19747  $as_echo_n "(cached) " >&6
19748else
19749  case $POTENTIAL_CXX in
19750  [\\/]* | ?:[\\/]*)
19751  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19752  ;;
19753  *)
19754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19755for as_dir in $PATH
19756do
19757  IFS=$as_save_IFS
19758  test -z "$as_dir" && as_dir=.
19759    for ac_exec_ext in '' $ac_executable_extensions; do
19760  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19761    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19763    break 2
19764  fi
19765done
19766  done
19767IFS=$as_save_IFS
19768
19769  ;;
19770esac
19771fi
19772POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19773if test -n "$POTENTIAL_CXX"; then
19774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19775$as_echo "$POTENTIAL_CXX" >&6; }
19776else
19777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19778$as_echo "no" >&6; }
19779fi
19780
19781
19782  test -n "$POTENTIAL_CXX" && break
19783done
19784
19785    CXX=$POTENTIAL_CXX
19786  fi
19787
19788  if test "x$CXX" = x; then
19789
19790    # Print a helpful message on how to acquire the necessary build dependency.
19791    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19792    MISSING_DEPENDENCY=devkit
19793    PKGHANDLER_COMMAND=
19794
19795    case $PKGHANDLER in
19796	apt-get)
19797                apt_help     $MISSING_DEPENDENCY ;;
19798    yum)
19799                yum_help     $MISSING_DEPENDENCY ;;
19800	port)
19801                port_help    $MISSING_DEPENDENCY ;;
19802	pkgutil)
19803                pkgutil_help $MISSING_DEPENDENCY ;;
19804	pkgadd)
19805                pkgadd_help  $MISSING_DEPENDENCY ;;
19806    * )
19807      break ;;
19808    esac
19809
19810    if test "x$PKGHANDLER_COMMAND" != x; then
19811        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19812    fi
19813
19814      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19815  fi
19816
19817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19818
19819  # First separate the path from the arguments. This will split at the first
19820  # space.
19821  complete="$CXX"
19822  path="${complete%% *}"
19823  tmp="$complete EOL"
19824  arguments="${tmp#* }"
19825
19826  # Input might be given as Windows format, start by converting to
19827  # unix format.
19828  new_path=`$CYGPATH -u "$path"`
19829
19830  # Now try to locate executable using which
19831  new_path=`$WHICH "$new_path" 2> /dev/null`
19832  # bat and cmd files are not always considered executable in cygwin causing which
19833  # to not find them
19834  if test "x$new_path" = x \
19835           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19836           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19837    new_path=`$CYGPATH -u "$path"`
19838  fi
19839  if test "x$new_path" = x; then
19840    # Oops. Which didn't find the executable.
19841    # The splitting of arguments from the executable at a space might have been incorrect,
19842    # since paths with space are more likely in Windows. Give it another try with the whole
19843    # argument.
19844    path="$complete"
19845    arguments="EOL"
19846    new_path=`$CYGPATH -u "$path"`
19847    new_path=`$WHICH "$new_path" 2> /dev/null`
19848    # bat and cmd files are not always considered executable in cygwin causing which
19849    # to not find them
19850    if test "x$new_path" = x \
19851             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19852             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19853      new_path=`$CYGPATH -u "$path"`
19854    fi
19855    if test "x$new_path" = x; then
19856      # It's still not found. Now this is an unrecoverable error.
19857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19858$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19859      has_space=`$ECHO "$complete" | $GREP " "`
19860      if test "x$has_space" != x; then
19861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19863      fi
19864      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19865    fi
19866  fi
19867
19868  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19869  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19870  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19871  # "foo.exe" is OK but "foo" is an error.
19872  #
19873  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19874  # It is also a way to make sure we got the proper file name for the real test later on.
19875  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19876  if test "x$test_shortpath" = x; then
19877    # Short path failed, file does not exist as specified.
19878    # Try adding .exe or .cmd
19879    if test -f "${new_path}.exe"; then
19880       input_to_shortpath="${new_path}.exe"
19881    elif test -f "${new_path}.cmd"; then
19882       input_to_shortpath="${new_path}.cmd"
19883    else
19884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19885$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19886      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19887$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19888      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19889    fi
19890  else
19891    input_to_shortpath="$new_path"
19892  fi
19893
19894  # Call helper function which possibly converts this using DOS-style short mode.
19895  # If so, the updated path is stored in $new_path.
19896  new_path="$input_to_shortpath"
19897
19898  input_path="$input_to_shortpath"
19899  # Check if we need to convert this using DOS-style short mode. If the path
19900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19901  # take no chances and rewrite it.
19902  # Note: m4 eats our [], so we need to use [ and ] instead.
19903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19904  if test "x$has_forbidden_chars" != x; then
19905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19909      # Going to short mode and back again did indeed matter. Since short mode is
19910      # case insensitive, let's make it lowercase to improve readability.
19911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19912      # Now convert it back to Unix-stile (cygpath)
19913      input_path=`$CYGPATH -u "$shortmode_path"`
19914      new_path="$input_path"
19915    fi
19916  fi
19917
19918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19919  if test "x$test_cygdrive_prefix" = x; then
19920    # As a simple fix, exclude /usr/bin since it's not a real path.
19921    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19923      # a path prefixed by /cygdrive for fixpath to work.
19924      new_path="$CYGWIN_ROOT_PATH$input_path"
19925    fi
19926  fi
19927
19928  # remove trailing .exe if any
19929  new_path="${new_path/%.exe/}"
19930
19931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19932
19933  # First separate the path from the arguments. This will split at the first
19934  # space.
19935  complete="$CXX"
19936  path="${complete%% *}"
19937  tmp="$complete EOL"
19938  arguments="${tmp#* }"
19939
19940  # Input might be given as Windows format, start by converting to
19941  # unix format.
19942  new_path="$path"
19943
19944  windows_path="$new_path"
19945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19946    unix_path=`$CYGPATH -u "$windows_path"`
19947    new_path="$unix_path"
19948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19950    new_path="$unix_path"
19951  fi
19952
19953
19954  # Now try to locate executable using which
19955  new_path=`$WHICH "$new_path" 2> /dev/null`
19956
19957  if test "x$new_path" = x; then
19958    # Oops. Which didn't find the executable.
19959    # The splitting of arguments from the executable at a space might have been incorrect,
19960    # since paths with space are more likely in Windows. Give it another try with the whole
19961    # argument.
19962    path="$complete"
19963    arguments="EOL"
19964    new_path="$path"
19965
19966  windows_path="$new_path"
19967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19968    unix_path=`$CYGPATH -u "$windows_path"`
19969    new_path="$unix_path"
19970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19972    new_path="$unix_path"
19973  fi
19974
19975
19976    new_path=`$WHICH "$new_path" 2> /dev/null`
19977
19978    if test "x$new_path" = x; then
19979      # It's still not found. Now this is an unrecoverable error.
19980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19981$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19982      has_space=`$ECHO "$complete" | $GREP " "`
19983      if test "x$has_space" != x; then
19984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19986      fi
19987      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19988    fi
19989  fi
19990
19991  # Now new_path has a complete unix path to the binary
19992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19993    # Keep paths in /bin as-is, but remove trailing .exe if any
19994    new_path="${new_path/%.exe/}"
19995    # Do not save /bin paths to all_fixpath_prefixes!
19996  else
19997    # Not in mixed or Windows style, start by that.
19998    new_path=`cmd //c echo $new_path`
19999
20000  input_path="$new_path"
20001  # Check if we need to convert this using DOS-style short mode. If the path
20002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20003  # take no chances and rewrite it.
20004  # Note: m4 eats our [], so we need to use [ and ] instead.
20005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20006  if test "x$has_forbidden_chars" != x; then
20007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20009  fi
20010
20011    # Output is in $new_path
20012
20013  windows_path="$new_path"
20014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20015    unix_path=`$CYGPATH -u "$windows_path"`
20016    new_path="$unix_path"
20017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20019    new_path="$unix_path"
20020  fi
20021
20022    # remove trailing .exe if any
20023    new_path="${new_path/%.exe/}"
20024
20025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20027  fi
20028
20029  else
20030    # We're on a posix platform. Hooray! :)
20031    # First separate the path from the arguments. This will split at the first
20032    # space.
20033    complete="$CXX"
20034    path="${complete%% *}"
20035    tmp="$complete EOL"
20036    arguments="${tmp#* }"
20037
20038    # Cannot rely on the command "which" here since it doesn't always work.
20039    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20040    if test -z "$is_absolute_path"; then
20041      # Path to executable is not absolute. Find it.
20042      IFS_save="$IFS"
20043      IFS=:
20044      for p in $PATH; do
20045        if test -f "$p/$path" && test -x "$p/$path"; then
20046          new_path="$p/$path"
20047          break
20048        fi
20049      done
20050      IFS="$IFS_save"
20051    else
20052      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20053$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20054      new_path="$path"
20055    fi
20056
20057    if test "x$new_path" = x; then
20058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20059$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20060        has_space=`$ECHO "$complete" | $GREP " "`
20061        if test "x$has_space" != x; then
20062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20064        fi
20065        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20066      fi
20067  fi
20068
20069      # Now join together the path and the arguments once again
20070      if test "x$arguments" != xEOL; then
20071        new_complete="$new_path ${arguments% *}"
20072      else
20073        new_complete="$new_path"
20074      fi
20075
20076  if test "x$complete" != "x$new_complete"; then
20077      CXX="$new_complete"
20078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20079$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20080    fi
20081
20082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20083$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20084  TEST_COMPILER="$CXX"
20085
20086    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20087        # Follow a chain of symbolic links. Use readlink
20088        # where it exists, else fall back to horribly
20089        # complicated shell code.
20090        if test "x$READLINK_TESTED" != yes; then
20091            # On MacOSX there is a readlink tool with a different
20092            # purpose than the GNU readlink tool. Check the found readlink.
20093            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20094            if test "x$ISGNU" = x; then
20095                 # A readlink that we do not know how to use.
20096                 # Are there other non-GNU readlinks out there?
20097                 READLINK_TESTED=yes
20098                 READLINK=
20099            fi
20100        fi
20101
20102        if test "x$READLINK" != x; then
20103            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20104        else
20105            # Save the current directory for restoring afterwards
20106            STARTDIR=$PWD
20107            COUNTER=0
20108            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20109            sym_link_file=`$BASENAME $TEST_COMPILER`
20110            # Use the system pwd and not the shell builtin to resolve directory symlinks
20111            cd $sym_link_dir
20112            cd `$THEPWDCMD`
20113            sym_link_dir=`$THEPWDCMD`
20114            # Resolve file symlinks
20115            while test $COUNTER -lt 20; do
20116                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20117                if test "x$ISLINK" == x; then
20118                    # This is not a symbolic link! We are done!
20119                    break
20120                fi
20121                # Again resolve directory symlinks since the target of the just found
20122                # link could be in a different directory
20123                cd `$DIRNAME $ISLINK`
20124                sym_link_dir=`$THEPWDCMD`
20125                sym_link_file=`$BASENAME $ISLINK`
20126                let COUNTER=COUNTER+1
20127            done
20128            cd $STARTDIR
20129            TEST_COMPILER=$sym_link_dir/$sym_link_file
20130        fi
20131    fi
20132
20133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20134$as_echo "$TEST_COMPILER" >&6; }
20135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20136$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20137
20138  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20139  if test "x$COMPILER_BASENAME" = "xccache"; then
20140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20141$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20142    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20143    # We want to control ccache invocation ourselves, so ignore this cc and try
20144    # searching again.
20145
20146    # Remove the path to the fake ccache cc from the PATH
20147    RETRY_COMPILER_SAVED_PATH="$PATH"
20148    COMPILER_DIRNAME=`$DIRNAME $CXX`
20149    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20150
20151    # Try again looking for our compiler
20152    if test -n "$ac_tool_prefix"; then
20153  for ac_prog in $COMPILER_CHECK_LIST
20154  do
20155    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20156set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20158$as_echo_n "checking for $ac_word... " >&6; }
20159if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20160  $as_echo_n "(cached) " >&6
20161else
20162  if test -n "$PROPER_COMPILER_CXX"; then
20163  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20164else
20165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20166for as_dir in $PATH
20167do
20168  IFS=$as_save_IFS
20169  test -z "$as_dir" && as_dir=.
20170    for ac_exec_ext in '' $ac_executable_extensions; do
20171  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20172    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20174    break 2
20175  fi
20176done
20177  done
20178IFS=$as_save_IFS
20179
20180fi
20181fi
20182PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20183if test -n "$PROPER_COMPILER_CXX"; then
20184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20185$as_echo "$PROPER_COMPILER_CXX" >&6; }
20186else
20187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20188$as_echo "no" >&6; }
20189fi
20190
20191
20192    test -n "$PROPER_COMPILER_CXX" && break
20193  done
20194fi
20195if test -z "$PROPER_COMPILER_CXX"; then
20196  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20197  for ac_prog in $COMPILER_CHECK_LIST
20198do
20199  # Extract the first word of "$ac_prog", so it can be a program name with args.
20200set dummy $ac_prog; ac_word=$2
20201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20202$as_echo_n "checking for $ac_word... " >&6; }
20203if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20204  $as_echo_n "(cached) " >&6
20205else
20206  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20207  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20208else
20209as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20210for as_dir in $PATH
20211do
20212  IFS=$as_save_IFS
20213  test -z "$as_dir" && as_dir=.
20214    for ac_exec_ext in '' $ac_executable_extensions; do
20215  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20216    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20218    break 2
20219  fi
20220done
20221  done
20222IFS=$as_save_IFS
20223
20224fi
20225fi
20226ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20227if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20229$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20230else
20231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20232$as_echo "no" >&6; }
20233fi
20234
20235
20236  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20237done
20238
20239  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20240    PROPER_COMPILER_CXX=""
20241  else
20242    case $cross_compiling:$ac_tool_warned in
20243yes:)
20244{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20245$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20246ac_tool_warned=yes ;;
20247esac
20248    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20249  fi
20250fi
20251
20252
20253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20254
20255  # First separate the path from the arguments. This will split at the first
20256  # space.
20257  complete="$PROPER_COMPILER_CXX"
20258  path="${complete%% *}"
20259  tmp="$complete EOL"
20260  arguments="${tmp#* }"
20261
20262  # Input might be given as Windows format, start by converting to
20263  # unix format.
20264  new_path=`$CYGPATH -u "$path"`
20265
20266  # Now try to locate executable using which
20267  new_path=`$WHICH "$new_path" 2> /dev/null`
20268  # bat and cmd files are not always considered executable in cygwin causing which
20269  # to not find them
20270  if test "x$new_path" = x \
20271           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20272           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20273    new_path=`$CYGPATH -u "$path"`
20274  fi
20275  if test "x$new_path" = x; then
20276    # Oops. Which didn't find the executable.
20277    # The splitting of arguments from the executable at a space might have been incorrect,
20278    # since paths with space are more likely in Windows. Give it another try with the whole
20279    # argument.
20280    path="$complete"
20281    arguments="EOL"
20282    new_path=`$CYGPATH -u "$path"`
20283    new_path=`$WHICH "$new_path" 2> /dev/null`
20284    # bat and cmd files are not always considered executable in cygwin causing which
20285    # to not find them
20286    if test "x$new_path" = x \
20287             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20288             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20289      new_path=`$CYGPATH -u "$path"`
20290    fi
20291    if test "x$new_path" = x; then
20292      # It's still not found. Now this is an unrecoverable error.
20293      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20294$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20295      has_space=`$ECHO "$complete" | $GREP " "`
20296      if test "x$has_space" != x; then
20297        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20298$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20299      fi
20300      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20301    fi
20302  fi
20303
20304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20307  # "foo.exe" is OK but "foo" is an error.
20308  #
20309  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20310  # It is also a way to make sure we got the proper file name for the real test later on.
20311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20312  if test "x$test_shortpath" = x; then
20313    # Short path failed, file does not exist as specified.
20314    # Try adding .exe or .cmd
20315    if test -f "${new_path}.exe"; then
20316       input_to_shortpath="${new_path}.exe"
20317    elif test -f "${new_path}.cmd"; then
20318       input_to_shortpath="${new_path}.cmd"
20319    else
20320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20321$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20322      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20323$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20324      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20325    fi
20326  else
20327    input_to_shortpath="$new_path"
20328  fi
20329
20330  # Call helper function which possibly converts this using DOS-style short mode.
20331  # If so, the updated path is stored in $new_path.
20332  new_path="$input_to_shortpath"
20333
20334  input_path="$input_to_shortpath"
20335  # Check if we need to convert this using DOS-style short mode. If the path
20336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20337  # take no chances and rewrite it.
20338  # Note: m4 eats our [], so we need to use [ and ] instead.
20339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20340  if test "x$has_forbidden_chars" != x; then
20341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20342    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20343    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20344    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20345      # Going to short mode and back again did indeed matter. Since short mode is
20346      # case insensitive, let's make it lowercase to improve readability.
20347      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20348      # Now convert it back to Unix-stile (cygpath)
20349      input_path=`$CYGPATH -u "$shortmode_path"`
20350      new_path="$input_path"
20351    fi
20352  fi
20353
20354  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20355  if test "x$test_cygdrive_prefix" = x; then
20356    # As a simple fix, exclude /usr/bin since it's not a real path.
20357    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20358      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20359      # a path prefixed by /cygdrive for fixpath to work.
20360      new_path="$CYGWIN_ROOT_PATH$input_path"
20361    fi
20362  fi
20363
20364  # remove trailing .exe if any
20365  new_path="${new_path/%.exe/}"
20366
20367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20368
20369  # First separate the path from the arguments. This will split at the first
20370  # space.
20371  complete="$PROPER_COMPILER_CXX"
20372  path="${complete%% *}"
20373  tmp="$complete EOL"
20374  arguments="${tmp#* }"
20375
20376  # Input might be given as Windows format, start by converting to
20377  # unix format.
20378  new_path="$path"
20379
20380  windows_path="$new_path"
20381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20382    unix_path=`$CYGPATH -u "$windows_path"`
20383    new_path="$unix_path"
20384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20386    new_path="$unix_path"
20387  fi
20388
20389
20390  # Now try to locate executable using which
20391  new_path=`$WHICH "$new_path" 2> /dev/null`
20392
20393  if test "x$new_path" = x; then
20394    # Oops. Which didn't find the executable.
20395    # The splitting of arguments from the executable at a space might have been incorrect,
20396    # since paths with space are more likely in Windows. Give it another try with the whole
20397    # argument.
20398    path="$complete"
20399    arguments="EOL"
20400    new_path="$path"
20401
20402  windows_path="$new_path"
20403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20404    unix_path=`$CYGPATH -u "$windows_path"`
20405    new_path="$unix_path"
20406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20408    new_path="$unix_path"
20409  fi
20410
20411
20412    new_path=`$WHICH "$new_path" 2> /dev/null`
20413
20414    if test "x$new_path" = x; then
20415      # It's still not found. Now this is an unrecoverable error.
20416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20417$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20418      has_space=`$ECHO "$complete" | $GREP " "`
20419      if test "x$has_space" != x; then
20420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20422      fi
20423      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20424    fi
20425  fi
20426
20427  # Now new_path has a complete unix path to the binary
20428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20429    # Keep paths in /bin as-is, but remove trailing .exe if any
20430    new_path="${new_path/%.exe/}"
20431    # Do not save /bin paths to all_fixpath_prefixes!
20432  else
20433    # Not in mixed or Windows style, start by that.
20434    new_path=`cmd //c echo $new_path`
20435
20436  input_path="$new_path"
20437  # Check if we need to convert this using DOS-style short mode. If the path
20438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20439  # take no chances and rewrite it.
20440  # Note: m4 eats our [], so we need to use [ and ] instead.
20441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20442  if test "x$has_forbidden_chars" != x; then
20443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20445  fi
20446
20447    # Output is in $new_path
20448
20449  windows_path="$new_path"
20450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20451    unix_path=`$CYGPATH -u "$windows_path"`
20452    new_path="$unix_path"
20453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20455    new_path="$unix_path"
20456  fi
20457
20458    # remove trailing .exe if any
20459    new_path="${new_path/%.exe/}"
20460
20461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20463  fi
20464
20465  else
20466    # We're on a posix platform. Hooray! :)
20467    # First separate the path from the arguments. This will split at the first
20468    # space.
20469    complete="$PROPER_COMPILER_CXX"
20470    path="${complete%% *}"
20471    tmp="$complete EOL"
20472    arguments="${tmp#* }"
20473
20474    # Cannot rely on the command "which" here since it doesn't always work.
20475    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20476    if test -z "$is_absolute_path"; then
20477      # Path to executable is not absolute. Find it.
20478      IFS_save="$IFS"
20479      IFS=:
20480      for p in $PATH; do
20481        if test -f "$p/$path" && test -x "$p/$path"; then
20482          new_path="$p/$path"
20483          break
20484        fi
20485      done
20486      IFS="$IFS_save"
20487    else
20488      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20489$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20490      new_path="$path"
20491    fi
20492
20493    if test "x$new_path" = x; then
20494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20495$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20496        has_space=`$ECHO "$complete" | $GREP " "`
20497        if test "x$has_space" != x; then
20498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20500        fi
20501        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20502      fi
20503  fi
20504
20505      # Now join together the path and the arguments once again
20506      if test "x$arguments" != xEOL; then
20507        new_complete="$new_path ${arguments% *}"
20508      else
20509        new_complete="$new_path"
20510      fi
20511
20512  if test "x$complete" != "x$new_complete"; then
20513      PROPER_COMPILER_CXX="$new_complete"
20514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20515$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20516    fi
20517
20518    PATH="$RETRY_COMPILER_SAVED_PATH"
20519
20520    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20521$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20522
20523    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20524        # Follow a chain of symbolic links. Use readlink
20525        # where it exists, else fall back to horribly
20526        # complicated shell code.
20527        if test "x$READLINK_TESTED" != yes; then
20528            # On MacOSX there is a readlink tool with a different
20529            # purpose than the GNU readlink tool. Check the found readlink.
20530            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20531            if test "x$ISGNU" = x; then
20532                 # A readlink that we do not know how to use.
20533                 # Are there other non-GNU readlinks out there?
20534                 READLINK_TESTED=yes
20535                 READLINK=
20536            fi
20537        fi
20538
20539        if test "x$READLINK" != x; then
20540            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20541        else
20542            # Save the current directory for restoring afterwards
20543            STARTDIR=$PWD
20544            COUNTER=0
20545            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20546            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20547            # Use the system pwd and not the shell builtin to resolve directory symlinks
20548            cd $sym_link_dir
20549            cd `$THEPWDCMD`
20550            sym_link_dir=`$THEPWDCMD`
20551            # Resolve file symlinks
20552            while test $COUNTER -lt 20; do
20553                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20554                if test "x$ISLINK" == x; then
20555                    # This is not a symbolic link! We are done!
20556                    break
20557                fi
20558                # Again resolve directory symlinks since the target of the just found
20559                # link could be in a different directory
20560                cd `$DIRNAME $ISLINK`
20561                sym_link_dir=`$THEPWDCMD`
20562                sym_link_file=`$BASENAME $ISLINK`
20563                let COUNTER=COUNTER+1
20564            done
20565            cd $STARTDIR
20566            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20567        fi
20568    fi
20569
20570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20571$as_echo "$PROPER_COMPILER_CXX" >&6; }
20572    CXX="$PROPER_COMPILER_CXX"
20573  else
20574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20575$as_echo "no, keeping CXX" >&6; }
20576    CXX="$TEST_COMPILER"
20577  fi
20578
20579  COMPILER=$CXX
20580  COMPILER_NAME=$COMPILER_NAME
20581
20582  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20583    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20584    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20585    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20586    if test $? -ne 0; then
20587      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20588
20589      { $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
20590$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20591      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20592$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20593      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20594    else
20595      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20596      COMPILER_VENDOR="Sun Studio"
20597    fi
20598  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20599    # First line typically looks something like:
20600    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20601    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20602    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20603    COMPILER_VENDOR="Microsoft CL.EXE"
20604    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20605    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20606      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20607        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20608      fi
20609    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20610      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20611        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20612      fi
20613    fi
20614  else
20615    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20616    # Check that this is likely to be GCC.
20617    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20618    if test $? -ne 0; then
20619      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20620$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20621      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20622$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20623      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20624    fi
20625
20626    # First line typically looks something like:
20627    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20628    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20629    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20630  fi
20631  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20632  CXX_VERSION="$COMPILER_VERSION"
20633  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20634  CXX_VENDOR="$COMPILER_VENDOR"
20635
20636  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20637$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20638
20639
20640# Now that we have resolved CXX ourself, let autoconf have it's go at it
20641ac_ext=cpp
20642ac_cpp='$CXXCPP $CPPFLAGS'
20643ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20644ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20645ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20646if test -z "$CXX"; then
20647  if test -n "$CCC"; then
20648    CXX=$CCC
20649  else
20650    if test -n "$ac_tool_prefix"; then
20651  for ac_prog in $CXX
20652  do
20653    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20654set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20656$as_echo_n "checking for $ac_word... " >&6; }
20657if test "${ac_cv_prog_CXX+set}" = set; then :
20658  $as_echo_n "(cached) " >&6
20659else
20660  if test -n "$CXX"; then
20661  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20662else
20663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20664for as_dir in $PATH
20665do
20666  IFS=$as_save_IFS
20667  test -z "$as_dir" && as_dir=.
20668    for ac_exec_ext in '' $ac_executable_extensions; do
20669  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20670    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20672    break 2
20673  fi
20674done
20675  done
20676IFS=$as_save_IFS
20677
20678fi
20679fi
20680CXX=$ac_cv_prog_CXX
20681if test -n "$CXX"; then
20682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20683$as_echo "$CXX" >&6; }
20684else
20685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20686$as_echo "no" >&6; }
20687fi
20688
20689
20690    test -n "$CXX" && break
20691  done
20692fi
20693if test -z "$CXX"; then
20694  ac_ct_CXX=$CXX
20695  for ac_prog in $CXX
20696do
20697  # Extract the first word of "$ac_prog", so it can be a program name with args.
20698set dummy $ac_prog; ac_word=$2
20699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20700$as_echo_n "checking for $ac_word... " >&6; }
20701if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20702  $as_echo_n "(cached) " >&6
20703else
20704  if test -n "$ac_ct_CXX"; then
20705  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20706else
20707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20708for as_dir in $PATH
20709do
20710  IFS=$as_save_IFS
20711  test -z "$as_dir" && as_dir=.
20712    for ac_exec_ext in '' $ac_executable_extensions; do
20713  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20714    ac_cv_prog_ac_ct_CXX="$ac_prog"
20715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20716    break 2
20717  fi
20718done
20719  done
20720IFS=$as_save_IFS
20721
20722fi
20723fi
20724ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20725if test -n "$ac_ct_CXX"; then
20726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20727$as_echo "$ac_ct_CXX" >&6; }
20728else
20729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20730$as_echo "no" >&6; }
20731fi
20732
20733
20734  test -n "$ac_ct_CXX" && break
20735done
20736
20737  if test "x$ac_ct_CXX" = x; then
20738    CXX="g++"
20739  else
20740    case $cross_compiling:$ac_tool_warned in
20741yes:)
20742{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20743$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20744ac_tool_warned=yes ;;
20745esac
20746    CXX=$ac_ct_CXX
20747  fi
20748fi
20749
20750  fi
20751fi
20752# Provide some information about the compiler.
20753$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20754set X $ac_compile
20755ac_compiler=$2
20756for ac_option in --version -v -V -qversion; do
20757  { { ac_try="$ac_compiler $ac_option >&5"
20758case "(($ac_try" in
20759  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20760  *) ac_try_echo=$ac_try;;
20761esac
20762eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20763$as_echo "$ac_try_echo"; } >&5
20764  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20765  ac_status=$?
20766  if test -s conftest.err; then
20767    sed '10a\
20768... rest of stderr output deleted ...
20769         10q' conftest.err >conftest.er1
20770    cat conftest.er1 >&5
20771  fi
20772  rm -f conftest.er1 conftest.err
20773  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20774  test $ac_status = 0; }
20775done
20776
20777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20778$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20779if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20780  $as_echo_n "(cached) " >&6
20781else
20782  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20783/* end confdefs.h.  */
20784
20785int
20786main ()
20787{
20788#ifndef __GNUC__
20789       choke me
20790#endif
20791
20792  ;
20793  return 0;
20794}
20795_ACEOF
20796if ac_fn_cxx_try_compile "$LINENO"; then :
20797  ac_compiler_gnu=yes
20798else
20799  ac_compiler_gnu=no
20800fi
20801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20802ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20803
20804fi
20805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20806$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20807if test $ac_compiler_gnu = yes; then
20808  GXX=yes
20809else
20810  GXX=
20811fi
20812ac_test_CXXFLAGS=${CXXFLAGS+set}
20813ac_save_CXXFLAGS=$CXXFLAGS
20814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20815$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20816if test "${ac_cv_prog_cxx_g+set}" = set; then :
20817  $as_echo_n "(cached) " >&6
20818else
20819  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20820   ac_cxx_werror_flag=yes
20821   ac_cv_prog_cxx_g=no
20822   CXXFLAGS="-g"
20823   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20824/* end confdefs.h.  */
20825
20826int
20827main ()
20828{
20829
20830  ;
20831  return 0;
20832}
20833_ACEOF
20834if ac_fn_cxx_try_compile "$LINENO"; then :
20835  ac_cv_prog_cxx_g=yes
20836else
20837  CXXFLAGS=""
20838      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20839/* end confdefs.h.  */
20840
20841int
20842main ()
20843{
20844
20845  ;
20846  return 0;
20847}
20848_ACEOF
20849if ac_fn_cxx_try_compile "$LINENO"; then :
20850
20851else
20852  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20853	 CXXFLAGS="-g"
20854	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20855/* end confdefs.h.  */
20856
20857int
20858main ()
20859{
20860
20861  ;
20862  return 0;
20863}
20864_ACEOF
20865if ac_fn_cxx_try_compile "$LINENO"; then :
20866  ac_cv_prog_cxx_g=yes
20867fi
20868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20869fi
20870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20871fi
20872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20873   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20874fi
20875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20876$as_echo "$ac_cv_prog_cxx_g" >&6; }
20877if test "$ac_test_CXXFLAGS" = set; then
20878  CXXFLAGS=$ac_save_CXXFLAGS
20879elif test $ac_cv_prog_cxx_g = yes; then
20880  if test "$GXX" = yes; then
20881    CXXFLAGS="-g -O2"
20882  else
20883    CXXFLAGS="-g"
20884  fi
20885else
20886  if test "$GXX" = yes; then
20887    CXXFLAGS="-O2"
20888  else
20889    CXXFLAGS=
20890  fi
20891fi
20892ac_ext=cpp
20893ac_cpp='$CXXCPP $CPPFLAGS'
20894ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20895ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20896ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20897
20898
20899### Locate other tools
20900
20901if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20902    ac_ext=m
20903ac_cpp='$OBJCPP $CPPFLAGS'
20904ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20905ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20906ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20907if test -n "$ac_tool_prefix"; then
20908  for ac_prog in gcc objcc objc cc CC
20909  do
20910    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20911set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20913$as_echo_n "checking for $ac_word... " >&6; }
20914if test "${ac_cv_prog_OBJC+set}" = set; then :
20915  $as_echo_n "(cached) " >&6
20916else
20917  if test -n "$OBJC"; then
20918  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20919else
20920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20921for as_dir in $PATH
20922do
20923  IFS=$as_save_IFS
20924  test -z "$as_dir" && as_dir=.
20925    for ac_exec_ext in '' $ac_executable_extensions; do
20926  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20927    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20929    break 2
20930  fi
20931done
20932  done
20933IFS=$as_save_IFS
20934
20935fi
20936fi
20937OBJC=$ac_cv_prog_OBJC
20938if test -n "$OBJC"; then
20939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20940$as_echo "$OBJC" >&6; }
20941else
20942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20943$as_echo "no" >&6; }
20944fi
20945
20946
20947    test -n "$OBJC" && break
20948  done
20949fi
20950if test -z "$OBJC"; then
20951  ac_ct_OBJC=$OBJC
20952  for ac_prog in gcc objcc objc cc CC
20953do
20954  # Extract the first word of "$ac_prog", so it can be a program name with args.
20955set dummy $ac_prog; ac_word=$2
20956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20957$as_echo_n "checking for $ac_word... " >&6; }
20958if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20959  $as_echo_n "(cached) " >&6
20960else
20961  if test -n "$ac_ct_OBJC"; then
20962  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20963else
20964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20965for as_dir in $PATH
20966do
20967  IFS=$as_save_IFS
20968  test -z "$as_dir" && as_dir=.
20969    for ac_exec_ext in '' $ac_executable_extensions; do
20970  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20971    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20973    break 2
20974  fi
20975done
20976  done
20977IFS=$as_save_IFS
20978
20979fi
20980fi
20981ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20982if test -n "$ac_ct_OBJC"; then
20983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20984$as_echo "$ac_ct_OBJC" >&6; }
20985else
20986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20987$as_echo "no" >&6; }
20988fi
20989
20990
20991  test -n "$ac_ct_OBJC" && break
20992done
20993
20994  if test "x$ac_ct_OBJC" = x; then
20995    OBJC="gcc"
20996  else
20997    case $cross_compiling:$ac_tool_warned in
20998yes:)
20999{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21000$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21001ac_tool_warned=yes ;;
21002esac
21003    OBJC=$ac_ct_OBJC
21004  fi
21005fi
21006
21007# Provide some information about the compiler.
21008$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21009set X $ac_compile
21010ac_compiler=$2
21011for ac_option in --version -v -V -qversion; do
21012  { { ac_try="$ac_compiler $ac_option >&5"
21013case "(($ac_try" in
21014  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21015  *) ac_try_echo=$ac_try;;
21016esac
21017eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21018$as_echo "$ac_try_echo"; } >&5
21019  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21020  ac_status=$?
21021  if test -s conftest.err; then
21022    sed '10a\
21023... rest of stderr output deleted ...
21024         10q' conftest.err >conftest.er1
21025    cat conftest.er1 >&5
21026  fi
21027  rm -f conftest.er1 conftest.err
21028  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21029  test $ac_status = 0; }
21030done
21031
21032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21033$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21034if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21035  $as_echo_n "(cached) " >&6
21036else
21037  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21038/* end confdefs.h.  */
21039
21040int
21041main ()
21042{
21043#ifndef __GNUC__
21044       choke me
21045#endif
21046
21047  ;
21048  return 0;
21049}
21050_ACEOF
21051if ac_fn_objc_try_compile "$LINENO"; then :
21052  ac_compiler_gnu=yes
21053else
21054  ac_compiler_gnu=no
21055fi
21056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21057ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21058
21059fi
21060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21061$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21062if test $ac_compiler_gnu = yes; then
21063  GOBJC=yes
21064else
21065  GOBJC=
21066fi
21067ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21068ac_save_OBJCFLAGS=$OBJCFLAGS
21069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21070$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21071if test "${ac_cv_prog_objc_g+set}" = set; then :
21072  $as_echo_n "(cached) " >&6
21073else
21074  ac_save_objc_werror_flag=$ac_objc_werror_flag
21075   ac_objc_werror_flag=yes
21076   ac_cv_prog_objc_g=no
21077   OBJCFLAGS="-g"
21078   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21079/* end confdefs.h.  */
21080
21081int
21082main ()
21083{
21084
21085  ;
21086  return 0;
21087}
21088_ACEOF
21089if ac_fn_objc_try_compile "$LINENO"; then :
21090  ac_cv_prog_objc_g=yes
21091else
21092  OBJCFLAGS=""
21093      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21094/* end confdefs.h.  */
21095
21096int
21097main ()
21098{
21099
21100  ;
21101  return 0;
21102}
21103_ACEOF
21104if ac_fn_objc_try_compile "$LINENO"; then :
21105
21106else
21107  ac_objc_werror_flag=$ac_save_objc_werror_flag
21108	 OBJCFLAGS="-g"
21109	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21110/* end confdefs.h.  */
21111
21112int
21113main ()
21114{
21115
21116  ;
21117  return 0;
21118}
21119_ACEOF
21120if ac_fn_objc_try_compile "$LINENO"; then :
21121  ac_cv_prog_objc_g=yes
21122fi
21123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21124fi
21125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21126fi
21127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21128   ac_objc_werror_flag=$ac_save_objc_werror_flag
21129fi
21130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21131$as_echo "$ac_cv_prog_objc_g" >&6; }
21132if test "$ac_test_OBJCFLAGS" = set; then
21133  OBJCFLAGS=$ac_save_OBJCFLAGS
21134elif test $ac_cv_prog_objc_g = yes; then
21135  if test "$GOBJC" = yes; then
21136    OBJCFLAGS="-g -O2"
21137  else
21138    OBJCFLAGS="-g"
21139  fi
21140else
21141  if test "$GOBJC" = yes; then
21142    OBJCFLAGS="-O2"
21143  else
21144    OBJCFLAGS=
21145  fi
21146fi
21147ac_ext=cpp
21148ac_cpp='$CXXCPP $CPPFLAGS'
21149ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21150ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21151ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21152
21153
21154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21155
21156  # First separate the path from the arguments. This will split at the first
21157  # space.
21158  complete="$OBJC"
21159  path="${complete%% *}"
21160  tmp="$complete EOL"
21161  arguments="${tmp#* }"
21162
21163  # Input might be given as Windows format, start by converting to
21164  # unix format.
21165  new_path=`$CYGPATH -u "$path"`
21166
21167  # Now try to locate executable using which
21168  new_path=`$WHICH "$new_path" 2> /dev/null`
21169  # bat and cmd files are not always considered executable in cygwin causing which
21170  # to not find them
21171  if test "x$new_path" = x \
21172           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21173           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21174    new_path=`$CYGPATH -u "$path"`
21175  fi
21176  if test "x$new_path" = x; then
21177    # Oops. Which didn't find the executable.
21178    # The splitting of arguments from the executable at a space might have been incorrect,
21179    # since paths with space are more likely in Windows. Give it another try with the whole
21180    # argument.
21181    path="$complete"
21182    arguments="EOL"
21183    new_path=`$CYGPATH -u "$path"`
21184    new_path=`$WHICH "$new_path" 2> /dev/null`
21185    # bat and cmd files are not always considered executable in cygwin causing which
21186    # to not find them
21187    if test "x$new_path" = x \
21188             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21189             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21190      new_path=`$CYGPATH -u "$path"`
21191    fi
21192    if test "x$new_path" = x; then
21193      # It's still not found. Now this is an unrecoverable error.
21194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21195$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21196      has_space=`$ECHO "$complete" | $GREP " "`
21197      if test "x$has_space" != x; then
21198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21200      fi
21201      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21202    fi
21203  fi
21204
21205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21208  # "foo.exe" is OK but "foo" is an error.
21209  #
21210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21211  # It is also a way to make sure we got the proper file name for the real test later on.
21212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21213  if test "x$test_shortpath" = x; then
21214    # Short path failed, file does not exist as specified.
21215    # Try adding .exe or .cmd
21216    if test -f "${new_path}.exe"; then
21217       input_to_shortpath="${new_path}.exe"
21218    elif test -f "${new_path}.cmd"; then
21219       input_to_shortpath="${new_path}.cmd"
21220    else
21221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21222$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21223      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21224$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21225      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21226    fi
21227  else
21228    input_to_shortpath="$new_path"
21229  fi
21230
21231  # Call helper function which possibly converts this using DOS-style short mode.
21232  # If so, the updated path is stored in $new_path.
21233  new_path="$input_to_shortpath"
21234
21235  input_path="$input_to_shortpath"
21236  # Check if we need to convert this using DOS-style short mode. If the path
21237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21238  # take no chances and rewrite it.
21239  # Note: m4 eats our [], so we need to use [ and ] instead.
21240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21241  if test "x$has_forbidden_chars" != x; then
21242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21243    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21244    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21245    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21246      # Going to short mode and back again did indeed matter. Since short mode is
21247      # case insensitive, let's make it lowercase to improve readability.
21248      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21249      # Now convert it back to Unix-stile (cygpath)
21250      input_path=`$CYGPATH -u "$shortmode_path"`
21251      new_path="$input_path"
21252    fi
21253  fi
21254
21255  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21256  if test "x$test_cygdrive_prefix" = x; then
21257    # As a simple fix, exclude /usr/bin since it's not a real path.
21258    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21259      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21260      # a path prefixed by /cygdrive for fixpath to work.
21261      new_path="$CYGWIN_ROOT_PATH$input_path"
21262    fi
21263  fi
21264
21265  # remove trailing .exe if any
21266  new_path="${new_path/%.exe/}"
21267
21268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21269
21270  # First separate the path from the arguments. This will split at the first
21271  # space.
21272  complete="$OBJC"
21273  path="${complete%% *}"
21274  tmp="$complete EOL"
21275  arguments="${tmp#* }"
21276
21277  # Input might be given as Windows format, start by converting to
21278  # unix format.
21279  new_path="$path"
21280
21281  windows_path="$new_path"
21282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21283    unix_path=`$CYGPATH -u "$windows_path"`
21284    new_path="$unix_path"
21285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21287    new_path="$unix_path"
21288  fi
21289
21290
21291  # Now try to locate executable using which
21292  new_path=`$WHICH "$new_path" 2> /dev/null`
21293
21294  if test "x$new_path" = x; then
21295    # Oops. Which didn't find the executable.
21296    # The splitting of arguments from the executable at a space might have been incorrect,
21297    # since paths with space are more likely in Windows. Give it another try with the whole
21298    # argument.
21299    path="$complete"
21300    arguments="EOL"
21301    new_path="$path"
21302
21303  windows_path="$new_path"
21304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21305    unix_path=`$CYGPATH -u "$windows_path"`
21306    new_path="$unix_path"
21307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21309    new_path="$unix_path"
21310  fi
21311
21312
21313    new_path=`$WHICH "$new_path" 2> /dev/null`
21314
21315    if test "x$new_path" = x; then
21316      # It's still not found. Now this is an unrecoverable error.
21317      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21318$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21319      has_space=`$ECHO "$complete" | $GREP " "`
21320      if test "x$has_space" != x; then
21321        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21322$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21323      fi
21324      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21325    fi
21326  fi
21327
21328  # Now new_path has a complete unix path to the binary
21329  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21330    # Keep paths in /bin as-is, but remove trailing .exe if any
21331    new_path="${new_path/%.exe/}"
21332    # Do not save /bin paths to all_fixpath_prefixes!
21333  else
21334    # Not in mixed or Windows style, start by that.
21335    new_path=`cmd //c echo $new_path`
21336
21337  input_path="$new_path"
21338  # Check if we need to convert this using DOS-style short mode. If the path
21339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21340  # take no chances and rewrite it.
21341  # Note: m4 eats our [], so we need to use [ and ] instead.
21342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21343  if test "x$has_forbidden_chars" != x; then
21344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21346  fi
21347
21348    # Output is in $new_path
21349
21350  windows_path="$new_path"
21351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21352    unix_path=`$CYGPATH -u "$windows_path"`
21353    new_path="$unix_path"
21354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21356    new_path="$unix_path"
21357  fi
21358
21359    # remove trailing .exe if any
21360    new_path="${new_path/%.exe/}"
21361
21362    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21363    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21364  fi
21365
21366  else
21367    # We're on a posix platform. Hooray! :)
21368    # First separate the path from the arguments. This will split at the first
21369    # space.
21370    complete="$OBJC"
21371    path="${complete%% *}"
21372    tmp="$complete EOL"
21373    arguments="${tmp#* }"
21374
21375    # Cannot rely on the command "which" here since it doesn't always work.
21376    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21377    if test -z "$is_absolute_path"; then
21378      # Path to executable is not absolute. Find it.
21379      IFS_save="$IFS"
21380      IFS=:
21381      for p in $PATH; do
21382        if test -f "$p/$path" && test -x "$p/$path"; then
21383          new_path="$p/$path"
21384          break
21385        fi
21386      done
21387      IFS="$IFS_save"
21388    else
21389      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21390$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21391      new_path="$path"
21392    fi
21393
21394    if test "x$new_path" = x; then
21395        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21396$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21397        has_space=`$ECHO "$complete" | $GREP " "`
21398        if test "x$has_space" != x; then
21399          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21400$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21401        fi
21402        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21403      fi
21404  fi
21405
21406      # Now join together the path and the arguments once again
21407      if test "x$arguments" != xEOL; then
21408        new_complete="$new_path ${arguments% *}"
21409      else
21410        new_complete="$new_path"
21411      fi
21412
21413  if test "x$complete" != "x$new_complete"; then
21414      OBJC="$new_complete"
21415      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21416$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21417    fi
21418
21419else
21420    OBJC=
21421fi
21422
21423# Restore the flags to the user specified values.
21424# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21425CFLAGS="$ORG_CFLAGS"
21426CXXFLAGS="$ORG_CXXFLAGS"
21427OBJCFLAGS="$ORG_OBJCFLAGS"
21428
21429LD="$CC"
21430LDEXE="$CC"
21431LDCXX="$CXX"
21432LDEXECXX="$CXX"
21433
21434# LDEXE is the linker to use, when creating executables.
21435
21436# Linking C++ libraries.
21437
21438# Linking C++ executables.
21439
21440
21441if test "x$OPENJDK_TARGET_OS" != xwindows; then
21442    if test -n "$ac_tool_prefix"; then
21443  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21444set dummy ${ac_tool_prefix}ar; ac_word=$2
21445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21446$as_echo_n "checking for $ac_word... " >&6; }
21447if test "${ac_cv_prog_AR+set}" = set; then :
21448  $as_echo_n "(cached) " >&6
21449else
21450  if test -n "$AR"; then
21451  ac_cv_prog_AR="$AR" # Let the user override the test.
21452else
21453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21454for as_dir in $PATH
21455do
21456  IFS=$as_save_IFS
21457  test -z "$as_dir" && as_dir=.
21458    for ac_exec_ext in '' $ac_executable_extensions; do
21459  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21460    ac_cv_prog_AR="${ac_tool_prefix}ar"
21461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21462    break 2
21463  fi
21464done
21465  done
21466IFS=$as_save_IFS
21467
21468fi
21469fi
21470AR=$ac_cv_prog_AR
21471if test -n "$AR"; then
21472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21473$as_echo "$AR" >&6; }
21474else
21475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21476$as_echo "no" >&6; }
21477fi
21478
21479
21480fi
21481if test -z "$ac_cv_prog_AR"; then
21482  ac_ct_AR=$AR
21483  # Extract the first word of "ar", so it can be a program name with args.
21484set dummy ar; ac_word=$2
21485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21486$as_echo_n "checking for $ac_word... " >&6; }
21487if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21488  $as_echo_n "(cached) " >&6
21489else
21490  if test -n "$ac_ct_AR"; then
21491  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21492else
21493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21494for as_dir in $PATH
21495do
21496  IFS=$as_save_IFS
21497  test -z "$as_dir" && as_dir=.
21498    for ac_exec_ext in '' $ac_executable_extensions; do
21499  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21500    ac_cv_prog_ac_ct_AR="ar"
21501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21502    break 2
21503  fi
21504done
21505  done
21506IFS=$as_save_IFS
21507
21508fi
21509fi
21510ac_ct_AR=$ac_cv_prog_ac_ct_AR
21511if test -n "$ac_ct_AR"; then
21512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21513$as_echo "$ac_ct_AR" >&6; }
21514else
21515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21516$as_echo "no" >&6; }
21517fi
21518
21519  if test "x$ac_ct_AR" = x; then
21520    AR=""
21521  else
21522    case $cross_compiling:$ac_tool_warned in
21523yes:)
21524{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21525$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21526ac_tool_warned=yes ;;
21527esac
21528    AR=$ac_ct_AR
21529  fi
21530else
21531  AR="$ac_cv_prog_AR"
21532fi
21533
21534
21535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21536
21537  # First separate the path from the arguments. This will split at the first
21538  # space.
21539  complete="$AR"
21540  path="${complete%% *}"
21541  tmp="$complete EOL"
21542  arguments="${tmp#* }"
21543
21544  # Input might be given as Windows format, start by converting to
21545  # unix format.
21546  new_path=`$CYGPATH -u "$path"`
21547
21548  # Now try to locate executable using which
21549  new_path=`$WHICH "$new_path" 2> /dev/null`
21550  # bat and cmd files are not always considered executable in cygwin causing which
21551  # to not find them
21552  if test "x$new_path" = x \
21553           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21554           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21555    new_path=`$CYGPATH -u "$path"`
21556  fi
21557  if test "x$new_path" = x; then
21558    # Oops. Which didn't find the executable.
21559    # The splitting of arguments from the executable at a space might have been incorrect,
21560    # since paths with space are more likely in Windows. Give it another try with the whole
21561    # argument.
21562    path="$complete"
21563    arguments="EOL"
21564    new_path=`$CYGPATH -u "$path"`
21565    new_path=`$WHICH "$new_path" 2> /dev/null`
21566    # bat and cmd files are not always considered executable in cygwin causing which
21567    # to not find them
21568    if test "x$new_path" = x \
21569             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21570             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21571      new_path=`$CYGPATH -u "$path"`
21572    fi
21573    if test "x$new_path" = x; then
21574      # It's still not found. Now this is an unrecoverable error.
21575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21576$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21577      has_space=`$ECHO "$complete" | $GREP " "`
21578      if test "x$has_space" != x; then
21579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21581      fi
21582      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21583    fi
21584  fi
21585
21586  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21587  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21588  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21589  # "foo.exe" is OK but "foo" is an error.
21590  #
21591  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21592  # It is also a way to make sure we got the proper file name for the real test later on.
21593  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21594  if test "x$test_shortpath" = x; then
21595    # Short path failed, file does not exist as specified.
21596    # Try adding .exe or .cmd
21597    if test -f "${new_path}.exe"; then
21598       input_to_shortpath="${new_path}.exe"
21599    elif test -f "${new_path}.cmd"; then
21600       input_to_shortpath="${new_path}.cmd"
21601    else
21602      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21603$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21604      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21605$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21606      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21607    fi
21608  else
21609    input_to_shortpath="$new_path"
21610  fi
21611
21612  # Call helper function which possibly converts this using DOS-style short mode.
21613  # If so, the updated path is stored in $new_path.
21614  new_path="$input_to_shortpath"
21615
21616  input_path="$input_to_shortpath"
21617  # Check if we need to convert this using DOS-style short mode. If the path
21618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21619  # take no chances and rewrite it.
21620  # Note: m4 eats our [], so we need to use [ and ] instead.
21621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21622  if test "x$has_forbidden_chars" != x; then
21623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21624    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21625    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21626    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21627      # Going to short mode and back again did indeed matter. Since short mode is
21628      # case insensitive, let's make it lowercase to improve readability.
21629      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21630      # Now convert it back to Unix-stile (cygpath)
21631      input_path=`$CYGPATH -u "$shortmode_path"`
21632      new_path="$input_path"
21633    fi
21634  fi
21635
21636  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21637  if test "x$test_cygdrive_prefix" = x; then
21638    # As a simple fix, exclude /usr/bin since it's not a real path.
21639    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21640      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21641      # a path prefixed by /cygdrive for fixpath to work.
21642      new_path="$CYGWIN_ROOT_PATH$input_path"
21643    fi
21644  fi
21645
21646  # remove trailing .exe if any
21647  new_path="${new_path/%.exe/}"
21648
21649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21650
21651  # First separate the path from the arguments. This will split at the first
21652  # space.
21653  complete="$AR"
21654  path="${complete%% *}"
21655  tmp="$complete EOL"
21656  arguments="${tmp#* }"
21657
21658  # Input might be given as Windows format, start by converting to
21659  # unix format.
21660  new_path="$path"
21661
21662  windows_path="$new_path"
21663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21664    unix_path=`$CYGPATH -u "$windows_path"`
21665    new_path="$unix_path"
21666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21668    new_path="$unix_path"
21669  fi
21670
21671
21672  # Now try to locate executable using which
21673  new_path=`$WHICH "$new_path" 2> /dev/null`
21674
21675  if test "x$new_path" = x; then
21676    # Oops. Which didn't find the executable.
21677    # The splitting of arguments from the executable at a space might have been incorrect,
21678    # since paths with space are more likely in Windows. Give it another try with the whole
21679    # argument.
21680    path="$complete"
21681    arguments="EOL"
21682    new_path="$path"
21683
21684  windows_path="$new_path"
21685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21686    unix_path=`$CYGPATH -u "$windows_path"`
21687    new_path="$unix_path"
21688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21690    new_path="$unix_path"
21691  fi
21692
21693
21694    new_path=`$WHICH "$new_path" 2> /dev/null`
21695
21696    if test "x$new_path" = x; then
21697      # It's still not found. Now this is an unrecoverable error.
21698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21699$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21700      has_space=`$ECHO "$complete" | $GREP " "`
21701      if test "x$has_space" != x; then
21702        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21703$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21704      fi
21705      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21706    fi
21707  fi
21708
21709  # Now new_path has a complete unix path to the binary
21710  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21711    # Keep paths in /bin as-is, but remove trailing .exe if any
21712    new_path="${new_path/%.exe/}"
21713    # Do not save /bin paths to all_fixpath_prefixes!
21714  else
21715    # Not in mixed or Windows style, start by that.
21716    new_path=`cmd //c echo $new_path`
21717
21718  input_path="$new_path"
21719  # Check if we need to convert this using DOS-style short mode. If the path
21720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21721  # take no chances and rewrite it.
21722  # Note: m4 eats our [], so we need to use [ and ] instead.
21723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21724  if test "x$has_forbidden_chars" != x; then
21725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21727  fi
21728
21729    # Output is in $new_path
21730
21731  windows_path="$new_path"
21732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21733    unix_path=`$CYGPATH -u "$windows_path"`
21734    new_path="$unix_path"
21735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21737    new_path="$unix_path"
21738  fi
21739
21740    # remove trailing .exe if any
21741    new_path="${new_path/%.exe/}"
21742
21743    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21744    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21745  fi
21746
21747  else
21748    # We're on a posix platform. Hooray! :)
21749    # First separate the path from the arguments. This will split at the first
21750    # space.
21751    complete="$AR"
21752    path="${complete%% *}"
21753    tmp="$complete EOL"
21754    arguments="${tmp#* }"
21755
21756    # Cannot rely on the command "which" here since it doesn't always work.
21757    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21758    if test -z "$is_absolute_path"; then
21759      # Path to executable is not absolute. Find it.
21760      IFS_save="$IFS"
21761      IFS=:
21762      for p in $PATH; do
21763        if test -f "$p/$path" && test -x "$p/$path"; then
21764          new_path="$p/$path"
21765          break
21766        fi
21767      done
21768      IFS="$IFS_save"
21769    else
21770      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21771$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21772      new_path="$path"
21773    fi
21774
21775    if test "x$new_path" = x; then
21776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21777$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21778        has_space=`$ECHO "$complete" | $GREP " "`
21779        if test "x$has_space" != x; then
21780          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21781$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21782        fi
21783        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21784      fi
21785  fi
21786
21787      # Now join together the path and the arguments once again
21788      if test "x$arguments" != xEOL; then
21789        new_complete="$new_path ${arguments% *}"
21790      else
21791        new_complete="$new_path"
21792      fi
21793
21794  if test "x$complete" != "x$new_complete"; then
21795      AR="$new_complete"
21796      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21797$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21798    fi
21799
21800fi
21801if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21802    ARFLAGS="-r"
21803else
21804    ARFLAGS=""
21805fi
21806
21807
21808# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21809HOTSPOT_CXX="$CXX"
21810HOTSPOT_LD="$LD"
21811
21812
21813
21814COMPILER_NAME=gcc
21815COMPILER_TYPE=CC
21816if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21817
21818    # For now, assume that we are always compiling using cl.exe.
21819    CC_OUT_OPTION=-Fo
21820    EXE_OUT_OPTION=-out:
21821    LD_OUT_OPTION=-out:
21822    AR_OUT_OPTION=-out:
21823    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21824    # program for something completely different.
21825    # Extract the first word of "link", so it can be a program name with args.
21826set dummy link; ac_word=$2
21827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21828$as_echo_n "checking for $ac_word... " >&6; }
21829if test "${ac_cv_prog_WINLD+set}" = set; then :
21830  $as_echo_n "(cached) " >&6
21831else
21832  if test -n "$WINLD"; then
21833  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21834else
21835  ac_prog_rejected=no
21836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21837for as_dir in $PATH
21838do
21839  IFS=$as_save_IFS
21840  test -z "$as_dir" && as_dir=.
21841    for ac_exec_ext in '' $ac_executable_extensions; do
21842  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21843    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21844       ac_prog_rejected=yes
21845       continue
21846     fi
21847    ac_cv_prog_WINLD="link"
21848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21849    break 2
21850  fi
21851done
21852  done
21853IFS=$as_save_IFS
21854
21855if test $ac_prog_rejected = yes; then
21856  # We found a bogon in the path, so make sure we never use it.
21857  set dummy $ac_cv_prog_WINLD
21858  shift
21859  if test $# != 0; then
21860    # We chose a different compiler from the bogus one.
21861    # However, it has the same basename, so the bogon will be chosen
21862    # first if we set WINLD to just the basename; use the full file name.
21863    shift
21864    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21865  fi
21866fi
21867fi
21868fi
21869WINLD=$ac_cv_prog_WINLD
21870if test -n "$WINLD"; then
21871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21872$as_echo "$WINLD" >&6; }
21873else
21874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21875$as_echo "no" >&6; }
21876fi
21877
21878
21879    # Since we must ignore the first found link, WINLD will contain
21880    # the full path to the link.exe program.
21881
21882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21883
21884  # First separate the path from the arguments. This will split at the first
21885  # space.
21886  complete="$WINLD"
21887  path="${complete%% *}"
21888  tmp="$complete EOL"
21889  arguments="${tmp#* }"
21890
21891  # Input might be given as Windows format, start by converting to
21892  # unix format.
21893  new_path=`$CYGPATH -u "$path"`
21894
21895  # Now try to locate executable using which
21896  new_path=`$WHICH "$new_path" 2> /dev/null`
21897  # bat and cmd files are not always considered executable in cygwin causing which
21898  # to not find them
21899  if test "x$new_path" = x \
21900           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21901           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21902    new_path=`$CYGPATH -u "$path"`
21903  fi
21904  if test "x$new_path" = x; then
21905    # Oops. Which didn't find the executable.
21906    # The splitting of arguments from the executable at a space might have been incorrect,
21907    # since paths with space are more likely in Windows. Give it another try with the whole
21908    # argument.
21909    path="$complete"
21910    arguments="EOL"
21911    new_path=`$CYGPATH -u "$path"`
21912    new_path=`$WHICH "$new_path" 2> /dev/null`
21913    # bat and cmd files are not always considered executable in cygwin causing which
21914    # to not find them
21915    if test "x$new_path" = x \
21916             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21917             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21918      new_path=`$CYGPATH -u "$path"`
21919    fi
21920    if test "x$new_path" = x; then
21921      # It's still not found. Now this is an unrecoverable error.
21922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21923$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21924      has_space=`$ECHO "$complete" | $GREP " "`
21925      if test "x$has_space" != x; then
21926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21928      fi
21929      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21930    fi
21931  fi
21932
21933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21936  # "foo.exe" is OK but "foo" is an error.
21937  #
21938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21939  # It is also a way to make sure we got the proper file name for the real test later on.
21940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21941  if test "x$test_shortpath" = x; then
21942    # Short path failed, file does not exist as specified.
21943    # Try adding .exe or .cmd
21944    if test -f "${new_path}.exe"; then
21945       input_to_shortpath="${new_path}.exe"
21946    elif test -f "${new_path}.cmd"; then
21947       input_to_shortpath="${new_path}.cmd"
21948    else
21949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21950$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21951      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21952$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21953      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21954    fi
21955  else
21956    input_to_shortpath="$new_path"
21957  fi
21958
21959  # Call helper function which possibly converts this using DOS-style short mode.
21960  # If so, the updated path is stored in $new_path.
21961  new_path="$input_to_shortpath"
21962
21963  input_path="$input_to_shortpath"
21964  # Check if we need to convert this using DOS-style short mode. If the path
21965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21966  # take no chances and rewrite it.
21967  # Note: m4 eats our [], so we need to use [ and ] instead.
21968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21969  if test "x$has_forbidden_chars" != x; then
21970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21974      # Going to short mode and back again did indeed matter. Since short mode is
21975      # case insensitive, let's make it lowercase to improve readability.
21976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21977      # Now convert it back to Unix-stile (cygpath)
21978      input_path=`$CYGPATH -u "$shortmode_path"`
21979      new_path="$input_path"
21980    fi
21981  fi
21982
21983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21984  if test "x$test_cygdrive_prefix" = x; then
21985    # As a simple fix, exclude /usr/bin since it's not a real path.
21986    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21988      # a path prefixed by /cygdrive for fixpath to work.
21989      new_path="$CYGWIN_ROOT_PATH$input_path"
21990    fi
21991  fi
21992
21993  # remove trailing .exe if any
21994  new_path="${new_path/%.exe/}"
21995
21996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21997
21998  # First separate the path from the arguments. This will split at the first
21999  # space.
22000  complete="$WINLD"
22001  path="${complete%% *}"
22002  tmp="$complete EOL"
22003  arguments="${tmp#* }"
22004
22005  # Input might be given as Windows format, start by converting to
22006  # unix format.
22007  new_path="$path"
22008
22009  windows_path="$new_path"
22010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22011    unix_path=`$CYGPATH -u "$windows_path"`
22012    new_path="$unix_path"
22013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22015    new_path="$unix_path"
22016  fi
22017
22018
22019  # Now try to locate executable using which
22020  new_path=`$WHICH "$new_path" 2> /dev/null`
22021
22022  if test "x$new_path" = x; then
22023    # Oops. Which didn't find the executable.
22024    # The splitting of arguments from the executable at a space might have been incorrect,
22025    # since paths with space are more likely in Windows. Give it another try with the whole
22026    # argument.
22027    path="$complete"
22028    arguments="EOL"
22029    new_path="$path"
22030
22031  windows_path="$new_path"
22032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22033    unix_path=`$CYGPATH -u "$windows_path"`
22034    new_path="$unix_path"
22035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22037    new_path="$unix_path"
22038  fi
22039
22040
22041    new_path=`$WHICH "$new_path" 2> /dev/null`
22042
22043    if test "x$new_path" = x; then
22044      # It's still not found. Now this is an unrecoverable error.
22045      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22046$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22047      has_space=`$ECHO "$complete" | $GREP " "`
22048      if test "x$has_space" != x; then
22049        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22050$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22051      fi
22052      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22053    fi
22054  fi
22055
22056  # Now new_path has a complete unix path to the binary
22057  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22058    # Keep paths in /bin as-is, but remove trailing .exe if any
22059    new_path="${new_path/%.exe/}"
22060    # Do not save /bin paths to all_fixpath_prefixes!
22061  else
22062    # Not in mixed or Windows style, start by that.
22063    new_path=`cmd //c echo $new_path`
22064
22065  input_path="$new_path"
22066  # Check if we need to convert this using DOS-style short mode. If the path
22067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22068  # take no chances and rewrite it.
22069  # Note: m4 eats our [], so we need to use [ and ] instead.
22070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22071  if test "x$has_forbidden_chars" != x; then
22072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22074  fi
22075
22076    # Output is in $new_path
22077
22078  windows_path="$new_path"
22079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22080    unix_path=`$CYGPATH -u "$windows_path"`
22081    new_path="$unix_path"
22082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22084    new_path="$unix_path"
22085  fi
22086
22087    # remove trailing .exe if any
22088    new_path="${new_path/%.exe/}"
22089
22090    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22091    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22092  fi
22093
22094  else
22095    # We're on a posix platform. Hooray! :)
22096    # First separate the path from the arguments. This will split at the first
22097    # space.
22098    complete="$WINLD"
22099    path="${complete%% *}"
22100    tmp="$complete EOL"
22101    arguments="${tmp#* }"
22102
22103    # Cannot rely on the command "which" here since it doesn't always work.
22104    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22105    if test -z "$is_absolute_path"; then
22106      # Path to executable is not absolute. Find it.
22107      IFS_save="$IFS"
22108      IFS=:
22109      for p in $PATH; do
22110        if test -f "$p/$path" && test -x "$p/$path"; then
22111          new_path="$p/$path"
22112          break
22113        fi
22114      done
22115      IFS="$IFS_save"
22116    else
22117      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22118$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22119      new_path="$path"
22120    fi
22121
22122    if test "x$new_path" = x; then
22123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22124$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22125        has_space=`$ECHO "$complete" | $GREP " "`
22126        if test "x$has_space" != x; then
22127          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22128$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22129        fi
22130        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22131      fi
22132  fi
22133
22134      # Now join together the path and the arguments once again
22135      if test "x$arguments" != xEOL; then
22136        new_complete="$new_path ${arguments% *}"
22137      else
22138        new_complete="$new_path"
22139      fi
22140
22141  if test "x$complete" != "x$new_complete"; then
22142      WINLD="$new_complete"
22143      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22144$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22145    fi
22146
22147    printf "Windows linker was found at $WINLD\n"
22148    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22149$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22150    "$WINLD" --version > /dev/null
22151    if test $? -eq 0 ; then
22152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22153$as_echo "no" >&6; }
22154      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22155    else
22156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22157$as_echo "yes" >&6; }
22158    fi
22159    LD="$WINLD"
22160    LDEXE="$WINLD"
22161    LDCXX="$WINLD"
22162    LDEXECXX="$WINLD"
22163
22164    # Extract the first word of "mt", so it can be a program name with args.
22165set dummy mt; ac_word=$2
22166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22167$as_echo_n "checking for $ac_word... " >&6; }
22168if test "${ac_cv_prog_MT+set}" = set; then :
22169  $as_echo_n "(cached) " >&6
22170else
22171  if test -n "$MT"; then
22172  ac_cv_prog_MT="$MT" # Let the user override the test.
22173else
22174  ac_prog_rejected=no
22175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22176for as_dir in $PATH
22177do
22178  IFS=$as_save_IFS
22179  test -z "$as_dir" && as_dir=.
22180    for ac_exec_ext in '' $ac_executable_extensions; do
22181  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22182    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22183       ac_prog_rejected=yes
22184       continue
22185     fi
22186    ac_cv_prog_MT="mt"
22187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22188    break 2
22189  fi
22190done
22191  done
22192IFS=$as_save_IFS
22193
22194if test $ac_prog_rejected = yes; then
22195  # We found a bogon in the path, so make sure we never use it.
22196  set dummy $ac_cv_prog_MT
22197  shift
22198  if test $# != 0; then
22199    # We chose a different compiler from the bogus one.
22200    # However, it has the same basename, so the bogon will be chosen
22201    # first if we set MT to just the basename; use the full file name.
22202    shift
22203    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22204  fi
22205fi
22206fi
22207fi
22208MT=$ac_cv_prog_MT
22209if test -n "$MT"; then
22210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22211$as_echo "$MT" >&6; }
22212else
22213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22214$as_echo "no" >&6; }
22215fi
22216
22217
22218
22219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22220
22221  # First separate the path from the arguments. This will split at the first
22222  # space.
22223  complete="$MT"
22224  path="${complete%% *}"
22225  tmp="$complete EOL"
22226  arguments="${tmp#* }"
22227
22228  # Input might be given as Windows format, start by converting to
22229  # unix format.
22230  new_path=`$CYGPATH -u "$path"`
22231
22232  # Now try to locate executable using which
22233  new_path=`$WHICH "$new_path" 2> /dev/null`
22234  # bat and cmd files are not always considered executable in cygwin causing which
22235  # to not find them
22236  if test "x$new_path" = x \
22237           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22238           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22239    new_path=`$CYGPATH -u "$path"`
22240  fi
22241  if test "x$new_path" = x; then
22242    # Oops. Which didn't find the executable.
22243    # The splitting of arguments from the executable at a space might have been incorrect,
22244    # since paths with space are more likely in Windows. Give it another try with the whole
22245    # argument.
22246    path="$complete"
22247    arguments="EOL"
22248    new_path=`$CYGPATH -u "$path"`
22249    new_path=`$WHICH "$new_path" 2> /dev/null`
22250    # bat and cmd files are not always considered executable in cygwin causing which
22251    # to not find them
22252    if test "x$new_path" = x \
22253             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22254             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22255      new_path=`$CYGPATH -u "$path"`
22256    fi
22257    if test "x$new_path" = x; then
22258      # It's still not found. Now this is an unrecoverable error.
22259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22260$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22261      has_space=`$ECHO "$complete" | $GREP " "`
22262      if test "x$has_space" != x; then
22263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22265      fi
22266      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22267    fi
22268  fi
22269
22270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22273  # "foo.exe" is OK but "foo" is an error.
22274  #
22275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22276  # It is also a way to make sure we got the proper file name for the real test later on.
22277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22278  if test "x$test_shortpath" = x; then
22279    # Short path failed, file does not exist as specified.
22280    # Try adding .exe or .cmd
22281    if test -f "${new_path}.exe"; then
22282       input_to_shortpath="${new_path}.exe"
22283    elif test -f "${new_path}.cmd"; then
22284       input_to_shortpath="${new_path}.cmd"
22285    else
22286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22287$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22288      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22289$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22290      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22291    fi
22292  else
22293    input_to_shortpath="$new_path"
22294  fi
22295
22296  # Call helper function which possibly converts this using DOS-style short mode.
22297  # If so, the updated path is stored in $new_path.
22298  new_path="$input_to_shortpath"
22299
22300  input_path="$input_to_shortpath"
22301  # Check if we need to convert this using DOS-style short mode. If the path
22302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22303  # take no chances and rewrite it.
22304  # Note: m4 eats our [], so we need to use [ and ] instead.
22305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22306  if test "x$has_forbidden_chars" != x; then
22307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22311      # Going to short mode and back again did indeed matter. Since short mode is
22312      # case insensitive, let's make it lowercase to improve readability.
22313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22314      # Now convert it back to Unix-stile (cygpath)
22315      input_path=`$CYGPATH -u "$shortmode_path"`
22316      new_path="$input_path"
22317    fi
22318  fi
22319
22320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22321  if test "x$test_cygdrive_prefix" = x; then
22322    # As a simple fix, exclude /usr/bin since it's not a real path.
22323    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22325      # a path prefixed by /cygdrive for fixpath to work.
22326      new_path="$CYGWIN_ROOT_PATH$input_path"
22327    fi
22328  fi
22329
22330  # remove trailing .exe if any
22331  new_path="${new_path/%.exe/}"
22332
22333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22334
22335  # First separate the path from the arguments. This will split at the first
22336  # space.
22337  complete="$MT"
22338  path="${complete%% *}"
22339  tmp="$complete EOL"
22340  arguments="${tmp#* }"
22341
22342  # Input might be given as Windows format, start by converting to
22343  # unix format.
22344  new_path="$path"
22345
22346  windows_path="$new_path"
22347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22348    unix_path=`$CYGPATH -u "$windows_path"`
22349    new_path="$unix_path"
22350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22352    new_path="$unix_path"
22353  fi
22354
22355
22356  # Now try to locate executable using which
22357  new_path=`$WHICH "$new_path" 2> /dev/null`
22358
22359  if test "x$new_path" = x; then
22360    # Oops. Which didn't find the executable.
22361    # The splitting of arguments from the executable at a space might have been incorrect,
22362    # since paths with space are more likely in Windows. Give it another try with the whole
22363    # argument.
22364    path="$complete"
22365    arguments="EOL"
22366    new_path="$path"
22367
22368  windows_path="$new_path"
22369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22370    unix_path=`$CYGPATH -u "$windows_path"`
22371    new_path="$unix_path"
22372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22374    new_path="$unix_path"
22375  fi
22376
22377
22378    new_path=`$WHICH "$new_path" 2> /dev/null`
22379
22380    if test "x$new_path" = x; then
22381      # It's still not found. Now this is an unrecoverable error.
22382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22383$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22384      has_space=`$ECHO "$complete" | $GREP " "`
22385      if test "x$has_space" != x; then
22386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22388      fi
22389      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22390    fi
22391  fi
22392
22393  # Now new_path has a complete unix path to the binary
22394  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22395    # Keep paths in /bin as-is, but remove trailing .exe if any
22396    new_path="${new_path/%.exe/}"
22397    # Do not save /bin paths to all_fixpath_prefixes!
22398  else
22399    # Not in mixed or Windows style, start by that.
22400    new_path=`cmd //c echo $new_path`
22401
22402  input_path="$new_path"
22403  # Check if we need to convert this using DOS-style short mode. If the path
22404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22405  # take no chances and rewrite it.
22406  # Note: m4 eats our [], so we need to use [ and ] instead.
22407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22408  if test "x$has_forbidden_chars" != x; then
22409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22411  fi
22412
22413    # Output is in $new_path
22414
22415  windows_path="$new_path"
22416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22417    unix_path=`$CYGPATH -u "$windows_path"`
22418    new_path="$unix_path"
22419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22421    new_path="$unix_path"
22422  fi
22423
22424    # remove trailing .exe if any
22425    new_path="${new_path/%.exe/}"
22426
22427    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22428    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22429  fi
22430
22431  else
22432    # We're on a posix platform. Hooray! :)
22433    # First separate the path from the arguments. This will split at the first
22434    # space.
22435    complete="$MT"
22436    path="${complete%% *}"
22437    tmp="$complete EOL"
22438    arguments="${tmp#* }"
22439
22440    # Cannot rely on the command "which" here since it doesn't always work.
22441    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22442    if test -z "$is_absolute_path"; then
22443      # Path to executable is not absolute. Find it.
22444      IFS_save="$IFS"
22445      IFS=:
22446      for p in $PATH; do
22447        if test -f "$p/$path" && test -x "$p/$path"; then
22448          new_path="$p/$path"
22449          break
22450        fi
22451      done
22452      IFS="$IFS_save"
22453    else
22454      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22455$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22456      new_path="$path"
22457    fi
22458
22459    if test "x$new_path" = x; then
22460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22461$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22462        has_space=`$ECHO "$complete" | $GREP " "`
22463        if test "x$has_space" != x; then
22464          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22465$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22466        fi
22467        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22468      fi
22469  fi
22470
22471      # Now join together the path and the arguments once again
22472      if test "x$arguments" != xEOL; then
22473        new_complete="$new_path ${arguments% *}"
22474      else
22475        new_complete="$new_path"
22476      fi
22477
22478  if test "x$complete" != "x$new_complete"; then
22479      MT="$new_complete"
22480      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22481$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22482    fi
22483
22484    # The resource compiler
22485    # Extract the first word of "rc", so it can be a program name with args.
22486set dummy rc; ac_word=$2
22487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22488$as_echo_n "checking for $ac_word... " >&6; }
22489if test "${ac_cv_prog_RC+set}" = set; then :
22490  $as_echo_n "(cached) " >&6
22491else
22492  if test -n "$RC"; then
22493  ac_cv_prog_RC="$RC" # Let the user override the test.
22494else
22495  ac_prog_rejected=no
22496as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22497for as_dir in $PATH
22498do
22499  IFS=$as_save_IFS
22500  test -z "$as_dir" && as_dir=.
22501    for ac_exec_ext in '' $ac_executable_extensions; do
22502  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22503    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22504       ac_prog_rejected=yes
22505       continue
22506     fi
22507    ac_cv_prog_RC="rc"
22508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22509    break 2
22510  fi
22511done
22512  done
22513IFS=$as_save_IFS
22514
22515if test $ac_prog_rejected = yes; then
22516  # We found a bogon in the path, so make sure we never use it.
22517  set dummy $ac_cv_prog_RC
22518  shift
22519  if test $# != 0; then
22520    # We chose a different compiler from the bogus one.
22521    # However, it has the same basename, so the bogon will be chosen
22522    # first if we set RC to just the basename; use the full file name.
22523    shift
22524    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22525  fi
22526fi
22527fi
22528fi
22529RC=$ac_cv_prog_RC
22530if test -n "$RC"; then
22531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22532$as_echo "$RC" >&6; }
22533else
22534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22535$as_echo "no" >&6; }
22536fi
22537
22538
22539
22540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22541
22542  # First separate the path from the arguments. This will split at the first
22543  # space.
22544  complete="$RC"
22545  path="${complete%% *}"
22546  tmp="$complete EOL"
22547  arguments="${tmp#* }"
22548
22549  # Input might be given as Windows format, start by converting to
22550  # unix format.
22551  new_path=`$CYGPATH -u "$path"`
22552
22553  # Now try to locate executable using which
22554  new_path=`$WHICH "$new_path" 2> /dev/null`
22555  # bat and cmd files are not always considered executable in cygwin causing which
22556  # to not find them
22557  if test "x$new_path" = x \
22558           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22559           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22560    new_path=`$CYGPATH -u "$path"`
22561  fi
22562  if test "x$new_path" = x; then
22563    # Oops. Which didn't find the executable.
22564    # The splitting of arguments from the executable at a space might have been incorrect,
22565    # since paths with space are more likely in Windows. Give it another try with the whole
22566    # argument.
22567    path="$complete"
22568    arguments="EOL"
22569    new_path=`$CYGPATH -u "$path"`
22570    new_path=`$WHICH "$new_path" 2> /dev/null`
22571    # bat and cmd files are not always considered executable in cygwin causing which
22572    # to not find them
22573    if test "x$new_path" = x \
22574             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22575             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22576      new_path=`$CYGPATH -u "$path"`
22577    fi
22578    if test "x$new_path" = x; then
22579      # It's still not found. Now this is an unrecoverable error.
22580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22581$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22582      has_space=`$ECHO "$complete" | $GREP " "`
22583      if test "x$has_space" != x; then
22584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22586      fi
22587      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22588    fi
22589  fi
22590
22591  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22592  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22593  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22594  # "foo.exe" is OK but "foo" is an error.
22595  #
22596  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22597  # It is also a way to make sure we got the proper file name for the real test later on.
22598  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22599  if test "x$test_shortpath" = x; then
22600    # Short path failed, file does not exist as specified.
22601    # Try adding .exe or .cmd
22602    if test -f "${new_path}.exe"; then
22603       input_to_shortpath="${new_path}.exe"
22604    elif test -f "${new_path}.cmd"; then
22605       input_to_shortpath="${new_path}.cmd"
22606    else
22607      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22608$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22609      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22610$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22611      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22612    fi
22613  else
22614    input_to_shortpath="$new_path"
22615  fi
22616
22617  # Call helper function which possibly converts this using DOS-style short mode.
22618  # If so, the updated path is stored in $new_path.
22619  new_path="$input_to_shortpath"
22620
22621  input_path="$input_to_shortpath"
22622  # Check if we need to convert this using DOS-style short mode. If the path
22623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22624  # take no chances and rewrite it.
22625  # Note: m4 eats our [], so we need to use [ and ] instead.
22626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22627  if test "x$has_forbidden_chars" != x; then
22628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22629    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22630    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22631    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22632      # Going to short mode and back again did indeed matter. Since short mode is
22633      # case insensitive, let's make it lowercase to improve readability.
22634      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22635      # Now convert it back to Unix-stile (cygpath)
22636      input_path=`$CYGPATH -u "$shortmode_path"`
22637      new_path="$input_path"
22638    fi
22639  fi
22640
22641  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22642  if test "x$test_cygdrive_prefix" = x; then
22643    # As a simple fix, exclude /usr/bin since it's not a real path.
22644    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22645      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22646      # a path prefixed by /cygdrive for fixpath to work.
22647      new_path="$CYGWIN_ROOT_PATH$input_path"
22648    fi
22649  fi
22650
22651  # remove trailing .exe if any
22652  new_path="${new_path/%.exe/}"
22653
22654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22655
22656  # First separate the path from the arguments. This will split at the first
22657  # space.
22658  complete="$RC"
22659  path="${complete%% *}"
22660  tmp="$complete EOL"
22661  arguments="${tmp#* }"
22662
22663  # Input might be given as Windows format, start by converting to
22664  # unix format.
22665  new_path="$path"
22666
22667  windows_path="$new_path"
22668  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22669    unix_path=`$CYGPATH -u "$windows_path"`
22670    new_path="$unix_path"
22671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22672    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22673    new_path="$unix_path"
22674  fi
22675
22676
22677  # Now try to locate executable using which
22678  new_path=`$WHICH "$new_path" 2> /dev/null`
22679
22680  if test "x$new_path" = x; then
22681    # Oops. Which didn't find the executable.
22682    # The splitting of arguments from the executable at a space might have been incorrect,
22683    # since paths with space are more likely in Windows. Give it another try with the whole
22684    # argument.
22685    path="$complete"
22686    arguments="EOL"
22687    new_path="$path"
22688
22689  windows_path="$new_path"
22690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22691    unix_path=`$CYGPATH -u "$windows_path"`
22692    new_path="$unix_path"
22693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22695    new_path="$unix_path"
22696  fi
22697
22698
22699    new_path=`$WHICH "$new_path" 2> /dev/null`
22700
22701    if test "x$new_path" = x; then
22702      # It's still not found. Now this is an unrecoverable error.
22703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22704$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22705      has_space=`$ECHO "$complete" | $GREP " "`
22706      if test "x$has_space" != x; then
22707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22709      fi
22710      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22711    fi
22712  fi
22713
22714  # Now new_path has a complete unix path to the binary
22715  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22716    # Keep paths in /bin as-is, but remove trailing .exe if any
22717    new_path="${new_path/%.exe/}"
22718    # Do not save /bin paths to all_fixpath_prefixes!
22719  else
22720    # Not in mixed or Windows style, start by that.
22721    new_path=`cmd //c echo $new_path`
22722
22723  input_path="$new_path"
22724  # Check if we need to convert this using DOS-style short mode. If the path
22725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22726  # take no chances and rewrite it.
22727  # Note: m4 eats our [], so we need to use [ and ] instead.
22728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22729  if test "x$has_forbidden_chars" != x; then
22730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22732  fi
22733
22734    # Output is in $new_path
22735
22736  windows_path="$new_path"
22737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22738    unix_path=`$CYGPATH -u "$windows_path"`
22739    new_path="$unix_path"
22740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22742    new_path="$unix_path"
22743  fi
22744
22745    # remove trailing .exe if any
22746    new_path="${new_path/%.exe/}"
22747
22748    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22749    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22750  fi
22751
22752  else
22753    # We're on a posix platform. Hooray! :)
22754    # First separate the path from the arguments. This will split at the first
22755    # space.
22756    complete="$RC"
22757    path="${complete%% *}"
22758    tmp="$complete EOL"
22759    arguments="${tmp#* }"
22760
22761    # Cannot rely on the command "which" here since it doesn't always work.
22762    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22763    if test -z "$is_absolute_path"; then
22764      # Path to executable is not absolute. Find it.
22765      IFS_save="$IFS"
22766      IFS=:
22767      for p in $PATH; do
22768        if test -f "$p/$path" && test -x "$p/$path"; then
22769          new_path="$p/$path"
22770          break
22771        fi
22772      done
22773      IFS="$IFS_save"
22774    else
22775      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22776$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22777      new_path="$path"
22778    fi
22779
22780    if test "x$new_path" = x; then
22781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22782$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22783        has_space=`$ECHO "$complete" | $GREP " "`
22784        if test "x$has_space" != x; then
22785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22787        fi
22788        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22789      fi
22790  fi
22791
22792      # Now join together the path and the arguments once again
22793      if test "x$arguments" != xEOL; then
22794        new_complete="$new_path ${arguments% *}"
22795      else
22796        new_complete="$new_path"
22797      fi
22798
22799  if test "x$complete" != "x$new_complete"; then
22800      RC="$new_complete"
22801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22802$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22803    fi
22804
22805
22806    # For hotspot, we need these in Windows mixed path,
22807    # so rewrite them all. Need added .exe suffix.
22808    HOTSPOT_CXX="$CXX.exe"
22809    HOTSPOT_LD="$LD.exe"
22810    HOTSPOT_MT="$MT.exe"
22811    HOTSPOT_RC="$RC.exe"
22812
22813  unix_path="$HOTSPOT_CXX"
22814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22815    windows_path=`$CYGPATH -m "$unix_path"`
22816    HOTSPOT_CXX="$windows_path"
22817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22818    windows_path=`cmd //c echo $unix_path`
22819    HOTSPOT_CXX="$windows_path"
22820  fi
22821
22822
22823  unix_path="$HOTSPOT_LD"
22824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22825    windows_path=`$CYGPATH -m "$unix_path"`
22826    HOTSPOT_LD="$windows_path"
22827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22828    windows_path=`cmd //c echo $unix_path`
22829    HOTSPOT_LD="$windows_path"
22830  fi
22831
22832
22833  unix_path="$HOTSPOT_MT"
22834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22835    windows_path=`$CYGPATH -m "$unix_path"`
22836    HOTSPOT_MT="$windows_path"
22837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22838    windows_path=`cmd //c echo $unix_path`
22839    HOTSPOT_MT="$windows_path"
22840  fi
22841
22842
22843  unix_path="$HOTSPOT_RC"
22844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22845    windows_path=`$CYGPATH -m "$unix_path"`
22846    HOTSPOT_RC="$windows_path"
22847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22848    windows_path=`cmd //c echo $unix_path`
22849    HOTSPOT_RC="$windows_path"
22850  fi
22851
22852
22853
22854
22855    RC_FLAGS="-nologo -l 0x409 -r"
22856    if test "x$VARIANT" = xOPT; then :
22857
22858        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22859
22860fi
22861    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22862    if test "x$JDK_UPDATE_VERSION" = x; then :
22863
22864        JDK_UPDATE_VERSION_NOTNULL=0
22865
22866fi
22867    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22868    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22869    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22870    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22871    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22872    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22873    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22874
22875    # lib.exe is used to create static libraries.
22876    # Extract the first word of "lib", so it can be a program name with args.
22877set dummy lib; ac_word=$2
22878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22879$as_echo_n "checking for $ac_word... " >&6; }
22880if test "${ac_cv_prog_WINAR+set}" = set; then :
22881  $as_echo_n "(cached) " >&6
22882else
22883  if test -n "$WINAR"; then
22884  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22885else
22886as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22887for as_dir in $PATH
22888do
22889  IFS=$as_save_IFS
22890  test -z "$as_dir" && as_dir=.
22891    for ac_exec_ext in '' $ac_executable_extensions; do
22892  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22893    ac_cv_prog_WINAR="lib"
22894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22895    break 2
22896  fi
22897done
22898  done
22899IFS=$as_save_IFS
22900
22901fi
22902fi
22903WINAR=$ac_cv_prog_WINAR
22904if test -n "$WINAR"; then
22905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22906$as_echo "$WINAR" >&6; }
22907else
22908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22909$as_echo "no" >&6; }
22910fi
22911
22912
22913
22914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22915
22916  # First separate the path from the arguments. This will split at the first
22917  # space.
22918  complete="$WINAR"
22919  path="${complete%% *}"
22920  tmp="$complete EOL"
22921  arguments="${tmp#* }"
22922
22923  # Input might be given as Windows format, start by converting to
22924  # unix format.
22925  new_path=`$CYGPATH -u "$path"`
22926
22927  # Now try to locate executable using which
22928  new_path=`$WHICH "$new_path" 2> /dev/null`
22929  # bat and cmd files are not always considered executable in cygwin causing which
22930  # to not find them
22931  if test "x$new_path" = x \
22932           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22933           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22934    new_path=`$CYGPATH -u "$path"`
22935  fi
22936  if test "x$new_path" = x; then
22937    # Oops. Which didn't find the executable.
22938    # The splitting of arguments from the executable at a space might have been incorrect,
22939    # since paths with space are more likely in Windows. Give it another try with the whole
22940    # argument.
22941    path="$complete"
22942    arguments="EOL"
22943    new_path=`$CYGPATH -u "$path"`
22944    new_path=`$WHICH "$new_path" 2> /dev/null`
22945    # bat and cmd files are not always considered executable in cygwin causing which
22946    # to not find them
22947    if test "x$new_path" = x \
22948             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22949             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22950      new_path=`$CYGPATH -u "$path"`
22951    fi
22952    if test "x$new_path" = x; then
22953      # It's still not found. Now this is an unrecoverable error.
22954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22955$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22956      has_space=`$ECHO "$complete" | $GREP " "`
22957      if test "x$has_space" != x; then
22958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22960      fi
22961      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22962    fi
22963  fi
22964
22965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22968  # "foo.exe" is OK but "foo" is an error.
22969  #
22970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22971  # It is also a way to make sure we got the proper file name for the real test later on.
22972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22973  if test "x$test_shortpath" = x; then
22974    # Short path failed, file does not exist as specified.
22975    # Try adding .exe or .cmd
22976    if test -f "${new_path}.exe"; then
22977       input_to_shortpath="${new_path}.exe"
22978    elif test -f "${new_path}.cmd"; then
22979       input_to_shortpath="${new_path}.cmd"
22980    else
22981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22982$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22983      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22984$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22985      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22986    fi
22987  else
22988    input_to_shortpath="$new_path"
22989  fi
22990
22991  # Call helper function which possibly converts this using DOS-style short mode.
22992  # If so, the updated path is stored in $new_path.
22993  new_path="$input_to_shortpath"
22994
22995  input_path="$input_to_shortpath"
22996  # Check if we need to convert this using DOS-style short mode. If the path
22997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22998  # take no chances and rewrite it.
22999  # Note: m4 eats our [], so we need to use [ and ] instead.
23000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23001  if test "x$has_forbidden_chars" != x; then
23002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23006      # Going to short mode and back again did indeed matter. Since short mode is
23007      # case insensitive, let's make it lowercase to improve readability.
23008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23009      # Now convert it back to Unix-stile (cygpath)
23010      input_path=`$CYGPATH -u "$shortmode_path"`
23011      new_path="$input_path"
23012    fi
23013  fi
23014
23015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23016  if test "x$test_cygdrive_prefix" = x; then
23017    # As a simple fix, exclude /usr/bin since it's not a real path.
23018    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23020      # a path prefixed by /cygdrive for fixpath to work.
23021      new_path="$CYGWIN_ROOT_PATH$input_path"
23022    fi
23023  fi
23024
23025  # remove trailing .exe if any
23026  new_path="${new_path/%.exe/}"
23027
23028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23029
23030  # First separate the path from the arguments. This will split at the first
23031  # space.
23032  complete="$WINAR"
23033  path="${complete%% *}"
23034  tmp="$complete EOL"
23035  arguments="${tmp#* }"
23036
23037  # Input might be given as Windows format, start by converting to
23038  # unix format.
23039  new_path="$path"
23040
23041  windows_path="$new_path"
23042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23043    unix_path=`$CYGPATH -u "$windows_path"`
23044    new_path="$unix_path"
23045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23047    new_path="$unix_path"
23048  fi
23049
23050
23051  # Now try to locate executable using which
23052  new_path=`$WHICH "$new_path" 2> /dev/null`
23053
23054  if test "x$new_path" = x; then
23055    # Oops. Which didn't find the executable.
23056    # The splitting of arguments from the executable at a space might have been incorrect,
23057    # since paths with space are more likely in Windows. Give it another try with the whole
23058    # argument.
23059    path="$complete"
23060    arguments="EOL"
23061    new_path="$path"
23062
23063  windows_path="$new_path"
23064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23065    unix_path=`$CYGPATH -u "$windows_path"`
23066    new_path="$unix_path"
23067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23069    new_path="$unix_path"
23070  fi
23071
23072
23073    new_path=`$WHICH "$new_path" 2> /dev/null`
23074
23075    if test "x$new_path" = x; then
23076      # It's still not found. Now this is an unrecoverable error.
23077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23078$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23079      has_space=`$ECHO "$complete" | $GREP " "`
23080      if test "x$has_space" != x; then
23081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23083      fi
23084      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23085    fi
23086  fi
23087
23088  # Now new_path has a complete unix path to the binary
23089  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23090    # Keep paths in /bin as-is, but remove trailing .exe if any
23091    new_path="${new_path/%.exe/}"
23092    # Do not save /bin paths to all_fixpath_prefixes!
23093  else
23094    # Not in mixed or Windows style, start by that.
23095    new_path=`cmd //c echo $new_path`
23096
23097  input_path="$new_path"
23098  # Check if we need to convert this using DOS-style short mode. If the path
23099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23100  # take no chances and rewrite it.
23101  # Note: m4 eats our [], so we need to use [ and ] instead.
23102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23103  if test "x$has_forbidden_chars" != x; then
23104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23106  fi
23107
23108    # Output is in $new_path
23109
23110  windows_path="$new_path"
23111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23112    unix_path=`$CYGPATH -u "$windows_path"`
23113    new_path="$unix_path"
23114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23116    new_path="$unix_path"
23117  fi
23118
23119    # remove trailing .exe if any
23120    new_path="${new_path/%.exe/}"
23121
23122    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23123    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23124  fi
23125
23126  else
23127    # We're on a posix platform. Hooray! :)
23128    # First separate the path from the arguments. This will split at the first
23129    # space.
23130    complete="$WINAR"
23131    path="${complete%% *}"
23132    tmp="$complete EOL"
23133    arguments="${tmp#* }"
23134
23135    # Cannot rely on the command "which" here since it doesn't always work.
23136    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23137    if test -z "$is_absolute_path"; then
23138      # Path to executable is not absolute. Find it.
23139      IFS_save="$IFS"
23140      IFS=:
23141      for p in $PATH; do
23142        if test -f "$p/$path" && test -x "$p/$path"; then
23143          new_path="$p/$path"
23144          break
23145        fi
23146      done
23147      IFS="$IFS_save"
23148    else
23149      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23150$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23151      new_path="$path"
23152    fi
23153
23154    if test "x$new_path" = x; then
23155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23156$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23157        has_space=`$ECHO "$complete" | $GREP " "`
23158        if test "x$has_space" != x; then
23159          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23160$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23161        fi
23162        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23163      fi
23164  fi
23165
23166      # Now join together the path and the arguments once again
23167      if test "x$arguments" != xEOL; then
23168        new_complete="$new_path ${arguments% *}"
23169      else
23170        new_complete="$new_path"
23171      fi
23172
23173  if test "x$complete" != "x$new_complete"; then
23174      WINAR="$new_complete"
23175      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23176$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23177    fi
23178
23179    AR="$WINAR"
23180    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23181
23182    # Extract the first word of "dumpbin", so it can be a program name with args.
23183set dummy dumpbin; ac_word=$2
23184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23185$as_echo_n "checking for $ac_word... " >&6; }
23186if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23187  $as_echo_n "(cached) " >&6
23188else
23189  if test -n "$DUMPBIN"; then
23190  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23191else
23192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23193for as_dir in $PATH
23194do
23195  IFS=$as_save_IFS
23196  test -z "$as_dir" && as_dir=.
23197    for ac_exec_ext in '' $ac_executable_extensions; do
23198  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23199    ac_cv_prog_DUMPBIN="dumpbin"
23200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23201    break 2
23202  fi
23203done
23204  done
23205IFS=$as_save_IFS
23206
23207fi
23208fi
23209DUMPBIN=$ac_cv_prog_DUMPBIN
23210if test -n "$DUMPBIN"; then
23211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23212$as_echo "$DUMPBIN" >&6; }
23213else
23214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23215$as_echo "no" >&6; }
23216fi
23217
23218
23219
23220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23221
23222  # First separate the path from the arguments. This will split at the first
23223  # space.
23224  complete="$DUMPBIN"
23225  path="${complete%% *}"
23226  tmp="$complete EOL"
23227  arguments="${tmp#* }"
23228
23229  # Input might be given as Windows format, start by converting to
23230  # unix format.
23231  new_path=`$CYGPATH -u "$path"`
23232
23233  # Now try to locate executable using which
23234  new_path=`$WHICH "$new_path" 2> /dev/null`
23235  # bat and cmd files are not always considered executable in cygwin causing which
23236  # to not find them
23237  if test "x$new_path" = x \
23238           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23239           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23240    new_path=`$CYGPATH -u "$path"`
23241  fi
23242  if test "x$new_path" = x; then
23243    # Oops. Which didn't find the executable.
23244    # The splitting of arguments from the executable at a space might have been incorrect,
23245    # since paths with space are more likely in Windows. Give it another try with the whole
23246    # argument.
23247    path="$complete"
23248    arguments="EOL"
23249    new_path=`$CYGPATH -u "$path"`
23250    new_path=`$WHICH "$new_path" 2> /dev/null`
23251    # bat and cmd files are not always considered executable in cygwin causing which
23252    # to not find them
23253    if test "x$new_path" = x \
23254             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23255             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23256      new_path=`$CYGPATH -u "$path"`
23257    fi
23258    if test "x$new_path" = x; then
23259      # It's still not found. Now this is an unrecoverable error.
23260      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23261$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23262      has_space=`$ECHO "$complete" | $GREP " "`
23263      if test "x$has_space" != x; then
23264        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23265$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23266      fi
23267      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23268    fi
23269  fi
23270
23271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23274  # "foo.exe" is OK but "foo" is an error.
23275  #
23276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23277  # It is also a way to make sure we got the proper file name for the real test later on.
23278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23279  if test "x$test_shortpath" = x; then
23280    # Short path failed, file does not exist as specified.
23281    # Try adding .exe or .cmd
23282    if test -f "${new_path}.exe"; then
23283       input_to_shortpath="${new_path}.exe"
23284    elif test -f "${new_path}.cmd"; then
23285       input_to_shortpath="${new_path}.cmd"
23286    else
23287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23288$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23289      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23290$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23291      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23292    fi
23293  else
23294    input_to_shortpath="$new_path"
23295  fi
23296
23297  # Call helper function which possibly converts this using DOS-style short mode.
23298  # If so, the updated path is stored in $new_path.
23299  new_path="$input_to_shortpath"
23300
23301  input_path="$input_to_shortpath"
23302  # Check if we need to convert this using DOS-style short mode. If the path
23303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23304  # take no chances and rewrite it.
23305  # Note: m4 eats our [], so we need to use [ and ] instead.
23306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23307  if test "x$has_forbidden_chars" != x; then
23308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23312      # Going to short mode and back again did indeed matter. Since short mode is
23313      # case insensitive, let's make it lowercase to improve readability.
23314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23315      # Now convert it back to Unix-stile (cygpath)
23316      input_path=`$CYGPATH -u "$shortmode_path"`
23317      new_path="$input_path"
23318    fi
23319  fi
23320
23321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23322  if test "x$test_cygdrive_prefix" = x; then
23323    # As a simple fix, exclude /usr/bin since it's not a real path.
23324    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23326      # a path prefixed by /cygdrive for fixpath to work.
23327      new_path="$CYGWIN_ROOT_PATH$input_path"
23328    fi
23329  fi
23330
23331  # remove trailing .exe if any
23332  new_path="${new_path/%.exe/}"
23333
23334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23335
23336  # First separate the path from the arguments. This will split at the first
23337  # space.
23338  complete="$DUMPBIN"
23339  path="${complete%% *}"
23340  tmp="$complete EOL"
23341  arguments="${tmp#* }"
23342
23343  # Input might be given as Windows format, start by converting to
23344  # unix format.
23345  new_path="$path"
23346
23347  windows_path="$new_path"
23348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23349    unix_path=`$CYGPATH -u "$windows_path"`
23350    new_path="$unix_path"
23351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23353    new_path="$unix_path"
23354  fi
23355
23356
23357  # Now try to locate executable using which
23358  new_path=`$WHICH "$new_path" 2> /dev/null`
23359
23360  if test "x$new_path" = x; then
23361    # Oops. Which didn't find the executable.
23362    # The splitting of arguments from the executable at a space might have been incorrect,
23363    # since paths with space are more likely in Windows. Give it another try with the whole
23364    # argument.
23365    path="$complete"
23366    arguments="EOL"
23367    new_path="$path"
23368
23369  windows_path="$new_path"
23370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23371    unix_path=`$CYGPATH -u "$windows_path"`
23372    new_path="$unix_path"
23373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23375    new_path="$unix_path"
23376  fi
23377
23378
23379    new_path=`$WHICH "$new_path" 2> /dev/null`
23380
23381    if test "x$new_path" = x; then
23382      # It's still not found. Now this is an unrecoverable error.
23383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23384$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23385      has_space=`$ECHO "$complete" | $GREP " "`
23386      if test "x$has_space" != x; then
23387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23389      fi
23390      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23391    fi
23392  fi
23393
23394  # Now new_path has a complete unix path to the binary
23395  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23396    # Keep paths in /bin as-is, but remove trailing .exe if any
23397    new_path="${new_path/%.exe/}"
23398    # Do not save /bin paths to all_fixpath_prefixes!
23399  else
23400    # Not in mixed or Windows style, start by that.
23401    new_path=`cmd //c echo $new_path`
23402
23403  input_path="$new_path"
23404  # Check if we need to convert this using DOS-style short mode. If the path
23405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23406  # take no chances and rewrite it.
23407  # Note: m4 eats our [], so we need to use [ and ] instead.
23408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23409  if test "x$has_forbidden_chars" != x; then
23410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23411    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23412  fi
23413
23414    # Output is in $new_path
23415
23416  windows_path="$new_path"
23417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23418    unix_path=`$CYGPATH -u "$windows_path"`
23419    new_path="$unix_path"
23420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23422    new_path="$unix_path"
23423  fi
23424
23425    # remove trailing .exe if any
23426    new_path="${new_path/%.exe/}"
23427
23428    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23429    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23430  fi
23431
23432  else
23433    # We're on a posix platform. Hooray! :)
23434    # First separate the path from the arguments. This will split at the first
23435    # space.
23436    complete="$DUMPBIN"
23437    path="${complete%% *}"
23438    tmp="$complete EOL"
23439    arguments="${tmp#* }"
23440
23441    # Cannot rely on the command "which" here since it doesn't always work.
23442    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23443    if test -z "$is_absolute_path"; then
23444      # Path to executable is not absolute. Find it.
23445      IFS_save="$IFS"
23446      IFS=:
23447      for p in $PATH; do
23448        if test -f "$p/$path" && test -x "$p/$path"; then
23449          new_path="$p/$path"
23450          break
23451        fi
23452      done
23453      IFS="$IFS_save"
23454    else
23455      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23456$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23457      new_path="$path"
23458    fi
23459
23460    if test "x$new_path" = x; then
23461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23462$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23463        has_space=`$ECHO "$complete" | $GREP " "`
23464        if test "x$has_space" != x; then
23465          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23466$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23467        fi
23468        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23469      fi
23470  fi
23471
23472      # Now join together the path and the arguments once again
23473      if test "x$arguments" != xEOL; then
23474        new_complete="$new_path ${arguments% *}"
23475      else
23476        new_complete="$new_path"
23477      fi
23478
23479  if test "x$complete" != "x$new_complete"; then
23480      DUMPBIN="$new_complete"
23481      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23482$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23483    fi
23484
23485
23486    COMPILER_TYPE=CL
23487    CCXXFLAGS="$CCXXFLAGS -nologo"
23488
23489fi
23490
23491
23492
23493ac_ext=c
23494ac_cpp='$CPP $CPPFLAGS'
23495ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23496ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23497ac_compiler_gnu=$ac_cv_c_compiler_gnu
23498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23499$as_echo_n "checking how to run the C preprocessor... " >&6; }
23500# On Suns, sometimes $CPP names a directory.
23501if test -n "$CPP" && test -d "$CPP"; then
23502  CPP=
23503fi
23504if test -z "$CPP"; then
23505  if test "${ac_cv_prog_CPP+set}" = set; then :
23506  $as_echo_n "(cached) " >&6
23507else
23508      # Double quotes because CPP needs to be expanded
23509    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23510    do
23511      ac_preproc_ok=false
23512for ac_c_preproc_warn_flag in '' yes
23513do
23514  # Use a header file that comes with gcc, so configuring glibc
23515  # with a fresh cross-compiler works.
23516  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23517  # <limits.h> exists even on freestanding compilers.
23518  # On the NeXT, cc -E runs the code through the compiler's parser,
23519  # not just through cpp. "Syntax error" is here to catch this case.
23520  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23521/* end confdefs.h.  */
23522#ifdef __STDC__
23523# include <limits.h>
23524#else
23525# include <assert.h>
23526#endif
23527		     Syntax error
23528_ACEOF
23529if ac_fn_c_try_cpp "$LINENO"; then :
23530
23531else
23532  # Broken: fails on valid input.
23533continue
23534fi
23535rm -f conftest.err conftest.i conftest.$ac_ext
23536
23537  # OK, works on sane cases.  Now check whether nonexistent headers
23538  # can be detected and how.
23539  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23540/* end confdefs.h.  */
23541#include <ac_nonexistent.h>
23542_ACEOF
23543if ac_fn_c_try_cpp "$LINENO"; then :
23544  # Broken: success on invalid input.
23545continue
23546else
23547  # Passes both tests.
23548ac_preproc_ok=:
23549break
23550fi
23551rm -f conftest.err conftest.i conftest.$ac_ext
23552
23553done
23554# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23555rm -f conftest.i conftest.err conftest.$ac_ext
23556if $ac_preproc_ok; then :
23557  break
23558fi
23559
23560    done
23561    ac_cv_prog_CPP=$CPP
23562
23563fi
23564  CPP=$ac_cv_prog_CPP
23565else
23566  ac_cv_prog_CPP=$CPP
23567fi
23568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23569$as_echo "$CPP" >&6; }
23570ac_preproc_ok=false
23571for ac_c_preproc_warn_flag in '' yes
23572do
23573  # Use a header file that comes with gcc, so configuring glibc
23574  # with a fresh cross-compiler works.
23575  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23576  # <limits.h> exists even on freestanding compilers.
23577  # On the NeXT, cc -E runs the code through the compiler's parser,
23578  # not just through cpp. "Syntax error" is here to catch this case.
23579  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23580/* end confdefs.h.  */
23581#ifdef __STDC__
23582# include <limits.h>
23583#else
23584# include <assert.h>
23585#endif
23586		     Syntax error
23587_ACEOF
23588if ac_fn_c_try_cpp "$LINENO"; then :
23589
23590else
23591  # Broken: fails on valid input.
23592continue
23593fi
23594rm -f conftest.err conftest.i conftest.$ac_ext
23595
23596  # OK, works on sane cases.  Now check whether nonexistent headers
23597  # can be detected and how.
23598  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23599/* end confdefs.h.  */
23600#include <ac_nonexistent.h>
23601_ACEOF
23602if ac_fn_c_try_cpp "$LINENO"; then :
23603  # Broken: success on invalid input.
23604continue
23605else
23606  # Passes both tests.
23607ac_preproc_ok=:
23608break
23609fi
23610rm -f conftest.err conftest.i conftest.$ac_ext
23611
23612done
23613# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23614rm -f conftest.i conftest.err conftest.$ac_ext
23615if $ac_preproc_ok; then :
23616
23617else
23618  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23619$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23620as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23621See \`config.log' for more details" "$LINENO" 5 ; }
23622fi
23623
23624ac_ext=cpp
23625ac_cpp='$CXXCPP $CPPFLAGS'
23626ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23627ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23628ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23629
23630
23631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23632
23633  # First separate the path from the arguments. This will split at the first
23634  # space.
23635  complete="$CPP"
23636  path="${complete%% *}"
23637  tmp="$complete EOL"
23638  arguments="${tmp#* }"
23639
23640  # Input might be given as Windows format, start by converting to
23641  # unix format.
23642  new_path=`$CYGPATH -u "$path"`
23643
23644  # Now try to locate executable using which
23645  new_path=`$WHICH "$new_path" 2> /dev/null`
23646  # bat and cmd files are not always considered executable in cygwin causing which
23647  # to not find them
23648  if test "x$new_path" = x \
23649           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23650           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23651    new_path=`$CYGPATH -u "$path"`
23652  fi
23653  if test "x$new_path" = x; then
23654    # Oops. Which didn't find the executable.
23655    # The splitting of arguments from the executable at a space might have been incorrect,
23656    # since paths with space are more likely in Windows. Give it another try with the whole
23657    # argument.
23658    path="$complete"
23659    arguments="EOL"
23660    new_path=`$CYGPATH -u "$path"`
23661    new_path=`$WHICH "$new_path" 2> /dev/null`
23662    # bat and cmd files are not always considered executable in cygwin causing which
23663    # to not find them
23664    if test "x$new_path" = x \
23665             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23666             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23667      new_path=`$CYGPATH -u "$path"`
23668    fi
23669    if test "x$new_path" = x; then
23670      # It's still not found. Now this is an unrecoverable error.
23671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23672$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23673      has_space=`$ECHO "$complete" | $GREP " "`
23674      if test "x$has_space" != x; then
23675        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23676$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23677      fi
23678      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23679    fi
23680  fi
23681
23682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23685  # "foo.exe" is OK but "foo" is an error.
23686  #
23687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23688  # It is also a way to make sure we got the proper file name for the real test later on.
23689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23690  if test "x$test_shortpath" = x; then
23691    # Short path failed, file does not exist as specified.
23692    # Try adding .exe or .cmd
23693    if test -f "${new_path}.exe"; then
23694       input_to_shortpath="${new_path}.exe"
23695    elif test -f "${new_path}.cmd"; then
23696       input_to_shortpath="${new_path}.cmd"
23697    else
23698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23699$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23700      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23701$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23702      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23703    fi
23704  else
23705    input_to_shortpath="$new_path"
23706  fi
23707
23708  # Call helper function which possibly converts this using DOS-style short mode.
23709  # If so, the updated path is stored in $new_path.
23710  new_path="$input_to_shortpath"
23711
23712  input_path="$input_to_shortpath"
23713  # Check if we need to convert this using DOS-style short mode. If the path
23714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23715  # take no chances and rewrite it.
23716  # Note: m4 eats our [], so we need to use [ and ] instead.
23717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23718  if test "x$has_forbidden_chars" != x; then
23719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23723      # Going to short mode and back again did indeed matter. Since short mode is
23724      # case insensitive, let's make it lowercase to improve readability.
23725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23726      # Now convert it back to Unix-stile (cygpath)
23727      input_path=`$CYGPATH -u "$shortmode_path"`
23728      new_path="$input_path"
23729    fi
23730  fi
23731
23732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23733  if test "x$test_cygdrive_prefix" = x; then
23734    # As a simple fix, exclude /usr/bin since it's not a real path.
23735    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23737      # a path prefixed by /cygdrive for fixpath to work.
23738      new_path="$CYGWIN_ROOT_PATH$input_path"
23739    fi
23740  fi
23741
23742  # remove trailing .exe if any
23743  new_path="${new_path/%.exe/}"
23744
23745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23746
23747  # First separate the path from the arguments. This will split at the first
23748  # space.
23749  complete="$CPP"
23750  path="${complete%% *}"
23751  tmp="$complete EOL"
23752  arguments="${tmp#* }"
23753
23754  # Input might be given as Windows format, start by converting to
23755  # unix format.
23756  new_path="$path"
23757
23758  windows_path="$new_path"
23759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23760    unix_path=`$CYGPATH -u "$windows_path"`
23761    new_path="$unix_path"
23762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23764    new_path="$unix_path"
23765  fi
23766
23767
23768  # Now try to locate executable using which
23769  new_path=`$WHICH "$new_path" 2> /dev/null`
23770
23771  if test "x$new_path" = x; then
23772    # Oops. Which didn't find the executable.
23773    # The splitting of arguments from the executable at a space might have been incorrect,
23774    # since paths with space are more likely in Windows. Give it another try with the whole
23775    # argument.
23776    path="$complete"
23777    arguments="EOL"
23778    new_path="$path"
23779
23780  windows_path="$new_path"
23781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23782    unix_path=`$CYGPATH -u "$windows_path"`
23783    new_path="$unix_path"
23784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23786    new_path="$unix_path"
23787  fi
23788
23789
23790    new_path=`$WHICH "$new_path" 2> /dev/null`
23791
23792    if test "x$new_path" = x; then
23793      # It's still not found. Now this is an unrecoverable error.
23794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23795$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23796      has_space=`$ECHO "$complete" | $GREP " "`
23797      if test "x$has_space" != x; then
23798        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23799$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23800      fi
23801      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23802    fi
23803  fi
23804
23805  # Now new_path has a complete unix path to the binary
23806  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23807    # Keep paths in /bin as-is, but remove trailing .exe if any
23808    new_path="${new_path/%.exe/}"
23809    # Do not save /bin paths to all_fixpath_prefixes!
23810  else
23811    # Not in mixed or Windows style, start by that.
23812    new_path=`cmd //c echo $new_path`
23813
23814  input_path="$new_path"
23815  # Check if we need to convert this using DOS-style short mode. If the path
23816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23817  # take no chances and rewrite it.
23818  # Note: m4 eats our [], so we need to use [ and ] instead.
23819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23820  if test "x$has_forbidden_chars" != x; then
23821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23822    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23823  fi
23824
23825    # Output is in $new_path
23826
23827  windows_path="$new_path"
23828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23829    unix_path=`$CYGPATH -u "$windows_path"`
23830    new_path="$unix_path"
23831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23833    new_path="$unix_path"
23834  fi
23835
23836    # remove trailing .exe if any
23837    new_path="${new_path/%.exe/}"
23838
23839    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23840    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23841  fi
23842
23843  else
23844    # We're on a posix platform. Hooray! :)
23845    # First separate the path from the arguments. This will split at the first
23846    # space.
23847    complete="$CPP"
23848    path="${complete%% *}"
23849    tmp="$complete EOL"
23850    arguments="${tmp#* }"
23851
23852    # Cannot rely on the command "which" here since it doesn't always work.
23853    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23854    if test -z "$is_absolute_path"; then
23855      # Path to executable is not absolute. Find it.
23856      IFS_save="$IFS"
23857      IFS=:
23858      for p in $PATH; do
23859        if test -f "$p/$path" && test -x "$p/$path"; then
23860          new_path="$p/$path"
23861          break
23862        fi
23863      done
23864      IFS="$IFS_save"
23865    else
23866      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23867$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23868      new_path="$path"
23869    fi
23870
23871    if test "x$new_path" = x; then
23872        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23873$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23874        has_space=`$ECHO "$complete" | $GREP " "`
23875        if test "x$has_space" != x; then
23876          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23877$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23878        fi
23879        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23880      fi
23881  fi
23882
23883      # Now join together the path and the arguments once again
23884      if test "x$arguments" != xEOL; then
23885        new_complete="$new_path ${arguments% *}"
23886      else
23887        new_complete="$new_path"
23888      fi
23889
23890  if test "x$complete" != "x$new_complete"; then
23891      CPP="$new_complete"
23892      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23893$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23894    fi
23895
23896
23897ac_ext=cpp
23898ac_cpp='$CXXCPP $CPPFLAGS'
23899ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23900ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23901ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23903$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23904if test -z "$CXXCPP"; then
23905  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23906  $as_echo_n "(cached) " >&6
23907else
23908      # Double quotes because CXXCPP needs to be expanded
23909    for CXXCPP in "$CXX -E" "/lib/cpp"
23910    do
23911      ac_preproc_ok=false
23912for ac_cxx_preproc_warn_flag in '' yes
23913do
23914  # Use a header file that comes with gcc, so configuring glibc
23915  # with a fresh cross-compiler works.
23916  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23917  # <limits.h> exists even on freestanding compilers.
23918  # On the NeXT, cc -E runs the code through the compiler's parser,
23919  # not just through cpp. "Syntax error" is here to catch this case.
23920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23921/* end confdefs.h.  */
23922#ifdef __STDC__
23923# include <limits.h>
23924#else
23925# include <assert.h>
23926#endif
23927		     Syntax error
23928_ACEOF
23929if ac_fn_cxx_try_cpp "$LINENO"; then :
23930
23931else
23932  # Broken: fails on valid input.
23933continue
23934fi
23935rm -f conftest.err conftest.i conftest.$ac_ext
23936
23937  # OK, works on sane cases.  Now check whether nonexistent headers
23938  # can be detected and how.
23939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23940/* end confdefs.h.  */
23941#include <ac_nonexistent.h>
23942_ACEOF
23943if ac_fn_cxx_try_cpp "$LINENO"; then :
23944  # Broken: success on invalid input.
23945continue
23946else
23947  # Passes both tests.
23948ac_preproc_ok=:
23949break
23950fi
23951rm -f conftest.err conftest.i conftest.$ac_ext
23952
23953done
23954# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23955rm -f conftest.i conftest.err conftest.$ac_ext
23956if $ac_preproc_ok; then :
23957  break
23958fi
23959
23960    done
23961    ac_cv_prog_CXXCPP=$CXXCPP
23962
23963fi
23964  CXXCPP=$ac_cv_prog_CXXCPP
23965else
23966  ac_cv_prog_CXXCPP=$CXXCPP
23967fi
23968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23969$as_echo "$CXXCPP" >&6; }
23970ac_preproc_ok=false
23971for ac_cxx_preproc_warn_flag in '' yes
23972do
23973  # Use a header file that comes with gcc, so configuring glibc
23974  # with a fresh cross-compiler works.
23975  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23976  # <limits.h> exists even on freestanding compilers.
23977  # On the NeXT, cc -E runs the code through the compiler's parser,
23978  # not just through cpp. "Syntax error" is here to catch this case.
23979  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23980/* end confdefs.h.  */
23981#ifdef __STDC__
23982# include <limits.h>
23983#else
23984# include <assert.h>
23985#endif
23986		     Syntax error
23987_ACEOF
23988if ac_fn_cxx_try_cpp "$LINENO"; then :
23989
23990else
23991  # Broken: fails on valid input.
23992continue
23993fi
23994rm -f conftest.err conftest.i conftest.$ac_ext
23995
23996  # OK, works on sane cases.  Now check whether nonexistent headers
23997  # can be detected and how.
23998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23999/* end confdefs.h.  */
24000#include <ac_nonexistent.h>
24001_ACEOF
24002if ac_fn_cxx_try_cpp "$LINENO"; then :
24003  # Broken: success on invalid input.
24004continue
24005else
24006  # Passes both tests.
24007ac_preproc_ok=:
24008break
24009fi
24010rm -f conftest.err conftest.i conftest.$ac_ext
24011
24012done
24013# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24014rm -f conftest.i conftest.err conftest.$ac_ext
24015if $ac_preproc_ok; then :
24016
24017else
24018  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24020as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24021See \`config.log' for more details" "$LINENO" 5 ; }
24022fi
24023
24024ac_ext=cpp
24025ac_cpp='$CXXCPP $CPPFLAGS'
24026ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24027ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24028ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24029
24030
24031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24032
24033  # First separate the path from the arguments. This will split at the first
24034  # space.
24035  complete="$CXXCPP"
24036  path="${complete%% *}"
24037  tmp="$complete EOL"
24038  arguments="${tmp#* }"
24039
24040  # Input might be given as Windows format, start by converting to
24041  # unix format.
24042  new_path=`$CYGPATH -u "$path"`
24043
24044  # Now try to locate executable using which
24045  new_path=`$WHICH "$new_path" 2> /dev/null`
24046  # bat and cmd files are not always considered executable in cygwin causing which
24047  # to not find them
24048  if test "x$new_path" = x \
24049           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24050           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24051    new_path=`$CYGPATH -u "$path"`
24052  fi
24053  if test "x$new_path" = x; then
24054    # Oops. Which didn't find the executable.
24055    # The splitting of arguments from the executable at a space might have been incorrect,
24056    # since paths with space are more likely in Windows. Give it another try with the whole
24057    # argument.
24058    path="$complete"
24059    arguments="EOL"
24060    new_path=`$CYGPATH -u "$path"`
24061    new_path=`$WHICH "$new_path" 2> /dev/null`
24062    # bat and cmd files are not always considered executable in cygwin causing which
24063    # to not find them
24064    if test "x$new_path" = x \
24065             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24066             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24067      new_path=`$CYGPATH -u "$path"`
24068    fi
24069    if test "x$new_path" = x; then
24070      # It's still not found. Now this is an unrecoverable error.
24071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24072$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24073      has_space=`$ECHO "$complete" | $GREP " "`
24074      if test "x$has_space" != x; then
24075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24077      fi
24078      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24079    fi
24080  fi
24081
24082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24085  # "foo.exe" is OK but "foo" is an error.
24086  #
24087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24088  # It is also a way to make sure we got the proper file name for the real test later on.
24089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24090  if test "x$test_shortpath" = x; then
24091    # Short path failed, file does not exist as specified.
24092    # Try adding .exe or .cmd
24093    if test -f "${new_path}.exe"; then
24094       input_to_shortpath="${new_path}.exe"
24095    elif test -f "${new_path}.cmd"; then
24096       input_to_shortpath="${new_path}.cmd"
24097    else
24098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24099$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24102      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24103    fi
24104  else
24105    input_to_shortpath="$new_path"
24106  fi
24107
24108  # Call helper function which possibly converts this using DOS-style short mode.
24109  # If so, the updated path is stored in $new_path.
24110  new_path="$input_to_shortpath"
24111
24112  input_path="$input_to_shortpath"
24113  # Check if we need to convert this using DOS-style short mode. If the path
24114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24115  # take no chances and rewrite it.
24116  # Note: m4 eats our [], so we need to use [ and ] instead.
24117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24118  if test "x$has_forbidden_chars" != x; then
24119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24123      # Going to short mode and back again did indeed matter. Since short mode is
24124      # case insensitive, let's make it lowercase to improve readability.
24125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24126      # Now convert it back to Unix-stile (cygpath)
24127      input_path=`$CYGPATH -u "$shortmode_path"`
24128      new_path="$input_path"
24129    fi
24130  fi
24131
24132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24133  if test "x$test_cygdrive_prefix" = x; then
24134    # As a simple fix, exclude /usr/bin since it's not a real path.
24135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24137      # a path prefixed by /cygdrive for fixpath to work.
24138      new_path="$CYGWIN_ROOT_PATH$input_path"
24139    fi
24140  fi
24141
24142  # remove trailing .exe if any
24143  new_path="${new_path/%.exe/}"
24144
24145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24146
24147  # First separate the path from the arguments. This will split at the first
24148  # space.
24149  complete="$CXXCPP"
24150  path="${complete%% *}"
24151  tmp="$complete EOL"
24152  arguments="${tmp#* }"
24153
24154  # Input might be given as Windows format, start by converting to
24155  # unix format.
24156  new_path="$path"
24157
24158  windows_path="$new_path"
24159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24160    unix_path=`$CYGPATH -u "$windows_path"`
24161    new_path="$unix_path"
24162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24164    new_path="$unix_path"
24165  fi
24166
24167
24168  # Now try to locate executable using which
24169  new_path=`$WHICH "$new_path" 2> /dev/null`
24170
24171  if test "x$new_path" = x; then
24172    # Oops. Which didn't find the executable.
24173    # The splitting of arguments from the executable at a space might have been incorrect,
24174    # since paths with space are more likely in Windows. Give it another try with the whole
24175    # argument.
24176    path="$complete"
24177    arguments="EOL"
24178    new_path="$path"
24179
24180  windows_path="$new_path"
24181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24182    unix_path=`$CYGPATH -u "$windows_path"`
24183    new_path="$unix_path"
24184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24186    new_path="$unix_path"
24187  fi
24188
24189
24190    new_path=`$WHICH "$new_path" 2> /dev/null`
24191
24192    if test "x$new_path" = x; then
24193      # It's still not found. Now this is an unrecoverable error.
24194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24195$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24196      has_space=`$ECHO "$complete" | $GREP " "`
24197      if test "x$has_space" != x; then
24198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24200      fi
24201      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24202    fi
24203  fi
24204
24205  # Now new_path has a complete unix path to the binary
24206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24207    # Keep paths in /bin as-is, but remove trailing .exe if any
24208    new_path="${new_path/%.exe/}"
24209    # Do not save /bin paths to all_fixpath_prefixes!
24210  else
24211    # Not in mixed or Windows style, start by that.
24212    new_path=`cmd //c echo $new_path`
24213
24214  input_path="$new_path"
24215  # Check if we need to convert this using DOS-style short mode. If the path
24216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24217  # take no chances and rewrite it.
24218  # Note: m4 eats our [], so we need to use [ and ] instead.
24219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24220  if test "x$has_forbidden_chars" != x; then
24221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24223  fi
24224
24225    # Output is in $new_path
24226
24227  windows_path="$new_path"
24228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24229    unix_path=`$CYGPATH -u "$windows_path"`
24230    new_path="$unix_path"
24231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24233    new_path="$unix_path"
24234  fi
24235
24236    # remove trailing .exe if any
24237    new_path="${new_path/%.exe/}"
24238
24239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24241  fi
24242
24243  else
24244    # We're on a posix platform. Hooray! :)
24245    # First separate the path from the arguments. This will split at the first
24246    # space.
24247    complete="$CXXCPP"
24248    path="${complete%% *}"
24249    tmp="$complete EOL"
24250    arguments="${tmp#* }"
24251
24252    # Cannot rely on the command "which" here since it doesn't always work.
24253    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24254    if test -z "$is_absolute_path"; then
24255      # Path to executable is not absolute. Find it.
24256      IFS_save="$IFS"
24257      IFS=:
24258      for p in $PATH; do
24259        if test -f "$p/$path" && test -x "$p/$path"; then
24260          new_path="$p/$path"
24261          break
24262        fi
24263      done
24264      IFS="$IFS_save"
24265    else
24266      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24267$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24268      new_path="$path"
24269    fi
24270
24271    if test "x$new_path" = x; then
24272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24273$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24274        has_space=`$ECHO "$complete" | $GREP " "`
24275        if test "x$has_space" != x; then
24276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24278        fi
24279        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24280      fi
24281  fi
24282
24283      # Now join together the path and the arguments once again
24284      if test "x$arguments" != xEOL; then
24285        new_complete="$new_path ${arguments% *}"
24286      else
24287        new_complete="$new_path"
24288      fi
24289
24290  if test "x$complete" != "x$new_complete"; then
24291      CXXCPP="$new_complete"
24292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24293$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24294    fi
24295
24296
24297if test "x$COMPILE_TYPE" != "xcross"; then
24298    # If we are not cross compiling, use the same compilers for
24299    # building the build platform executables. The cross-compilation
24300    # case needed to be done earlier, but this can only be done after
24301    # the native tools have been localized.
24302    BUILD_CC="$CC"
24303    BUILD_CXX="$CXX"
24304    BUILD_LD="$LD"
24305fi
24306
24307# for solaris we really need solaris tools, and not gnu equivalent
24308#   these seems to normally reside in /usr/ccs/bin so add that to path before
24309#   starting to probe
24310#
24311#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24312#         so that it can be overriden --with-tools-dir
24313if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24314    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24315fi
24316
24317# Find the right assembler.
24318if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24319    # Extract the first word of "as", so it can be a program name with args.
24320set dummy as; ac_word=$2
24321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24322$as_echo_n "checking for $ac_word... " >&6; }
24323if test "${ac_cv_path_AS+set}" = set; then :
24324  $as_echo_n "(cached) " >&6
24325else
24326  case $AS in
24327  [\\/]* | ?:[\\/]*)
24328  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24329  ;;
24330  *)
24331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24332for as_dir in $PATH
24333do
24334  IFS=$as_save_IFS
24335  test -z "$as_dir" && as_dir=.
24336    for ac_exec_ext in '' $ac_executable_extensions; do
24337  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24338    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24340    break 2
24341  fi
24342done
24343  done
24344IFS=$as_save_IFS
24345
24346  ;;
24347esac
24348fi
24349AS=$ac_cv_path_AS
24350if test -n "$AS"; then
24351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24352$as_echo "$AS" >&6; }
24353else
24354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24355$as_echo "no" >&6; }
24356fi
24357
24358
24359
24360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24361
24362  # First separate the path from the arguments. This will split at the first
24363  # space.
24364  complete="$AS"
24365  path="${complete%% *}"
24366  tmp="$complete EOL"
24367  arguments="${tmp#* }"
24368
24369  # Input might be given as Windows format, start by converting to
24370  # unix format.
24371  new_path=`$CYGPATH -u "$path"`
24372
24373  # Now try to locate executable using which
24374  new_path=`$WHICH "$new_path" 2> /dev/null`
24375  # bat and cmd files are not always considered executable in cygwin causing which
24376  # to not find them
24377  if test "x$new_path" = x \
24378           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24379           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24380    new_path=`$CYGPATH -u "$path"`
24381  fi
24382  if test "x$new_path" = x; then
24383    # Oops. Which didn't find the executable.
24384    # The splitting of arguments from the executable at a space might have been incorrect,
24385    # since paths with space are more likely in Windows. Give it another try with the whole
24386    # argument.
24387    path="$complete"
24388    arguments="EOL"
24389    new_path=`$CYGPATH -u "$path"`
24390    new_path=`$WHICH "$new_path" 2> /dev/null`
24391    # bat and cmd files are not always considered executable in cygwin causing which
24392    # to not find them
24393    if test "x$new_path" = x \
24394             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24395             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24396      new_path=`$CYGPATH -u "$path"`
24397    fi
24398    if test "x$new_path" = x; then
24399      # It's still not found. Now this is an unrecoverable error.
24400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24401$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24402      has_space=`$ECHO "$complete" | $GREP " "`
24403      if test "x$has_space" != x; then
24404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24406      fi
24407      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24408    fi
24409  fi
24410
24411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24414  # "foo.exe" is OK but "foo" is an error.
24415  #
24416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24417  # It is also a way to make sure we got the proper file name for the real test later on.
24418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24419  if test "x$test_shortpath" = x; then
24420    # Short path failed, file does not exist as specified.
24421    # Try adding .exe or .cmd
24422    if test -f "${new_path}.exe"; then
24423       input_to_shortpath="${new_path}.exe"
24424    elif test -f "${new_path}.cmd"; then
24425       input_to_shortpath="${new_path}.cmd"
24426    else
24427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24428$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24429      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24430$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24431      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24432    fi
24433  else
24434    input_to_shortpath="$new_path"
24435  fi
24436
24437  # Call helper function which possibly converts this using DOS-style short mode.
24438  # If so, the updated path is stored in $new_path.
24439  new_path="$input_to_shortpath"
24440
24441  input_path="$input_to_shortpath"
24442  # Check if we need to convert this using DOS-style short mode. If the path
24443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24444  # take no chances and rewrite it.
24445  # Note: m4 eats our [], so we need to use [ and ] instead.
24446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24447  if test "x$has_forbidden_chars" != x; then
24448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24452      # Going to short mode and back again did indeed matter. Since short mode is
24453      # case insensitive, let's make it lowercase to improve readability.
24454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24455      # Now convert it back to Unix-stile (cygpath)
24456      input_path=`$CYGPATH -u "$shortmode_path"`
24457      new_path="$input_path"
24458    fi
24459  fi
24460
24461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24462  if test "x$test_cygdrive_prefix" = x; then
24463    # As a simple fix, exclude /usr/bin since it's not a real path.
24464    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24466      # a path prefixed by /cygdrive for fixpath to work.
24467      new_path="$CYGWIN_ROOT_PATH$input_path"
24468    fi
24469  fi
24470
24471  # remove trailing .exe if any
24472  new_path="${new_path/%.exe/}"
24473
24474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24475
24476  # First separate the path from the arguments. This will split at the first
24477  # space.
24478  complete="$AS"
24479  path="${complete%% *}"
24480  tmp="$complete EOL"
24481  arguments="${tmp#* }"
24482
24483  # Input might be given as Windows format, start by converting to
24484  # unix format.
24485  new_path="$path"
24486
24487  windows_path="$new_path"
24488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24489    unix_path=`$CYGPATH -u "$windows_path"`
24490    new_path="$unix_path"
24491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24493    new_path="$unix_path"
24494  fi
24495
24496
24497  # Now try to locate executable using which
24498  new_path=`$WHICH "$new_path" 2> /dev/null`
24499
24500  if test "x$new_path" = x; then
24501    # Oops. Which didn't find the executable.
24502    # The splitting of arguments from the executable at a space might have been incorrect,
24503    # since paths with space are more likely in Windows. Give it another try with the whole
24504    # argument.
24505    path="$complete"
24506    arguments="EOL"
24507    new_path="$path"
24508
24509  windows_path="$new_path"
24510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24511    unix_path=`$CYGPATH -u "$windows_path"`
24512    new_path="$unix_path"
24513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24515    new_path="$unix_path"
24516  fi
24517
24518
24519    new_path=`$WHICH "$new_path" 2> /dev/null`
24520
24521    if test "x$new_path" = x; then
24522      # It's still not found. Now this is an unrecoverable error.
24523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24524$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24525      has_space=`$ECHO "$complete" | $GREP " "`
24526      if test "x$has_space" != x; then
24527        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24528$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24529      fi
24530      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24531    fi
24532  fi
24533
24534  # Now new_path has a complete unix path to the binary
24535  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24536    # Keep paths in /bin as-is, but remove trailing .exe if any
24537    new_path="${new_path/%.exe/}"
24538    # Do not save /bin paths to all_fixpath_prefixes!
24539  else
24540    # Not in mixed or Windows style, start by that.
24541    new_path=`cmd //c echo $new_path`
24542
24543  input_path="$new_path"
24544  # Check if we need to convert this using DOS-style short mode. If the path
24545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24546  # take no chances and rewrite it.
24547  # Note: m4 eats our [], so we need to use [ and ] instead.
24548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24549  if test "x$has_forbidden_chars" != x; then
24550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24551    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24552  fi
24553
24554    # Output is in $new_path
24555
24556  windows_path="$new_path"
24557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24558    unix_path=`$CYGPATH -u "$windows_path"`
24559    new_path="$unix_path"
24560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24562    new_path="$unix_path"
24563  fi
24564
24565    # remove trailing .exe if any
24566    new_path="${new_path/%.exe/}"
24567
24568    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24569    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24570  fi
24571
24572  else
24573    # We're on a posix platform. Hooray! :)
24574    # First separate the path from the arguments. This will split at the first
24575    # space.
24576    complete="$AS"
24577    path="${complete%% *}"
24578    tmp="$complete EOL"
24579    arguments="${tmp#* }"
24580
24581    # Cannot rely on the command "which" here since it doesn't always work.
24582    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24583    if test -z "$is_absolute_path"; then
24584      # Path to executable is not absolute. Find it.
24585      IFS_save="$IFS"
24586      IFS=:
24587      for p in $PATH; do
24588        if test -f "$p/$path" && test -x "$p/$path"; then
24589          new_path="$p/$path"
24590          break
24591        fi
24592      done
24593      IFS="$IFS_save"
24594    else
24595      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24596$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24597      new_path="$path"
24598    fi
24599
24600    if test "x$new_path" = x; then
24601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24602$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24603        has_space=`$ECHO "$complete" | $GREP " "`
24604        if test "x$has_space" != x; then
24605          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24606$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24607        fi
24608        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24609      fi
24610  fi
24611
24612      # Now join together the path and the arguments once again
24613      if test "x$arguments" != xEOL; then
24614        new_complete="$new_path ${arguments% *}"
24615      else
24616        new_complete="$new_path"
24617      fi
24618
24619  if test "x$complete" != "x$new_complete"; then
24620      AS="$new_complete"
24621      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24622$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24623    fi
24624
24625else
24626    AS="$CC -c"
24627fi
24628
24629
24630if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24631    for ac_prog in gnm nm
24632do
24633  # Extract the first word of "$ac_prog", so it can be a program name with args.
24634set dummy $ac_prog; ac_word=$2
24635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24636$as_echo_n "checking for $ac_word... " >&6; }
24637if test "${ac_cv_path_NM+set}" = set; then :
24638  $as_echo_n "(cached) " >&6
24639else
24640  case $NM in
24641  [\\/]* | ?:[\\/]*)
24642  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24643  ;;
24644  *)
24645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24646for as_dir in $PATH
24647do
24648  IFS=$as_save_IFS
24649  test -z "$as_dir" && as_dir=.
24650    for ac_exec_ext in '' $ac_executable_extensions; do
24651  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24652    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24654    break 2
24655  fi
24656done
24657  done
24658IFS=$as_save_IFS
24659
24660  ;;
24661esac
24662fi
24663NM=$ac_cv_path_NM
24664if test -n "$NM"; then
24665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24666$as_echo "$NM" >&6; }
24667else
24668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24669$as_echo "no" >&6; }
24670fi
24671
24672
24673  test -n "$NM" && break
24674done
24675
24676
24677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24678
24679  # First separate the path from the arguments. This will split at the first
24680  # space.
24681  complete="$NM"
24682  path="${complete%% *}"
24683  tmp="$complete EOL"
24684  arguments="${tmp#* }"
24685
24686  # Input might be given as Windows format, start by converting to
24687  # unix format.
24688  new_path=`$CYGPATH -u "$path"`
24689
24690  # Now try to locate executable using which
24691  new_path=`$WHICH "$new_path" 2> /dev/null`
24692  # bat and cmd files are not always considered executable in cygwin causing which
24693  # to not find them
24694  if test "x$new_path" = x \
24695           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24696           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24697    new_path=`$CYGPATH -u "$path"`
24698  fi
24699  if test "x$new_path" = x; then
24700    # Oops. Which didn't find the executable.
24701    # The splitting of arguments from the executable at a space might have been incorrect,
24702    # since paths with space are more likely in Windows. Give it another try with the whole
24703    # argument.
24704    path="$complete"
24705    arguments="EOL"
24706    new_path=`$CYGPATH -u "$path"`
24707    new_path=`$WHICH "$new_path" 2> /dev/null`
24708    # bat and cmd files are not always considered executable in cygwin causing which
24709    # to not find them
24710    if test "x$new_path" = x \
24711             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24712             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24713      new_path=`$CYGPATH -u "$path"`
24714    fi
24715    if test "x$new_path" = x; then
24716      # It's still not found. Now this is an unrecoverable error.
24717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24718$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24719      has_space=`$ECHO "$complete" | $GREP " "`
24720      if test "x$has_space" != x; then
24721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24723      fi
24724      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24725    fi
24726  fi
24727
24728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24731  # "foo.exe" is OK but "foo" is an error.
24732  #
24733  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24734  # It is also a way to make sure we got the proper file name for the real test later on.
24735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24736  if test "x$test_shortpath" = x; then
24737    # Short path failed, file does not exist as specified.
24738    # Try adding .exe or .cmd
24739    if test -f "${new_path}.exe"; then
24740       input_to_shortpath="${new_path}.exe"
24741    elif test -f "${new_path}.cmd"; then
24742       input_to_shortpath="${new_path}.cmd"
24743    else
24744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24745$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24746      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24747$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24748      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24749    fi
24750  else
24751    input_to_shortpath="$new_path"
24752  fi
24753
24754  # Call helper function which possibly converts this using DOS-style short mode.
24755  # If so, the updated path is stored in $new_path.
24756  new_path="$input_to_shortpath"
24757
24758  input_path="$input_to_shortpath"
24759  # Check if we need to convert this using DOS-style short mode. If the path
24760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24761  # take no chances and rewrite it.
24762  # Note: m4 eats our [], so we need to use [ and ] instead.
24763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24764  if test "x$has_forbidden_chars" != x; then
24765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24769      # Going to short mode and back again did indeed matter. Since short mode is
24770      # case insensitive, let's make it lowercase to improve readability.
24771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24772      # Now convert it back to Unix-stile (cygpath)
24773      input_path=`$CYGPATH -u "$shortmode_path"`
24774      new_path="$input_path"
24775    fi
24776  fi
24777
24778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24779  if test "x$test_cygdrive_prefix" = x; then
24780    # As a simple fix, exclude /usr/bin since it's not a real path.
24781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24783      # a path prefixed by /cygdrive for fixpath to work.
24784      new_path="$CYGWIN_ROOT_PATH$input_path"
24785    fi
24786  fi
24787
24788  # remove trailing .exe if any
24789  new_path="${new_path/%.exe/}"
24790
24791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24792
24793  # First separate the path from the arguments. This will split at the first
24794  # space.
24795  complete="$NM"
24796  path="${complete%% *}"
24797  tmp="$complete EOL"
24798  arguments="${tmp#* }"
24799
24800  # Input might be given as Windows format, start by converting to
24801  # unix format.
24802  new_path="$path"
24803
24804  windows_path="$new_path"
24805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24806    unix_path=`$CYGPATH -u "$windows_path"`
24807    new_path="$unix_path"
24808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24810    new_path="$unix_path"
24811  fi
24812
24813
24814  # Now try to locate executable using which
24815  new_path=`$WHICH "$new_path" 2> /dev/null`
24816
24817  if test "x$new_path" = x; then
24818    # Oops. Which didn't find the executable.
24819    # The splitting of arguments from the executable at a space might have been incorrect,
24820    # since paths with space are more likely in Windows. Give it another try with the whole
24821    # argument.
24822    path="$complete"
24823    arguments="EOL"
24824    new_path="$path"
24825
24826  windows_path="$new_path"
24827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24828    unix_path=`$CYGPATH -u "$windows_path"`
24829    new_path="$unix_path"
24830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24832    new_path="$unix_path"
24833  fi
24834
24835
24836    new_path=`$WHICH "$new_path" 2> /dev/null`
24837
24838    if test "x$new_path" = x; then
24839      # It's still not found. Now this is an unrecoverable error.
24840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24841$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24842      has_space=`$ECHO "$complete" | $GREP " "`
24843      if test "x$has_space" != x; then
24844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24846      fi
24847      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24848    fi
24849  fi
24850
24851  # Now new_path has a complete unix path to the binary
24852  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24853    # Keep paths in /bin as-is, but remove trailing .exe if any
24854    new_path="${new_path/%.exe/}"
24855    # Do not save /bin paths to all_fixpath_prefixes!
24856  else
24857    # Not in mixed or Windows style, start by that.
24858    new_path=`cmd //c echo $new_path`
24859
24860  input_path="$new_path"
24861  # Check if we need to convert this using DOS-style short mode. If the path
24862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24863  # take no chances and rewrite it.
24864  # Note: m4 eats our [], so we need to use [ and ] instead.
24865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24866  if test "x$has_forbidden_chars" != x; then
24867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24868    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24869  fi
24870
24871    # Output is in $new_path
24872
24873  windows_path="$new_path"
24874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24875    unix_path=`$CYGPATH -u "$windows_path"`
24876    new_path="$unix_path"
24877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24879    new_path="$unix_path"
24880  fi
24881
24882    # remove trailing .exe if any
24883    new_path="${new_path/%.exe/}"
24884
24885    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24886    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24887  fi
24888
24889  else
24890    # We're on a posix platform. Hooray! :)
24891    # First separate the path from the arguments. This will split at the first
24892    # space.
24893    complete="$NM"
24894    path="${complete%% *}"
24895    tmp="$complete EOL"
24896    arguments="${tmp#* }"
24897
24898    # Cannot rely on the command "which" here since it doesn't always work.
24899    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24900    if test -z "$is_absolute_path"; then
24901      # Path to executable is not absolute. Find it.
24902      IFS_save="$IFS"
24903      IFS=:
24904      for p in $PATH; do
24905        if test -f "$p/$path" && test -x "$p/$path"; then
24906          new_path="$p/$path"
24907          break
24908        fi
24909      done
24910      IFS="$IFS_save"
24911    else
24912      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24913$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24914      new_path="$path"
24915    fi
24916
24917    if test "x$new_path" = x; then
24918        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24919$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24920        has_space=`$ECHO "$complete" | $GREP " "`
24921        if test "x$has_space" != x; then
24922          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24923$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24924        fi
24925        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24926      fi
24927  fi
24928
24929      # Now join together the path and the arguments once again
24930      if test "x$arguments" != xEOL; then
24931        new_complete="$new_path ${arguments% *}"
24932      else
24933        new_complete="$new_path"
24934      fi
24935
24936  if test "x$complete" != "x$new_complete"; then
24937      NM="$new_complete"
24938      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24939$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24940    fi
24941
24942    # Extract the first word of "strip", so it can be a program name with args.
24943set dummy strip; ac_word=$2
24944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24945$as_echo_n "checking for $ac_word... " >&6; }
24946if test "${ac_cv_path_STRIP+set}" = set; then :
24947  $as_echo_n "(cached) " >&6
24948else
24949  case $STRIP in
24950  [\\/]* | ?:[\\/]*)
24951  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24952  ;;
24953  *)
24954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24955for as_dir in $PATH
24956do
24957  IFS=$as_save_IFS
24958  test -z "$as_dir" && as_dir=.
24959    for ac_exec_ext in '' $ac_executable_extensions; do
24960  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24961    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24963    break 2
24964  fi
24965done
24966  done
24967IFS=$as_save_IFS
24968
24969  ;;
24970esac
24971fi
24972STRIP=$ac_cv_path_STRIP
24973if test -n "$STRIP"; then
24974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24975$as_echo "$STRIP" >&6; }
24976else
24977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24978$as_echo "no" >&6; }
24979fi
24980
24981
24982
24983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24984
24985  # First separate the path from the arguments. This will split at the first
24986  # space.
24987  complete="$STRIP"
24988  path="${complete%% *}"
24989  tmp="$complete EOL"
24990  arguments="${tmp#* }"
24991
24992  # Input might be given as Windows format, start by converting to
24993  # unix format.
24994  new_path=`$CYGPATH -u "$path"`
24995
24996  # Now try to locate executable using which
24997  new_path=`$WHICH "$new_path" 2> /dev/null`
24998  # bat and cmd files are not always considered executable in cygwin causing which
24999  # to not find them
25000  if test "x$new_path" = x \
25001           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25002           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25003    new_path=`$CYGPATH -u "$path"`
25004  fi
25005  if test "x$new_path" = x; then
25006    # Oops. Which didn't find the executable.
25007    # The splitting of arguments from the executable at a space might have been incorrect,
25008    # since paths with space are more likely in Windows. Give it another try with the whole
25009    # argument.
25010    path="$complete"
25011    arguments="EOL"
25012    new_path=`$CYGPATH -u "$path"`
25013    new_path=`$WHICH "$new_path" 2> /dev/null`
25014    # bat and cmd files are not always considered executable in cygwin causing which
25015    # to not find them
25016    if test "x$new_path" = x \
25017             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25018             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25019      new_path=`$CYGPATH -u "$path"`
25020    fi
25021    if test "x$new_path" = x; then
25022      # It's still not found. Now this is an unrecoverable error.
25023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25024$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25025      has_space=`$ECHO "$complete" | $GREP " "`
25026      if test "x$has_space" != x; then
25027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25029      fi
25030      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25031    fi
25032  fi
25033
25034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25037  # "foo.exe" is OK but "foo" is an error.
25038  #
25039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25040  # It is also a way to make sure we got the proper file name for the real test later on.
25041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25042  if test "x$test_shortpath" = x; then
25043    # Short path failed, file does not exist as specified.
25044    # Try adding .exe or .cmd
25045    if test -f "${new_path}.exe"; then
25046       input_to_shortpath="${new_path}.exe"
25047    elif test -f "${new_path}.cmd"; then
25048       input_to_shortpath="${new_path}.cmd"
25049    else
25050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25051$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25052      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25053$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25054      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25055    fi
25056  else
25057    input_to_shortpath="$new_path"
25058  fi
25059
25060  # Call helper function which possibly converts this using DOS-style short mode.
25061  # If so, the updated path is stored in $new_path.
25062  new_path="$input_to_shortpath"
25063
25064  input_path="$input_to_shortpath"
25065  # Check if we need to convert this using DOS-style short mode. If the path
25066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25067  # take no chances and rewrite it.
25068  # Note: m4 eats our [], so we need to use [ and ] instead.
25069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25070  if test "x$has_forbidden_chars" != x; then
25071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25075      # Going to short mode and back again did indeed matter. Since short mode is
25076      # case insensitive, let's make it lowercase to improve readability.
25077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25078      # Now convert it back to Unix-stile (cygpath)
25079      input_path=`$CYGPATH -u "$shortmode_path"`
25080      new_path="$input_path"
25081    fi
25082  fi
25083
25084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25085  if test "x$test_cygdrive_prefix" = x; then
25086    # As a simple fix, exclude /usr/bin since it's not a real path.
25087    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25089      # a path prefixed by /cygdrive for fixpath to work.
25090      new_path="$CYGWIN_ROOT_PATH$input_path"
25091    fi
25092  fi
25093
25094  # remove trailing .exe if any
25095  new_path="${new_path/%.exe/}"
25096
25097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25098
25099  # First separate the path from the arguments. This will split at the first
25100  # space.
25101  complete="$STRIP"
25102  path="${complete%% *}"
25103  tmp="$complete EOL"
25104  arguments="${tmp#* }"
25105
25106  # Input might be given as Windows format, start by converting to
25107  # unix format.
25108  new_path="$path"
25109
25110  windows_path="$new_path"
25111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25112    unix_path=`$CYGPATH -u "$windows_path"`
25113    new_path="$unix_path"
25114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25116    new_path="$unix_path"
25117  fi
25118
25119
25120  # Now try to locate executable using which
25121  new_path=`$WHICH "$new_path" 2> /dev/null`
25122
25123  if test "x$new_path" = x; then
25124    # Oops. Which didn't find the executable.
25125    # The splitting of arguments from the executable at a space might have been incorrect,
25126    # since paths with space are more likely in Windows. Give it another try with the whole
25127    # argument.
25128    path="$complete"
25129    arguments="EOL"
25130    new_path="$path"
25131
25132  windows_path="$new_path"
25133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25134    unix_path=`$CYGPATH -u "$windows_path"`
25135    new_path="$unix_path"
25136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25138    new_path="$unix_path"
25139  fi
25140
25141
25142    new_path=`$WHICH "$new_path" 2> /dev/null`
25143
25144    if test "x$new_path" = x; then
25145      # It's still not found. Now this is an unrecoverable error.
25146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25147$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25148      has_space=`$ECHO "$complete" | $GREP " "`
25149      if test "x$has_space" != x; then
25150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25152      fi
25153      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25154    fi
25155  fi
25156
25157  # Now new_path has a complete unix path to the binary
25158  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25159    # Keep paths in /bin as-is, but remove trailing .exe if any
25160    new_path="${new_path/%.exe/}"
25161    # Do not save /bin paths to all_fixpath_prefixes!
25162  else
25163    # Not in mixed or Windows style, start by that.
25164    new_path=`cmd //c echo $new_path`
25165
25166  input_path="$new_path"
25167  # Check if we need to convert this using DOS-style short mode. If the path
25168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25169  # take no chances and rewrite it.
25170  # Note: m4 eats our [], so we need to use [ and ] instead.
25171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25172  if test "x$has_forbidden_chars" != x; then
25173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25175  fi
25176
25177    # Output is in $new_path
25178
25179  windows_path="$new_path"
25180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25181    unix_path=`$CYGPATH -u "$windows_path"`
25182    new_path="$unix_path"
25183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25185    new_path="$unix_path"
25186  fi
25187
25188    # remove trailing .exe if any
25189    new_path="${new_path/%.exe/}"
25190
25191    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25192    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25193  fi
25194
25195  else
25196    # We're on a posix platform. Hooray! :)
25197    # First separate the path from the arguments. This will split at the first
25198    # space.
25199    complete="$STRIP"
25200    path="${complete%% *}"
25201    tmp="$complete EOL"
25202    arguments="${tmp#* }"
25203
25204    # Cannot rely on the command "which" here since it doesn't always work.
25205    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25206    if test -z "$is_absolute_path"; then
25207      # Path to executable is not absolute. Find it.
25208      IFS_save="$IFS"
25209      IFS=:
25210      for p in $PATH; do
25211        if test -f "$p/$path" && test -x "$p/$path"; then
25212          new_path="$p/$path"
25213          break
25214        fi
25215      done
25216      IFS="$IFS_save"
25217    else
25218      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25219$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25220      new_path="$path"
25221    fi
25222
25223    if test "x$new_path" = x; then
25224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25225$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25226        has_space=`$ECHO "$complete" | $GREP " "`
25227        if test "x$has_space" != x; then
25228          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25230        fi
25231        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25232      fi
25233  fi
25234
25235      # Now join together the path and the arguments once again
25236      if test "x$arguments" != xEOL; then
25237        new_complete="$new_path ${arguments% *}"
25238      else
25239        new_complete="$new_path"
25240      fi
25241
25242  if test "x$complete" != "x$new_complete"; then
25243      STRIP="$new_complete"
25244      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25245$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25246    fi
25247
25248    # Extract the first word of "mcs", so it can be a program name with args.
25249set dummy mcs; ac_word=$2
25250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25251$as_echo_n "checking for $ac_word... " >&6; }
25252if test "${ac_cv_path_MCS+set}" = set; then :
25253  $as_echo_n "(cached) " >&6
25254else
25255  case $MCS in
25256  [\\/]* | ?:[\\/]*)
25257  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25258  ;;
25259  *)
25260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25261for as_dir in $PATH
25262do
25263  IFS=$as_save_IFS
25264  test -z "$as_dir" && as_dir=.
25265    for ac_exec_ext in '' $ac_executable_extensions; do
25266  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25267    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25269    break 2
25270  fi
25271done
25272  done
25273IFS=$as_save_IFS
25274
25275  ;;
25276esac
25277fi
25278MCS=$ac_cv_path_MCS
25279if test -n "$MCS"; then
25280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25281$as_echo "$MCS" >&6; }
25282else
25283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25284$as_echo "no" >&6; }
25285fi
25286
25287
25288
25289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25290
25291  # First separate the path from the arguments. This will split at the first
25292  # space.
25293  complete="$MCS"
25294  path="${complete%% *}"
25295  tmp="$complete EOL"
25296  arguments="${tmp#* }"
25297
25298  # Input might be given as Windows format, start by converting to
25299  # unix format.
25300  new_path=`$CYGPATH -u "$path"`
25301
25302  # Now try to locate executable using which
25303  new_path=`$WHICH "$new_path" 2> /dev/null`
25304  # bat and cmd files are not always considered executable in cygwin causing which
25305  # to not find them
25306  if test "x$new_path" = x \
25307           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25308           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25309    new_path=`$CYGPATH -u "$path"`
25310  fi
25311  if test "x$new_path" = x; then
25312    # Oops. Which didn't find the executable.
25313    # The splitting of arguments from the executable at a space might have been incorrect,
25314    # since paths with space are more likely in Windows. Give it another try with the whole
25315    # argument.
25316    path="$complete"
25317    arguments="EOL"
25318    new_path=`$CYGPATH -u "$path"`
25319    new_path=`$WHICH "$new_path" 2> /dev/null`
25320    # bat and cmd files are not always considered executable in cygwin causing which
25321    # to not find them
25322    if test "x$new_path" = x \
25323             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25324             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25325      new_path=`$CYGPATH -u "$path"`
25326    fi
25327    if test "x$new_path" = x; then
25328      # It's still not found. Now this is an unrecoverable error.
25329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25330$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25331      has_space=`$ECHO "$complete" | $GREP " "`
25332      if test "x$has_space" != x; then
25333        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25334$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25335      fi
25336      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25337    fi
25338  fi
25339
25340  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25341  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25342  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25343  # "foo.exe" is OK but "foo" is an error.
25344  #
25345  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25346  # It is also a way to make sure we got the proper file name for the real test later on.
25347  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25348  if test "x$test_shortpath" = x; then
25349    # Short path failed, file does not exist as specified.
25350    # Try adding .exe or .cmd
25351    if test -f "${new_path}.exe"; then
25352       input_to_shortpath="${new_path}.exe"
25353    elif test -f "${new_path}.cmd"; then
25354       input_to_shortpath="${new_path}.cmd"
25355    else
25356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25357$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25358      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25359$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25360      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25361    fi
25362  else
25363    input_to_shortpath="$new_path"
25364  fi
25365
25366  # Call helper function which possibly converts this using DOS-style short mode.
25367  # If so, the updated path is stored in $new_path.
25368  new_path="$input_to_shortpath"
25369
25370  input_path="$input_to_shortpath"
25371  # Check if we need to convert this using DOS-style short mode. If the path
25372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25373  # take no chances and rewrite it.
25374  # Note: m4 eats our [], so we need to use [ and ] instead.
25375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25376  if test "x$has_forbidden_chars" != x; then
25377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25381      # Going to short mode and back again did indeed matter. Since short mode is
25382      # case insensitive, let's make it lowercase to improve readability.
25383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25384      # Now convert it back to Unix-stile (cygpath)
25385      input_path=`$CYGPATH -u "$shortmode_path"`
25386      new_path="$input_path"
25387    fi
25388  fi
25389
25390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25391  if test "x$test_cygdrive_prefix" = x; then
25392    # As a simple fix, exclude /usr/bin since it's not a real path.
25393    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25395      # a path prefixed by /cygdrive for fixpath to work.
25396      new_path="$CYGWIN_ROOT_PATH$input_path"
25397    fi
25398  fi
25399
25400  # remove trailing .exe if any
25401  new_path="${new_path/%.exe/}"
25402
25403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25404
25405  # First separate the path from the arguments. This will split at the first
25406  # space.
25407  complete="$MCS"
25408  path="${complete%% *}"
25409  tmp="$complete EOL"
25410  arguments="${tmp#* }"
25411
25412  # Input might be given as Windows format, start by converting to
25413  # unix format.
25414  new_path="$path"
25415
25416  windows_path="$new_path"
25417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25418    unix_path=`$CYGPATH -u "$windows_path"`
25419    new_path="$unix_path"
25420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25421    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25422    new_path="$unix_path"
25423  fi
25424
25425
25426  # Now try to locate executable using which
25427  new_path=`$WHICH "$new_path" 2> /dev/null`
25428
25429  if test "x$new_path" = x; then
25430    # Oops. Which didn't find the executable.
25431    # The splitting of arguments from the executable at a space might have been incorrect,
25432    # since paths with space are more likely in Windows. Give it another try with the whole
25433    # argument.
25434    path="$complete"
25435    arguments="EOL"
25436    new_path="$path"
25437
25438  windows_path="$new_path"
25439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25440    unix_path=`$CYGPATH -u "$windows_path"`
25441    new_path="$unix_path"
25442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25444    new_path="$unix_path"
25445  fi
25446
25447
25448    new_path=`$WHICH "$new_path" 2> /dev/null`
25449
25450    if test "x$new_path" = x; then
25451      # It's still not found. Now this is an unrecoverable error.
25452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25453$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25454      has_space=`$ECHO "$complete" | $GREP " "`
25455      if test "x$has_space" != x; then
25456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25458      fi
25459      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25460    fi
25461  fi
25462
25463  # Now new_path has a complete unix path to the binary
25464  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25465    # Keep paths in /bin as-is, but remove trailing .exe if any
25466    new_path="${new_path/%.exe/}"
25467    # Do not save /bin paths to all_fixpath_prefixes!
25468  else
25469    # Not in mixed or Windows style, start by that.
25470    new_path=`cmd //c echo $new_path`
25471
25472  input_path="$new_path"
25473  # Check if we need to convert this using DOS-style short mode. If the path
25474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25475  # take no chances and rewrite it.
25476  # Note: m4 eats our [], so we need to use [ and ] instead.
25477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25478  if test "x$has_forbidden_chars" != x; then
25479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25481  fi
25482
25483    # Output is in $new_path
25484
25485  windows_path="$new_path"
25486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25487    unix_path=`$CYGPATH -u "$windows_path"`
25488    new_path="$unix_path"
25489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25491    new_path="$unix_path"
25492  fi
25493
25494    # remove trailing .exe if any
25495    new_path="${new_path/%.exe/}"
25496
25497    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25498    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25499  fi
25500
25501  else
25502    # We're on a posix platform. Hooray! :)
25503    # First separate the path from the arguments. This will split at the first
25504    # space.
25505    complete="$MCS"
25506    path="${complete%% *}"
25507    tmp="$complete EOL"
25508    arguments="${tmp#* }"
25509
25510    # Cannot rely on the command "which" here since it doesn't always work.
25511    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25512    if test -z "$is_absolute_path"; then
25513      # Path to executable is not absolute. Find it.
25514      IFS_save="$IFS"
25515      IFS=:
25516      for p in $PATH; do
25517        if test -f "$p/$path" && test -x "$p/$path"; then
25518          new_path="$p/$path"
25519          break
25520        fi
25521      done
25522      IFS="$IFS_save"
25523    else
25524      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25525$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25526      new_path="$path"
25527    fi
25528
25529    if test "x$new_path" = x; then
25530        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25531$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25532        has_space=`$ECHO "$complete" | $GREP " "`
25533        if test "x$has_space" != x; then
25534          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25535$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25536        fi
25537        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25538      fi
25539  fi
25540
25541      # Now join together the path and the arguments once again
25542      if test "x$arguments" != xEOL; then
25543        new_complete="$new_path ${arguments% *}"
25544      else
25545        new_complete="$new_path"
25546      fi
25547
25548  if test "x$complete" != "x$new_complete"; then
25549      MCS="$new_complete"
25550      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25551$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25552    fi
25553
25554elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25555    if test -n "$ac_tool_prefix"; then
25556  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25557set dummy ${ac_tool_prefix}nm; ac_word=$2
25558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25559$as_echo_n "checking for $ac_word... " >&6; }
25560if test "${ac_cv_prog_NM+set}" = set; then :
25561  $as_echo_n "(cached) " >&6
25562else
25563  if test -n "$NM"; then
25564  ac_cv_prog_NM="$NM" # Let the user override the test.
25565else
25566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25567for as_dir in $PATH
25568do
25569  IFS=$as_save_IFS
25570  test -z "$as_dir" && as_dir=.
25571    for ac_exec_ext in '' $ac_executable_extensions; do
25572  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25573    ac_cv_prog_NM="${ac_tool_prefix}nm"
25574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25575    break 2
25576  fi
25577done
25578  done
25579IFS=$as_save_IFS
25580
25581fi
25582fi
25583NM=$ac_cv_prog_NM
25584if test -n "$NM"; then
25585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25586$as_echo "$NM" >&6; }
25587else
25588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25589$as_echo "no" >&6; }
25590fi
25591
25592
25593fi
25594if test -z "$ac_cv_prog_NM"; then
25595  ac_ct_NM=$NM
25596  # Extract the first word of "nm", so it can be a program name with args.
25597set dummy nm; ac_word=$2
25598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25599$as_echo_n "checking for $ac_word... " >&6; }
25600if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25601  $as_echo_n "(cached) " >&6
25602else
25603  if test -n "$ac_ct_NM"; then
25604  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25605else
25606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25607for as_dir in $PATH
25608do
25609  IFS=$as_save_IFS
25610  test -z "$as_dir" && as_dir=.
25611    for ac_exec_ext in '' $ac_executable_extensions; do
25612  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25613    ac_cv_prog_ac_ct_NM="nm"
25614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25615    break 2
25616  fi
25617done
25618  done
25619IFS=$as_save_IFS
25620
25621fi
25622fi
25623ac_ct_NM=$ac_cv_prog_ac_ct_NM
25624if test -n "$ac_ct_NM"; then
25625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25626$as_echo "$ac_ct_NM" >&6; }
25627else
25628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25629$as_echo "no" >&6; }
25630fi
25631
25632  if test "x$ac_ct_NM" = x; then
25633    NM=""
25634  else
25635    case $cross_compiling:$ac_tool_warned in
25636yes:)
25637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25639ac_tool_warned=yes ;;
25640esac
25641    NM=$ac_ct_NM
25642  fi
25643else
25644  NM="$ac_cv_prog_NM"
25645fi
25646
25647
25648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25649
25650  # First separate the path from the arguments. This will split at the first
25651  # space.
25652  complete="$NM"
25653  path="${complete%% *}"
25654  tmp="$complete EOL"
25655  arguments="${tmp#* }"
25656
25657  # Input might be given as Windows format, start by converting to
25658  # unix format.
25659  new_path=`$CYGPATH -u "$path"`
25660
25661  # Now try to locate executable using which
25662  new_path=`$WHICH "$new_path" 2> /dev/null`
25663  # bat and cmd files are not always considered executable in cygwin causing which
25664  # to not find them
25665  if test "x$new_path" = x \
25666           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25667           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25668    new_path=`$CYGPATH -u "$path"`
25669  fi
25670  if test "x$new_path" = x; then
25671    # Oops. Which didn't find the executable.
25672    # The splitting of arguments from the executable at a space might have been incorrect,
25673    # since paths with space are more likely in Windows. Give it another try with the whole
25674    # argument.
25675    path="$complete"
25676    arguments="EOL"
25677    new_path=`$CYGPATH -u "$path"`
25678    new_path=`$WHICH "$new_path" 2> /dev/null`
25679    # bat and cmd files are not always considered executable in cygwin causing which
25680    # to not find them
25681    if test "x$new_path" = x \
25682             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25683             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25684      new_path=`$CYGPATH -u "$path"`
25685    fi
25686    if test "x$new_path" = x; then
25687      # It's still not found. Now this is an unrecoverable error.
25688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25689$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25690      has_space=`$ECHO "$complete" | $GREP " "`
25691      if test "x$has_space" != x; then
25692        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25693$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25694      fi
25695      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25696    fi
25697  fi
25698
25699  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25700  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25701  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25702  # "foo.exe" is OK but "foo" is an error.
25703  #
25704  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25705  # It is also a way to make sure we got the proper file name for the real test later on.
25706  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25707  if test "x$test_shortpath" = x; then
25708    # Short path failed, file does not exist as specified.
25709    # Try adding .exe or .cmd
25710    if test -f "${new_path}.exe"; then
25711       input_to_shortpath="${new_path}.exe"
25712    elif test -f "${new_path}.cmd"; then
25713       input_to_shortpath="${new_path}.cmd"
25714    else
25715      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25716$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25717      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25718$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25719      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25720    fi
25721  else
25722    input_to_shortpath="$new_path"
25723  fi
25724
25725  # Call helper function which possibly converts this using DOS-style short mode.
25726  # If so, the updated path is stored in $new_path.
25727  new_path="$input_to_shortpath"
25728
25729  input_path="$input_to_shortpath"
25730  # Check if we need to convert this using DOS-style short mode. If the path
25731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25732  # take no chances and rewrite it.
25733  # Note: m4 eats our [], so we need to use [ and ] instead.
25734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25735  if test "x$has_forbidden_chars" != x; then
25736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25737    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25738    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25739    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25740      # Going to short mode and back again did indeed matter. Since short mode is
25741      # case insensitive, let's make it lowercase to improve readability.
25742      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25743      # Now convert it back to Unix-stile (cygpath)
25744      input_path=`$CYGPATH -u "$shortmode_path"`
25745      new_path="$input_path"
25746    fi
25747  fi
25748
25749  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25750  if test "x$test_cygdrive_prefix" = x; then
25751    # As a simple fix, exclude /usr/bin since it's not a real path.
25752    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25753      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25754      # a path prefixed by /cygdrive for fixpath to work.
25755      new_path="$CYGWIN_ROOT_PATH$input_path"
25756    fi
25757  fi
25758
25759  # remove trailing .exe if any
25760  new_path="${new_path/%.exe/}"
25761
25762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25763
25764  # First separate the path from the arguments. This will split at the first
25765  # space.
25766  complete="$NM"
25767  path="${complete%% *}"
25768  tmp="$complete EOL"
25769  arguments="${tmp#* }"
25770
25771  # Input might be given as Windows format, start by converting to
25772  # unix format.
25773  new_path="$path"
25774
25775  windows_path="$new_path"
25776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25777    unix_path=`$CYGPATH -u "$windows_path"`
25778    new_path="$unix_path"
25779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25781    new_path="$unix_path"
25782  fi
25783
25784
25785  # Now try to locate executable using which
25786  new_path=`$WHICH "$new_path" 2> /dev/null`
25787
25788  if test "x$new_path" = x; then
25789    # Oops. Which didn't find the executable.
25790    # The splitting of arguments from the executable at a space might have been incorrect,
25791    # since paths with space are more likely in Windows. Give it another try with the whole
25792    # argument.
25793    path="$complete"
25794    arguments="EOL"
25795    new_path="$path"
25796
25797  windows_path="$new_path"
25798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25799    unix_path=`$CYGPATH -u "$windows_path"`
25800    new_path="$unix_path"
25801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25803    new_path="$unix_path"
25804  fi
25805
25806
25807    new_path=`$WHICH "$new_path" 2> /dev/null`
25808
25809    if test "x$new_path" = x; then
25810      # It's still not found. Now this is an unrecoverable error.
25811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25812$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25813      has_space=`$ECHO "$complete" | $GREP " "`
25814      if test "x$has_space" != x; then
25815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25817      fi
25818      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25819    fi
25820  fi
25821
25822  # Now new_path has a complete unix path to the binary
25823  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25824    # Keep paths in /bin as-is, but remove trailing .exe if any
25825    new_path="${new_path/%.exe/}"
25826    # Do not save /bin paths to all_fixpath_prefixes!
25827  else
25828    # Not in mixed or Windows style, start by that.
25829    new_path=`cmd //c echo $new_path`
25830
25831  input_path="$new_path"
25832  # Check if we need to convert this using DOS-style short mode. If the path
25833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25834  # take no chances and rewrite it.
25835  # Note: m4 eats our [], so we need to use [ and ] instead.
25836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25837  if test "x$has_forbidden_chars" != x; then
25838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25839    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25840  fi
25841
25842    # Output is in $new_path
25843
25844  windows_path="$new_path"
25845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25846    unix_path=`$CYGPATH -u "$windows_path"`
25847    new_path="$unix_path"
25848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25850    new_path="$unix_path"
25851  fi
25852
25853    # remove trailing .exe if any
25854    new_path="${new_path/%.exe/}"
25855
25856    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25857    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25858  fi
25859
25860  else
25861    # We're on a posix platform. Hooray! :)
25862    # First separate the path from the arguments. This will split at the first
25863    # space.
25864    complete="$NM"
25865    path="${complete%% *}"
25866    tmp="$complete EOL"
25867    arguments="${tmp#* }"
25868
25869    # Cannot rely on the command "which" here since it doesn't always work.
25870    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25871    if test -z "$is_absolute_path"; then
25872      # Path to executable is not absolute. Find it.
25873      IFS_save="$IFS"
25874      IFS=:
25875      for p in $PATH; do
25876        if test -f "$p/$path" && test -x "$p/$path"; then
25877          new_path="$p/$path"
25878          break
25879        fi
25880      done
25881      IFS="$IFS_save"
25882    else
25883      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25884$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25885      new_path="$path"
25886    fi
25887
25888    if test "x$new_path" = x; then
25889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25890$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25891        has_space=`$ECHO "$complete" | $GREP " "`
25892        if test "x$has_space" != x; then
25893          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25894$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25895        fi
25896        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25897      fi
25898  fi
25899
25900      # Now join together the path and the arguments once again
25901      if test "x$arguments" != xEOL; then
25902        new_complete="$new_path ${arguments% *}"
25903      else
25904        new_complete="$new_path"
25905      fi
25906
25907  if test "x$complete" != "x$new_complete"; then
25908      NM="$new_complete"
25909      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25910$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25911    fi
25912
25913    if test -n "$ac_tool_prefix"; then
25914  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25915set dummy ${ac_tool_prefix}strip; ac_word=$2
25916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25917$as_echo_n "checking for $ac_word... " >&6; }
25918if test "${ac_cv_prog_STRIP+set}" = set; then :
25919  $as_echo_n "(cached) " >&6
25920else
25921  if test -n "$STRIP"; then
25922  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25923else
25924as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25925for as_dir in $PATH
25926do
25927  IFS=$as_save_IFS
25928  test -z "$as_dir" && as_dir=.
25929    for ac_exec_ext in '' $ac_executable_extensions; do
25930  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25931    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25933    break 2
25934  fi
25935done
25936  done
25937IFS=$as_save_IFS
25938
25939fi
25940fi
25941STRIP=$ac_cv_prog_STRIP
25942if test -n "$STRIP"; then
25943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25944$as_echo "$STRIP" >&6; }
25945else
25946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25947$as_echo "no" >&6; }
25948fi
25949
25950
25951fi
25952if test -z "$ac_cv_prog_STRIP"; then
25953  ac_ct_STRIP=$STRIP
25954  # Extract the first word of "strip", so it can be a program name with args.
25955set dummy strip; ac_word=$2
25956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25957$as_echo_n "checking for $ac_word... " >&6; }
25958if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25959  $as_echo_n "(cached) " >&6
25960else
25961  if test -n "$ac_ct_STRIP"; then
25962  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25963else
25964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25965for as_dir in $PATH
25966do
25967  IFS=$as_save_IFS
25968  test -z "$as_dir" && as_dir=.
25969    for ac_exec_ext in '' $ac_executable_extensions; do
25970  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25971    ac_cv_prog_ac_ct_STRIP="strip"
25972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25973    break 2
25974  fi
25975done
25976  done
25977IFS=$as_save_IFS
25978
25979fi
25980fi
25981ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25982if test -n "$ac_ct_STRIP"; then
25983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25984$as_echo "$ac_ct_STRIP" >&6; }
25985else
25986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25987$as_echo "no" >&6; }
25988fi
25989
25990  if test "x$ac_ct_STRIP" = x; then
25991    STRIP=""
25992  else
25993    case $cross_compiling:$ac_tool_warned in
25994yes:)
25995{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25996$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25997ac_tool_warned=yes ;;
25998esac
25999    STRIP=$ac_ct_STRIP
26000  fi
26001else
26002  STRIP="$ac_cv_prog_STRIP"
26003fi
26004
26005
26006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26007
26008  # First separate the path from the arguments. This will split at the first
26009  # space.
26010  complete="$STRIP"
26011  path="${complete%% *}"
26012  tmp="$complete EOL"
26013  arguments="${tmp#* }"
26014
26015  # Input might be given as Windows format, start by converting to
26016  # unix format.
26017  new_path=`$CYGPATH -u "$path"`
26018
26019  # Now try to locate executable using which
26020  new_path=`$WHICH "$new_path" 2> /dev/null`
26021  # bat and cmd files are not always considered executable in cygwin causing which
26022  # to not find them
26023  if test "x$new_path" = x \
26024           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26025           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26026    new_path=`$CYGPATH -u "$path"`
26027  fi
26028  if test "x$new_path" = x; then
26029    # Oops. Which didn't find the executable.
26030    # The splitting of arguments from the executable at a space might have been incorrect,
26031    # since paths with space are more likely in Windows. Give it another try with the whole
26032    # argument.
26033    path="$complete"
26034    arguments="EOL"
26035    new_path=`$CYGPATH -u "$path"`
26036    new_path=`$WHICH "$new_path" 2> /dev/null`
26037    # bat and cmd files are not always considered executable in cygwin causing which
26038    # to not find them
26039    if test "x$new_path" = x \
26040             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26041             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26042      new_path=`$CYGPATH -u "$path"`
26043    fi
26044    if test "x$new_path" = x; then
26045      # It's still not found. Now this is an unrecoverable error.
26046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26047$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26048      has_space=`$ECHO "$complete" | $GREP " "`
26049      if test "x$has_space" != x; then
26050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26052      fi
26053      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26054    fi
26055  fi
26056
26057  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26058  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26059  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26060  # "foo.exe" is OK but "foo" is an error.
26061  #
26062  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26063  # It is also a way to make sure we got the proper file name for the real test later on.
26064  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26065  if test "x$test_shortpath" = x; then
26066    # Short path failed, file does not exist as specified.
26067    # Try adding .exe or .cmd
26068    if test -f "${new_path}.exe"; then
26069       input_to_shortpath="${new_path}.exe"
26070    elif test -f "${new_path}.cmd"; then
26071       input_to_shortpath="${new_path}.cmd"
26072    else
26073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26074$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26075      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26076$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26077      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26078    fi
26079  else
26080    input_to_shortpath="$new_path"
26081  fi
26082
26083  # Call helper function which possibly converts this using DOS-style short mode.
26084  # If so, the updated path is stored in $new_path.
26085  new_path="$input_to_shortpath"
26086
26087  input_path="$input_to_shortpath"
26088  # Check if we need to convert this using DOS-style short mode. If the path
26089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26090  # take no chances and rewrite it.
26091  # Note: m4 eats our [], so we need to use [ and ] instead.
26092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26093  if test "x$has_forbidden_chars" != x; then
26094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26098      # Going to short mode and back again did indeed matter. Since short mode is
26099      # case insensitive, let's make it lowercase to improve readability.
26100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26101      # Now convert it back to Unix-stile (cygpath)
26102      input_path=`$CYGPATH -u "$shortmode_path"`
26103      new_path="$input_path"
26104    fi
26105  fi
26106
26107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26108  if test "x$test_cygdrive_prefix" = x; then
26109    # As a simple fix, exclude /usr/bin since it's not a real path.
26110    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26112      # a path prefixed by /cygdrive for fixpath to work.
26113      new_path="$CYGWIN_ROOT_PATH$input_path"
26114    fi
26115  fi
26116
26117  # remove trailing .exe if any
26118  new_path="${new_path/%.exe/}"
26119
26120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26121
26122  # First separate the path from the arguments. This will split at the first
26123  # space.
26124  complete="$STRIP"
26125  path="${complete%% *}"
26126  tmp="$complete EOL"
26127  arguments="${tmp#* }"
26128
26129  # Input might be given as Windows format, start by converting to
26130  # unix format.
26131  new_path="$path"
26132
26133  windows_path="$new_path"
26134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26135    unix_path=`$CYGPATH -u "$windows_path"`
26136    new_path="$unix_path"
26137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26139    new_path="$unix_path"
26140  fi
26141
26142
26143  # Now try to locate executable using which
26144  new_path=`$WHICH "$new_path" 2> /dev/null`
26145
26146  if test "x$new_path" = x; then
26147    # Oops. Which didn't find the executable.
26148    # The splitting of arguments from the executable at a space might have been incorrect,
26149    # since paths with space are more likely in Windows. Give it another try with the whole
26150    # argument.
26151    path="$complete"
26152    arguments="EOL"
26153    new_path="$path"
26154
26155  windows_path="$new_path"
26156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26157    unix_path=`$CYGPATH -u "$windows_path"`
26158    new_path="$unix_path"
26159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26160    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26161    new_path="$unix_path"
26162  fi
26163
26164
26165    new_path=`$WHICH "$new_path" 2> /dev/null`
26166
26167    if test "x$new_path" = x; then
26168      # It's still not found. Now this is an unrecoverable error.
26169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26170$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26171      has_space=`$ECHO "$complete" | $GREP " "`
26172      if test "x$has_space" != x; then
26173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26175      fi
26176      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26177    fi
26178  fi
26179
26180  # Now new_path has a complete unix path to the binary
26181  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26182    # Keep paths in /bin as-is, but remove trailing .exe if any
26183    new_path="${new_path/%.exe/}"
26184    # Do not save /bin paths to all_fixpath_prefixes!
26185  else
26186    # Not in mixed or Windows style, start by that.
26187    new_path=`cmd //c echo $new_path`
26188
26189  input_path="$new_path"
26190  # Check if we need to convert this using DOS-style short mode. If the path
26191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26192  # take no chances and rewrite it.
26193  # Note: m4 eats our [], so we need to use [ and ] instead.
26194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26195  if test "x$has_forbidden_chars" != x; then
26196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26198  fi
26199
26200    # Output is in $new_path
26201
26202  windows_path="$new_path"
26203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26204    unix_path=`$CYGPATH -u "$windows_path"`
26205    new_path="$unix_path"
26206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26208    new_path="$unix_path"
26209  fi
26210
26211    # remove trailing .exe if any
26212    new_path="${new_path/%.exe/}"
26213
26214    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26215    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26216  fi
26217
26218  else
26219    # We're on a posix platform. Hooray! :)
26220    # First separate the path from the arguments. This will split at the first
26221    # space.
26222    complete="$STRIP"
26223    path="${complete%% *}"
26224    tmp="$complete EOL"
26225    arguments="${tmp#* }"
26226
26227    # Cannot rely on the command "which" here since it doesn't always work.
26228    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26229    if test -z "$is_absolute_path"; then
26230      # Path to executable is not absolute. Find it.
26231      IFS_save="$IFS"
26232      IFS=:
26233      for p in $PATH; do
26234        if test -f "$p/$path" && test -x "$p/$path"; then
26235          new_path="$p/$path"
26236          break
26237        fi
26238      done
26239      IFS="$IFS_save"
26240    else
26241      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26242$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26243      new_path="$path"
26244    fi
26245
26246    if test "x$new_path" = x; then
26247        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26248$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26249        has_space=`$ECHO "$complete" | $GREP " "`
26250        if test "x$has_space" != x; then
26251          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26252$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26253        fi
26254        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26255      fi
26256  fi
26257
26258      # Now join together the path and the arguments once again
26259      if test "x$arguments" != xEOL; then
26260        new_complete="$new_path ${arguments% *}"
26261      else
26262        new_complete="$new_path"
26263      fi
26264
26265  if test "x$complete" != "x$new_complete"; then
26266      STRIP="$new_complete"
26267      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26268$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26269    fi
26270
26271fi
26272
26273# objcopy is used for moving debug symbols to separate files when
26274# full debug symbols are enabled.
26275if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26276    if test -n "$ac_tool_prefix"; then
26277  for ac_prog in gobjcopy objcopy
26278  do
26279    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26280set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26282$as_echo_n "checking for $ac_word... " >&6; }
26283if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26284  $as_echo_n "(cached) " >&6
26285else
26286  if test -n "$OBJCOPY"; then
26287  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26288else
26289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26290for as_dir in $PATH
26291do
26292  IFS=$as_save_IFS
26293  test -z "$as_dir" && as_dir=.
26294    for ac_exec_ext in '' $ac_executable_extensions; do
26295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26296    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26298    break 2
26299  fi
26300done
26301  done
26302IFS=$as_save_IFS
26303
26304fi
26305fi
26306OBJCOPY=$ac_cv_prog_OBJCOPY
26307if test -n "$OBJCOPY"; then
26308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26309$as_echo "$OBJCOPY" >&6; }
26310else
26311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26312$as_echo "no" >&6; }
26313fi
26314
26315
26316    test -n "$OBJCOPY" && break
26317  done
26318fi
26319if test -z "$OBJCOPY"; then
26320  ac_ct_OBJCOPY=$OBJCOPY
26321  for ac_prog in gobjcopy objcopy
26322do
26323  # Extract the first word of "$ac_prog", so it can be a program name with args.
26324set dummy $ac_prog; ac_word=$2
26325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26326$as_echo_n "checking for $ac_word... " >&6; }
26327if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26328  $as_echo_n "(cached) " >&6
26329else
26330  if test -n "$ac_ct_OBJCOPY"; then
26331  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26332else
26333as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26334for as_dir in $PATH
26335do
26336  IFS=$as_save_IFS
26337  test -z "$as_dir" && as_dir=.
26338    for ac_exec_ext in '' $ac_executable_extensions; do
26339  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26340    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26342    break 2
26343  fi
26344done
26345  done
26346IFS=$as_save_IFS
26347
26348fi
26349fi
26350ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26351if test -n "$ac_ct_OBJCOPY"; then
26352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26353$as_echo "$ac_ct_OBJCOPY" >&6; }
26354else
26355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26356$as_echo "no" >&6; }
26357fi
26358
26359
26360  test -n "$ac_ct_OBJCOPY" && break
26361done
26362
26363  if test "x$ac_ct_OBJCOPY" = x; then
26364    OBJCOPY=""
26365  else
26366    case $cross_compiling:$ac_tool_warned in
26367yes:)
26368{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26369$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26370ac_tool_warned=yes ;;
26371esac
26372    OBJCOPY=$ac_ct_OBJCOPY
26373  fi
26374fi
26375
26376    # Only call fixup if objcopy was found.
26377    if test -n "$OBJCOPY"; then
26378
26379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26380
26381  # First separate the path from the arguments. This will split at the first
26382  # space.
26383  complete="$OBJCOPY"
26384  path="${complete%% *}"
26385  tmp="$complete EOL"
26386  arguments="${tmp#* }"
26387
26388  # Input might be given as Windows format, start by converting to
26389  # unix format.
26390  new_path=`$CYGPATH -u "$path"`
26391
26392  # Now try to locate executable using which
26393  new_path=`$WHICH "$new_path" 2> /dev/null`
26394  # bat and cmd files are not always considered executable in cygwin causing which
26395  # to not find them
26396  if test "x$new_path" = x \
26397           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26398           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26399    new_path=`$CYGPATH -u "$path"`
26400  fi
26401  if test "x$new_path" = x; then
26402    # Oops. Which didn't find the executable.
26403    # The splitting of arguments from the executable at a space might have been incorrect,
26404    # since paths with space are more likely in Windows. Give it another try with the whole
26405    # argument.
26406    path="$complete"
26407    arguments="EOL"
26408    new_path=`$CYGPATH -u "$path"`
26409    new_path=`$WHICH "$new_path" 2> /dev/null`
26410    # bat and cmd files are not always considered executable in cygwin causing which
26411    # to not find them
26412    if test "x$new_path" = x \
26413             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26414             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26415      new_path=`$CYGPATH -u "$path"`
26416    fi
26417    if test "x$new_path" = x; then
26418      # It's still not found. Now this is an unrecoverable error.
26419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26420$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26421      has_space=`$ECHO "$complete" | $GREP " "`
26422      if test "x$has_space" != x; then
26423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26425      fi
26426      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26427    fi
26428  fi
26429
26430  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26431  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26432  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26433  # "foo.exe" is OK but "foo" is an error.
26434  #
26435  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26436  # It is also a way to make sure we got the proper file name for the real test later on.
26437  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26438  if test "x$test_shortpath" = x; then
26439    # Short path failed, file does not exist as specified.
26440    # Try adding .exe or .cmd
26441    if test -f "${new_path}.exe"; then
26442       input_to_shortpath="${new_path}.exe"
26443    elif test -f "${new_path}.cmd"; then
26444       input_to_shortpath="${new_path}.cmd"
26445    else
26446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26447$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26448      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26449$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26450      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26451    fi
26452  else
26453    input_to_shortpath="$new_path"
26454  fi
26455
26456  # Call helper function which possibly converts this using DOS-style short mode.
26457  # If so, the updated path is stored in $new_path.
26458  new_path="$input_to_shortpath"
26459
26460  input_path="$input_to_shortpath"
26461  # Check if we need to convert this using DOS-style short mode. If the path
26462  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26463  # take no chances and rewrite it.
26464  # Note: m4 eats our [], so we need to use [ and ] instead.
26465  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26466  if test "x$has_forbidden_chars" != x; then
26467    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26468    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26469    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26470    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26471      # Going to short mode and back again did indeed matter. Since short mode is
26472      # case insensitive, let's make it lowercase to improve readability.
26473      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26474      # Now convert it back to Unix-stile (cygpath)
26475      input_path=`$CYGPATH -u "$shortmode_path"`
26476      new_path="$input_path"
26477    fi
26478  fi
26479
26480  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26481  if test "x$test_cygdrive_prefix" = x; then
26482    # As a simple fix, exclude /usr/bin since it's not a real path.
26483    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26484      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26485      # a path prefixed by /cygdrive for fixpath to work.
26486      new_path="$CYGWIN_ROOT_PATH$input_path"
26487    fi
26488  fi
26489
26490  # remove trailing .exe if any
26491  new_path="${new_path/%.exe/}"
26492
26493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26494
26495  # First separate the path from the arguments. This will split at the first
26496  # space.
26497  complete="$OBJCOPY"
26498  path="${complete%% *}"
26499  tmp="$complete EOL"
26500  arguments="${tmp#* }"
26501
26502  # Input might be given as Windows format, start by converting to
26503  # unix format.
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  # Now try to locate executable using which
26517  new_path=`$WHICH "$new_path" 2> /dev/null`
26518
26519  if test "x$new_path" = x; then
26520    # Oops. Which didn't find the executable.
26521    # The splitting of arguments from the executable at a space might have been incorrect,
26522    # since paths with space are more likely in Windows. Give it another try with the whole
26523    # argument.
26524    path="$complete"
26525    arguments="EOL"
26526    new_path="$path"
26527
26528  windows_path="$new_path"
26529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26530    unix_path=`$CYGPATH -u "$windows_path"`
26531    new_path="$unix_path"
26532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26534    new_path="$unix_path"
26535  fi
26536
26537
26538    new_path=`$WHICH "$new_path" 2> /dev/null`
26539
26540    if test "x$new_path" = x; then
26541      # It's still not found. Now this is an unrecoverable error.
26542      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26543$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26544      has_space=`$ECHO "$complete" | $GREP " "`
26545      if test "x$has_space" != x; then
26546        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26547$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26548      fi
26549      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26550    fi
26551  fi
26552
26553  # Now new_path has a complete unix path to the binary
26554  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26555    # Keep paths in /bin as-is, but remove trailing .exe if any
26556    new_path="${new_path/%.exe/}"
26557    # Do not save /bin paths to all_fixpath_prefixes!
26558  else
26559    # Not in mixed or Windows style, start by that.
26560    new_path=`cmd //c echo $new_path`
26561
26562  input_path="$new_path"
26563  # Check if we need to convert this using DOS-style short mode. If the path
26564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26565  # take no chances and rewrite it.
26566  # Note: m4 eats our [], so we need to use [ and ] instead.
26567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26568  if test "x$has_forbidden_chars" != x; then
26569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26571  fi
26572
26573    # Output is in $new_path
26574
26575  windows_path="$new_path"
26576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26577    unix_path=`$CYGPATH -u "$windows_path"`
26578    new_path="$unix_path"
26579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26581    new_path="$unix_path"
26582  fi
26583
26584    # remove trailing .exe if any
26585    new_path="${new_path/%.exe/}"
26586
26587    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26588    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26589  fi
26590
26591  else
26592    # We're on a posix platform. Hooray! :)
26593    # First separate the path from the arguments. This will split at the first
26594    # space.
26595    complete="$OBJCOPY"
26596    path="${complete%% *}"
26597    tmp="$complete EOL"
26598    arguments="${tmp#* }"
26599
26600    # Cannot rely on the command "which" here since it doesn't always work.
26601    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26602    if test -z "$is_absolute_path"; then
26603      # Path to executable is not absolute. Find it.
26604      IFS_save="$IFS"
26605      IFS=:
26606      for p in $PATH; do
26607        if test -f "$p/$path" && test -x "$p/$path"; then
26608          new_path="$p/$path"
26609          break
26610        fi
26611      done
26612      IFS="$IFS_save"
26613    else
26614      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26615$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26616      new_path="$path"
26617    fi
26618
26619    if test "x$new_path" = x; then
26620        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26621$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26622        has_space=`$ECHO "$complete" | $GREP " "`
26623        if test "x$has_space" != x; then
26624          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26625$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26626        fi
26627        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26628      fi
26629  fi
26630
26631      # Now join together the path and the arguments once again
26632      if test "x$arguments" != xEOL; then
26633        new_complete="$new_path ${arguments% *}"
26634      else
26635        new_complete="$new_path"
26636      fi
26637
26638  if test "x$complete" != "x$new_complete"; then
26639      OBJCOPY="$new_complete"
26640      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26641$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26642    fi
26643
26644    fi
26645fi
26646
26647if test -n "$ac_tool_prefix"; then
26648  for ac_prog in gobjdump objdump
26649  do
26650    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26651set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26653$as_echo_n "checking for $ac_word... " >&6; }
26654if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26655  $as_echo_n "(cached) " >&6
26656else
26657  if test -n "$OBJDUMP"; then
26658  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26659else
26660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26661for as_dir in $PATH
26662do
26663  IFS=$as_save_IFS
26664  test -z "$as_dir" && as_dir=.
26665    for ac_exec_ext in '' $ac_executable_extensions; do
26666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26667    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26669    break 2
26670  fi
26671done
26672  done
26673IFS=$as_save_IFS
26674
26675fi
26676fi
26677OBJDUMP=$ac_cv_prog_OBJDUMP
26678if test -n "$OBJDUMP"; then
26679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26680$as_echo "$OBJDUMP" >&6; }
26681else
26682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26683$as_echo "no" >&6; }
26684fi
26685
26686
26687    test -n "$OBJDUMP" && break
26688  done
26689fi
26690if test -z "$OBJDUMP"; then
26691  ac_ct_OBJDUMP=$OBJDUMP
26692  for ac_prog in gobjdump objdump
26693do
26694  # Extract the first word of "$ac_prog", so it can be a program name with args.
26695set dummy $ac_prog; ac_word=$2
26696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26697$as_echo_n "checking for $ac_word... " >&6; }
26698if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26699  $as_echo_n "(cached) " >&6
26700else
26701  if test -n "$ac_ct_OBJDUMP"; then
26702  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26703else
26704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26705for as_dir in $PATH
26706do
26707  IFS=$as_save_IFS
26708  test -z "$as_dir" && as_dir=.
26709    for ac_exec_ext in '' $ac_executable_extensions; do
26710  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26711    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26713    break 2
26714  fi
26715done
26716  done
26717IFS=$as_save_IFS
26718
26719fi
26720fi
26721ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26722if test -n "$ac_ct_OBJDUMP"; then
26723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26724$as_echo "$ac_ct_OBJDUMP" >&6; }
26725else
26726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26727$as_echo "no" >&6; }
26728fi
26729
26730
26731  test -n "$ac_ct_OBJDUMP" && break
26732done
26733
26734  if test "x$ac_ct_OBJDUMP" = x; then
26735    OBJDUMP=""
26736  else
26737    case $cross_compiling:$ac_tool_warned in
26738yes:)
26739{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26740$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26741ac_tool_warned=yes ;;
26742esac
26743    OBJDUMP=$ac_ct_OBJDUMP
26744  fi
26745fi
26746
26747if test "x$OBJDUMP" != x; then
26748  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26749
26750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26751
26752  # First separate the path from the arguments. This will split at the first
26753  # space.
26754  complete="$OBJDUMP"
26755  path="${complete%% *}"
26756  tmp="$complete EOL"
26757  arguments="${tmp#* }"
26758
26759  # Input might be given as Windows format, start by converting to
26760  # unix format.
26761  new_path=`$CYGPATH -u "$path"`
26762
26763  # Now try to locate executable using which
26764  new_path=`$WHICH "$new_path" 2> /dev/null`
26765  # bat and cmd files are not always considered executable in cygwin causing which
26766  # to not find them
26767  if test "x$new_path" = x \
26768           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26769           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26770    new_path=`$CYGPATH -u "$path"`
26771  fi
26772  if test "x$new_path" = x; then
26773    # Oops. Which didn't find the executable.
26774    # The splitting of arguments from the executable at a space might have been incorrect,
26775    # since paths with space are more likely in Windows. Give it another try with the whole
26776    # argument.
26777    path="$complete"
26778    arguments="EOL"
26779    new_path=`$CYGPATH -u "$path"`
26780    new_path=`$WHICH "$new_path" 2> /dev/null`
26781    # bat and cmd files are not always considered executable in cygwin causing which
26782    # to not find them
26783    if test "x$new_path" = x \
26784             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26785             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26786      new_path=`$CYGPATH -u "$path"`
26787    fi
26788    if test "x$new_path" = x; then
26789      # It's still not found. Now this is an unrecoverable error.
26790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26791$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26792      has_space=`$ECHO "$complete" | $GREP " "`
26793      if test "x$has_space" != x; then
26794        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26795$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26796      fi
26797      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26798    fi
26799  fi
26800
26801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26804  # "foo.exe" is OK but "foo" is an error.
26805  #
26806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26807  # It is also a way to make sure we got the proper file name for the real test later on.
26808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26809  if test "x$test_shortpath" = x; then
26810    # Short path failed, file does not exist as specified.
26811    # Try adding .exe or .cmd
26812    if test -f "${new_path}.exe"; then
26813       input_to_shortpath="${new_path}.exe"
26814    elif test -f "${new_path}.cmd"; then
26815       input_to_shortpath="${new_path}.cmd"
26816    else
26817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26818$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26819      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26820$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26821      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26822    fi
26823  else
26824    input_to_shortpath="$new_path"
26825  fi
26826
26827  # Call helper function which possibly converts this using DOS-style short mode.
26828  # If so, the updated path is stored in $new_path.
26829  new_path="$input_to_shortpath"
26830
26831  input_path="$input_to_shortpath"
26832  # Check if we need to convert this using DOS-style short mode. If the path
26833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26834  # take no chances and rewrite it.
26835  # Note: m4 eats our [], so we need to use [ and ] instead.
26836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26837  if test "x$has_forbidden_chars" != x; then
26838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26842      # Going to short mode and back again did indeed matter. Since short mode is
26843      # case insensitive, let's make it lowercase to improve readability.
26844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26845      # Now convert it back to Unix-stile (cygpath)
26846      input_path=`$CYGPATH -u "$shortmode_path"`
26847      new_path="$input_path"
26848    fi
26849  fi
26850
26851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26852  if test "x$test_cygdrive_prefix" = x; then
26853    # As a simple fix, exclude /usr/bin since it's not a real path.
26854    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26856      # a path prefixed by /cygdrive for fixpath to work.
26857      new_path="$CYGWIN_ROOT_PATH$input_path"
26858    fi
26859  fi
26860
26861  # remove trailing .exe if any
26862  new_path="${new_path/%.exe/}"
26863
26864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26865
26866  # First separate the path from the arguments. This will split at the first
26867  # space.
26868  complete="$OBJDUMP"
26869  path="${complete%% *}"
26870  tmp="$complete EOL"
26871  arguments="${tmp#* }"
26872
26873  # Input might be given as Windows format, start by converting to
26874  # unix format.
26875  new_path="$path"
26876
26877  windows_path="$new_path"
26878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26879    unix_path=`$CYGPATH -u "$windows_path"`
26880    new_path="$unix_path"
26881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26883    new_path="$unix_path"
26884  fi
26885
26886
26887  # Now try to locate executable using which
26888  new_path=`$WHICH "$new_path" 2> /dev/null`
26889
26890  if test "x$new_path" = x; then
26891    # Oops. Which didn't find the executable.
26892    # The splitting of arguments from the executable at a space might have been incorrect,
26893    # since paths with space are more likely in Windows. Give it another try with the whole
26894    # argument.
26895    path="$complete"
26896    arguments="EOL"
26897    new_path="$path"
26898
26899  windows_path="$new_path"
26900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26901    unix_path=`$CYGPATH -u "$windows_path"`
26902    new_path="$unix_path"
26903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26905    new_path="$unix_path"
26906  fi
26907
26908
26909    new_path=`$WHICH "$new_path" 2> /dev/null`
26910
26911    if test "x$new_path" = x; then
26912      # It's still not found. Now this is an unrecoverable error.
26913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26914$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26915      has_space=`$ECHO "$complete" | $GREP " "`
26916      if test "x$has_space" != x; then
26917        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26918$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26919      fi
26920      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26921    fi
26922  fi
26923
26924  # Now new_path has a complete unix path to the binary
26925  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26926    # Keep paths in /bin as-is, but remove trailing .exe if any
26927    new_path="${new_path/%.exe/}"
26928    # Do not save /bin paths to all_fixpath_prefixes!
26929  else
26930    # Not in mixed or Windows style, start by that.
26931    new_path=`cmd //c echo $new_path`
26932
26933  input_path="$new_path"
26934  # Check if we need to convert this using DOS-style short mode. If the path
26935  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26936  # take no chances and rewrite it.
26937  # Note: m4 eats our [], so we need to use [ and ] instead.
26938  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26939  if test "x$has_forbidden_chars" != x; then
26940    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26941    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26942  fi
26943
26944    # Output is in $new_path
26945
26946  windows_path="$new_path"
26947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26948    unix_path=`$CYGPATH -u "$windows_path"`
26949    new_path="$unix_path"
26950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26952    new_path="$unix_path"
26953  fi
26954
26955    # remove trailing .exe if any
26956    new_path="${new_path/%.exe/}"
26957
26958    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26959    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26960  fi
26961
26962  else
26963    # We're on a posix platform. Hooray! :)
26964    # First separate the path from the arguments. This will split at the first
26965    # space.
26966    complete="$OBJDUMP"
26967    path="${complete%% *}"
26968    tmp="$complete EOL"
26969    arguments="${tmp#* }"
26970
26971    # Cannot rely on the command "which" here since it doesn't always work.
26972    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26973    if test -z "$is_absolute_path"; then
26974      # Path to executable is not absolute. Find it.
26975      IFS_save="$IFS"
26976      IFS=:
26977      for p in $PATH; do
26978        if test -f "$p/$path" && test -x "$p/$path"; then
26979          new_path="$p/$path"
26980          break
26981        fi
26982      done
26983      IFS="$IFS_save"
26984    else
26985      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26986$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26987      new_path="$path"
26988    fi
26989
26990    if test "x$new_path" = x; then
26991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26992$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26993        has_space=`$ECHO "$complete" | $GREP " "`
26994        if test "x$has_space" != x; then
26995          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26996$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26997        fi
26998        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26999      fi
27000  fi
27001
27002      # Now join together the path and the arguments once again
27003      if test "x$arguments" != xEOL; then
27004        new_complete="$new_path ${arguments% *}"
27005      else
27006        new_complete="$new_path"
27007      fi
27008
27009  if test "x$complete" != "x$new_complete"; then
27010      OBJDUMP="$new_complete"
27011      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27012$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27013    fi
27014
27015fi
27016
27017if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27018   # Extract the first word of "lipo", so it can be a program name with args.
27019set dummy lipo; ac_word=$2
27020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27021$as_echo_n "checking for $ac_word... " >&6; }
27022if test "${ac_cv_path_LIPO+set}" = set; then :
27023  $as_echo_n "(cached) " >&6
27024else
27025  case $LIPO in
27026  [\\/]* | ?:[\\/]*)
27027  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27028  ;;
27029  *)
27030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27031for as_dir in $PATH
27032do
27033  IFS=$as_save_IFS
27034  test -z "$as_dir" && as_dir=.
27035    for ac_exec_ext in '' $ac_executable_extensions; do
27036  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27037    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27039    break 2
27040  fi
27041done
27042  done
27043IFS=$as_save_IFS
27044
27045  ;;
27046esac
27047fi
27048LIPO=$ac_cv_path_LIPO
27049if test -n "$LIPO"; then
27050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27051$as_echo "$LIPO" >&6; }
27052else
27053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27054$as_echo "no" >&6; }
27055fi
27056
27057
27058
27059  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27060
27061  # First separate the path from the arguments. This will split at the first
27062  # space.
27063  complete="$LIPO"
27064  path="${complete%% *}"
27065  tmp="$complete EOL"
27066  arguments="${tmp#* }"
27067
27068  # Input might be given as Windows format, start by converting to
27069  # unix format.
27070  new_path=`$CYGPATH -u "$path"`
27071
27072  # Now try to locate executable using which
27073  new_path=`$WHICH "$new_path" 2> /dev/null`
27074  # bat and cmd files are not always considered executable in cygwin causing which
27075  # to not find them
27076  if test "x$new_path" = x \
27077           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27078           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27079    new_path=`$CYGPATH -u "$path"`
27080  fi
27081  if test "x$new_path" = x; then
27082    # Oops. Which didn't find the executable.
27083    # The splitting of arguments from the executable at a space might have been incorrect,
27084    # since paths with space are more likely in Windows. Give it another try with the whole
27085    # argument.
27086    path="$complete"
27087    arguments="EOL"
27088    new_path=`$CYGPATH -u "$path"`
27089    new_path=`$WHICH "$new_path" 2> /dev/null`
27090    # bat and cmd files are not always considered executable in cygwin causing which
27091    # to not find them
27092    if test "x$new_path" = x \
27093             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27094             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27095      new_path=`$CYGPATH -u "$path"`
27096    fi
27097    if test "x$new_path" = x; then
27098      # It's still not found. Now this is an unrecoverable error.
27099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27100$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27101      has_space=`$ECHO "$complete" | $GREP " "`
27102      if test "x$has_space" != x; then
27103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27105      fi
27106      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27107    fi
27108  fi
27109
27110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27113  # "foo.exe" is OK but "foo" is an error.
27114  #
27115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27116  # It is also a way to make sure we got the proper file name for the real test later on.
27117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27118  if test "x$test_shortpath" = x; then
27119    # Short path failed, file does not exist as specified.
27120    # Try adding .exe or .cmd
27121    if test -f "${new_path}.exe"; then
27122       input_to_shortpath="${new_path}.exe"
27123    elif test -f "${new_path}.cmd"; then
27124       input_to_shortpath="${new_path}.cmd"
27125    else
27126      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27127$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27128      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27129$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27130      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27131    fi
27132  else
27133    input_to_shortpath="$new_path"
27134  fi
27135
27136  # Call helper function which possibly converts this using DOS-style short mode.
27137  # If so, the updated path is stored in $new_path.
27138  new_path="$input_to_shortpath"
27139
27140  input_path="$input_to_shortpath"
27141  # Check if we need to convert this using DOS-style short mode. If the path
27142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27143  # take no chances and rewrite it.
27144  # Note: m4 eats our [], so we need to use [ and ] instead.
27145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27146  if test "x$has_forbidden_chars" != x; then
27147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27151      # Going to short mode and back again did indeed matter. Since short mode is
27152      # case insensitive, let's make it lowercase to improve readability.
27153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27154      # Now convert it back to Unix-stile (cygpath)
27155      input_path=`$CYGPATH -u "$shortmode_path"`
27156      new_path="$input_path"
27157    fi
27158  fi
27159
27160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27161  if test "x$test_cygdrive_prefix" = x; then
27162    # As a simple fix, exclude /usr/bin since it's not a real path.
27163    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27165      # a path prefixed by /cygdrive for fixpath to work.
27166      new_path="$CYGWIN_ROOT_PATH$input_path"
27167    fi
27168  fi
27169
27170  # remove trailing .exe if any
27171  new_path="${new_path/%.exe/}"
27172
27173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27174
27175  # First separate the path from the arguments. This will split at the first
27176  # space.
27177  complete="$LIPO"
27178  path="${complete%% *}"
27179  tmp="$complete EOL"
27180  arguments="${tmp#* }"
27181
27182  # Input might be given as Windows format, start by converting to
27183  # unix format.
27184  new_path="$path"
27185
27186  windows_path="$new_path"
27187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27188    unix_path=`$CYGPATH -u "$windows_path"`
27189    new_path="$unix_path"
27190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27192    new_path="$unix_path"
27193  fi
27194
27195
27196  # Now try to locate executable using which
27197  new_path=`$WHICH "$new_path" 2> /dev/null`
27198
27199  if test "x$new_path" = x; then
27200    # Oops. Which didn't find the executable.
27201    # The splitting of arguments from the executable at a space might have been incorrect,
27202    # since paths with space are more likely in Windows. Give it another try with the whole
27203    # argument.
27204    path="$complete"
27205    arguments="EOL"
27206    new_path="$path"
27207
27208  windows_path="$new_path"
27209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27210    unix_path=`$CYGPATH -u "$windows_path"`
27211    new_path="$unix_path"
27212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27214    new_path="$unix_path"
27215  fi
27216
27217
27218    new_path=`$WHICH "$new_path" 2> /dev/null`
27219
27220    if test "x$new_path" = x; then
27221      # It's still not found. Now this is an unrecoverable error.
27222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27223$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27224      has_space=`$ECHO "$complete" | $GREP " "`
27225      if test "x$has_space" != x; then
27226        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27227$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27228      fi
27229      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27230    fi
27231  fi
27232
27233  # Now new_path has a complete unix path to the binary
27234  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27235    # Keep paths in /bin as-is, but remove trailing .exe if any
27236    new_path="${new_path/%.exe/}"
27237    # Do not save /bin paths to all_fixpath_prefixes!
27238  else
27239    # Not in mixed or Windows style, start by that.
27240    new_path=`cmd //c echo $new_path`
27241
27242  input_path="$new_path"
27243  # Check if we need to convert this using DOS-style short mode. If the path
27244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27245  # take no chances and rewrite it.
27246  # Note: m4 eats our [], so we need to use [ and ] instead.
27247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27248  if test "x$has_forbidden_chars" != x; then
27249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27251  fi
27252
27253    # Output is in $new_path
27254
27255  windows_path="$new_path"
27256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27257    unix_path=`$CYGPATH -u "$windows_path"`
27258    new_path="$unix_path"
27259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27261    new_path="$unix_path"
27262  fi
27263
27264    # remove trailing .exe if any
27265    new_path="${new_path/%.exe/}"
27266
27267    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27268    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27269  fi
27270
27271  else
27272    # We're on a posix platform. Hooray! :)
27273    # First separate the path from the arguments. This will split at the first
27274    # space.
27275    complete="$LIPO"
27276    path="${complete%% *}"
27277    tmp="$complete EOL"
27278    arguments="${tmp#* }"
27279
27280    # Cannot rely on the command "which" here since it doesn't always work.
27281    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27282    if test -z "$is_absolute_path"; then
27283      # Path to executable is not absolute. Find it.
27284      IFS_save="$IFS"
27285      IFS=:
27286      for p in $PATH; do
27287        if test -f "$p/$path" && test -x "$p/$path"; then
27288          new_path="$p/$path"
27289          break
27290        fi
27291      done
27292      IFS="$IFS_save"
27293    else
27294      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27295$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27296      new_path="$path"
27297    fi
27298
27299    if test "x$new_path" = x; then
27300        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27301$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27302        has_space=`$ECHO "$complete" | $GREP " "`
27303        if test "x$has_space" != x; then
27304          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27305$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27306        fi
27307        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27308      fi
27309  fi
27310
27311      # Now join together the path and the arguments once again
27312      if test "x$arguments" != xEOL; then
27313        new_complete="$new_path ${arguments% *}"
27314      else
27315        new_complete="$new_path"
27316      fi
27317
27318  if test "x$complete" != "x$new_complete"; then
27319      LIPO="$new_complete"
27320      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27321$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27322    fi
27323
27324fi
27325
27326# Restore old path without tools dir
27327PATH="$OLD_PATH"
27328
27329
27330# FIXME: Currently we must test this after paths but before flags. Fix!
27331
27332# And we can test some aspects on the target using configure macros.
27333
27334
27335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27336$as_echo_n "checking for ANSI C header files... " >&6; }
27337if test "${ac_cv_header_stdc+set}" = set; then :
27338  $as_echo_n "(cached) " >&6
27339else
27340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27341/* end confdefs.h.  */
27342#include <stdlib.h>
27343#include <stdarg.h>
27344#include <string.h>
27345#include <float.h>
27346
27347int
27348main ()
27349{
27350
27351  ;
27352  return 0;
27353}
27354_ACEOF
27355if ac_fn_cxx_try_compile "$LINENO"; then :
27356  ac_cv_header_stdc=yes
27357else
27358  ac_cv_header_stdc=no
27359fi
27360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27361
27362if test $ac_cv_header_stdc = yes; then
27363  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27365/* end confdefs.h.  */
27366#include <string.h>
27367
27368_ACEOF
27369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27370  $EGREP "memchr" >/dev/null 2>&1; then :
27371
27372else
27373  ac_cv_header_stdc=no
27374fi
27375rm -f conftest*
27376
27377fi
27378
27379if test $ac_cv_header_stdc = yes; then
27380  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27382/* end confdefs.h.  */
27383#include <stdlib.h>
27384
27385_ACEOF
27386if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27387  $EGREP "free" >/dev/null 2>&1; then :
27388
27389else
27390  ac_cv_header_stdc=no
27391fi
27392rm -f conftest*
27393
27394fi
27395
27396if test $ac_cv_header_stdc = yes; then
27397  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27398  if test "$cross_compiling" = yes; then :
27399  :
27400else
27401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27402/* end confdefs.h.  */
27403#include <ctype.h>
27404#include <stdlib.h>
27405#if ((' ' & 0x0FF) == 0x020)
27406# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27407# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27408#else
27409# define ISLOWER(c) \
27410		   (('a' <= (c) && (c) <= 'i') \
27411		     || ('j' <= (c) && (c) <= 'r') \
27412		     || ('s' <= (c) && (c) <= 'z'))
27413# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27414#endif
27415
27416#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27417int
27418main ()
27419{
27420  int i;
27421  for (i = 0; i < 256; i++)
27422    if (XOR (islower (i), ISLOWER (i))
27423	|| toupper (i) != TOUPPER (i))
27424      return 2;
27425  return 0;
27426}
27427_ACEOF
27428if ac_fn_cxx_try_run "$LINENO"; then :
27429
27430else
27431  ac_cv_header_stdc=no
27432fi
27433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27434  conftest.$ac_objext conftest.beam conftest.$ac_ext
27435fi
27436
27437fi
27438fi
27439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27440$as_echo "$ac_cv_header_stdc" >&6; }
27441if test $ac_cv_header_stdc = yes; then
27442
27443$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27444
27445fi
27446
27447# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27448for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27449		  inttypes.h stdint.h unistd.h
27450do :
27451  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27452ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27453"
27454if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27455  cat >>confdefs.h <<_ACEOF
27456#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27457_ACEOF
27458
27459fi
27460
27461done
27462
27463
27464
27465###############################################################################
27466#
27467# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27468# (The JVM can use 32 or 64 bit Java pointers but that decision
27469# is made at runtime.)
27470#
27471if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27472  # Always specify -m flags on Solaris
27473
27474  # keep track of c/cxx flags that we added outselves...
27475  #   to prevent emitting warning...
27476  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27477  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27478  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27479
27480  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27481  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27482  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27483
27484  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27485  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27486  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27487
27488elif test "x$COMPILE_TYPE" = xreduced; then
27489  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27490    # Specify -m if running reduced on other Posix platforms
27491
27492  # keep track of c/cxx flags that we added outselves...
27493  #   to prevent emitting warning...
27494  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27495  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27496  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27497
27498  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27499  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27500  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27501
27502  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27503  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27504  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27505
27506  fi
27507fi
27508
27509# Make compilation sanity check
27510for ac_header in stdio.h
27511do :
27512  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27513if test "x$ac_cv_header_stdio_h" = x""yes; then :
27514  cat >>confdefs.h <<_ACEOF
27515#define HAVE_STDIO_H 1
27516_ACEOF
27517
27518else
27519
27520  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27521$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27522  if test "x$COMPILE_TYPE" = xreduced; then
27523    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27524$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27525  elif test "x$COMPILE_TYPE" = xcross; then
27526    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27527$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27528  fi
27529  as_fn_error $? "Cannot continue." "$LINENO" 5
27530
27531fi
27532
27533done
27534
27535
27536# The cast to long int works around a bug in the HP C Compiler
27537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27539# This bug is HP SR number 8606223364.
27540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27541$as_echo_n "checking size of int *... " >&6; }
27542if test "${ac_cv_sizeof_int_p+set}" = set; then :
27543  $as_echo_n "(cached) " >&6
27544else
27545  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27546
27547else
27548  if test "$ac_cv_type_int_p" = yes; then
27549     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27551as_fn_error 77 "cannot compute sizeof (int *)
27552See \`config.log' for more details" "$LINENO" 5 ; }
27553   else
27554     ac_cv_sizeof_int_p=0
27555   fi
27556fi
27557
27558fi
27559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27560$as_echo "$ac_cv_sizeof_int_p" >&6; }
27561
27562
27563
27564cat >>confdefs.h <<_ACEOF
27565#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27566_ACEOF
27567
27568
27569
27570if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27571  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27572  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27573fi
27574
27575if test "x$SIZEOF_INT_P" = x; then
27576    # The test failed, lets stick to the assumed value.
27577    { $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
27578$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27579else
27580    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27581
27582    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27583        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
27584    fi
27585fi
27586
27587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27588$as_echo_n "checking for target address size... " >&6; }
27589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27590$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27591
27592
27593###############################################################################
27594#
27595# Is the target little of big endian?
27596#
27597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27598$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27599if test "${ac_cv_c_bigendian+set}" = set; then :
27600  $as_echo_n "(cached) " >&6
27601else
27602  ac_cv_c_bigendian=unknown
27603    # See if we're dealing with a universal compiler.
27604    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27605/* end confdefs.h.  */
27606#ifndef __APPLE_CC__
27607	       not a universal capable compiler
27608	     #endif
27609	     typedef int dummy;
27610
27611_ACEOF
27612if ac_fn_cxx_try_compile "$LINENO"; then :
27613
27614	# Check for potential -arch flags.  It is not universal unless
27615	# there are at least two -arch flags with different values.
27616	ac_arch=
27617	ac_prev=
27618	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27619	 if test -n "$ac_prev"; then
27620	   case $ac_word in
27621	     i?86 | x86_64 | ppc | ppc64)
27622	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27623		 ac_arch=$ac_word
27624	       else
27625		 ac_cv_c_bigendian=universal
27626		 break
27627	       fi
27628	       ;;
27629	   esac
27630	   ac_prev=
27631	 elif test "x$ac_word" = "x-arch"; then
27632	   ac_prev=arch
27633	 fi
27634       done
27635fi
27636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27637    if test $ac_cv_c_bigendian = unknown; then
27638      # See if sys/param.h defines the BYTE_ORDER macro.
27639      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27640/* end confdefs.h.  */
27641#include <sys/types.h>
27642	     #include <sys/param.h>
27643
27644int
27645main ()
27646{
27647#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27648		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27649		     && LITTLE_ENDIAN)
27650	      bogus endian macros
27651	     #endif
27652
27653  ;
27654  return 0;
27655}
27656_ACEOF
27657if ac_fn_cxx_try_compile "$LINENO"; then :
27658  # It does; now see whether it defined to BIG_ENDIAN or not.
27659	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27660/* end confdefs.h.  */
27661#include <sys/types.h>
27662		#include <sys/param.h>
27663
27664int
27665main ()
27666{
27667#if BYTE_ORDER != BIG_ENDIAN
27668		 not big endian
27669		#endif
27670
27671  ;
27672  return 0;
27673}
27674_ACEOF
27675if ac_fn_cxx_try_compile "$LINENO"; then :
27676  ac_cv_c_bigendian=yes
27677else
27678  ac_cv_c_bigendian=no
27679fi
27680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27681fi
27682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27683    fi
27684    if test $ac_cv_c_bigendian = unknown; then
27685      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27686      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27687/* end confdefs.h.  */
27688#include <limits.h>
27689
27690int
27691main ()
27692{
27693#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27694	      bogus endian macros
27695	     #endif
27696
27697  ;
27698  return 0;
27699}
27700_ACEOF
27701if ac_fn_cxx_try_compile "$LINENO"; then :
27702  # It does; now see whether it defined to _BIG_ENDIAN or not.
27703	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27704/* end confdefs.h.  */
27705#include <limits.h>
27706
27707int
27708main ()
27709{
27710#ifndef _BIG_ENDIAN
27711		 not big endian
27712		#endif
27713
27714  ;
27715  return 0;
27716}
27717_ACEOF
27718if ac_fn_cxx_try_compile "$LINENO"; then :
27719  ac_cv_c_bigendian=yes
27720else
27721  ac_cv_c_bigendian=no
27722fi
27723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27724fi
27725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27726    fi
27727    if test $ac_cv_c_bigendian = unknown; then
27728      # Compile a test program.
27729      if test "$cross_compiling" = yes; then :
27730  # Try to guess by grepping values from an object file.
27731	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27732/* end confdefs.h.  */
27733short int ascii_mm[] =
27734		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27735		short int ascii_ii[] =
27736		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27737		int use_ascii (int i) {
27738		  return ascii_mm[i] + ascii_ii[i];
27739		}
27740		short int ebcdic_ii[] =
27741		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27742		short int ebcdic_mm[] =
27743		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27744		int use_ebcdic (int i) {
27745		  return ebcdic_mm[i] + ebcdic_ii[i];
27746		}
27747		extern int foo;
27748
27749int
27750main ()
27751{
27752return use_ascii (foo) == use_ebcdic (foo);
27753  ;
27754  return 0;
27755}
27756_ACEOF
27757if ac_fn_cxx_try_compile "$LINENO"; then :
27758  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27759	      ac_cv_c_bigendian=yes
27760	    fi
27761	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27762	      if test "$ac_cv_c_bigendian" = unknown; then
27763		ac_cv_c_bigendian=no
27764	      else
27765		# finding both strings is unlikely to happen, but who knows?
27766		ac_cv_c_bigendian=unknown
27767	      fi
27768	    fi
27769fi
27770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27771else
27772  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27773/* end confdefs.h.  */
27774$ac_includes_default
27775int
27776main ()
27777{
27778
27779	     /* Are we little or big endian?  From Harbison&Steele.  */
27780	     union
27781	     {
27782	       long int l;
27783	       char c[sizeof (long int)];
27784	     } u;
27785	     u.l = 1;
27786	     return u.c[sizeof (long int) - 1] == 1;
27787
27788  ;
27789  return 0;
27790}
27791_ACEOF
27792if ac_fn_cxx_try_run "$LINENO"; then :
27793  ac_cv_c_bigendian=no
27794else
27795  ac_cv_c_bigendian=yes
27796fi
27797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27798  conftest.$ac_objext conftest.beam conftest.$ac_ext
27799fi
27800
27801    fi
27802fi
27803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27804$as_echo "$ac_cv_c_bigendian" >&6; }
27805 case $ac_cv_c_bigendian in #(
27806   yes)
27807     ENDIAN="big";; #(
27808   no)
27809     ENDIAN="little" ;; #(
27810   universal)
27811     ENDIAN="universal_endianness"
27812     ;; #(
27813   *)
27814     ENDIAN="unknown" ;;
27815 esac
27816
27817
27818if test "x$ENDIAN" = xuniversal_endianness; then
27819    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27820fi
27821if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27822    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
27823fi
27824
27825
27826# Configure flags for the tools
27827
27828
27829###############################################################################
27830#
27831# How to compile shared libraries.
27832#
27833
27834if test "x$GCC" = xyes; then
27835    COMPILER_NAME=gcc
27836    PICFLAG="-fPIC"
27837    LIBRARY_PREFIX=lib
27838    SHARED_LIBRARY='lib$1.so'
27839    STATIC_LIBRARY='lib$1.a'
27840    SHARED_LIBRARY_FLAGS="-shared"
27841    SHARED_LIBRARY_SUFFIX='.so'
27842    STATIC_LIBRARY_SUFFIX='.a'
27843    OBJ_SUFFIX='.o'
27844    EXE_SUFFIX=''
27845    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27846    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27847    C_FLAG_REORDER=''
27848    CXX_FLAG_REORDER=''
27849    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27850    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27851    LD="$CC"
27852    LDEXE="$CC"
27853    LDCXX="$CXX"
27854    LDEXECXX="$CXX"
27855    POST_STRIP_CMD="$STRIP -g"
27856
27857    # Linking is different on MacOSX
27858    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27859        # Might change in the future to clang.
27860        COMPILER_NAME=gcc
27861        SHARED_LIBRARY='lib$1.dylib'
27862        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27863        SHARED_LIBRARY_SUFFIX='.dylib'
27864        EXE_SUFFIX=''
27865        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27866        SET_SHARED_LIBRARY_MAPFILE=''
27867        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27868        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27869        POST_STRIP_CMD="$STRIP -S"
27870    fi
27871else
27872    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27873        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27874        COMPILER_NAME=ossc
27875        PICFLAG="-KPIC"
27876        LIBRARY_PREFIX=lib
27877        SHARED_LIBRARY='lib$1.so'
27878        STATIC_LIBRARY='lib$1.a'
27879        SHARED_LIBRARY_FLAGS="-G"
27880        SHARED_LIBRARY_SUFFIX='.so'
27881        STATIC_LIBRARY_SUFFIX='.a'
27882        OBJ_SUFFIX='.o'
27883        EXE_SUFFIX=''
27884        SET_SHARED_LIBRARY_NAME=''
27885        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27886	C_FLAG_REORDER='-xF'
27887	CXX_FLAG_REORDER='-xF'
27888        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27889        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27890        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27891        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27892        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27893        POST_STRIP_CMD="$STRIP -x"
27894        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27895    fi
27896    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27897        # If it is not gcc, then assume it is the MS Visual Studio compiler
27898        COMPILER_NAME=cl
27899        PICFLAG=""
27900        LIBRARY_PREFIX=
27901        SHARED_LIBRARY='$1.dll'
27902        STATIC_LIBRARY='$1.lib'
27903        SHARED_LIBRARY_FLAGS="-LD"
27904        SHARED_LIBRARY_SUFFIX='.dll'
27905        STATIC_LIBRARY_SUFFIX='.lib'
27906        OBJ_SUFFIX='.obj'
27907        EXE_SUFFIX='.exe'
27908        SET_SHARED_LIBRARY_NAME=''
27909        SET_SHARED_LIBRARY_MAPFILE=''
27910        SET_SHARED_LIBRARY_ORIGIN=''
27911        SET_EXECUTABLE_ORIGIN=''
27912    fi
27913fi
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932# The (cross) compiler is now configured, we can now test capabilities
27933# of the target platform.
27934
27935
27936
27937###############################################################################
27938#
27939# Setup the opt flags for different compilers
27940# and different operating systems.
27941#
27942
27943#
27944# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27945#
27946if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27947    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27948    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27949    CFLAGS="$CFLAGS -mstackrealign"
27950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27951$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27952    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27953/* end confdefs.h.  */
27954int main() { return 0; }
27955_ACEOF
27956if ac_fn_cxx_try_link "$LINENO"; then :
27957
27958		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27959$as_echo "yes" >&6; }
27960
27961else
27962
27963		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27964$as_echo "no" >&6; }
27965	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27966
27967fi
27968rm -f core conftest.err conftest.$ac_objext \
27969    conftest$ac_exeext conftest.$ac_ext
27970fi
27971
27972C_FLAG_DEPS="-MMD -MF"
27973CXX_FLAG_DEPS="-MMD -MF"
27974
27975case $COMPILER_TYPE in
27976  CC )
27977    D_FLAG="-g"
27978    case $COMPILER_NAME in
27979      gcc )
27980      	case $OPENJDK_TARGET_OS in
27981	  macosx )
27982	    # On MacOSX we optimize for size, something
27983	    # we should do for all platforms?
27984	    C_O_FLAG_HI="-Os"
27985	    C_O_FLAG_NORM="-Os"
27986	    C_O_FLAG_NONE=""
27987	    ;;
27988	  *)
27989	    C_O_FLAG_HI="-O3"
27990	    C_O_FLAG_NORM="-O2"
27991	    C_O_FLAG_NONE="-O0"
27992	    CFLAGS_DEBUG_SYMBOLS="-g"
27993	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27994	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27995	       CFLAGS_DEBUG_SYMBOLS="-g1"
27996	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27997	    fi
27998	    ;;
27999	esac
28000        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28001        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28002        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28003        ;;
28004      ossc )
28005        #
28006        # Forte has different names for this with their C++ compiler...
28007        #
28008        C_FLAG_DEPS="-xMMD -xMF"
28009        CXX_FLAG_DEPS="-xMMD -xMF"
28010
28011        # Extra options used with HIGHEST
28012        #
28013        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28014        #          done with care, there are some assumptions below that need to
28015        #          be understood about the use of pointers, and IEEE behavior.
28016        #
28017        # Use non-standard floating point mode (not IEEE 754)
28018        CC_HIGHEST="$CC_HIGHEST -fns"
28019        # Do some simplification of floating point arithmetic (not IEEE 754)
28020        CC_HIGHEST="$CC_HIGHEST -fsimple"
28021        # Use single precision floating point with 'float'
28022        CC_HIGHEST="$CC_HIGHEST -fsingle"
28023        # Assume memory references via basic pointer types do not alias
28024        #   (Source with excessing pointer casting and data access with mixed
28025        #    pointer types are not recommended)
28026        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28027        # Use intrinsic or inline versions for math/std functions
28028        #   (If you expect perfect errno behavior, do not use this)
28029        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28030        # Loop data dependency optimizations (need -xO3 or higher)
28031        CC_HIGHEST="$CC_HIGHEST -xdepend"
28032        # Pointer parameters to functions do not overlap
28033        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28034        #    If you pass in multiple pointers to the same data, do not use this)
28035        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28036        # Inline some library routines
28037        #   (If you expect perfect errno behavior, do not use this)
28038        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28039        # Use optimized math routines
28040        #   (If you expect perfect errno behavior, do not use this)
28041        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28042        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28043
28044        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28045          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28046          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28047        fi
28048
28049        case $OPENJDK_TARGET_CPU_ARCH in
28050          x86)
28051            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28052            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28053            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28054            C_O_FLAG_NONE="-xregs=no%frameptr"
28055            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28056            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28057            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28058            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28059            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28060               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28061               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28062            fi
28063            ;;
28064          sparc)
28065            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28066            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28067            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28068            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28069            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28070            C_O_FLAG_NONE=""
28071            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28072            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28073            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28074            CXX_O_FLAG_NONE=""
28075            ;;
28076        esac
28077
28078    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28079    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28080    esac
28081    ;;
28082  CL )
28083    D_FLAG=
28084    C_O_FLAG_HIGHEST="-O2"
28085    C_O_FLAG_HI="-O1"
28086    C_O_FLAG_NORM="-O1"
28087    C_O_FLAG_NONE="-Od"
28088    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28089    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28090    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28091    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28092    ;;
28093esac
28094
28095if test -z "$C_O_FLAG_HIGHEST"; then
28096   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28097fi
28098
28099if test -z "$CXX_O_FLAG_HIGHEST"; then
28100   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28101fi
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28117   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28118$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28119fi
28120
28121if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28122   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28123$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28124fi
28125
28126if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28127   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28128$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28129fi
28130
28131
28132# Check whether --with-extra-cflags was given.
28133if test "${with_extra_cflags+set}" = set; then :
28134  withval=$with_extra_cflags;
28135fi
28136
28137
28138
28139# Check whether --with-extra-cxxflags was given.
28140if test "${with_extra_cxxflags+set}" = set; then :
28141  withval=$with_extra_cxxflags;
28142fi
28143
28144
28145
28146# Check whether --with-extra-ldflags was given.
28147if test "${with_extra_ldflags+set}" = set; then :
28148  withval=$with_extra_ldflags;
28149fi
28150
28151
28152CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28153CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28154LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28155
28156# Hotspot needs these set in their legacy form
28157LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28158LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28159LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28160
28161
28162
28163
28164
28165###############################################################################
28166#
28167# Now setup the CFLAGS and LDFLAGS for the JDK build.
28168# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28169#
28170case $COMPILER_NAME in
28171      gcc )
28172      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28173                          -pipe \
28174                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28175	  case $OPENJDK_TARGET_CPU_ARCH in
28176	  arm )
28177            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28178	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28179	  ;;
28180	  ppc )
28181            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28182	  ;;
28183	  * )
28184	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28185	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28186          ;;
28187	  esac
28188          ;;
28189      ossc )
28190          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28191          case $OPENJDK_TARGET_CPU_ARCH in
28192          x86 )
28193            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28194       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28195          ;;
28196          esac
28197
28198      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28199      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28200
28201          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28202          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28203          ;;
28204      cl )
28205          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28206               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28207	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28208	       -DWIN32 -DIAL"
28209          case $OPENJDK_TARGET_CPU in
28210              x86 )
28211                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28212                  ;;
28213              x86_64 )
28214                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28215                  ;;
28216          esac
28217          ;;
28218esac
28219
28220###############################################################################
28221
28222CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28223
28224# The package path is used only on macosx?
28225PACKAGE_PATH=/opt/local
28226
28227
28228if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28229    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28230    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28231    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28232    #   Note: -Dmacro         is the same as    #define macro 1
28233    #         -Dmacro=	    is the same as    #define macro
28234    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28235        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28236    else
28237        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28238    fi
28239else
28240    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28241fi
28242if test "x$OPENJDK_TARGET_OS" = xlinux; then
28243    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28244fi
28245if test "x$OPENJDK_TARGET_OS" = xwindows; then
28246    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28247fi
28248if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28249    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28250fi
28251if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28252    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28253    # Setting these parameters makes it an error to link to macosx APIs that are
28254    # newer than the given OS version and makes the linked binaries compatible even
28255    # if built on a newer version of the OS.
28256    # The expected format is X.Y.Z
28257    MACOSX_VERSION_MIN=10.7.0
28258
28259    # The macro takes the version with no dots, ex: 1070
28260    # Let the flags variables get resolved in make for easier override on make
28261    # command line.
28262    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28263    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28264fi
28265if test "x$OPENJDK_TARGET_OS" = xbsd; then
28266    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28267fi
28268if test "x$DEBUG_LEVEL" = xrelease; then
28269    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28270    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28271        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28272    fi
28273else
28274    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28275fi
28276
28277CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28278CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28279
28280CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28281        -I${JDK_OUTPUTDIR}/include \
28282        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28283        -I${JDK_TOPDIR}/src/share/javavm/export \
28284        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28285        -I${JDK_TOPDIR}/src/share/native/common \
28286        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28287
28288# The shared libraries are compiled using the picflag.
28289CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28290CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28291
28292# Executable flags
28293CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28294CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28295
28296# Now this is odd. The JDK native libraries have to link against libjvm.so
28297# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28298# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28299# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28300# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28301# libraries will link to whatever is in memory. Yuck.
28302#
28303# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28304if test "x$COMPILER_NAME" = xcl; then
28305    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28306    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28307        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28308    fi
28309    # TODO: make -debug optional "--disable-full-debug-symbols"
28310    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28311    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28312    LDFLAGS_JDKLIB_SUFFIX=""
28313    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28314        LDFLAGS_STACK_SIZE=1048576
28315    else
28316        LDFLAGS_STACK_SIZE=327680
28317    fi
28318    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28319else
28320    if test "x$COMPILER_NAME" = xgcc; then
28321        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28322        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28323        if test -n "$HAS_GNU_HASH"; then
28324            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28325        fi
28326        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28327          # And since we now know that the linker is gnu, then add -z defs, to forbid
28328          # undefined symbols in object files.
28329          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28330          if test "x$DEBUG_LEVEL" = "xrelease"; then
28331              # When building release libraries, tell the linker optimize them.
28332              # Should this be supplied to the OSS linker as well?
28333              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28334          fi
28335        fi
28336    fi
28337    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28338                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28339
28340    # On some platforms (mac) the linker warns about non existing -L dirs.
28341    # Add server first if available. Linking aginst client does not always produce the same results.
28342    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28343    # Default to server for other variants.
28344    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28345        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28346    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28347        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28348    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28349        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28350    else
28351        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28352    fi
28353
28354    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28355    if test "x$COMPILER_NAME" = xossc; then
28356        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28357    fi
28358
28359    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28360    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28361        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28362    fi
28363fi
28364
28365# Adjust flags according to debug level.
28366case $DEBUG_LEVEL in
28367      fastdebug )
28368              CFLAGS="$CFLAGS $D_FLAG"
28369              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28370              ;;
28371      slowdebug )
28372              CFLAGS="$CFLAGS $D_FLAG"
28373	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28374	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28375	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28376	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28377              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28378              ;;
28379esac
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395# Setup debug symbols (need objcopy from the toolchain for that)
28396
28397#
28398# ENABLE_DEBUG_SYMBOLS
28399# This must be done after the toolchain is setup, since we're looking at objcopy.
28400#
28401# Check whether --enable-debug-symbols was given.
28402if test "${enable_debug_symbols+set}" = set; then :
28403  enableval=$enable_debug_symbols;
28404fi
28405
28406
28407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28408$as_echo_n "checking if we should generate debug symbols... " >&6; }
28409
28410if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28411   # explicit enabling of enable-debug-symbols and can't find objcopy
28412   #   this is an error
28413   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28414fi
28415
28416if test "x$enable_debug_symbols" = "xyes"; then
28417  ENABLE_DEBUG_SYMBOLS=true
28418elif test "x$enable_debug_symbols" = "xno"; then
28419  ENABLE_DEBUG_SYMBOLS=false
28420else
28421  # default on macosx is false
28422  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28423    ENABLE_DEBUG_SYMBOLS=false
28424  # Default is on if objcopy is found, otherwise off
28425  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28426    ENABLE_DEBUG_SYMBOLS=true
28427  else
28428    ENABLE_DEBUG_SYMBOLS=false
28429  fi
28430fi
28431
28432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28433$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28434
28435#
28436# ZIP_DEBUGINFO_FILES
28437#
28438# Check whether --enable-zip-debug-info was given.
28439if test "${enable_zip_debug_info+set}" = set; then :
28440  enableval=$enable_zip_debug_info;
28441fi
28442
28443
28444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28445$as_echo_n "checking if we should zip debug-info files... " >&6; }
28446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28447$as_echo "${enable_zip_debug_info}" >&6; }
28448
28449if test "x${enable_zip_debug_info}" = "xno"; then
28450   ZIP_DEBUGINFO_FILES=false
28451else
28452   ZIP_DEBUGINFO_FILES=true
28453fi
28454
28455
28456
28457
28458
28459
28460
28461###############################################################################
28462#
28463# Check dependencies for external and internal libraries.
28464#
28465###############################################################################
28466
28467
28468
28469###############################################################################
28470#
28471# OS specific settings that we never will need to probe.
28472#
28473if test "x$OPENJDK_TARGET_OS" = xlinux; then
28474    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28475$as_echo_n "checking what is not needed on Linux?... " >&6; }
28476    PULSE_NOT_NEEDED=yes
28477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28478$as_echo "pulse" >&6; }
28479fi
28480
28481if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28483$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28484    ALSA_NOT_NEEDED=yes
28485    PULSE_NOT_NEEDED=yes
28486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28487$as_echo "alsa pulse" >&6; }
28488fi
28489
28490if test "x$OPENJDK_TARGET_OS" = xwindows; then
28491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28492$as_echo_n "checking what is not needed on Windows?... " >&6; }
28493    CUPS_NOT_NEEDED=yes
28494    ALSA_NOT_NEEDED=yes
28495    PULSE_NOT_NEEDED=yes
28496    X11_NOT_NEEDED=yes
28497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28498$as_echo "alsa cups pulse x11" >&6; }
28499fi
28500
28501if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28503$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28504    ALSA_NOT_NEEDED=yes
28505    PULSE_NOT_NEEDED=yes
28506    X11_NOT_NEEDED=yes
28507    FREETYPE2_NOT_NEEDED=yes
28508    # If the java runtime framework is disabled, then we need X11.
28509    # This will be adjusted below.
28510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28511$as_echo "alsa pulse x11" >&6; }
28512fi
28513
28514if test "x$OPENJDK_TARGET_OS" = xbsd; then
28515    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28516$as_echo_n "checking what is not needed on bsd?... " >&6; }
28517    ALSA_NOT_NEEDED=yes
28518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28519$as_echo "alsa" >&6; }
28520fi
28521
28522if test "x$OPENJDK" = "xfalse"; then
28523    FREETYPE2_NOT_NEEDED=yes
28524fi
28525
28526if test "x$SUPPORT_HEADFUL" = xno; then
28527    X11_NOT_NEEDED=yes
28528fi
28529
28530###############################################################################
28531#
28532# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28533# that uses this API.
28534#
28535# Check whether --enable-macosx-runtime-support was given.
28536if test "${enable_macosx_runtime_support+set}" = set; then :
28537  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28538else
28539  MACOSX_RUNTIME_SUPPORT="no"
28540fi
28541
28542
28543USE_MACOSX_RUNTIME_SUPPORT=no
28544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28545$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28546if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28547    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28548        MACOSX_RUNTIME_SUPPORT=yes
28549        USE_MACOSX_RUNTIME_SUPPORT=yes
28550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28551$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28552    else
28553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28554$as_echo "yes, but explicitly disabled." >&6; }
28555    fi
28556else
28557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28558$as_echo "no" >&6; }
28559fi
28560
28561if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28562    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28563$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28564    X11_NOT_NEEDED=
28565    FREETYPE2_NOT_NEEDED=
28566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28567$as_echo "alsa pulse" >&6; }
28568fi
28569
28570
28571
28572
28573###############################################################################
28574#
28575# Check for X Windows
28576#
28577
28578# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28579# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28580# --x-libraries for the sysroot, if that seems to be correct.
28581if test "x$SYS_ROOT" != "x/"; then
28582  if test "x$x_includes" = xNONE; then
28583    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28584      x_includes="$SYS_ROOT/usr/X11R6/include"
28585    fi
28586  fi
28587  if test "x$x_libraries" = xNONE; then
28588    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28589      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28590    fi
28591  fi
28592fi
28593
28594# Now let autoconf do it's magic
28595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28596$as_echo_n "checking for X... " >&6; }
28597
28598
28599# Check whether --with-x was given.
28600if test "${with_x+set}" = set; then :
28601  withval=$with_x;
28602fi
28603
28604# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28605if test "x$with_x" = xno; then
28606  # The user explicitly disabled X.
28607  have_x=disabled
28608else
28609  case $x_includes,$x_libraries in #(
28610    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28611    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28612  $as_echo_n "(cached) " >&6
28613else
28614  # One or both of the vars are not set, and there is no cached value.
28615ac_x_includes=no ac_x_libraries=no
28616rm -f -r conftest.dir
28617if mkdir conftest.dir; then
28618  cd conftest.dir
28619  cat >Imakefile <<'_ACEOF'
28620incroot:
28621	@echo incroot='${INCROOT}'
28622usrlibdir:
28623	@echo usrlibdir='${USRLIBDIR}'
28624libdir:
28625	@echo libdir='${LIBDIR}'
28626_ACEOF
28627  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28628    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28629    for ac_var in incroot usrlibdir libdir; do
28630      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28631    done
28632    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28633    for ac_extension in a so sl dylib la dll; do
28634      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28635	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28636	ac_im_usrlibdir=$ac_im_libdir; break
28637      fi
28638    done
28639    # Screen out bogus values from the imake configuration.  They are
28640    # bogus both because they are the default anyway, and because
28641    # using them would break gcc on systems where it needs fixed includes.
28642    case $ac_im_incroot in
28643	/usr/include) ac_x_includes= ;;
28644	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28645    esac
28646    case $ac_im_usrlibdir in
28647	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28648	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28649    esac
28650  fi
28651  cd ..
28652  rm -f -r conftest.dir
28653fi
28654
28655# Standard set of common directories for X headers.
28656# Check X11 before X11Rn because it is often a symlink to the current release.
28657ac_x_header_dirs='
28658/usr/X11/include
28659/usr/X11R7/include
28660/usr/X11R6/include
28661/usr/X11R5/include
28662/usr/X11R4/include
28663
28664/usr/include/X11
28665/usr/include/X11R7
28666/usr/include/X11R6
28667/usr/include/X11R5
28668/usr/include/X11R4
28669
28670/usr/local/X11/include
28671/usr/local/X11R7/include
28672/usr/local/X11R6/include
28673/usr/local/X11R5/include
28674/usr/local/X11R4/include
28675
28676/usr/local/include/X11
28677/usr/local/include/X11R7
28678/usr/local/include/X11R6
28679/usr/local/include/X11R5
28680/usr/local/include/X11R4
28681
28682/usr/X386/include
28683/usr/x386/include
28684/usr/XFree86/include/X11
28685
28686/usr/include
28687/usr/local/include
28688/usr/unsupported/include
28689/usr/athena/include
28690/usr/local/x11r5/include
28691/usr/lpp/Xamples/include
28692
28693/usr/openwin/include
28694/usr/openwin/share/include'
28695
28696if test "$ac_x_includes" = no; then
28697  # Guess where to find include files, by looking for Xlib.h.
28698  # First, try using that file with no special directory specified.
28699  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28700/* end confdefs.h.  */
28701#include <X11/Xlib.h>
28702_ACEOF
28703if ac_fn_cxx_try_cpp "$LINENO"; then :
28704  # We can compile using X headers with no special include directory.
28705ac_x_includes=
28706else
28707  for ac_dir in $ac_x_header_dirs; do
28708  if test -r "$ac_dir/X11/Xlib.h"; then
28709    ac_x_includes=$ac_dir
28710    break
28711  fi
28712done
28713fi
28714rm -f conftest.err conftest.i conftest.$ac_ext
28715fi # $ac_x_includes = no
28716
28717if test "$ac_x_libraries" = no; then
28718  # Check for the libraries.
28719  # See if we find them without any special options.
28720  # Don't add to $LIBS permanently.
28721  ac_save_LIBS=$LIBS
28722  LIBS="-lX11 $LIBS"
28723  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28724/* end confdefs.h.  */
28725#include <X11/Xlib.h>
28726int
28727main ()
28728{
28729XrmInitialize ()
28730  ;
28731  return 0;
28732}
28733_ACEOF
28734if ac_fn_cxx_try_link "$LINENO"; then :
28735  LIBS=$ac_save_LIBS
28736# We can link X programs with no special library path.
28737ac_x_libraries=
28738else
28739  LIBS=$ac_save_LIBS
28740for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28741do
28742  # Don't even attempt the hair of trying to link an X program!
28743  for ac_extension in a so sl dylib la dll; do
28744    if test -r "$ac_dir/libX11.$ac_extension"; then
28745      ac_x_libraries=$ac_dir
28746      break 2
28747    fi
28748  done
28749done
28750fi
28751rm -f core conftest.err conftest.$ac_objext \
28752    conftest$ac_exeext conftest.$ac_ext
28753fi # $ac_x_libraries = no
28754
28755case $ac_x_includes,$ac_x_libraries in #(
28756  no,* | *,no | *\'*)
28757    # Didn't find X, or a directory has "'" in its name.
28758    ac_cv_have_x="have_x=no";; #(
28759  *)
28760    # Record where we found X for the cache.
28761    ac_cv_have_x="have_x=yes\
28762	ac_x_includes='$ac_x_includes'\
28763	ac_x_libraries='$ac_x_libraries'"
28764esac
28765fi
28766;; #(
28767    *) have_x=yes;;
28768  esac
28769  eval "$ac_cv_have_x"
28770fi # $with_x != no
28771
28772if test "$have_x" != yes; then
28773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28774$as_echo "$have_x" >&6; }
28775  no_x=yes
28776else
28777  # If each of the values was on the command line, it overrides each guess.
28778  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28779  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28780  # Update the cache value to reflect the command line values.
28781  ac_cv_have_x="have_x=yes\
28782	ac_x_includes='$x_includes'\
28783	ac_x_libraries='$x_libraries'"
28784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28785$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28786fi
28787
28788if test "$no_x" = yes; then
28789  # Not all programs may use this symbol, but it does not hurt to define it.
28790
28791$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28792
28793  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28794else
28795  if test -n "$x_includes"; then
28796    X_CFLAGS="$X_CFLAGS -I$x_includes"
28797  fi
28798
28799  # It would also be nice to do this for all -L options, not just this one.
28800  if test -n "$x_libraries"; then
28801    X_LIBS="$X_LIBS -L$x_libraries"
28802    # For Solaris; some versions of Sun CC require a space after -R and
28803    # others require no space.  Words are not sufficient . . . .
28804    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28805$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28806    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28807    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28808    ac_cxx_werror_flag=yes
28809    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28810/* end confdefs.h.  */
28811
28812int
28813main ()
28814{
28815
28816  ;
28817  return 0;
28818}
28819_ACEOF
28820if ac_fn_cxx_try_link "$LINENO"; then :
28821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28822$as_echo "no" >&6; }
28823       X_LIBS="$X_LIBS -R$x_libraries"
28824else
28825  LIBS="$ac_xsave_LIBS -R $x_libraries"
28826       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28827/* end confdefs.h.  */
28828
28829int
28830main ()
28831{
28832
28833  ;
28834  return 0;
28835}
28836_ACEOF
28837if ac_fn_cxx_try_link "$LINENO"; then :
28838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28839$as_echo "yes" >&6; }
28840	  X_LIBS="$X_LIBS -R $x_libraries"
28841else
28842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28843$as_echo "neither works" >&6; }
28844fi
28845rm -f core conftest.err conftest.$ac_objext \
28846    conftest$ac_exeext conftest.$ac_ext
28847fi
28848rm -f core conftest.err conftest.$ac_objext \
28849    conftest$ac_exeext conftest.$ac_ext
28850    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28851    LIBS=$ac_xsave_LIBS
28852  fi
28853
28854  # Check for system-dependent libraries X programs must link with.
28855  # Do this before checking for the system-independent R6 libraries
28856  # (-lICE), since we may need -lsocket or whatever for X linking.
28857
28858  if test "$ISC" = yes; then
28859    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28860  else
28861    # Martyn Johnson says this is needed for Ultrix, if the X
28862    # libraries were built with DECnet support.  And Karl Berry says
28863    # the Alpha needs dnet_stub (dnet does not exist).
28864    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28865    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28866/* end confdefs.h.  */
28867
28868/* Override any GCC internal prototype to avoid an error.
28869   Use char because int might match the return type of a GCC
28870   builtin and then its argument prototype would still apply.  */
28871#ifdef __cplusplus
28872extern "C"
28873#endif
28874char XOpenDisplay ();
28875int
28876main ()
28877{
28878return XOpenDisplay ();
28879  ;
28880  return 0;
28881}
28882_ACEOF
28883if ac_fn_cxx_try_link "$LINENO"; then :
28884
28885else
28886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28887$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28888if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28889  $as_echo_n "(cached) " >&6
28890else
28891  ac_check_lib_save_LIBS=$LIBS
28892LIBS="-ldnet  $LIBS"
28893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28894/* end confdefs.h.  */
28895
28896/* Override any GCC internal prototype to avoid an error.
28897   Use char because int might match the return type of a GCC
28898   builtin and then its argument prototype would still apply.  */
28899#ifdef __cplusplus
28900extern "C"
28901#endif
28902char dnet_ntoa ();
28903int
28904main ()
28905{
28906return dnet_ntoa ();
28907  ;
28908  return 0;
28909}
28910_ACEOF
28911if ac_fn_cxx_try_link "$LINENO"; then :
28912  ac_cv_lib_dnet_dnet_ntoa=yes
28913else
28914  ac_cv_lib_dnet_dnet_ntoa=no
28915fi
28916rm -f core conftest.err conftest.$ac_objext \
28917    conftest$ac_exeext conftest.$ac_ext
28918LIBS=$ac_check_lib_save_LIBS
28919fi
28920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28921$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28922if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28923  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28924fi
28925
28926    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28927      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28928$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28929if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28930  $as_echo_n "(cached) " >&6
28931else
28932  ac_check_lib_save_LIBS=$LIBS
28933LIBS="-ldnet_stub  $LIBS"
28934cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28935/* end confdefs.h.  */
28936
28937/* Override any GCC internal prototype to avoid an error.
28938   Use char because int might match the return type of a GCC
28939   builtin and then its argument prototype would still apply.  */
28940#ifdef __cplusplus
28941extern "C"
28942#endif
28943char dnet_ntoa ();
28944int
28945main ()
28946{
28947return dnet_ntoa ();
28948  ;
28949  return 0;
28950}
28951_ACEOF
28952if ac_fn_cxx_try_link "$LINENO"; then :
28953  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28954else
28955  ac_cv_lib_dnet_stub_dnet_ntoa=no
28956fi
28957rm -f core conftest.err conftest.$ac_objext \
28958    conftest$ac_exeext conftest.$ac_ext
28959LIBS=$ac_check_lib_save_LIBS
28960fi
28961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28962$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28963if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28964  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28965fi
28966
28967    fi
28968fi
28969rm -f core conftest.err conftest.$ac_objext \
28970    conftest$ac_exeext conftest.$ac_ext
28971    LIBS="$ac_xsave_LIBS"
28972
28973    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28974    # to get the SysV transport functions.
28975    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28976    # needs -lnsl.
28977    # The nsl library prevents programs from opening the X display
28978    # on Irix 5.2, according to T.E. Dickey.
28979    # The functions gethostbyname, getservbyname, and inet_addr are
28980    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28981    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28982if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28983
28984fi
28985
28986    if test $ac_cv_func_gethostbyname = no; then
28987      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28988$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28989if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28990  $as_echo_n "(cached) " >&6
28991else
28992  ac_check_lib_save_LIBS=$LIBS
28993LIBS="-lnsl  $LIBS"
28994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28995/* end confdefs.h.  */
28996
28997/* Override any GCC internal prototype to avoid an error.
28998   Use char because int might match the return type of a GCC
28999   builtin and then its argument prototype would still apply.  */
29000#ifdef __cplusplus
29001extern "C"
29002#endif
29003char gethostbyname ();
29004int
29005main ()
29006{
29007return gethostbyname ();
29008  ;
29009  return 0;
29010}
29011_ACEOF
29012if ac_fn_cxx_try_link "$LINENO"; then :
29013  ac_cv_lib_nsl_gethostbyname=yes
29014else
29015  ac_cv_lib_nsl_gethostbyname=no
29016fi
29017rm -f core conftest.err conftest.$ac_objext \
29018    conftest$ac_exeext conftest.$ac_ext
29019LIBS=$ac_check_lib_save_LIBS
29020fi
29021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29022$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29023if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
29024  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29025fi
29026
29027      if test $ac_cv_lib_nsl_gethostbyname = no; then
29028	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29029$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29030if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29031  $as_echo_n "(cached) " >&6
29032else
29033  ac_check_lib_save_LIBS=$LIBS
29034LIBS="-lbsd  $LIBS"
29035cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29036/* end confdefs.h.  */
29037
29038/* Override any GCC internal prototype to avoid an error.
29039   Use char because int might match the return type of a GCC
29040   builtin and then its argument prototype would still apply.  */
29041#ifdef __cplusplus
29042extern "C"
29043#endif
29044char gethostbyname ();
29045int
29046main ()
29047{
29048return gethostbyname ();
29049  ;
29050  return 0;
29051}
29052_ACEOF
29053if ac_fn_cxx_try_link "$LINENO"; then :
29054  ac_cv_lib_bsd_gethostbyname=yes
29055else
29056  ac_cv_lib_bsd_gethostbyname=no
29057fi
29058rm -f core conftest.err conftest.$ac_objext \
29059    conftest$ac_exeext conftest.$ac_ext
29060LIBS=$ac_check_lib_save_LIBS
29061fi
29062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29063$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29064if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29065  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29066fi
29067
29068      fi
29069    fi
29070
29071    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29072    # socket/setsockopt and other routines are undefined under SCO ODT
29073    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29074    # on later versions), says Simon Leinen: it contains gethostby*
29075    # variants that don't use the name server (or something).  -lsocket
29076    # must be given before -lnsl if both are needed.  We assume that
29077    # if connect needs -lnsl, so does gethostbyname.
29078    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29079if test "x$ac_cv_func_connect" = x""yes; then :
29080
29081fi
29082
29083    if test $ac_cv_func_connect = no; then
29084      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29085$as_echo_n "checking for connect in -lsocket... " >&6; }
29086if test "${ac_cv_lib_socket_connect+set}" = set; then :
29087  $as_echo_n "(cached) " >&6
29088else
29089  ac_check_lib_save_LIBS=$LIBS
29090LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29091cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29092/* end confdefs.h.  */
29093
29094/* Override any GCC internal prototype to avoid an error.
29095   Use char because int might match the return type of a GCC
29096   builtin and then its argument prototype would still apply.  */
29097#ifdef __cplusplus
29098extern "C"
29099#endif
29100char connect ();
29101int
29102main ()
29103{
29104return connect ();
29105  ;
29106  return 0;
29107}
29108_ACEOF
29109if ac_fn_cxx_try_link "$LINENO"; then :
29110  ac_cv_lib_socket_connect=yes
29111else
29112  ac_cv_lib_socket_connect=no
29113fi
29114rm -f core conftest.err conftest.$ac_objext \
29115    conftest$ac_exeext conftest.$ac_ext
29116LIBS=$ac_check_lib_save_LIBS
29117fi
29118{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29119$as_echo "$ac_cv_lib_socket_connect" >&6; }
29120if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29121  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29122fi
29123
29124    fi
29125
29126    # Guillermo Gomez says -lposix is necessary on A/UX.
29127    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29128if test "x$ac_cv_func_remove" = x""yes; then :
29129
29130fi
29131
29132    if test $ac_cv_func_remove = no; then
29133      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29134$as_echo_n "checking for remove in -lposix... " >&6; }
29135if test "${ac_cv_lib_posix_remove+set}" = set; then :
29136  $as_echo_n "(cached) " >&6
29137else
29138  ac_check_lib_save_LIBS=$LIBS
29139LIBS="-lposix  $LIBS"
29140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29141/* end confdefs.h.  */
29142
29143/* Override any GCC internal prototype to avoid an error.
29144   Use char because int might match the return type of a GCC
29145   builtin and then its argument prototype would still apply.  */
29146#ifdef __cplusplus
29147extern "C"
29148#endif
29149char remove ();
29150int
29151main ()
29152{
29153return remove ();
29154  ;
29155  return 0;
29156}
29157_ACEOF
29158if ac_fn_cxx_try_link "$LINENO"; then :
29159  ac_cv_lib_posix_remove=yes
29160else
29161  ac_cv_lib_posix_remove=no
29162fi
29163rm -f core conftest.err conftest.$ac_objext \
29164    conftest$ac_exeext conftest.$ac_ext
29165LIBS=$ac_check_lib_save_LIBS
29166fi
29167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29168$as_echo "$ac_cv_lib_posix_remove" >&6; }
29169if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29170  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29171fi
29172
29173    fi
29174
29175    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29176    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29177if test "x$ac_cv_func_shmat" = x""yes; then :
29178
29179fi
29180
29181    if test $ac_cv_func_shmat = no; then
29182      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29183$as_echo_n "checking for shmat in -lipc... " >&6; }
29184if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29185  $as_echo_n "(cached) " >&6
29186else
29187  ac_check_lib_save_LIBS=$LIBS
29188LIBS="-lipc  $LIBS"
29189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29190/* end confdefs.h.  */
29191
29192/* Override any GCC internal prototype to avoid an error.
29193   Use char because int might match the return type of a GCC
29194   builtin and then its argument prototype would still apply.  */
29195#ifdef __cplusplus
29196extern "C"
29197#endif
29198char shmat ();
29199int
29200main ()
29201{
29202return shmat ();
29203  ;
29204  return 0;
29205}
29206_ACEOF
29207if ac_fn_cxx_try_link "$LINENO"; then :
29208  ac_cv_lib_ipc_shmat=yes
29209else
29210  ac_cv_lib_ipc_shmat=no
29211fi
29212rm -f core conftest.err conftest.$ac_objext \
29213    conftest$ac_exeext conftest.$ac_ext
29214LIBS=$ac_check_lib_save_LIBS
29215fi
29216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29217$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29218if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29219  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29220fi
29221
29222    fi
29223  fi
29224
29225  # Check for libraries that X11R6 Xt/Xaw programs need.
29226  ac_save_LDFLAGS=$LDFLAGS
29227  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29228  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29229  # check for ICE first), but we must link in the order -lSM -lICE or
29230  # we get undefined symbols.  So assume we have SM if we have ICE.
29231  # These have to be linked with before -lX11, unlike the other
29232  # libraries we check for below, so use a different variable.
29233  # John Interrante, Karl Berry
29234  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29235$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29236if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29237  $as_echo_n "(cached) " >&6
29238else
29239  ac_check_lib_save_LIBS=$LIBS
29240LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29242/* end confdefs.h.  */
29243
29244/* Override any GCC internal prototype to avoid an error.
29245   Use char because int might match the return type of a GCC
29246   builtin and then its argument prototype would still apply.  */
29247#ifdef __cplusplus
29248extern "C"
29249#endif
29250char IceConnectionNumber ();
29251int
29252main ()
29253{
29254return IceConnectionNumber ();
29255  ;
29256  return 0;
29257}
29258_ACEOF
29259if ac_fn_cxx_try_link "$LINENO"; then :
29260  ac_cv_lib_ICE_IceConnectionNumber=yes
29261else
29262  ac_cv_lib_ICE_IceConnectionNumber=no
29263fi
29264rm -f core conftest.err conftest.$ac_objext \
29265    conftest$ac_exeext conftest.$ac_ext
29266LIBS=$ac_check_lib_save_LIBS
29267fi
29268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29269$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29270if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29271  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29272fi
29273
29274  LDFLAGS=$ac_save_LDFLAGS
29275
29276fi
29277
29278
29279# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29280# this doesn't make sense so we remove it.
29281if test "x$COMPILE_TYPE" = xcross; then
29282  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29283fi
29284
29285if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29286
29287    # Print a helpful message on how to acquire the necessary build dependency.
29288    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29289    MISSING_DEPENDENCY=x11
29290    PKGHANDLER_COMMAND=
29291
29292    case $PKGHANDLER in
29293	apt-get)
29294                apt_help     $MISSING_DEPENDENCY ;;
29295    yum)
29296                yum_help     $MISSING_DEPENDENCY ;;
29297	port)
29298                port_help    $MISSING_DEPENDENCY ;;
29299	pkgutil)
29300                pkgutil_help $MISSING_DEPENDENCY ;;
29301	pkgadd)
29302                pkgadd_help  $MISSING_DEPENDENCY ;;
29303    * )
29304      break ;;
29305    esac
29306
29307    if test "x$PKGHANDLER_COMMAND" != x; then
29308        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29309    fi
29310
29311    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29312fi
29313
29314# Some of the old makefiles require a setting of OPENWIN_HOME
29315# Since the X11R6 directory has disappeared on later Linuxes,
29316# we need to probe for it.
29317if test "x$OPENJDK_TARGET_OS" = xlinux; then
29318    if test -d "$SYS_ROOT/usr/X11R6"; then
29319        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29320    fi
29321    if test -d "$SYS_ROOT/usr/include/X11"; then
29322        OPENWIN_HOME="$SYS_ROOT/usr"
29323    fi
29324fi
29325if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29326    OPENWIN_HOME="/usr/openwin"
29327fi
29328
29329
29330
29331#
29332# Weird Sol10 something check...TODO change to try compile
29333#
29334if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29335  if test "`uname -r`" = "5.10"; then
29336     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29337     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29338     fi
29339  fi
29340fi
29341
29342ac_ext=c
29343ac_cpp='$CPP $CPPFLAGS'
29344ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29345ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29346ac_compiler_gnu=$ac_cv_c_compiler_gnu
29347
29348OLD_CFLAGS="$CFLAGS"
29349CFLAGS="$CFLAGS $X_CFLAGS"
29350
29351# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29352for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29353do :
29354  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29355ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29356                   # include <X11/Xutil.h>
29357
29358"
29359if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29360  cat >>confdefs.h <<_ACEOF
29361#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29362_ACEOF
29363 X11_A_OK=yes
29364else
29365  X11_A_OK=no
29366fi
29367
29368done
29369
29370
29371CFLAGS="$OLD_CFLAGS"
29372ac_ext=cpp
29373ac_cpp='$CXXCPP $CPPFLAGS'
29374ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29375ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29376ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29377
29378
29379if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29380
29381    # Print a helpful message on how to acquire the necessary build dependency.
29382    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29383    MISSING_DEPENDENCY=x11
29384    PKGHANDLER_COMMAND=
29385
29386    case $PKGHANDLER in
29387	apt-get)
29388                apt_help     $MISSING_DEPENDENCY ;;
29389    yum)
29390                yum_help     $MISSING_DEPENDENCY ;;
29391	port)
29392                port_help    $MISSING_DEPENDENCY ;;
29393	pkgutil)
29394                pkgutil_help $MISSING_DEPENDENCY ;;
29395	pkgadd)
29396                pkgadd_help  $MISSING_DEPENDENCY ;;
29397    * )
29398      break ;;
29399    esac
29400
29401    if test "x$PKGHANDLER_COMMAND" != x; then
29402        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29403    fi
29404
29405    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29406fi
29407
29408
29409
29410
29411
29412
29413###############################################################################
29414#
29415# The common unix printing system cups is used to print from java.
29416#
29417
29418# Check whether --with-cups was given.
29419if test "${with_cups+set}" = set; then :
29420  withval=$with_cups;
29421fi
29422
29423
29424# Check whether --with-cups-include was given.
29425if test "${with_cups_include+set}" = set; then :
29426  withval=$with_cups_include;
29427fi
29428
29429
29430if test "x$CUPS_NOT_NEEDED" = xyes; then
29431	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29432		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29433$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29434	fi
29435	CUPS_CFLAGS=
29436else
29437	CUPS_FOUND=no
29438
29439	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29440	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29441	fi
29442
29443	if test "x${with_cups}" != x; then
29444	    CUPS_CFLAGS="-I${with_cups}/include"
29445	    CUPS_FOUND=yes
29446	fi
29447	if test "x${with_cups_include}" != x; then
29448	    CUPS_CFLAGS="-I${with_cups_include}"
29449	    CUPS_FOUND=yes
29450	fi
29451	if test "x$CUPS_FOUND" = xno; then
29452
29453
29454    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29455        # Source the builddeps file again, to make sure it uses the latest variables!
29456        . $builddepsfile
29457        # Look for a target and build machine specific resource!
29458        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29459        if test "x$resource" = x; then
29460            # Ok, lets instead look for a target specific resource
29461            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29462        fi
29463        if test "x$resource" = x; then
29464            # Ok, lets instead look for a build specific resource
29465            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29466        fi
29467        if test "x$resource" = x; then
29468            # Ok, lets instead look for a generic resource
29469            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29470            resource=${builddep_cups}
29471        fi
29472        if test "x$resource" != x; then
29473            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29474$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29475	    # If the resource in the builddeps.conf file is an existing directory,
29476	    # for example /java/linux/cups
29477	    if test -d ${resource}; then
29478	       depdir=${resource}
29479	    else
29480
29481# cups is for example mymodule
29482# $resource is for example libs/general/libmymod_1_2_3.zip
29483# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29484# $with_builddeps_dir is for example /localhome/builddeps
29485# depdir is the name of the variable into which we store the depdir, eg MYMOD
29486# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29487# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29488    filename=`basename $resource`
29489    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29490    filebase=${filename%%.*}
29491    extension=${filename#*.}
29492    installdir=$with_builddeps_dir/$filebase
29493    if test ! -f $installdir/$filename.unpacked; then
29494        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29495$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29496        if test ! -d $installdir; then
29497            mkdir -p $installdir
29498        fi
29499        if test ! -d $installdir; then
29500            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29501        fi
29502        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29503        touch $tmpfile
29504        if test ! -f $tmpfile; then
29505            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29506        fi
29507
29508    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29509    # $tmpfile is the local file name for the downloaded file.
29510    VALID_TOOL=no
29511    if test "x$BDEPS_FTP" = xwget; then
29512       VALID_TOOL=yes
29513       wget -O $tmpfile $with_builddeps_server/$resource
29514    fi
29515    if test "x$BDEPS_FTP" = xlftp; then
29516       VALID_TOOL=yes
29517       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29518    fi
29519    if test "x$BDEPS_FTP" = xftp; then
29520        VALID_TOOL=yes
29521        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29522        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29523        FTPUSERPWD=${FTPSERVER%%@*}
29524        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29525            FTPUSER=${userpwd%%:*}
29526            FTPPWD=${userpwd#*@}
29527            FTPSERVER=${FTPSERVER#*@}
29528        else
29529            FTPUSER=ftp
29530            FTPPWD=ftp
29531        fi
29532        # the "pass" command does not work on some
29533        # ftp clients (read ftp.exe) but if it works,
29534        # passive mode is better!
29535        (\
29536            echo "user $FTPUSER $FTPPWD"        ;\
29537            echo "pass"                         ;\
29538            echo "bin"                          ;\
29539            echo "get $FTPPATH $tmpfile"              ;\
29540        ) | ftp -in $FTPSERVER
29541    fi
29542    if test "x$VALID_TOOL" != xyes; then
29543       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29544    fi
29545
29546        mv $tmpfile $installdir/$filename
29547        if test ! -s $installdir/$filename; then
29548            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29549        fi
29550        case "$extension" in
29551            zip)  echo "Unzipping $installdir/$filename..."
29552               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29553            ;;
29554            tar.gz) echo "Untaring $installdir/$filename..."
29555               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29556            ;;
29557            tgz) echo "Untaring $installdir/$filename..."
29558               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29559            ;;
29560            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29561            ;;
29562        esac
29563    fi
29564    if test -f $installdir/$filename.unpacked; then
29565        depdir=$installdir
29566    fi
29567
29568	    fi
29569            # Source the builddeps file again, because in the previous command, the depdir
29570            # was updated to point at the current build dependency install directory.
29571            . $builddepsfile
29572            # Now extract variables from the builddeps.conf files.
29573            theroot=${builddep_cups_ROOT}
29574            thecflags=${builddep_cups_CFLAGS}
29575            thelibs=${builddep_cups_LIBS}
29576            if test "x$depdir" = x; then
29577                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29578            fi
29579            CUPS=$depdir
29580            if test "x$theroot" != x; then
29581               CUPS="$theroot"
29582            fi
29583            if test "x$thecflags" != x; then
29584               CUPS_CFLAGS="$thecflags"
29585            fi
29586            if test "x$thelibs" != x; then
29587               CUPS_LIBS="$thelibs"
29588            fi
29589            CUPS_FOUND=yes
29590
29591        fi
29592
29593    fi
29594
29595	fi
29596	if test "x$CUPS_FOUND" = xno; then
29597	    # Are the cups headers installed in the default /usr/include location?
29598	    for ac_header in cups/cups.h cups/ppd.h
29599do :
29600  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29601ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29602if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29603  cat >>confdefs.h <<_ACEOF
29604#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29605_ACEOF
29606 CUPS_FOUND=yes
29607	                      CUPS_CFLAGS=
29608	                      DEFAULT_CUPS=yes
29609fi
29610
29611done
29612
29613	fi
29614	if test "x$CUPS_FOUND" = xno; then
29615	    # Getting nervous now? Lets poke around for standard Solaris third-party
29616	    # package installation locations.
29617	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29618$as_echo_n "checking for cups headers... " >&6; }
29619	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29620	       # An SFW package seems to be installed!
29621	       CUPS_FOUND=yes
29622	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29623	    elif test -s /opt/csw/include/cups/cups.h; then
29624	       # A CSW package seems to be installed!
29625	       CUPS_FOUND=yes
29626	       CUPS_CFLAGS="-I/opt/csw/include"
29627	    fi
29628	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29629$as_echo "$CUPS_FOUND" >&6; }
29630	fi
29631	if test "x$CUPS_FOUND" = xno; then
29632
29633    # Print a helpful message on how to acquire the necessary build dependency.
29634    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29635    MISSING_DEPENDENCY=cups
29636    PKGHANDLER_COMMAND=
29637
29638    case $PKGHANDLER in
29639	apt-get)
29640                apt_help     $MISSING_DEPENDENCY ;;
29641    yum)
29642                yum_help     $MISSING_DEPENDENCY ;;
29643	port)
29644                port_help    $MISSING_DEPENDENCY ;;
29645	pkgutil)
29646                pkgutil_help $MISSING_DEPENDENCY ;;
29647	pkgadd)
29648                pkgadd_help  $MISSING_DEPENDENCY ;;
29649    * )
29650      break ;;
29651    esac
29652
29653    if test "x$PKGHANDLER_COMMAND" != x; then
29654        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29655    fi
29656
29657	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29658	fi
29659fi
29660
29661
29662
29663
29664
29665
29666###############################################################################
29667#
29668# The ubiquitous freetype2 library is used to render fonts.
29669#
29670
29671# Check whether --with-freetype was given.
29672if test "${with_freetype+set}" = set; then :
29673  withval=$with_freetype;
29674fi
29675
29676
29677# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29678USING_SYSTEM_FT_LIB=false
29679
29680if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29681	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29682		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29683$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29684	fi
29685	FREETYPE2_CFLAGS=
29686	FREETYPE2_LIBS=
29687        FREETYPE2_LIB_PATH=
29688else
29689	FREETYPE2_FOUND=no
29690
29691	if test "x$with_freetype" != x; then
29692
29693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29694
29695  # Input might be given as Windows format, start by converting to
29696  # unix format.
29697  path="$with_freetype"
29698  new_path=`$CYGPATH -u "$path"`
29699
29700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29703  # "foo.exe" is OK but "foo" is an error.
29704  #
29705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29706  # It is also a way to make sure we got the proper file name for the real test later on.
29707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29708  if test "x$test_shortpath" = x; then
29709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29710$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29711    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29712  fi
29713
29714  # Call helper function which possibly converts this using DOS-style short mode.
29715  # If so, the updated path is stored in $new_path.
29716
29717  input_path="$new_path"
29718  # Check if we need to convert this using DOS-style short mode. If the path
29719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29720  # take no chances and rewrite it.
29721  # Note: m4 eats our [], so we need to use [ and ] instead.
29722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29723  if test "x$has_forbidden_chars" != x; then
29724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29728      # Going to short mode and back again did indeed matter. Since short mode is
29729      # case insensitive, let's make it lowercase to improve readability.
29730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29731      # Now convert it back to Unix-stile (cygpath)
29732      input_path=`$CYGPATH -u "$shortmode_path"`
29733      new_path="$input_path"
29734    fi
29735  fi
29736
29737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29738  if test "x$test_cygdrive_prefix" = x; then
29739    # As a simple fix, exclude /usr/bin since it's not a real path.
29740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29742      # a path prefixed by /cygdrive for fixpath to work.
29743      new_path="$CYGWIN_ROOT_PATH$input_path"
29744    fi
29745  fi
29746
29747
29748  if test "x$path" != "x$new_path"; then
29749    with_freetype="$new_path"
29750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29751$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29752  fi
29753
29754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29755
29756  path="$with_freetype"
29757  has_colon=`$ECHO $path | $GREP ^.:`
29758  new_path="$path"
29759  if test "x$has_colon" = x; then
29760    # Not in mixed or Windows style, start by that.
29761    new_path=`cmd //c echo $path`
29762  fi
29763
29764
29765  input_path="$new_path"
29766  # Check if we need to convert this using DOS-style short mode. If the path
29767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29768  # take no chances and rewrite it.
29769  # Note: m4 eats our [], so we need to use [ and ] instead.
29770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29771  if test "x$has_forbidden_chars" != x; then
29772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29774  fi
29775
29776
29777  windows_path="$new_path"
29778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29779    unix_path=`$CYGPATH -u "$windows_path"`
29780    new_path="$unix_path"
29781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29783    new_path="$unix_path"
29784  fi
29785
29786  if test "x$path" != "x$new_path"; then
29787    with_freetype="$new_path"
29788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29789$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29790  fi
29791
29792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29794
29795  else
29796    # We're on a posix platform. Hooray! :)
29797    path="$with_freetype"
29798
29799    if test ! -f "$path" && test ! -d "$path"; then
29800      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29801    fi
29802
29803    has_space=`$ECHO "$path" | $GREP " "`
29804    if test "x$has_space" != x; then
29805      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29806$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29807      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29808    fi
29809  fi
29810
29811	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29812            FREETYPE2_LIB_PATH="$with_freetype/lib"
29813            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29814                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29815                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29816            fi
29817            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29818                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29819            fi
29820	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29821            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29822                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29823            fi
29824 	    FREETYPE2_FOUND=yes
29825   	    if test "x$FREETYPE2_FOUND" = xyes; then
29826	        # Verify that the directories exist
29827                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29828		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29829		fi
29830	        # List the contents of the lib.
29831		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29832                if test "x$FREETYPELIB" = x; then
29833		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29834		fi
29835	        # Check one h-file
29836                if ! test -s "$with_freetype/include/ft2build.h"; then
29837		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29838		fi
29839            fi
29840        fi
29841	if test "x$FREETYPE2_FOUND" = xno; then
29842
29843
29844    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29845        # Source the builddeps file again, to make sure it uses the latest variables!
29846        . $builddepsfile
29847        # Look for a target and build machine specific resource!
29848        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29849        if test "x$resource" = x; then
29850            # Ok, lets instead look for a target specific resource
29851            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29852        fi
29853        if test "x$resource" = x; then
29854            # Ok, lets instead look for a build specific resource
29855            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29856        fi
29857        if test "x$resource" = x; then
29858            # Ok, lets instead look for a generic resource
29859            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29860            resource=${builddep_freetype2}
29861        fi
29862        if test "x$resource" != x; then
29863            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29864$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29865	    # If the resource in the builddeps.conf file is an existing directory,
29866	    # for example /java/linux/cups
29867	    if test -d ${resource}; then
29868	       depdir=${resource}
29869	    else
29870
29871# freetype2 is for example mymodule
29872# $resource is for example libs/general/libmymod_1_2_3.zip
29873# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29874# $with_builddeps_dir is for example /localhome/builddeps
29875# depdir is the name of the variable into which we store the depdir, eg MYMOD
29876# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29877# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29878    filename=`basename $resource`
29879    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29880    filebase=${filename%%.*}
29881    extension=${filename#*.}
29882    installdir=$with_builddeps_dir/$filebase
29883    if test ! -f $installdir/$filename.unpacked; then
29884        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29885$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29886        if test ! -d $installdir; then
29887            mkdir -p $installdir
29888        fi
29889        if test ! -d $installdir; then
29890            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29891        fi
29892        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29893        touch $tmpfile
29894        if test ! -f $tmpfile; then
29895            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29896        fi
29897
29898    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29899    # $tmpfile is the local file name for the downloaded file.
29900    VALID_TOOL=no
29901    if test "x$BDEPS_FTP" = xwget; then
29902       VALID_TOOL=yes
29903       wget -O $tmpfile $with_builddeps_server/$resource
29904    fi
29905    if test "x$BDEPS_FTP" = xlftp; then
29906       VALID_TOOL=yes
29907       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29908    fi
29909    if test "x$BDEPS_FTP" = xftp; then
29910        VALID_TOOL=yes
29911        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29912        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29913        FTPUSERPWD=${FTPSERVER%%@*}
29914        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29915            FTPUSER=${userpwd%%:*}
29916            FTPPWD=${userpwd#*@}
29917            FTPSERVER=${FTPSERVER#*@}
29918        else
29919            FTPUSER=ftp
29920            FTPPWD=ftp
29921        fi
29922        # the "pass" command does not work on some
29923        # ftp clients (read ftp.exe) but if it works,
29924        # passive mode is better!
29925        (\
29926            echo "user $FTPUSER $FTPPWD"        ;\
29927            echo "pass"                         ;\
29928            echo "bin"                          ;\
29929            echo "get $FTPPATH $tmpfile"              ;\
29930        ) | ftp -in $FTPSERVER
29931    fi
29932    if test "x$VALID_TOOL" != xyes; then
29933       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29934    fi
29935
29936        mv $tmpfile $installdir/$filename
29937        if test ! -s $installdir/$filename; then
29938            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29939        fi
29940        case "$extension" in
29941            zip)  echo "Unzipping $installdir/$filename..."
29942               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29943            ;;
29944            tar.gz) echo "Untaring $installdir/$filename..."
29945               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29946            ;;
29947            tgz) echo "Untaring $installdir/$filename..."
29948               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29949            ;;
29950            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29951            ;;
29952        esac
29953    fi
29954    if test -f $installdir/$filename.unpacked; then
29955        depdir=$installdir
29956    fi
29957
29958	    fi
29959            # Source the builddeps file again, because in the previous command, the depdir
29960            # was updated to point at the current build dependency install directory.
29961            . $builddepsfile
29962            # Now extract variables from the builddeps.conf files.
29963            theroot=${builddep_freetype2_ROOT}
29964            thecflags=${builddep_freetype2_CFLAGS}
29965            thelibs=${builddep_freetype2_LIBS}
29966            if test "x$depdir" = x; then
29967                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29968            fi
29969            FREETYPE2=$depdir
29970            if test "x$theroot" != x; then
29971               FREETYPE2="$theroot"
29972            fi
29973            if test "x$thecflags" != x; then
29974               FREETYPE2_CFLAGS="$thecflags"
29975            fi
29976            if test "x$thelibs" != x; then
29977               FREETYPE2_LIBS="$thelibs"
29978            fi
29979            FREETYPE2_FOUND=yes
29980            else FREETYPE2_FOUND=no
29981
29982        fi
29983        else FREETYPE2_FOUND=no
29984
29985    fi
29986
29987            USING_SYSTEM_FT_LIB=true
29988	fi
29989	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29990            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29991
29992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29993
29994  # Input might be given as Windows format, start by converting to
29995  # unix format.
29996  path="$FREETYPELOCATION"
29997  new_path=`$CYGPATH -u "$path"`
29998
29999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30002  # "foo.exe" is OK but "foo" is an error.
30003  #
30004  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30005  # It is also a way to make sure we got the proper file name for the real test later on.
30006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30007  if test "x$test_shortpath" = x; then
30008    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30009$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30010    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30011  fi
30012
30013  # Call helper function which possibly converts this using DOS-style short mode.
30014  # If so, the updated path is stored in $new_path.
30015
30016  input_path="$new_path"
30017  # Check if we need to convert this using DOS-style short mode. If the path
30018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30019  # take no chances and rewrite it.
30020  # Note: m4 eats our [], so we need to use [ and ] instead.
30021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30022  if test "x$has_forbidden_chars" != x; then
30023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30027      # Going to short mode and back again did indeed matter. Since short mode is
30028      # case insensitive, let's make it lowercase to improve readability.
30029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30030      # Now convert it back to Unix-stile (cygpath)
30031      input_path=`$CYGPATH -u "$shortmode_path"`
30032      new_path="$input_path"
30033    fi
30034  fi
30035
30036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30037  if test "x$test_cygdrive_prefix" = x; then
30038    # As a simple fix, exclude /usr/bin since it's not a real path.
30039    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30041      # a path prefixed by /cygdrive for fixpath to work.
30042      new_path="$CYGWIN_ROOT_PATH$input_path"
30043    fi
30044  fi
30045
30046
30047  if test "x$path" != "x$new_path"; then
30048    FREETYPELOCATION="$new_path"
30049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30050$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30051  fi
30052
30053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30054
30055  path="$FREETYPELOCATION"
30056  has_colon=`$ECHO $path | $GREP ^.:`
30057  new_path="$path"
30058  if test "x$has_colon" = x; then
30059    # Not in mixed or Windows style, start by that.
30060    new_path=`cmd //c echo $path`
30061  fi
30062
30063
30064  input_path="$new_path"
30065  # Check if we need to convert this using DOS-style short mode. If the path
30066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30067  # take no chances and rewrite it.
30068  # Note: m4 eats our [], so we need to use [ and ] instead.
30069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30070  if test "x$has_forbidden_chars" != x; then
30071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30073  fi
30074
30075
30076  windows_path="$new_path"
30077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30078    unix_path=`$CYGPATH -u "$windows_path"`
30079    new_path="$unix_path"
30080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30082    new_path="$unix_path"
30083  fi
30084
30085  if test "x$path" != "x$new_path"; then
30086    FREETYPELOCATION="$new_path"
30087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30088$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30089  fi
30090
30091  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30092  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30093
30094  else
30095    # We're on a posix platform. Hooray! :)
30096    path="$FREETYPELOCATION"
30097
30098    if test ! -f "$path" && test ! -d "$path"; then
30099      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30100    fi
30101
30102    has_space=`$ECHO "$path" | $GREP " "`
30103    if test "x$has_space" != x; then
30104      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30105$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30106      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30107    fi
30108  fi
30109
30110	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30111$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30112	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30113	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30114	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30115 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30116                if ! test -s "$FREETYPE2_LIBS"; then
30117		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30118		fi
30119                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30120		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30121		fi
30122                USING_SYSTEM_FT_LIB=true
30123                FREETYPE2_FOUND=yes
30124	    fi
30125	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30126$as_echo "$FREETYPE2_FOUND" >&6; }
30127        fi
30128	if test "x$FREETYPE2_FOUND" = xno; then
30129
30130pkg_failed=no
30131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30132$as_echo_n "checking for FREETYPE2... " >&6; }
30133
30134if test -n "$FREETYPE2_CFLAGS"; then
30135    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30136 elif test -n "$PKG_CONFIG"; then
30137    if test -n "$PKG_CONFIG" && \
30138    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30139  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30140  ac_status=$?
30141  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30142  test $ac_status = 0; }; then
30143  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30144else
30145  pkg_failed=yes
30146fi
30147 else
30148    pkg_failed=untried
30149fi
30150if test -n "$FREETYPE2_LIBS"; then
30151    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30152 elif test -n "$PKG_CONFIG"; then
30153    if test -n "$PKG_CONFIG" && \
30154    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30155  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30156  ac_status=$?
30157  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30158  test $ac_status = 0; }; then
30159  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30160else
30161  pkg_failed=yes
30162fi
30163 else
30164    pkg_failed=untried
30165fi
30166
30167
30168
30169if test $pkg_failed = yes; then
30170
30171if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30172        _pkg_short_errors_supported=yes
30173else
30174        _pkg_short_errors_supported=no
30175fi
30176        if test $_pkg_short_errors_supported = yes; then
30177	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30178        else
30179	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30180        fi
30181	# Put the nasty error message in config.log where it belongs
30182	echo "$FREETYPE2_PKG_ERRORS" >&5
30183
30184	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30185$as_echo "no" >&6; }
30186                FREETYPE2_FOUND=no
30187elif test $pkg_failed = untried; then
30188	FREETYPE2_FOUND=no
30189else
30190	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30191	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30193$as_echo "yes" >&6; }
30194	FREETYPE2_FOUND=yes
30195fi
30196            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30197            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30198            USING_SYSTEM_FT_LIB=true
30199            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30200            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30201              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30202            fi
30203	fi
30204	if test "x$FREETYPE2_FOUND" = xno; then
30205	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30206$as_echo_n "checking for freetype in some standard locations... " >&6; }
30207
30208	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30209	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30210	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30211	    fi
30212	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30213	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30214	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30215	    fi
30216
30217	    PREV_CXXCFLAGS="$CXXFLAGS"
30218	    PREV_LDFLAGS="$LDFLAGS"
30219	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30220	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30221	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30222/* end confdefs.h.  */
30223#include<ft2build.h>
30224	                    #include FT_FREETYPE_H
30225	                   int main() { return 0; }
30226
30227_ACEOF
30228if ac_fn_cxx_try_link "$LINENO"; then :
30229
30230	                      # Yes, the default cflags and libs did the trick.
30231	                      FREETYPE2_FOUND=yes
30232	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30233	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30234
30235else
30236
30237	                      FREETYPE2_FOUND=no
30238
30239fi
30240rm -f core conftest.err conftest.$ac_objext \
30241    conftest$ac_exeext conftest.$ac_ext
30242            CXXCFLAGS="$PREV_CXXFLAGS"
30243	    LDFLAGS="$PREV_LDFLAGS"
30244	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30245$as_echo "$FREETYPE2_FOUND" >&6; }
30246            USING_SYSTEM_FT_LIB=true
30247	fi
30248	if test "x$FREETYPE2_FOUND" = xno; then
30249
30250    # Print a helpful message on how to acquire the necessary build dependency.
30251    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30252    MISSING_DEPENDENCY=freetype2
30253    PKGHANDLER_COMMAND=
30254
30255    case $PKGHANDLER in
30256	apt-get)
30257                apt_help     $MISSING_DEPENDENCY ;;
30258    yum)
30259                yum_help     $MISSING_DEPENDENCY ;;
30260	port)
30261                port_help    $MISSING_DEPENDENCY ;;
30262	pkgutil)
30263                pkgutil_help $MISSING_DEPENDENCY ;;
30264	pkgadd)
30265                pkgadd_help  $MISSING_DEPENDENCY ;;
30266    * )
30267      break ;;
30268    esac
30269
30270    if test "x$PKGHANDLER_COMMAND" != x; then
30271        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30272    fi
30273
30274		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30275	fi
30276
30277        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30278            # AC_CHECK_LIB does not support use of cl.exe
30279            PREV_LDFLAGS="$LDFLAGS"
30280            LDFLAGS="$FREETYPE2_LIBS"
30281            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30282$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30283if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30284  $as_echo_n "(cached) " >&6
30285else
30286  ac_check_lib_save_LIBS=$LIBS
30287LIBS="-lfreetype  $LIBS"
30288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30289/* end confdefs.h.  */
30290
30291/* Override any GCC internal prototype to avoid an error.
30292   Use char because int might match the return type of a GCC
30293   builtin and then its argument prototype would still apply.  */
30294#ifdef __cplusplus
30295extern "C"
30296#endif
30297char FT_Init_FreeType ();
30298int
30299main ()
30300{
30301return FT_Init_FreeType ();
30302  ;
30303  return 0;
30304}
30305_ACEOF
30306if ac_fn_cxx_try_link "$LINENO"; then :
30307  ac_cv_lib_freetype_FT_Init_FreeType=yes
30308else
30309  ac_cv_lib_freetype_FT_Init_FreeType=no
30310fi
30311rm -f core conftest.err conftest.$ac_objext \
30312    conftest$ac_exeext conftest.$ac_ext
30313LIBS=$ac_check_lib_save_LIBS
30314fi
30315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30316$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30317if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30318  FREETYPE2_FOUND=true
30319else
30320  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30321fi
30322
30323            LDFLAGS="$PREV_LDFLAGS"
30324        fi
30325fi
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335###############################################################################
30336#
30337# Check for alsa headers and libraries. Used on Linux/GNU systems.
30338#
30339
30340# Check whether --with-alsa was given.
30341if test "${with_alsa+set}" = set; then :
30342  withval=$with_alsa;
30343fi
30344
30345
30346# Check whether --with-alsa-include was given.
30347if test "${with_alsa_include+set}" = set; then :
30348  withval=$with_alsa_include;
30349fi
30350
30351
30352# Check whether --with-alsa-lib was given.
30353if test "${with_alsa_lib+set}" = set; then :
30354  withval=$with_alsa_lib;
30355fi
30356
30357
30358if test "x$ALSA_NOT_NEEDED" = xyes; then
30359	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30360		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30361$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30362	fi
30363	ALSA_CFLAGS=
30364	ALSA_LIBS=
30365else
30366	ALSA_FOUND=no
30367
30368	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30369	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30370	fi
30371
30372	if test "x${with_alsa}" != x; then
30373	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30374	    ALSA_CFLAGS="-I${with_alsa}/include"
30375	    ALSA_FOUND=yes
30376	fi
30377	if test "x${with_alsa_include}" != x; then
30378	    ALSA_CFLAGS="-I${with_alsa_include}"
30379	    ALSA_FOUND=yes
30380	fi
30381	if test "x${with_alsa_lib}" != x; then
30382	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30383	    ALSA_FOUND=yes
30384	fi
30385	if test "x$ALSA_FOUND" = xno; then
30386
30387
30388    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30389        # Source the builddeps file again, to make sure it uses the latest variables!
30390        . $builddepsfile
30391        # Look for a target and build machine specific resource!
30392        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30393        if test "x$resource" = x; then
30394            # Ok, lets instead look for a target specific resource
30395            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30396        fi
30397        if test "x$resource" = x; then
30398            # Ok, lets instead look for a build specific resource
30399            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30400        fi
30401        if test "x$resource" = x; then
30402            # Ok, lets instead look for a generic resource
30403            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30404            resource=${builddep_alsa}
30405        fi
30406        if test "x$resource" != x; then
30407            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30408$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30409	    # If the resource in the builddeps.conf file is an existing directory,
30410	    # for example /java/linux/cups
30411	    if test -d ${resource}; then
30412	       depdir=${resource}
30413	    else
30414
30415# alsa is for example mymodule
30416# $resource is for example libs/general/libmymod_1_2_3.zip
30417# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30418# $with_builddeps_dir is for example /localhome/builddeps
30419# depdir is the name of the variable into which we store the depdir, eg MYMOD
30420# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30421# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30422    filename=`basename $resource`
30423    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30424    filebase=${filename%%.*}
30425    extension=${filename#*.}
30426    installdir=$with_builddeps_dir/$filebase
30427    if test ! -f $installdir/$filename.unpacked; then
30428        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30429$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30430        if test ! -d $installdir; then
30431            mkdir -p $installdir
30432        fi
30433        if test ! -d $installdir; then
30434            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30435        fi
30436        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30437        touch $tmpfile
30438        if test ! -f $tmpfile; then
30439            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30440        fi
30441
30442    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30443    # $tmpfile is the local file name for the downloaded file.
30444    VALID_TOOL=no
30445    if test "x$BDEPS_FTP" = xwget; then
30446       VALID_TOOL=yes
30447       wget -O $tmpfile $with_builddeps_server/$resource
30448    fi
30449    if test "x$BDEPS_FTP" = xlftp; then
30450       VALID_TOOL=yes
30451       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30452    fi
30453    if test "x$BDEPS_FTP" = xftp; then
30454        VALID_TOOL=yes
30455        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30456        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30457        FTPUSERPWD=${FTPSERVER%%@*}
30458        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30459            FTPUSER=${userpwd%%:*}
30460            FTPPWD=${userpwd#*@}
30461            FTPSERVER=${FTPSERVER#*@}
30462        else
30463            FTPUSER=ftp
30464            FTPPWD=ftp
30465        fi
30466        # the "pass" command does not work on some
30467        # ftp clients (read ftp.exe) but if it works,
30468        # passive mode is better!
30469        (\
30470            echo "user $FTPUSER $FTPPWD"        ;\
30471            echo "pass"                         ;\
30472            echo "bin"                          ;\
30473            echo "get $FTPPATH $tmpfile"              ;\
30474        ) | ftp -in $FTPSERVER
30475    fi
30476    if test "x$VALID_TOOL" != xyes; then
30477       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30478    fi
30479
30480        mv $tmpfile $installdir/$filename
30481        if test ! -s $installdir/$filename; then
30482            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30483        fi
30484        case "$extension" in
30485            zip)  echo "Unzipping $installdir/$filename..."
30486               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30487            ;;
30488            tar.gz) echo "Untaring $installdir/$filename..."
30489               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30490            ;;
30491            tgz) echo "Untaring $installdir/$filename..."
30492               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30493            ;;
30494            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30495            ;;
30496        esac
30497    fi
30498    if test -f $installdir/$filename.unpacked; then
30499        depdir=$installdir
30500    fi
30501
30502	    fi
30503            # Source the builddeps file again, because in the previous command, the depdir
30504            # was updated to point at the current build dependency install directory.
30505            . $builddepsfile
30506            # Now extract variables from the builddeps.conf files.
30507            theroot=${builddep_alsa_ROOT}
30508            thecflags=${builddep_alsa_CFLAGS}
30509            thelibs=${builddep_alsa_LIBS}
30510            if test "x$depdir" = x; then
30511                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30512            fi
30513            ALSA=$depdir
30514            if test "x$theroot" != x; then
30515               ALSA="$theroot"
30516            fi
30517            if test "x$thecflags" != x; then
30518               ALSA_CFLAGS="$thecflags"
30519            fi
30520            if test "x$thelibs" != x; then
30521               ALSA_LIBS="$thelibs"
30522            fi
30523            ALSA_FOUND=yes
30524            else ALSA_FOUND=no
30525
30526        fi
30527        else ALSA_FOUND=no
30528
30529    fi
30530
30531	fi
30532	if test "x$ALSA_FOUND" = xno; then
30533
30534pkg_failed=no
30535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30536$as_echo_n "checking for ALSA... " >&6; }
30537
30538if test -n "$ALSA_CFLAGS"; then
30539    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30540 elif test -n "$PKG_CONFIG"; then
30541    if test -n "$PKG_CONFIG" && \
30542    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30543  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30544  ac_status=$?
30545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30546  test $ac_status = 0; }; then
30547  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30548else
30549  pkg_failed=yes
30550fi
30551 else
30552    pkg_failed=untried
30553fi
30554if test -n "$ALSA_LIBS"; then
30555    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30556 elif test -n "$PKG_CONFIG"; then
30557    if test -n "$PKG_CONFIG" && \
30558    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30559  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30560  ac_status=$?
30561  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30562  test $ac_status = 0; }; then
30563  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30564else
30565  pkg_failed=yes
30566fi
30567 else
30568    pkg_failed=untried
30569fi
30570
30571
30572
30573if test $pkg_failed = yes; then
30574
30575if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30576        _pkg_short_errors_supported=yes
30577else
30578        _pkg_short_errors_supported=no
30579fi
30580        if test $_pkg_short_errors_supported = yes; then
30581	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30582        else
30583	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30584        fi
30585	# Put the nasty error message in config.log where it belongs
30586	echo "$ALSA_PKG_ERRORS" >&5
30587
30588	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30589$as_echo "no" >&6; }
30590                ALSA_FOUND=no
30591elif test $pkg_failed = untried; then
30592	ALSA_FOUND=no
30593else
30594	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30595	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30597$as_echo "yes" >&6; }
30598	ALSA_FOUND=yes
30599fi
30600	fi
30601	if test "x$ALSA_FOUND" = xno; then
30602	    for ac_header in alsa/asoundlib.h
30603do :
30604  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30605if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30606  cat >>confdefs.h <<_ACEOF
30607#define HAVE_ALSA_ASOUNDLIB_H 1
30608_ACEOF
30609 ALSA_FOUND=yes
30610	                      ALSA_CFLAGS=-Iignoreme
30611	                      ALSA_LIBS=-lasound
30612	                      DEFAULT_ALSA=yes
30613else
30614  ALSA_FOUND=no
30615fi
30616
30617done
30618
30619	fi
30620	if test "x$ALSA_FOUND" = xno; then
30621
30622    # Print a helpful message on how to acquire the necessary build dependency.
30623    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30624    MISSING_DEPENDENCY=alsa
30625    PKGHANDLER_COMMAND=
30626
30627    case $PKGHANDLER in
30628	apt-get)
30629                apt_help     $MISSING_DEPENDENCY ;;
30630    yum)
30631                yum_help     $MISSING_DEPENDENCY ;;
30632	port)
30633                port_help    $MISSING_DEPENDENCY ;;
30634	pkgutil)
30635                pkgutil_help $MISSING_DEPENDENCY ;;
30636	pkgadd)
30637                pkgadd_help  $MISSING_DEPENDENCY ;;
30638    * )
30639      break ;;
30640    esac
30641
30642    if test "x$PKGHANDLER_COMMAND" != x; then
30643        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30644    fi
30645
30646	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30647	fi
30648fi
30649
30650
30651
30652
30653
30654
30655
30656###############################################################################
30657#
30658# Check for the jpeg library
30659#
30660
30661USE_EXTERNAL_LIBJPEG=true
30662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30663$as_echo_n "checking for main in -ljpeg... " >&6; }
30664if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30665  $as_echo_n "(cached) " >&6
30666else
30667  ac_check_lib_save_LIBS=$LIBS
30668LIBS="-ljpeg  $LIBS"
30669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30670/* end confdefs.h.  */
30671
30672
30673int
30674main ()
30675{
30676return main ();
30677  ;
30678  return 0;
30679}
30680_ACEOF
30681if ac_fn_cxx_try_link "$LINENO"; then :
30682  ac_cv_lib_jpeg_main=yes
30683else
30684  ac_cv_lib_jpeg_main=no
30685fi
30686rm -f core conftest.err conftest.$ac_objext \
30687    conftest$ac_exeext conftest.$ac_ext
30688LIBS=$ac_check_lib_save_LIBS
30689fi
30690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30691$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30692if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30693  cat >>confdefs.h <<_ACEOF
30694#define HAVE_LIBJPEG 1
30695_ACEOF
30696
30697  LIBS="-ljpeg $LIBS"
30698
30699else
30700   USE_EXTERNAL_LIBJPEG=false
30701               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30702$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30703
30704fi
30705
30706
30707
30708###############################################################################
30709#
30710# Check for the gif library
30711#
30712
30713USE_EXTERNAL_LIBJPEG=true
30714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30715$as_echo_n "checking for main in -lgif... " >&6; }
30716if test "${ac_cv_lib_gif_main+set}" = set; then :
30717  $as_echo_n "(cached) " >&6
30718else
30719  ac_check_lib_save_LIBS=$LIBS
30720LIBS="-lgif  $LIBS"
30721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30722/* end confdefs.h.  */
30723
30724
30725int
30726main ()
30727{
30728return main ();
30729  ;
30730  return 0;
30731}
30732_ACEOF
30733if ac_fn_cxx_try_link "$LINENO"; then :
30734  ac_cv_lib_gif_main=yes
30735else
30736  ac_cv_lib_gif_main=no
30737fi
30738rm -f core conftest.err conftest.$ac_objext \
30739    conftest$ac_exeext conftest.$ac_ext
30740LIBS=$ac_check_lib_save_LIBS
30741fi
30742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30743$as_echo "$ac_cv_lib_gif_main" >&6; }
30744if test "x$ac_cv_lib_gif_main" = x""yes; then :
30745  cat >>confdefs.h <<_ACEOF
30746#define HAVE_LIBGIF 1
30747_ACEOF
30748
30749  LIBS="-lgif $LIBS"
30750
30751else
30752   USE_EXTERNAL_LIBGIF=false
30753               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30754$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30755
30756fi
30757
30758
30759
30760###############################################################################
30761#
30762# Check for the zlib library
30763#
30764
30765
30766# Check whether --with-zlib was given.
30767if test "${with_zlib+set}" = set; then :
30768  withval=$with_zlib;
30769fi
30770
30771
30772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30773$as_echo_n "checking for compress in -lz... " >&6; }
30774if test "${ac_cv_lib_z_compress+set}" = set; then :
30775  $as_echo_n "(cached) " >&6
30776else
30777  ac_check_lib_save_LIBS=$LIBS
30778LIBS="-lz  $LIBS"
30779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30780/* end confdefs.h.  */
30781
30782/* Override any GCC internal prototype to avoid an error.
30783   Use char because int might match the return type of a GCC
30784   builtin and then its argument prototype would still apply.  */
30785#ifdef __cplusplus
30786extern "C"
30787#endif
30788char compress ();
30789int
30790main ()
30791{
30792return compress ();
30793  ;
30794  return 0;
30795}
30796_ACEOF
30797if ac_fn_cxx_try_link "$LINENO"; then :
30798  ac_cv_lib_z_compress=yes
30799else
30800  ac_cv_lib_z_compress=no
30801fi
30802rm -f core conftest.err conftest.$ac_objext \
30803    conftest$ac_exeext conftest.$ac_ext
30804LIBS=$ac_check_lib_save_LIBS
30805fi
30806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30807$as_echo "$ac_cv_lib_z_compress" >&6; }
30808if test "x$ac_cv_lib_z_compress" = x""yes; then :
30809   ZLIB_FOUND=yes
30810else
30811   ZLIB_FOUND=no
30812fi
30813
30814
30815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30816$as_echo_n "checking for which zlib to use... " >&6; }
30817
30818DEFAULT_ZLIB=bundled
30819if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30820#
30821# On macosx default is system...on others default is
30822#
30823    DEFAULT_ZLIB=system
30824fi
30825
30826if test "x${ZLIB_FOUND}" != "xyes"; then
30827#
30828# If we don't find any system...set default to bundled
30829#
30830    DEFAULT_ZLIB=bundled
30831fi
30832
30833#
30834# If user didn't specify, use DEFAULT_ZLIB
30835#
30836if test "x${with_zlib}" = "x"; then
30837    with_zlib=${DEFAULT_ZLIB}
30838fi
30839
30840if test "x${with_zlib}" = "xbundled"; then
30841    USE_EXTERNAL_LIBZ=false
30842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30843$as_echo "bundled" >&6; }
30844elif test "x${with_zlib}" = "xsystem"; then
30845    if test "x${ZLIB_FOUND}" = "xyes"; then
30846        USE_EXTERNAL_LIBZ=true
30847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30848$as_echo "system" >&6; }
30849    else
30850        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30851$as_echo "system not found" >&6; }
30852        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30853    fi
30854else
30855    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30856fi
30857
30858
30859
30860###############################################################################
30861LIBZIP_CAN_USE_MMAP=true
30862
30863
30864
30865###############################################################################
30866#
30867# Check if altzone exists in time.h
30868#
30869
30870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30871/* end confdefs.h.  */
30872#include <time.h>
30873int
30874main ()
30875{
30876return (int)altzone;
30877  ;
30878  return 0;
30879}
30880_ACEOF
30881if ac_fn_cxx_try_link "$LINENO"; then :
30882  has_altzone=yes
30883else
30884  has_altzone=no
30885fi
30886rm -f core conftest.err conftest.$ac_objext \
30887    conftest$ac_exeext conftest.$ac_ext
30888if test "x$has_altzone" = xyes; then
30889
30890$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30891
30892fi
30893
30894###############################################################################
30895#
30896# Check the maths library
30897#
30898
30899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30900$as_echo_n "checking for cos in -lm... " >&6; }
30901if test "${ac_cv_lib_m_cos+set}" = set; then :
30902  $as_echo_n "(cached) " >&6
30903else
30904  ac_check_lib_save_LIBS=$LIBS
30905LIBS="-lm  $LIBS"
30906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30907/* end confdefs.h.  */
30908
30909/* Override any GCC internal prototype to avoid an error.
30910   Use char because int might match the return type of a GCC
30911   builtin and then its argument prototype would still apply.  */
30912#ifdef __cplusplus
30913extern "C"
30914#endif
30915char cos ();
30916int
30917main ()
30918{
30919return cos ();
30920  ;
30921  return 0;
30922}
30923_ACEOF
30924if ac_fn_cxx_try_link "$LINENO"; then :
30925  ac_cv_lib_m_cos=yes
30926else
30927  ac_cv_lib_m_cos=no
30928fi
30929rm -f core conftest.err conftest.$ac_objext \
30930    conftest$ac_exeext conftest.$ac_ext
30931LIBS=$ac_check_lib_save_LIBS
30932fi
30933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30934$as_echo "$ac_cv_lib_m_cos" >&6; }
30935if test "x$ac_cv_lib_m_cos" = x""yes; then :
30936  cat >>confdefs.h <<_ACEOF
30937#define HAVE_LIBM 1
30938_ACEOF
30939
30940  LIBS="-lm $LIBS"
30941
30942else
30943
30944                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30945$as_echo "$as_me: Maths library was not found" >&6;}
30946
30947fi
30948
30949
30950
30951###############################################################################
30952#
30953# Check for libdl.so
30954
30955save_LIBS="$LIBS"
30956LIBS=""
30957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30958$as_echo_n "checking for dlopen in -ldl... " >&6; }
30959if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30960  $as_echo_n "(cached) " >&6
30961else
30962  ac_check_lib_save_LIBS=$LIBS
30963LIBS="-ldl  $LIBS"
30964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30965/* end confdefs.h.  */
30966
30967/* Override any GCC internal prototype to avoid an error.
30968   Use char because int might match the return type of a GCC
30969   builtin and then its argument prototype would still apply.  */
30970#ifdef __cplusplus
30971extern "C"
30972#endif
30973char dlopen ();
30974int
30975main ()
30976{
30977return dlopen ();
30978  ;
30979  return 0;
30980}
30981_ACEOF
30982if ac_fn_cxx_try_link "$LINENO"; then :
30983  ac_cv_lib_dl_dlopen=yes
30984else
30985  ac_cv_lib_dl_dlopen=no
30986fi
30987rm -f core conftest.err conftest.$ac_objext \
30988    conftest$ac_exeext conftest.$ac_ext
30989LIBS=$ac_check_lib_save_LIBS
30990fi
30991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30992$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30993if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30994  cat >>confdefs.h <<_ACEOF
30995#define HAVE_LIBDL 1
30996_ACEOF
30997
30998  LIBS="-ldl $LIBS"
30999
31000fi
31001
31002LIBDL="$LIBS"
31003
31004LIBS="$save_LIBS"
31005
31006
31007
31008###############################################################################
31009#
31010# statically link libstdc++ before C++ ABI is stablized on Linux unless
31011# dynamic build is configured on command line.
31012#
31013
31014# Check whether --with-stdc++lib was given.
31015if test "${with_stdc__lib+set}" = set; then :
31016  withval=$with_stdc__lib;
31017    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31018        && test "x$with_stdc__lib" != xdefault; then
31019      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31020    fi
31021
31022else
31023  with_stdc__lib=default
31024
31025fi
31026
31027
31028if test "x$OPENJDK_TARGET_OS" = xlinux; then
31029    # Test if -lstdc++ works.
31030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31031$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31032    ac_ext=cpp
31033ac_cpp='$CXXCPP $CPPFLAGS'
31034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31037
31038    OLD_CXXFLAGS="$CXXFLAGS"
31039    CXXFLAGS="$CXXFLAGS -lstdc++"
31040    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31041/* end confdefs.h.  */
31042
31043int
31044main ()
31045{
31046return 0;
31047  ;
31048  return 0;
31049}
31050_ACEOF
31051if ac_fn_cxx_try_link "$LINENO"; then :
31052  has_dynamic_libstdcxx=yes
31053else
31054  has_dynamic_libstdcxx=no
31055fi
31056rm -f core conftest.err conftest.$ac_objext \
31057    conftest$ac_exeext conftest.$ac_ext
31058    CXXFLAGS="$OLD_CXXFLAGS"
31059    ac_ext=cpp
31060ac_cpp='$CXXCPP $CPPFLAGS'
31061ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31062ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31063ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31064
31065    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31066$as_echo "$has_dynamic_libstdcxx" >&6; }
31067
31068    # Test if stdc++ can be linked statically.
31069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31070$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31071    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31072    ac_ext=cpp
31073ac_cpp='$CXXCPP $CPPFLAGS'
31074ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31075ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31076ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31077
31078    OLD_LIBS="$LIBS"
31079    OLD_CXX="$CXX"
31080    LIBS="$STATIC_STDCXX_FLAGS"
31081    CXX="$CC"
31082    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31083/* end confdefs.h.  */
31084
31085int
31086main ()
31087{
31088return 0;
31089  ;
31090  return 0;
31091}
31092_ACEOF
31093if ac_fn_cxx_try_link "$LINENO"; then :
31094  has_static_libstdcxx=yes
31095else
31096  has_static_libstdcxx=no
31097fi
31098rm -f core conftest.err conftest.$ac_objext \
31099    conftest$ac_exeext conftest.$ac_ext
31100    LIBS="$OLD_LIBS"
31101    CXX="$OLD_CXX"
31102    ac_ext=cpp
31103ac_cpp='$CXXCPP $CPPFLAGS'
31104ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31105ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31106ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31107
31108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31109$as_echo "$has_static_libstdcxx" >&6; }
31110
31111    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31112        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31113    fi
31114
31115    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31116        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31117    fi
31118
31119    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31120        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31121    fi
31122
31123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31124$as_echo_n "checking how to link with libstdc++... " >&6; }
31125    # If dynamic was requested, it's available since it would fail above otherwise.
31126    # If dynamic wasn't requested, go with static unless it isn't available.
31127    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31128        LIBCXX="$LIBCXX -lstdc++"
31129        LDCXX="$CXX"
31130        STATIC_CXX_SETTING="STATIC_CXX=false"
31131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31132$as_echo "dynamic" >&6; }
31133    else
31134        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31135        LDCXX="$CC"
31136        STATIC_CXX_SETTING="STATIC_CXX=true"
31137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31138$as_echo "static" >&6; }
31139    fi
31140fi
31141
31142
31143# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31144if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31145    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31146fi
31147
31148# TODO better (platform agnostic) test
31149if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31150    LIBCXX="-lstdc++"
31151fi
31152
31153
31154
31155
31156
31157# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31158
31159# When using cygwin or msys, we need a wrapper binary that renames
31160# /cygdrive/c/ arguments into c:/ arguments and peeks into
31161# @files and rewrites these too! This wrapper binary is
31162# called fixpath.
31163FIXPATH=
31164if test "x$OPENJDK_BUILD_OS" = xwindows; then
31165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31166$as_echo_n "checking if fixpath can be created... " >&6; }
31167    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31168    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31169    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31170      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31171      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31172      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31173      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31174    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31175      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31176      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31177
31178      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31179      # @ was chosen as separator to minimize risk of other tools messing around with it
31180      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31181      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31182
31183      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31184    fi
31185    rm -f $OUTPUT_ROOT/fixpath*
31186    cd $OUTPUT_ROOT
31187    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31188    cd $CURDIR
31189
31190    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31191        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31192$as_echo "no" >&6; }
31193        cat $OUTPUT_ROOT/fixpath1.log
31194        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31195    fi
31196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31197$as_echo "yes" >&6; }
31198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31199$as_echo_n "checking if fixpath.exe works... " >&6; }
31200    cd $OUTPUT_ROOT
31201    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31202    cd $CURDIR
31203    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31204        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31205$as_echo "no" >&6; }
31206        cat $OUTPUT_ROOT/fixpath2.log
31207        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31208    fi
31209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31210$as_echo "yes" >&6; }
31211    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31212fi
31213
31214
31215
31216
31217###############################################################################
31218#
31219# We need to do some final tweaking, when everything else is done.
31220#
31221###############################################################################
31222
31223
31224HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31225
31226
31227# The name of the Service Agent jar.
31228SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31229if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31230  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31231fi
31232
31233
31234
31235
31236###############################################################################
31237#
31238# Configure parts of the build that only affect the build performance,
31239# not the result.
31240#
31241###############################################################################
31242
31243
31244# How many cores do we have on this build system?
31245
31246# Check whether --with-num-cores was given.
31247if test "${with_num_cores+set}" = set; then :
31248  withval=$with_num_cores;
31249fi
31250
31251if test "x$with_num_cores" = x; then
31252    # The number of cores were not specified, try to probe them.
31253
31254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31255$as_echo_n "checking for number of cores... " >&6; }
31256    NUM_CORES=1
31257    FOUND_CORES=no
31258
31259    if test -f /proc/cpuinfo; then
31260        # Looks like a Linux (or cygwin) system
31261        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31262        FOUND_CORES=yes
31263    elif test -x /usr/sbin/psrinfo; then
31264        # Looks like a Solaris system
31265        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31266        FOUND_CORES=yes
31267    elif test -x /usr/sbin/system_profiler; then
31268        # Looks like a MacOSX system
31269        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31270        FOUND_CORES=yes
31271    elif test -n "$NUMBER_OF_PROCESSORS"; then
31272        # On windows, look in the env
31273        NUM_CORES=$NUMBER_OF_PROCESSORS
31274        FOUND_CORES=yes
31275    fi
31276
31277    # For c/c++ code we run twice as many concurrent build
31278    # jobs than we have cores, otherwise we will stall on io.
31279    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31280
31281    if test "x$FOUND_CORES" = xyes; then
31282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31283$as_echo "$NUM_CORES" >&6; }
31284    else
31285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31286$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31288$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31289    fi
31290
31291
31292else
31293    NUM_CORES=$with_num_cores
31294    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31295fi
31296
31297
31298
31299
31300# How much memory do we have on this build system?
31301
31302# Check whether --with-memory-size was given.
31303if test "${with_memory_size+set}" = set; then :
31304  withval=$with_memory_size;
31305fi
31306
31307if test "x$with_memory_size" = x; then
31308    # The memory size was not specified, try to probe it.
31309
31310    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31311$as_echo_n "checking for memory size... " >&6; }
31312    # Default to 1024 MB
31313    MEMORY_SIZE=1024
31314    FOUND_MEM=no
31315
31316    if test -f /proc/meminfo; then
31317        # Looks like a Linux (or cygwin) system
31318        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31319        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31320        FOUND_MEM=yes
31321    elif test -x /usr/sbin/prtconf; then
31322        # Looks like a Solaris system
31323        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31324        FOUND_MEM=yes
31325    elif test -x /usr/sbin/system_profiler; then
31326        # Looks like a MacOSX system
31327        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31328        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31329        FOUND_MEM=yes
31330    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31331        # Windows, but without cygwin
31332        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31333        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31334        FOUND_MEM=yes
31335    fi
31336
31337    if test "x$FOUND_MEM" = xyes; then
31338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31339$as_echo "$MEMORY_SIZE MB" >&6; }
31340    else
31341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31342$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31344$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31345    fi
31346
31347else
31348    MEMORY_SIZE=$with_memory_size
31349fi
31350
31351
31352
31353# Setup smart javac (after cores and memory have been setup)
31354
31355
31356# Check whether --with-sjavac-server-java was given.
31357if test "${with_sjavac_server_java+set}" = set; then :
31358  withval=$with_sjavac_server_java;
31359fi
31360
31361
31362if test "x$with_sjavac_server_java" != x; then
31363    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31364    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31365    if test "x$FOUND_VERSION" = x; then
31366        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31367    fi
31368else
31369    SJAVAC_SERVER_JAVA=""
31370    # Hotspot specific options.
31371
31372    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31373    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31374    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31375    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31376    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31377        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31378    fi
31379
31380    # JRockit specific options.
31381
31382    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31383    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31384    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31385    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31386    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31387        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31388    fi
31389
31390    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31391fi
31392
31393
31394
31395# Check whether --with-sjavac-server-cores was given.
31396if test "${with_sjavac_server_cores+set}" = set; then :
31397  withval=$with_sjavac_server_cores;
31398fi
31399
31400if test "x$with_sjavac_server_cores" != x; then
31401    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31402else
31403    if test "$NUM_CORES" -gt 16; then
31404        # We set this arbitrary limit because we want to limit the heap
31405        # size of the javac server.
31406        # In the future we will make the javac compilers in the server
31407        # share more and more state, thus enabling us to use more and
31408        # more concurrent threads in the server.
31409        SJAVAC_SERVER_CORES="16"
31410    else
31411        SJAVAC_SERVER_CORES="$NUM_CORES"
31412    fi
31413
31414    if test "$MEMORY_SIZE" -gt "17000"; then
31415        MAX_HEAP_MEM=10000
31416
31417    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31418    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31419    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31420    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31421    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31422        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31423    fi
31424
31425
31426    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31427    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31428    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31429    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31430    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31431        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31432    fi
31433
31434    elif test "$MEMORY_SIZE" -gt "10000"; then
31435        MAX_HEAP_MEM=6000
31436
31437    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31438    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31439    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31440    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31441    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31442        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31443    fi
31444
31445
31446    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31447    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31448    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31449    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31450    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31451        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31452    fi
31453
31454    elif test "$MEMORY_SIZE" -gt "5000"; then
31455        MAX_HEAP_MEM=3000
31456
31457    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31458    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31459    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31460    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31461    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31462        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31463    fi
31464
31465
31466    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31467    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31468    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31469    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31470    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31471        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31472    fi
31473
31474    elif test "$MEMORY_SIZE" -gt "3800"; then
31475        MAX_HEAP_MEM=2500
31476
31477    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31478    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31479    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31480    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31481    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31482        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31483    fi
31484
31485    elif test "$MEMORY_SIZE" -gt "1900"; then
31486        MAX_HEAP_MEM=1200
31487
31488    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31489    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31490    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31491    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31492    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31493        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31494    fi
31495
31496    elif test "$MEMORY_SIZE" -gt "1000"; then
31497        MAX_HEAP_MEM=900
31498
31499    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31500    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31501    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31502    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31503    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31504        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31505    fi
31506
31507    else
31508        MAX_HEAP_MEM=512
31509
31510    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31511    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31512    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31513    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31514    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31515        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31516    fi
31517
31518    fi
31519
31520
31521    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31522    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31523    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31524    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31525    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31526        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31527    fi
31528
31529
31530    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31531    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31532    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31533    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31534    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31535        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31536    fi
31537
31538
31539    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31540    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31541    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31542    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31543    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31544        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31545    fi
31546
31547
31548    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31549    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31551$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31552        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31553        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31554$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31555    fi
31556fi
31557
31558
31559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31560$as_echo_n "checking whether to use sjavac... " >&6; }
31561# Check whether --enable-sjavac was given.
31562if test "${enable_sjavac+set}" = set; then :
31563  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31564else
31565  ENABLE_SJAVAC='no'
31566fi
31567
31568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31569$as_echo "$ENABLE_SJAVAC" >&6; }
31570
31571
31572if test "x$ENABLE_SJAVAC" = xyes; then
31573    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31574else
31575    SJAVAC_SERVER_DIR=
31576fi
31577
31578
31579
31580
31581# Can the C/C++ compiler use precompiled headers?
31582
31583
31584###############################################################################
31585#
31586# Can the C/C++ compiler use precompiled headers?
31587#
31588# Check whether --enable-precompiled-headers was given.
31589if test "${enable_precompiled_headers+set}" = set; then :
31590  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31591else
31592  ENABLE_PRECOMPH=yes
31593fi
31594
31595
31596USE_PRECOMPILED_HEADER=1
31597if test "x$ENABLE_PRECOMPH" = xno; then
31598    USE_PRECOMPILED_HEADER=0
31599fi
31600
31601if test "x$ENABLE_PRECOMPH" = xyes; then
31602    # Check that the compiler actually supports precomp headers.
31603    if test "x$GCC" = xyes; then
31604         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31605$as_echo_n "checking that precompiled headers work... " >&6; }
31606         echo "int alfa();" > conftest.h
31607         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31608         if test ! -f conftest.hpp.gch; then
31609             USE_PRECOMPILED_HEADER=0
31610             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31611$as_echo "no" >&6; }
31612         else
31613             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31614$as_echo "yes" >&6; }
31615         fi
31616         rm -f conftest.h conftest.hpp.gch
31617    fi
31618fi
31619
31620
31621
31622
31623# Setup use of ccache, if available
31624
31625    # Check whether --enable-ccache was given.
31626if test "${enable_ccache+set}" = set; then :
31627  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31628else
31629  ENABLE_CCACHE=yes
31630fi
31631
31632    if test "x$ENABLE_CCACHE" = xyes; then
31633        # Extract the first word of "ccache", so it can be a program name with args.
31634set dummy ccache; ac_word=$2
31635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31636$as_echo_n "checking for $ac_word... " >&6; }
31637if test "${ac_cv_path_CCACHE+set}" = set; then :
31638  $as_echo_n "(cached) " >&6
31639else
31640  case $CCACHE in
31641  [\\/]* | ?:[\\/]*)
31642  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31643  ;;
31644  *)
31645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31646for as_dir in $PATH
31647do
31648  IFS=$as_save_IFS
31649  test -z "$as_dir" && as_dir=.
31650    for ac_exec_ext in '' $ac_executable_extensions; do
31651  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31652    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31654    break 2
31655  fi
31656done
31657  done
31658IFS=$as_save_IFS
31659
31660  ;;
31661esac
31662fi
31663CCACHE=$ac_cv_path_CCACHE
31664if test -n "$CCACHE"; then
31665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31666$as_echo "$CCACHE" >&6; }
31667else
31668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31669$as_echo "no" >&6; }
31670fi
31671
31672
31673    else
31674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31675$as_echo_n "checking for ccache... " >&6; }
31676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31677$as_echo "explicitly disabled" >&6; }
31678        CCACHE=
31679    fi
31680
31681
31682
31683# Check whether --with-ccache-dir was given.
31684if test "${with_ccache_dir+set}" = set; then :
31685  withval=$with_ccache_dir;
31686fi
31687
31688
31689    if test "x$with_ccache_dir" != x; then
31690        # When using a non home ccache directory, assume the use is to share ccache files
31691        # with other users. Thus change the umask.
31692        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31693    fi
31694    CCACHE_FOUND=""
31695    if test "x$CCACHE" != x; then
31696
31697    if test "x$CCACHE" != x; then
31698        CCACHE_FOUND="true"
31699        # Only use ccache if it is 3.1.4 or later, which supports
31700        # precompiled headers.
31701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31702$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31703        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31704        if test "x$HAS_GOOD_CCACHE" = x; then
31705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31706$as_echo "no, disabling ccache" >&6; }
31707            CCACHE=
31708        else
31709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31710$as_echo "yes" >&6; }
31711            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31712$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31713            PUSHED_FLAGS="$CXXFLAGS"
31714            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31715            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31716/* end confdefs.h.  */
31717
31718int
31719main ()
31720{
31721
31722  ;
31723  return 0;
31724}
31725_ACEOF
31726if ac_fn_cxx_try_compile "$LINENO"; then :
31727  CC_KNOWS_CCACHE_TRICK=yes
31728else
31729  CC_KNOWS_CCACHE_TRICK=no
31730fi
31731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31732            CXXFLAGS="$PUSHED_FLAGS"
31733            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31734                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31735$as_echo "yes" >&6; }
31736            else
31737                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31738$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31739                CCACHE=
31740            fi
31741        fi
31742    fi
31743
31744    if test "x$CCACHE" != x; then
31745        CCACHE_SLOPPINESS=time_macros
31746        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31747        CCACHE_FLAGS=-fpch-preprocess
31748
31749        if test "x$SET_CCACHE_DIR" != x; then
31750            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31751	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31752        fi
31753    fi
31754
31755    fi
31756
31757
31758###############################################################################
31759#
31760# And now the finish...
31761#
31762###############################################################################
31763
31764# Check for some common pitfalls
31765
31766  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31767    file_to_test="$SRC_ROOT/LICENSE"
31768    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31769      as_fn_error $? "Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin." "$LINENO" 5
31770    fi
31771  fi
31772
31773
31774
31775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31776$as_echo_n "checking if build directory is on local disk... " >&6; }
31777
31778	# df -l lists only local disks; if the given directory is not found then
31779	# a non-zero exit code is given
31780  if test "x$DF" = x; then
31781    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31782      # msys does not have df; use Windows "net use" instead.
31783      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31784      if test "x$IS_NETWORK_DISK" = x; then
31785        OUTPUT_DIR_IS_LOCAL="yes"
31786      else
31787        OUTPUT_DIR_IS_LOCAL="no"
31788      fi
31789    else
31790      # No df here, say it's local
31791      OUTPUT_DIR_IS_LOCAL="yes"
31792    fi
31793  else
31794    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31795      OUTPUT_DIR_IS_LOCAL="yes"
31796    else
31797      OUTPUT_DIR_IS_LOCAL="no"
31798    fi
31799  fi
31800
31801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31802$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31803
31804
31805
31806# Check if the user has any old-style ALT_ variables set.
31807FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31808
31809# Before generating output files, test if they exist. If they do, this is a reconfigure.
31810# Since we can't properly handle the dependencies for this, warn the user about the situation
31811if test -e $OUTPUT_ROOT/spec.gmk; then
31812  IS_RECONFIGURE=yes
31813else
31814  IS_RECONFIGURE=no
31815fi
31816
31817if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31818  HIDE_PERFORMANCE_HINTS=yes
31819else
31820  HIDE_PERFORMANCE_HINTS=no
31821  # Hide it the next time around...
31822  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31823fi
31824
31825
31826
31827# At the end, call the custom hook. (Dummy macro if no custom sources available)
31828
31829
31830# We're messing a bit with internal autoconf variables to put the config.status
31831# in the output directory instead of the current directory.
31832CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31833# Create the actual output files. Now the main work of configure is done.
31834cat >confcache <<\_ACEOF
31835# This file is a shell script that caches the results of configure
31836# tests run on this system so they can be shared between configure
31837# scripts and configure runs, see configure's option --config-cache.
31838# It is not useful on other systems.  If it contains results you don't
31839# want to keep, you may remove or edit it.
31840#
31841# config.status only pays attention to the cache file if you give it
31842# the --recheck option to rerun configure.
31843#
31844# `ac_cv_env_foo' variables (set or unset) will be overridden when
31845# loading this file, other *unset* `ac_cv_foo' will be assigned the
31846# following values.
31847
31848_ACEOF
31849
31850# The following way of writing the cache mishandles newlines in values,
31851# but we know of no workaround that is simple, portable, and efficient.
31852# So, we kill variables containing newlines.
31853# Ultrix sh set writes to stderr and can't be redirected directly,
31854# and sets the high bit in the cache file unless we assign to the vars.
31855(
31856  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31857    eval ac_val=\$$ac_var
31858    case $ac_val in #(
31859    *${as_nl}*)
31860      case $ac_var in #(
31861      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31862$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31863      esac
31864      case $ac_var in #(
31865      _ | IFS | as_nl) ;; #(
31866      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31867      *) { eval $ac_var=; unset $ac_var;} ;;
31868      esac ;;
31869    esac
31870  done
31871
31872  (set) 2>&1 |
31873    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31874    *${as_nl}ac_space=\ *)
31875      # `set' does not quote correctly, so add quotes: double-quote
31876      # substitution turns \\\\ into \\, and sed turns \\ into \.
31877      sed -n \
31878	"s/'/'\\\\''/g;
31879	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31880      ;; #(
31881    *)
31882      # `set' quotes correctly as required by POSIX, so do not add quotes.
31883      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31884      ;;
31885    esac |
31886    sort
31887) |
31888  sed '
31889     /^ac_cv_env_/b end
31890     t clear
31891     :clear
31892     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31893     t end
31894     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31895     :end' >>confcache
31896if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31897  if test -w "$cache_file"; then
31898    test "x$cache_file" != "x/dev/null" &&
31899      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31900$as_echo "$as_me: updating cache $cache_file" >&6;}
31901    cat confcache >$cache_file
31902  else
31903    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31904$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31905  fi
31906fi
31907rm -f confcache
31908
31909test "x$prefix" = xNONE && prefix=$ac_default_prefix
31910# Let make expand exec_prefix.
31911test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31912
31913DEFS=-DHAVE_CONFIG_H
31914
31915ac_libobjs=
31916ac_ltlibobjs=
31917U=
31918for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31919  # 1. Remove the extension, and $U if already installed.
31920  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31921  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31922  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31923  #    will be set to the directory where LIBOBJS objects are built.
31924  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31925  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31926done
31927LIBOBJS=$ac_libobjs
31928
31929LTLIBOBJS=$ac_ltlibobjs
31930
31931
31932
31933: ${CONFIG_STATUS=./config.status}
31934ac_write_fail=0
31935ac_clean_files_save=$ac_clean_files
31936ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31937{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31938$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31939as_write_fail=0
31940cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31941#! $SHELL
31942# Generated by $as_me.
31943# Run this file to recreate the current configuration.
31944# Compiler output produced by configure, useful for debugging
31945# configure, is in config.log if it exists.
31946
31947debug=false
31948ac_cs_recheck=false
31949ac_cs_silent=false
31950
31951SHELL=\${CONFIG_SHELL-$SHELL}
31952export SHELL
31953_ASEOF
31954cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31955## -------------------- ##
31956## M4sh Initialization. ##
31957## -------------------- ##
31958
31959# Be more Bourne compatible
31960DUALCASE=1; export DUALCASE # for MKS sh
31961if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31962  emulate sh
31963  NULLCMD=:
31964  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31965  # is contrary to our usage.  Disable this feature.
31966  alias -g '${1+"$@"}'='"$@"'
31967  setopt NO_GLOB_SUBST
31968else
31969  case `(set -o) 2>/dev/null` in #(
31970  *posix*) :
31971    set -o posix ;; #(
31972  *) :
31973     ;;
31974esac
31975fi
31976
31977
31978as_nl='
31979'
31980export as_nl
31981# Printing a long string crashes Solaris 7 /usr/bin/printf.
31982as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31983as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31984as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31985# Prefer a ksh shell builtin over an external printf program on Solaris,
31986# but without wasting forks for bash or zsh.
31987if test -z "$BASH_VERSION$ZSH_VERSION" \
31988    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31989  as_echo='print -r --'
31990  as_echo_n='print -rn --'
31991elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31992  as_echo='printf %s\n'
31993  as_echo_n='printf %s'
31994else
31995  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31996    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31997    as_echo_n='/usr/ucb/echo -n'
31998  else
31999    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32000    as_echo_n_body='eval
32001      arg=$1;
32002      case $arg in #(
32003      *"$as_nl"*)
32004	expr "X$arg" : "X\\(.*\\)$as_nl";
32005	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32006      esac;
32007      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32008    '
32009    export as_echo_n_body
32010    as_echo_n='sh -c $as_echo_n_body as_echo'
32011  fi
32012  export as_echo_body
32013  as_echo='sh -c $as_echo_body as_echo'
32014fi
32015
32016# The user is always right.
32017if test "${PATH_SEPARATOR+set}" != set; then
32018  PATH_SEPARATOR=:
32019  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32020    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32021      PATH_SEPARATOR=';'
32022  }
32023fi
32024
32025
32026# IFS
32027# We need space, tab and new line, in precisely that order.  Quoting is
32028# there to prevent editors from complaining about space-tab.
32029# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32030# splitting by setting IFS to empty value.)
32031IFS=" ""	$as_nl"
32032
32033# Find who we are.  Look in the path if we contain no directory separator.
32034case $0 in #((
32035  *[\\/]* ) as_myself=$0 ;;
32036  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32037for as_dir in $PATH
32038do
32039  IFS=$as_save_IFS
32040  test -z "$as_dir" && as_dir=.
32041    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32042  done
32043IFS=$as_save_IFS
32044
32045     ;;
32046esac
32047# We did not find ourselves, most probably we were run as `sh COMMAND'
32048# in which case we are not to be found in the path.
32049if test "x$as_myself" = x; then
32050  as_myself=$0
32051fi
32052if test ! -f "$as_myself"; then
32053  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32054  exit 1
32055fi
32056
32057# Unset variables that we do not need and which cause bugs (e.g. in
32058# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32059# suppresses any "Segmentation fault" message there.  '((' could
32060# trigger a bug in pdksh 5.2.14.
32061for as_var in BASH_ENV ENV MAIL MAILPATH
32062do eval test x\${$as_var+set} = xset \
32063  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32064done
32065PS1='$ '
32066PS2='> '
32067PS4='+ '
32068
32069# NLS nuisances.
32070LC_ALL=C
32071export LC_ALL
32072LANGUAGE=C
32073export LANGUAGE
32074
32075# CDPATH.
32076(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32077
32078
32079# as_fn_error STATUS ERROR [LINENO LOG_FD]
32080# ----------------------------------------
32081# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32082# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32083# script with STATUS, using 1 if that was 0.
32084as_fn_error ()
32085{
32086  as_status=$1; test $as_status -eq 0 && as_status=1
32087  if test "$4"; then
32088    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32089    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32090  fi
32091  $as_echo "$as_me: error: $2" >&2
32092  as_fn_exit $as_status
32093} # as_fn_error
32094
32095
32096# as_fn_set_status STATUS
32097# -----------------------
32098# Set $? to STATUS, without forking.
32099as_fn_set_status ()
32100{
32101  return $1
32102} # as_fn_set_status
32103
32104# as_fn_exit STATUS
32105# -----------------
32106# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32107as_fn_exit ()
32108{
32109  set +e
32110  as_fn_set_status $1
32111  exit $1
32112} # as_fn_exit
32113
32114# as_fn_unset VAR
32115# ---------------
32116# Portably unset VAR.
32117as_fn_unset ()
32118{
32119  { eval $1=; unset $1;}
32120}
32121as_unset=as_fn_unset
32122# as_fn_append VAR VALUE
32123# ----------------------
32124# Append the text in VALUE to the end of the definition contained in VAR. Take
32125# advantage of any shell optimizations that allow amortized linear growth over
32126# repeated appends, instead of the typical quadratic growth present in naive
32127# implementations.
32128if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32129  eval 'as_fn_append ()
32130  {
32131    eval $1+=\$2
32132  }'
32133else
32134  as_fn_append ()
32135  {
32136    eval $1=\$$1\$2
32137  }
32138fi # as_fn_append
32139
32140# as_fn_arith ARG...
32141# ------------------
32142# Perform arithmetic evaluation on the ARGs, and store the result in the
32143# global $as_val. Take advantage of shells that can avoid forks. The arguments
32144# must be portable across $(()) and expr.
32145if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32146  eval 'as_fn_arith ()
32147  {
32148    as_val=$(( $* ))
32149  }'
32150else
32151  as_fn_arith ()
32152  {
32153    as_val=`expr "$@" || test $? -eq 1`
32154  }
32155fi # as_fn_arith
32156
32157
32158if expr a : '\(a\)' >/dev/null 2>&1 &&
32159   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32160  as_expr=expr
32161else
32162  as_expr=false
32163fi
32164
32165if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32166  as_basename=basename
32167else
32168  as_basename=false
32169fi
32170
32171if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32172  as_dirname=dirname
32173else
32174  as_dirname=false
32175fi
32176
32177as_me=`$as_basename -- "$0" ||
32178$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32179	 X"$0" : 'X\(//\)$' \| \
32180	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32181$as_echo X/"$0" |
32182    sed '/^.*\/\([^/][^/]*\)\/*$/{
32183	    s//\1/
32184	    q
32185	  }
32186	  /^X\/\(\/\/\)$/{
32187	    s//\1/
32188	    q
32189	  }
32190	  /^X\/\(\/\).*/{
32191	    s//\1/
32192	    q
32193	  }
32194	  s/.*/./; q'`
32195
32196# Avoid depending upon Character Ranges.
32197as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32198as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32199as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32200as_cr_digits='0123456789'
32201as_cr_alnum=$as_cr_Letters$as_cr_digits
32202
32203ECHO_C= ECHO_N= ECHO_T=
32204case `echo -n x` in #(((((
32205-n*)
32206  case `echo 'xy\c'` in
32207  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32208  xy)  ECHO_C='\c';;
32209  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32210       ECHO_T='	';;
32211  esac;;
32212*)
32213  ECHO_N='-n';;
32214esac
32215
32216rm -f conf$$ conf$$.exe conf$$.file
32217if test -d conf$$.dir; then
32218  rm -f conf$$.dir/conf$$.file
32219else
32220  rm -f conf$$.dir
32221  mkdir conf$$.dir 2>/dev/null
32222fi
32223if (echo >conf$$.file) 2>/dev/null; then
32224  if ln -s conf$$.file conf$$ 2>/dev/null; then
32225    as_ln_s='ln -s'
32226    # ... but there are two gotchas:
32227    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32228    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32229    # In both cases, we have to default to `cp -p'.
32230    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32231      as_ln_s='cp -p'
32232  elif ln conf$$.file conf$$ 2>/dev/null; then
32233    as_ln_s=ln
32234  else
32235    as_ln_s='cp -p'
32236  fi
32237else
32238  as_ln_s='cp -p'
32239fi
32240rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32241rmdir conf$$.dir 2>/dev/null
32242
32243
32244# as_fn_mkdir_p
32245# -------------
32246# Create "$as_dir" as a directory, including parents if necessary.
32247as_fn_mkdir_p ()
32248{
32249
32250  case $as_dir in #(
32251  -*) as_dir=./$as_dir;;
32252  esac
32253  test -d "$as_dir" || eval $as_mkdir_p || {
32254    as_dirs=
32255    while :; do
32256      case $as_dir in #(
32257      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32258      *) as_qdir=$as_dir;;
32259      esac
32260      as_dirs="'$as_qdir' $as_dirs"
32261      as_dir=`$as_dirname -- "$as_dir" ||
32262$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32263	 X"$as_dir" : 'X\(//\)[^/]' \| \
32264	 X"$as_dir" : 'X\(//\)$' \| \
32265	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32266$as_echo X"$as_dir" |
32267    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32268	    s//\1/
32269	    q
32270	  }
32271	  /^X\(\/\/\)[^/].*/{
32272	    s//\1/
32273	    q
32274	  }
32275	  /^X\(\/\/\)$/{
32276	    s//\1/
32277	    q
32278	  }
32279	  /^X\(\/\).*/{
32280	    s//\1/
32281	    q
32282	  }
32283	  s/.*/./; q'`
32284      test -d "$as_dir" && break
32285    done
32286    test -z "$as_dirs" || eval "mkdir $as_dirs"
32287  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32288
32289
32290} # as_fn_mkdir_p
32291if mkdir -p . 2>/dev/null; then
32292  as_mkdir_p='mkdir -p "$as_dir"'
32293else
32294  test -d ./-p && rmdir ./-p
32295  as_mkdir_p=false
32296fi
32297
32298if test -x / >/dev/null 2>&1; then
32299  as_test_x='test -x'
32300else
32301  if ls -dL / >/dev/null 2>&1; then
32302    as_ls_L_option=L
32303  else
32304    as_ls_L_option=
32305  fi
32306  as_test_x='
32307    eval sh -c '\''
32308      if test -d "$1"; then
32309	test -d "$1/.";
32310      else
32311	case $1 in #(
32312	-*)set "./$1";;
32313	esac;
32314	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32315	???[sx]*):;;*)false;;esac;fi
32316    '\'' sh
32317  '
32318fi
32319as_executable_p=$as_test_x
32320
32321# Sed expression to map a string onto a valid CPP name.
32322as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32323
32324# Sed expression to map a string onto a valid variable name.
32325as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32326
32327
32328exec 6>&1
32329## ----------------------------------- ##
32330## Main body of $CONFIG_STATUS script. ##
32331## ----------------------------------- ##
32332_ASEOF
32333test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32334
32335cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32336# Save the log message, to keep $0 and so on meaningful, and to
32337# report actual input values of CONFIG_FILES etc. instead of their
32338# values after options handling.
32339ac_log="
32340This file was extended by OpenJDK $as_me jdk8, which was
32341generated by GNU Autoconf 2.67.  Invocation command line was
32342
32343  CONFIG_FILES    = $CONFIG_FILES
32344  CONFIG_HEADERS  = $CONFIG_HEADERS
32345  CONFIG_LINKS    = $CONFIG_LINKS
32346  CONFIG_COMMANDS = $CONFIG_COMMANDS
32347  $ $0 $@
32348
32349on `(hostname || uname -n) 2>/dev/null | sed 1q`
32350"
32351
32352_ACEOF
32353
32354case $ac_config_files in *"
32355"*) set x $ac_config_files; shift; ac_config_files=$*;;
32356esac
32357
32358case $ac_config_headers in *"
32359"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32360esac
32361
32362
32363cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32364# Files that config.status was made for.
32365config_files="$ac_config_files"
32366config_headers="$ac_config_headers"
32367
32368_ACEOF
32369
32370cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32371ac_cs_usage="\
32372\`$as_me' instantiates files and other configuration actions
32373from templates according to the current configuration.  Unless the files
32374and actions are specified as TAGs, all are instantiated by default.
32375
32376Usage: $0 [OPTION]... [TAG]...
32377
32378  -h, --help       print this help, then exit
32379  -V, --version    print version number and configuration settings, then exit
32380      --config     print configuration, then exit
32381  -q, --quiet, --silent
32382                   do not print progress messages
32383  -d, --debug      don't remove temporary files
32384      --recheck    update $as_me by reconfiguring in the same conditions
32385      --file=FILE[:TEMPLATE]
32386                   instantiate the configuration file FILE
32387      --header=FILE[:TEMPLATE]
32388                   instantiate the configuration header FILE
32389
32390Configuration files:
32391$config_files
32392
32393Configuration headers:
32394$config_headers
32395
32396Report bugs to <build-dev@openjdk.java.net>.
32397OpenJDK home page: <http://openjdk.java.net>."
32398
32399_ACEOF
32400cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32401ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32402ac_cs_version="\\
32403OpenJDK config.status jdk8
32404configured by $0, generated by GNU Autoconf 2.67,
32405  with options \\"\$ac_cs_config\\"
32406
32407Copyright (C) 2010 Free Software Foundation, Inc.
32408This config.status script is free software; the Free Software Foundation
32409gives unlimited permission to copy, distribute and modify it."
32410
32411ac_pwd='$ac_pwd'
32412srcdir='$srcdir'
32413AWK='$AWK'
32414test -n "\$AWK" || AWK=awk
32415_ACEOF
32416
32417cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32418# The default lists apply if the user does not specify any file.
32419ac_need_defaults=:
32420while test $# != 0
32421do
32422  case $1 in
32423  --*=?*)
32424    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32425    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32426    ac_shift=:
32427    ;;
32428  --*=)
32429    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32430    ac_optarg=
32431    ac_shift=:
32432    ;;
32433  *)
32434    ac_option=$1
32435    ac_optarg=$2
32436    ac_shift=shift
32437    ;;
32438  esac
32439
32440  case $ac_option in
32441  # Handling of the options.
32442  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32443    ac_cs_recheck=: ;;
32444  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32445    $as_echo "$ac_cs_version"; exit ;;
32446  --config | --confi | --conf | --con | --co | --c )
32447    $as_echo "$ac_cs_config"; exit ;;
32448  --debug | --debu | --deb | --de | --d | -d )
32449    debug=: ;;
32450  --file | --fil | --fi | --f )
32451    $ac_shift
32452    case $ac_optarg in
32453    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32454    '') as_fn_error $? "missing file argument" ;;
32455    esac
32456    as_fn_append CONFIG_FILES " '$ac_optarg'"
32457    ac_need_defaults=false;;
32458  --header | --heade | --head | --hea )
32459    $ac_shift
32460    case $ac_optarg in
32461    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32462    esac
32463    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32464    ac_need_defaults=false;;
32465  --he | --h)
32466    # Conflict between --help and --header
32467    as_fn_error $? "ambiguous option: \`$1'
32468Try \`$0 --help' for more information.";;
32469  --help | --hel | -h )
32470    $as_echo "$ac_cs_usage"; exit ;;
32471  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32472  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32473    ac_cs_silent=: ;;
32474
32475  # This is an error.
32476  -*) as_fn_error $? "unrecognized option: \`$1'
32477Try \`$0 --help' for more information." ;;
32478
32479  *) as_fn_append ac_config_targets " $1"
32480     ac_need_defaults=false ;;
32481
32482  esac
32483  shift
32484done
32485
32486ac_configure_extra_args=
32487
32488if $ac_cs_silent; then
32489  exec 6>/dev/null
32490  ac_configure_extra_args="$ac_configure_extra_args --silent"
32491fi
32492
32493_ACEOF
32494cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32495if \$ac_cs_recheck; then
32496  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32497  shift
32498  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32499  CONFIG_SHELL='$SHELL'
32500  export CONFIG_SHELL
32501  exec "\$@"
32502fi
32503
32504_ACEOF
32505cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32506exec 5>>config.log
32507{
32508  echo
32509  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32510## Running $as_me. ##
32511_ASBOX
32512  $as_echo "$ac_log"
32513} >&5
32514
32515_ACEOF
32516cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32517_ACEOF
32518
32519cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32520
32521# Handling of arguments.
32522for ac_config_target in $ac_config_targets
32523do
32524  case $ac_config_target in
32525    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32526    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32527    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32528    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32529    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32530    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32531    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32532
32533  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32534  esac
32535done
32536
32537
32538# If the user did not use the arguments to specify the items to instantiate,
32539# then the envvar interface is used.  Set only those that are not.
32540# We use the long form for the default assignment because of an extremely
32541# bizarre bug on SunOS 4.1.3.
32542if $ac_need_defaults; then
32543  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32544  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32545fi
32546
32547# Have a temporary directory for convenience.  Make it in the build tree
32548# simply because there is no reason against having it here, and in addition,
32549# creating and moving files from /tmp can sometimes cause problems.
32550# Hook for its removal unless debugging.
32551# Note that there is a small window in which the directory will not be cleaned:
32552# after its creation but before its name has been assigned to `$tmp'.
32553$debug ||
32554{
32555  tmp=
32556  trap 'exit_status=$?
32557  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32558' 0
32559  trap 'as_fn_exit 1' 1 2 13 15
32560}
32561# Create a (secure) tmp directory for tmp files.
32562
32563{
32564  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32565  test -n "$tmp" && test -d "$tmp"
32566}  ||
32567{
32568  tmp=./conf$$-$RANDOM
32569  (umask 077 && mkdir "$tmp")
32570} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32571
32572# Set up the scripts for CONFIG_FILES section.
32573# No need to generate them if there are no CONFIG_FILES.
32574# This happens for instance with `./config.status config.h'.
32575if test -n "$CONFIG_FILES"; then
32576
32577
32578ac_cr=`echo X | tr X '\015'`
32579# On cygwin, bash can eat \r inside `` if the user requested igncr.
32580# But we know of no other shell where ac_cr would be empty at this
32581# point, so we can use a bashism as a fallback.
32582if test "x$ac_cr" = x; then
32583  eval ac_cr=\$\'\\r\'
32584fi
32585ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32586if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32587  ac_cs_awk_cr='\\r'
32588else
32589  ac_cs_awk_cr=$ac_cr
32590fi
32591
32592echo 'BEGIN {' >"$tmp/subs1.awk" &&
32593_ACEOF
32594
32595
32596{
32597  echo "cat >conf$$subs.awk <<_ACEOF" &&
32598  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32599  echo "_ACEOF"
32600} >conf$$subs.sh ||
32601  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32602ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32603ac_delim='%!_!# '
32604for ac_last_try in false false false false false :; do
32605  . ./conf$$subs.sh ||
32606    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32607
32608  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32609  if test $ac_delim_n = $ac_delim_num; then
32610    break
32611  elif $ac_last_try; then
32612    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32613  else
32614    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32615  fi
32616done
32617rm -f conf$$subs.sh
32618
32619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32620cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32621_ACEOF
32622sed -n '
32623h
32624s/^/S["/; s/!.*/"]=/
32625p
32626g
32627s/^[^!]*!//
32628:repl
32629t repl
32630s/'"$ac_delim"'$//
32631t delim
32632:nl
32633h
32634s/\(.\{148\}\)..*/\1/
32635t more1
32636s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32637p
32638n
32639b repl
32640:more1
32641s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32642p
32643g
32644s/.\{148\}//
32645t nl
32646:delim
32647h
32648s/\(.\{148\}\)..*/\1/
32649t more2
32650s/["\\]/\\&/g; s/^/"/; s/$/"/
32651p
32652b
32653:more2
32654s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32655p
32656g
32657s/.\{148\}//
32658t delim
32659' <conf$$subs.awk | sed '
32660/^[^""]/{
32661  N
32662  s/\n//
32663}
32664' >>$CONFIG_STATUS || ac_write_fail=1
32665rm -f conf$$subs.awk
32666cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32667_ACAWK
32668cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32669  for (key in S) S_is_set[key] = 1
32670  FS = ""
32671
32672}
32673{
32674  line = $ 0
32675  nfields = split(line, field, "@")
32676  substed = 0
32677  len = length(field[1])
32678  for (i = 2; i < nfields; i++) {
32679    key = field[i]
32680    keylen = length(key)
32681    if (S_is_set[key]) {
32682      value = S[key]
32683      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32684      len += length(value) + length(field[++i])
32685      substed = 1
32686    } else
32687      len += 1 + keylen
32688  }
32689
32690  print line
32691}
32692
32693_ACAWK
32694_ACEOF
32695cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32696if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32697  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32698else
32699  cat
32700fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32701  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32702_ACEOF
32703
32704# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32705# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32706# trailing colons and then remove the whole line if VPATH becomes empty
32707# (actually we leave an empty line to preserve line numbers).
32708if test "x$srcdir" = x.; then
32709  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32710h
32711s///
32712s/^/:/
32713s/[	 ]*$/:/
32714s/:\$(srcdir):/:/g
32715s/:\${srcdir}:/:/g
32716s/:@srcdir@:/:/g
32717s/^:*//
32718s/:*$//
32719x
32720s/\(=[	 ]*\).*/\1/
32721G
32722s/\n//
32723s/^[^=]*=[	 ]*$//
32724}'
32725fi
32726
32727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32728fi # test -n "$CONFIG_FILES"
32729
32730# Set up the scripts for CONFIG_HEADERS section.
32731# No need to generate them if there are no CONFIG_HEADERS.
32732# This happens for instance with `./config.status Makefile'.
32733if test -n "$CONFIG_HEADERS"; then
32734cat >"$tmp/defines.awk" <<\_ACAWK ||
32735BEGIN {
32736_ACEOF
32737
32738# Transform confdefs.h into an awk script `defines.awk', embedded as
32739# here-document in config.status, that substitutes the proper values into
32740# config.h.in to produce config.h.
32741
32742# Create a delimiter string that does not exist in confdefs.h, to ease
32743# handling of long lines.
32744ac_delim='%!_!# '
32745for ac_last_try in false false :; do
32746  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32747  if test -z "$ac_t"; then
32748    break
32749  elif $ac_last_try; then
32750    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32751  else
32752    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32753  fi
32754done
32755
32756# For the awk script, D is an array of macro values keyed by name,
32757# likewise P contains macro parameters if any.  Preserve backslash
32758# newline sequences.
32759
32760ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32761sed -n '
32762s/.\{148\}/&'"$ac_delim"'/g
32763t rset
32764:rset
32765s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32766t def
32767d
32768:def
32769s/\\$//
32770t bsnl
32771s/["\\]/\\&/g
32772s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32773D["\1"]=" \3"/p
32774s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32775d
32776:bsnl
32777s/["\\]/\\&/g
32778s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32779D["\1"]=" \3\\\\\\n"\\/p
32780t cont
32781s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32782t cont
32783d
32784:cont
32785n
32786s/.\{148\}/&'"$ac_delim"'/g
32787t clear
32788:clear
32789s/\\$//
32790t bsnlc
32791s/["\\]/\\&/g; s/^/"/; s/$/"/p
32792d
32793:bsnlc
32794s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32795b cont
32796' <confdefs.h | sed '
32797s/'"$ac_delim"'/"\\\
32798"/g' >>$CONFIG_STATUS || ac_write_fail=1
32799
32800cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32801  for (key in D) D_is_set[key] = 1
32802  FS = ""
32803}
32804/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32805  line = \$ 0
32806  split(line, arg, " ")
32807  if (arg[1] == "#") {
32808    defundef = arg[2]
32809    mac1 = arg[3]
32810  } else {
32811    defundef = substr(arg[1], 2)
32812    mac1 = arg[2]
32813  }
32814  split(mac1, mac2, "(") #)
32815  macro = mac2[1]
32816  prefix = substr(line, 1, index(line, defundef) - 1)
32817  if (D_is_set[macro]) {
32818    # Preserve the white space surrounding the "#".
32819    print prefix "define", macro P[macro] D[macro]
32820    next
32821  } else {
32822    # Replace #undef with comments.  This is necessary, for example,
32823    # in the case of _POSIX_SOURCE, which is predefined and required
32824    # on some systems where configure will not decide to define it.
32825    if (defundef == "undef") {
32826      print "/*", prefix defundef, macro, "*/"
32827      next
32828    }
32829  }
32830}
32831{ print }
32832_ACAWK
32833_ACEOF
32834cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32835  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32836fi # test -n "$CONFIG_HEADERS"
32837
32838
32839eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32840shift
32841for ac_tag
32842do
32843  case $ac_tag in
32844  :[FHLC]) ac_mode=$ac_tag; continue;;
32845  esac
32846  case $ac_mode$ac_tag in
32847  :[FHL]*:*);;
32848  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32849  :[FH]-) ac_tag=-:-;;
32850  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32851  esac
32852  ac_save_IFS=$IFS
32853  IFS=:
32854  set x $ac_tag
32855  IFS=$ac_save_IFS
32856  shift
32857  ac_file=$1
32858  shift
32859
32860  case $ac_mode in
32861  :L) ac_source=$1;;
32862  :[FH])
32863    ac_file_inputs=
32864    for ac_f
32865    do
32866      case $ac_f in
32867      -) ac_f="$tmp/stdin";;
32868      *) # Look for the file first in the build tree, then in the source tree
32869	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32870	 # because $ac_f cannot contain `:'.
32871	 test -f "$ac_f" ||
32872	   case $ac_f in
32873	   [\\/$]*) false;;
32874	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32875	   esac ||
32876	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32877      esac
32878      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32879      as_fn_append ac_file_inputs " '$ac_f'"
32880    done
32881
32882    # Let's still pretend it is `configure' which instantiates (i.e., don't
32883    # use $as_me), people would be surprised to read:
32884    #    /* config.h.  Generated by config.status.  */
32885    configure_input='Generated from '`
32886	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32887	`' by configure.'
32888    if test x"$ac_file" != x-; then
32889      configure_input="$ac_file.  $configure_input"
32890      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32891$as_echo "$as_me: creating $ac_file" >&6;}
32892    fi
32893    # Neutralize special characters interpreted by sed in replacement strings.
32894    case $configure_input in #(
32895    *\&* | *\|* | *\\* )
32896       ac_sed_conf_input=`$as_echo "$configure_input" |
32897       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32898    *) ac_sed_conf_input=$configure_input;;
32899    esac
32900
32901    case $ac_tag in
32902    *:-:* | *:-) cat >"$tmp/stdin" \
32903      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32904    esac
32905    ;;
32906  esac
32907
32908  ac_dir=`$as_dirname -- "$ac_file" ||
32909$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32910	 X"$ac_file" : 'X\(//\)[^/]' \| \
32911	 X"$ac_file" : 'X\(//\)$' \| \
32912	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32913$as_echo X"$ac_file" |
32914    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32915	    s//\1/
32916	    q
32917	  }
32918	  /^X\(\/\/\)[^/].*/{
32919	    s//\1/
32920	    q
32921	  }
32922	  /^X\(\/\/\)$/{
32923	    s//\1/
32924	    q
32925	  }
32926	  /^X\(\/\).*/{
32927	    s//\1/
32928	    q
32929	  }
32930	  s/.*/./; q'`
32931  as_dir="$ac_dir"; as_fn_mkdir_p
32932  ac_builddir=.
32933
32934case "$ac_dir" in
32935.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32936*)
32937  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32938  # A ".." for each directory in $ac_dir_suffix.
32939  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32940  case $ac_top_builddir_sub in
32941  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32942  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32943  esac ;;
32944esac
32945ac_abs_top_builddir=$ac_pwd
32946ac_abs_builddir=$ac_pwd$ac_dir_suffix
32947# for backward compatibility:
32948ac_top_builddir=$ac_top_build_prefix
32949
32950case $srcdir in
32951  .)  # We are building in place.
32952    ac_srcdir=.
32953    ac_top_srcdir=$ac_top_builddir_sub
32954    ac_abs_top_srcdir=$ac_pwd ;;
32955  [\\/]* | ?:[\\/]* )  # Absolute name.
32956    ac_srcdir=$srcdir$ac_dir_suffix;
32957    ac_top_srcdir=$srcdir
32958    ac_abs_top_srcdir=$srcdir ;;
32959  *) # Relative name.
32960    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32961    ac_top_srcdir=$ac_top_build_prefix$srcdir
32962    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32963esac
32964ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32965
32966
32967  case $ac_mode in
32968  :F)
32969  #
32970  # CONFIG_FILE
32971  #
32972
32973_ACEOF
32974
32975cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32976# If the template does not know about datarootdir, expand it.
32977# FIXME: This hack should be removed a few years after 2.60.
32978ac_datarootdir_hack=; ac_datarootdir_seen=
32979ac_sed_dataroot='
32980/datarootdir/ {
32981  p
32982  q
32983}
32984/@datadir@/p
32985/@docdir@/p
32986/@infodir@/p
32987/@localedir@/p
32988/@mandir@/p'
32989case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32990*datarootdir*) ac_datarootdir_seen=yes;;
32991*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32992  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32993$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32994_ACEOF
32995cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32996  ac_datarootdir_hack='
32997  s&@datadir@&$datadir&g
32998  s&@docdir@&$docdir&g
32999  s&@infodir@&$infodir&g
33000  s&@localedir@&$localedir&g
33001  s&@mandir@&$mandir&g
33002  s&\\\${datarootdir}&$datarootdir&g' ;;
33003esac
33004_ACEOF
33005
33006# Neutralize VPATH when `$srcdir' = `.'.
33007# Shell code in configure.ac might set extrasub.
33008# FIXME: do we really want to maintain this feature?
33009cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33010ac_sed_extra="$ac_vpsub
33011$extrasub
33012_ACEOF
33013cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33014:t
33015/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33016s|@configure_input@|$ac_sed_conf_input|;t t
33017s&@top_builddir@&$ac_top_builddir_sub&;t t
33018s&@top_build_prefix@&$ac_top_build_prefix&;t t
33019s&@srcdir@&$ac_srcdir&;t t
33020s&@abs_srcdir@&$ac_abs_srcdir&;t t
33021s&@top_srcdir@&$ac_top_srcdir&;t t
33022s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33023s&@builddir@&$ac_builddir&;t t
33024s&@abs_builddir@&$ac_abs_builddir&;t t
33025s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33026$ac_datarootdir_hack
33027"
33028eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33029  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33030
33031test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33032  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33033  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33034  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33035which seems to be undefined.  Please make sure it is defined" >&5
33036$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33037which seems to be undefined.  Please make sure it is defined" >&2;}
33038
33039  rm -f "$tmp/stdin"
33040  case $ac_file in
33041  -) cat "$tmp/out" && rm -f "$tmp/out";;
33042  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33043  esac \
33044  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33045 ;;
33046  :H)
33047  #
33048  # CONFIG_HEADER
33049  #
33050  if test x"$ac_file" != x-; then
33051    {
33052      $as_echo "/* $configure_input  */" \
33053      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33054    } >"$tmp/config.h" \
33055      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33056    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33057      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33058$as_echo "$as_me: $ac_file is unchanged" >&6;}
33059    else
33060      rm -f "$ac_file"
33061      mv "$tmp/config.h" "$ac_file" \
33062	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33063    fi
33064  else
33065    $as_echo "/* $configure_input  */" \
33066      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33067      || as_fn_error $? "could not create -" "$LINENO" 5
33068  fi
33069 ;;
33070
33071
33072  esac
33073
33074done # for ac_tag
33075
33076
33077as_fn_exit 0
33078_ACEOF
33079ac_clean_files=$ac_clean_files_save
33080
33081test $ac_write_fail = 0 ||
33082  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33083
33084
33085# configure is writing to config.log, and then calls config.status.
33086# config.status does its own redirection, appending to config.log.
33087# Unfortunately, on DOS this fails, as config.log is still kept open
33088# by configure, so config.status won't be able to write to it; its
33089# output is simply discarded.  So we exec the FD to /dev/null,
33090# effectively closing config.log, so it can be properly (re)opened and
33091# appended to by config.status.  When coming back to configure, we
33092# need to make the FD available again.
33093if test "$no_create" != yes; then
33094  ac_cs_success=:
33095  ac_config_status_args=
33096  test "$silent" = yes &&
33097    ac_config_status_args="$ac_config_status_args --quiet"
33098  exec 5>/dev/null
33099  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33100  exec 5>>config.log
33101  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33102  # would make configure fail if this is the last instruction.
33103  $ac_cs_success || as_fn_exit 1
33104fi
33105if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33106  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33107$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33108fi
33109
33110
33111# Make the compare script executable
33112$CHMOD +x $OUTPUT_ROOT/compare.sh
33113
33114# Finally output some useful information to the user
33115
33116# Finally output some useful information to the user
33117
33118if test "x$CCACHE_FOUND" != x; then
33119	if  test "x$HAS_GOOD_CCACHE" = x; then
33120		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33121		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33122	else
33123		CCACHE_STATUS="installed and in use"
33124	fi
33125else
33126	if test "x$GCC" = xyes; then
33127		CCACHE_STATUS="not installed (consider installing)"
33128		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33129	else
33130		CCACHE_STATUS="not available for your system"
33131	fi
33132fi
33133
33134printf "\n"
33135printf "====================================================\n"
33136printf "A new configuration has been successfully created in\n"
33137printf "$OUTPUT_ROOT\n"
33138if test "x$CONFIGURE_COMMAND_LINE" != x; then
33139	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33140else
33141	printf "using default settings.\n"
33142fi
33143
33144printf "\n"
33145printf "Configuration summary:\n"
33146printf "* Debug level:    $DEBUG_LEVEL\n"
33147printf "* JDK variant:    $JDK_VARIANT\n"
33148printf "* JVM variants:   $with_jvm_variants\n"
33149printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33150
33151printf "\n"
33152printf "Tools summary:\n"
33153if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33154  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33155fi
33156printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33157printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33158printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33159
33160printf "\n"
33161printf "Build performance summary:\n"
33162printf "* Cores to use:   $NUM_CORES\n"
33163printf "* Memory limit:   $MEMORY_SIZE MB\n"
33164printf "* ccache status:  $CCACHE_STATUS\n"
33165printf "\n"
33166
33167if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33168	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33169	printf "$CCACHE_HELP_MSG\n"
33170
33171    # Print a helpful message on how to acquire the necessary build dependency.
33172    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33173    MISSING_DEPENDENCY=ccache
33174    PKGHANDLER_COMMAND=
33175
33176    case $PKGHANDLER in
33177	apt-get)
33178                apt_help     $MISSING_DEPENDENCY ;;
33179    yum)
33180                yum_help     $MISSING_DEPENDENCY ;;
33181	port)
33182                port_help    $MISSING_DEPENDENCY ;;
33183	pkgutil)
33184                pkgutil_help $MISSING_DEPENDENCY ;;
33185	pkgadd)
33186                pkgadd_help  $MISSING_DEPENDENCY ;;
33187    * )
33188      break ;;
33189    esac
33190
33191    if test "x$PKGHANDLER_COMMAND" != x; then
33192        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33193    fi
33194
33195	printf "$HELP_MSG\n"
33196	printf "\n"
33197fi
33198
33199if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33200	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33201	printf "will result in longer build times.\n"
33202	printf "\n"
33203fi
33204
33205if test "x$FOUND_ALT_VARIABLES" != "x"; then
33206	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33207	printf "These are not respected, and will be ignored. It is recommended\n"
33208	printf "that you clean your environment. The following variables are set:\n"
33209	printf "$FOUND_ALT_VARIABLES\n"
33210	printf "\n"
33211fi
33212
33213if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33214	printf "WARNING: Your build output directory is not on a local disk.\n"
33215	printf "This will severely degrade build performance!\n"
33216	printf "It is recommended that you create an output directory on a local disk,\n"
33217	printf "and run the configure script again from that directory.\n"
33218	printf "\n"
33219fi
33220
33221if test "x$IS_RECONFIGURE" = "xyes"; then
33222	printf "WARNING: The result of this configuration has overridden an older\n"
33223	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33224	printf "proper build. Failure to do so might result in strange build problems.\n"
33225	printf "\n"
33226fi
33227
33228