generated-configure.sh revision 648:c4901c0e0579
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=1362517596
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# On windows, only cl.exe is supported.
18101# On Solaris, cc is preferred to gcc.
18102# Elsewhere, gcc is preferred to cc.
18103
18104if test "x$CC" != x; then
18105  COMPILER_CHECK_LIST="$CC"
18106elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18107  COMPILER_CHECK_LIST="cl"
18108elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18109  COMPILER_CHECK_LIST="cc gcc"
18110else
18111  COMPILER_CHECK_LIST="gcc cc"
18112fi
18113
18114
18115  COMPILER_NAME=C
18116
18117  CC=
18118  # If TOOLS_DIR is set, check for all compiler names in there first
18119  # before checking the rest of the PATH.
18120  if test -n "$TOOLS_DIR"; then
18121    PATH_save="$PATH"
18122    PATH="$TOOLS_DIR"
18123    for ac_prog in $COMPILER_CHECK_LIST
18124do
18125  # Extract the first word of "$ac_prog", so it can be a program name with args.
18126set dummy $ac_prog; ac_word=$2
18127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18128$as_echo_n "checking for $ac_word... " >&6; }
18129if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18130  $as_echo_n "(cached) " >&6
18131else
18132  case $TOOLS_DIR_CC in
18133  [\\/]* | ?:[\\/]*)
18134  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18135  ;;
18136  *)
18137  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18138for as_dir in $PATH
18139do
18140  IFS=$as_save_IFS
18141  test -z "$as_dir" && as_dir=.
18142    for ac_exec_ext in '' $ac_executable_extensions; do
18143  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18144    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18145    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18146    break 2
18147  fi
18148done
18149  done
18150IFS=$as_save_IFS
18151
18152  ;;
18153esac
18154fi
18155TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18156if test -n "$TOOLS_DIR_CC"; then
18157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18158$as_echo "$TOOLS_DIR_CC" >&6; }
18159else
18160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18161$as_echo "no" >&6; }
18162fi
18163
18164
18165  test -n "$TOOLS_DIR_CC" && break
18166done
18167
18168    CC=$TOOLS_DIR_CC
18169    PATH="$PATH_save"
18170  fi
18171
18172  # AC_PATH_PROGS can't be run multiple times with the same variable,
18173  # so create a new name for this run.
18174  if test "x$CC" = x; then
18175    for ac_prog in $COMPILER_CHECK_LIST
18176do
18177  # Extract the first word of "$ac_prog", so it can be a program name with args.
18178set dummy $ac_prog; ac_word=$2
18179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18180$as_echo_n "checking for $ac_word... " >&6; }
18181if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18182  $as_echo_n "(cached) " >&6
18183else
18184  case $POTENTIAL_CC in
18185  [\\/]* | ?:[\\/]*)
18186  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18187  ;;
18188  *)
18189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18190for as_dir in $PATH
18191do
18192  IFS=$as_save_IFS
18193  test -z "$as_dir" && as_dir=.
18194    for ac_exec_ext in '' $ac_executable_extensions; do
18195  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18196    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18198    break 2
18199  fi
18200done
18201  done
18202IFS=$as_save_IFS
18203
18204  ;;
18205esac
18206fi
18207POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18208if test -n "$POTENTIAL_CC"; then
18209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18210$as_echo "$POTENTIAL_CC" >&6; }
18211else
18212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18213$as_echo "no" >&6; }
18214fi
18215
18216
18217  test -n "$POTENTIAL_CC" && break
18218done
18219
18220    CC=$POTENTIAL_CC
18221  fi
18222
18223  if test "x$CC" = x; then
18224
18225    # Print a helpful message on how to acquire the necessary build dependency.
18226    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18227    MISSING_DEPENDENCY=devkit
18228    PKGHANDLER_COMMAND=
18229
18230    case $PKGHANDLER in
18231	apt-get)
18232                apt_help     $MISSING_DEPENDENCY ;;
18233    yum)
18234                yum_help     $MISSING_DEPENDENCY ;;
18235	port)
18236                port_help    $MISSING_DEPENDENCY ;;
18237	pkgutil)
18238                pkgutil_help $MISSING_DEPENDENCY ;;
18239	pkgadd)
18240                pkgadd_help  $MISSING_DEPENDENCY ;;
18241    * )
18242      break ;;
18243    esac
18244
18245    if test "x$PKGHANDLER_COMMAND" != x; then
18246        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18247    fi
18248
18249      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18250  fi
18251
18252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18253
18254  # First separate the path from the arguments. This will split at the first
18255  # space.
18256  complete="$CC"
18257  path="${complete%% *}"
18258  tmp="$complete EOL"
18259  arguments="${tmp#* }"
18260
18261  # Input might be given as Windows format, start by converting to
18262  # unix format.
18263  new_path=`$CYGPATH -u "$path"`
18264
18265  # Now try to locate executable using which
18266  new_path=`$WHICH "$new_path" 2> /dev/null`
18267  # bat and cmd files are not always considered executable in cygwin causing which
18268  # to not find them
18269  if test "x$new_path" = x \
18270           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18271           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18272    new_path=`$CYGPATH -u "$path"`
18273  fi
18274  if test "x$new_path" = x; then
18275    # Oops. Which didn't find the executable.
18276    # The splitting of arguments from the executable at a space might have been incorrect,
18277    # since paths with space are more likely in Windows. Give it another try with the whole
18278    # argument.
18279    path="$complete"
18280    arguments="EOL"
18281    new_path=`$CYGPATH -u "$path"`
18282    new_path=`$WHICH "$new_path" 2> /dev/null`
18283    # bat and cmd files are not always considered executable in cygwin causing which
18284    # to not find them
18285    if test "x$new_path" = x \
18286             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18287             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18288      new_path=`$CYGPATH -u "$path"`
18289    fi
18290    if test "x$new_path" = x; then
18291      # It's still not found. Now this is an unrecoverable error.
18292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18293$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18294      has_space=`$ECHO "$complete" | $GREP " "`
18295      if test "x$has_space" != x; then
18296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18298      fi
18299      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18300    fi
18301  fi
18302
18303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18306  # "foo.exe" is OK but "foo" is an error.
18307  #
18308  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18309  # It is also a way to make sure we got the proper file name for the real test later on.
18310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18311  if test "x$test_shortpath" = x; then
18312    # Short path failed, file does not exist as specified.
18313    # Try adding .exe or .cmd
18314    if test -f "${new_path}.exe"; then
18315       input_to_shortpath="${new_path}.exe"
18316    elif test -f "${new_path}.cmd"; then
18317       input_to_shortpath="${new_path}.cmd"
18318    else
18319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18320$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18323      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18324    fi
18325  else
18326    input_to_shortpath="$new_path"
18327  fi
18328
18329  # Call helper function which possibly converts this using DOS-style short mode.
18330  # If so, the updated path is stored in $new_path.
18331  new_path="$input_to_shortpath"
18332
18333  input_path="$input_to_shortpath"
18334  # Check if we need to convert this using DOS-style short mode. If the path
18335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18336  # take no chances and rewrite it.
18337  # Note: m4 eats our [], so we need to use [ and ] instead.
18338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18339  if test "x$has_forbidden_chars" != x; then
18340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18344      # Going to short mode and back again did indeed matter. Since short mode is
18345      # case insensitive, let's make it lowercase to improve readability.
18346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18347      # Now convert it back to Unix-stile (cygpath)
18348      input_path=`$CYGPATH -u "$shortmode_path"`
18349      new_path="$input_path"
18350    fi
18351  fi
18352
18353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18354  if test "x$test_cygdrive_prefix" = x; then
18355    # As a simple fix, exclude /usr/bin since it's not a real path.
18356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18358      # a path prefixed by /cygdrive for fixpath to work.
18359      new_path="$CYGWIN_ROOT_PATH$input_path"
18360    fi
18361  fi
18362
18363  # remove trailing .exe if any
18364  new_path="${new_path/%.exe/}"
18365
18366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18367
18368  # First separate the path from the arguments. This will split at the first
18369  # space.
18370  complete="$CC"
18371  path="${complete%% *}"
18372  tmp="$complete EOL"
18373  arguments="${tmp#* }"
18374
18375  # Input might be given as Windows format, start by converting to
18376  # unix format.
18377  new_path="$path"
18378
18379  windows_path="$new_path"
18380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18381    unix_path=`$CYGPATH -u "$windows_path"`
18382    new_path="$unix_path"
18383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18385    new_path="$unix_path"
18386  fi
18387
18388
18389  # Now try to locate executable using which
18390  new_path=`$WHICH "$new_path" 2> /dev/null`
18391
18392  if test "x$new_path" = x; then
18393    # Oops. Which didn't find the executable.
18394    # The splitting of arguments from the executable at a space might have been incorrect,
18395    # since paths with space are more likely in Windows. Give it another try with the whole
18396    # argument.
18397    path="$complete"
18398    arguments="EOL"
18399    new_path="$path"
18400
18401  windows_path="$new_path"
18402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18403    unix_path=`$CYGPATH -u "$windows_path"`
18404    new_path="$unix_path"
18405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18407    new_path="$unix_path"
18408  fi
18409
18410
18411    new_path=`$WHICH "$new_path" 2> /dev/null`
18412
18413    if test "x$new_path" = x; then
18414      # It's still not found. Now this is an unrecoverable error.
18415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18416$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18417      has_space=`$ECHO "$complete" | $GREP " "`
18418      if test "x$has_space" != x; then
18419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18421      fi
18422      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18423    fi
18424  fi
18425
18426  # Now new_path has a complete unix path to the binary
18427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18428    # Keep paths in /bin as-is, but remove trailing .exe if any
18429    new_path="${new_path/%.exe/}"
18430    # Do not save /bin paths to all_fixpath_prefixes!
18431  else
18432    # Not in mixed or Windows style, start by that.
18433    new_path=`cmd //c echo $new_path`
18434
18435  input_path="$new_path"
18436  # Check if we need to convert this using DOS-style short mode. If the path
18437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18438  # take no chances and rewrite it.
18439  # Note: m4 eats our [], so we need to use [ and ] instead.
18440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18441  if test "x$has_forbidden_chars" != x; then
18442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18444  fi
18445
18446    # Output is in $new_path
18447
18448  windows_path="$new_path"
18449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18450    unix_path=`$CYGPATH -u "$windows_path"`
18451    new_path="$unix_path"
18452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18454    new_path="$unix_path"
18455  fi
18456
18457    # remove trailing .exe if any
18458    new_path="${new_path/%.exe/}"
18459
18460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18462  fi
18463
18464  else
18465    # We're on a posix platform. Hooray! :)
18466    # First separate the path from the arguments. This will split at the first
18467    # space.
18468    complete="$CC"
18469    path="${complete%% *}"
18470    tmp="$complete EOL"
18471    arguments="${tmp#* }"
18472
18473    # Cannot rely on the command "which" here since it doesn't always work.
18474    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18475    if test -z "$is_absolute_path"; then
18476      # Path to executable is not absolute. Find it.
18477      IFS_save="$IFS"
18478      IFS=:
18479      for p in $PATH; do
18480        if test -f "$p/$path" && test -x "$p/$path"; then
18481          new_path="$p/$path"
18482          break
18483        fi
18484      done
18485      IFS="$IFS_save"
18486    else
18487      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18488$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18489      new_path="$path"
18490    fi
18491
18492    if test "x$new_path" = x; then
18493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18494$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18495        has_space=`$ECHO "$complete" | $GREP " "`
18496        if test "x$has_space" != x; then
18497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18499        fi
18500        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18501      fi
18502  fi
18503
18504      # Now join together the path and the arguments once again
18505      if test "x$arguments" != xEOL; then
18506        new_complete="$new_path ${arguments% *}"
18507      else
18508        new_complete="$new_path"
18509      fi
18510
18511  if test "x$complete" != "x$new_complete"; then
18512      CC="$new_complete"
18513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18514$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18515    fi
18516
18517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18518$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18519  TEST_COMPILER="$CC"
18520
18521    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18522        # Follow a chain of symbolic links. Use readlink
18523        # where it exists, else fall back to horribly
18524        # complicated shell code.
18525        if test "x$READLINK_TESTED" != yes; then
18526            # On MacOSX there is a readlink tool with a different
18527            # purpose than the GNU readlink tool. Check the found readlink.
18528            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18529            if test "x$ISGNU" = x; then
18530                 # A readlink that we do not know how to use.
18531                 # Are there other non-GNU readlinks out there?
18532                 READLINK_TESTED=yes
18533                 READLINK=
18534            fi
18535        fi
18536
18537        if test "x$READLINK" != x; then
18538            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18539        else
18540            # Save the current directory for restoring afterwards
18541            STARTDIR=$PWD
18542            COUNTER=0
18543            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18544            sym_link_file=`$BASENAME $TEST_COMPILER`
18545            # Use the system pwd and not the shell builtin to resolve directory symlinks
18546            cd $sym_link_dir
18547            cd `$THEPWDCMD`
18548            sym_link_dir=`$THEPWDCMD`
18549            # Resolve file symlinks
18550            while test $COUNTER -lt 20; do
18551                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18552                if test "x$ISLINK" == x; then
18553                    # This is not a symbolic link! We are done!
18554                    break
18555                fi
18556                # Again resolve directory symlinks since the target of the just found
18557                # link could be in a different directory
18558                cd `$DIRNAME $ISLINK`
18559                sym_link_dir=`$THEPWDCMD`
18560                sym_link_file=`$BASENAME $ISLINK`
18561                let COUNTER=COUNTER+1
18562            done
18563            cd $STARTDIR
18564            TEST_COMPILER=$sym_link_dir/$sym_link_file
18565        fi
18566    fi
18567
18568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18569$as_echo "$TEST_COMPILER" >&6; }
18570  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18571$as_echo_n "checking if CC is disguised ccache... " >&6; }
18572
18573  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18574  if test "x$COMPILER_BASENAME" = "xccache"; then
18575    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18576$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18577    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18578    # We want to control ccache invocation ourselves, so ignore this cc and try
18579    # searching again.
18580
18581    # Remove the path to the fake ccache cc from the PATH
18582    RETRY_COMPILER_SAVED_PATH="$PATH"
18583    COMPILER_DIRNAME=`$DIRNAME $CC`
18584    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18585
18586    # Try again looking for our compiler
18587    if test -n "$ac_tool_prefix"; then
18588  for ac_prog in $COMPILER_CHECK_LIST
18589  do
18590    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18591set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18593$as_echo_n "checking for $ac_word... " >&6; }
18594if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18595  $as_echo_n "(cached) " >&6
18596else
18597  if test -n "$PROPER_COMPILER_CC"; then
18598  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18599else
18600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18601for as_dir in $PATH
18602do
18603  IFS=$as_save_IFS
18604  test -z "$as_dir" && as_dir=.
18605    for ac_exec_ext in '' $ac_executable_extensions; do
18606  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18607    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18609    break 2
18610  fi
18611done
18612  done
18613IFS=$as_save_IFS
18614
18615fi
18616fi
18617PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18618if test -n "$PROPER_COMPILER_CC"; then
18619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18620$as_echo "$PROPER_COMPILER_CC" >&6; }
18621else
18622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18623$as_echo "no" >&6; }
18624fi
18625
18626
18627    test -n "$PROPER_COMPILER_CC" && break
18628  done
18629fi
18630if test -z "$PROPER_COMPILER_CC"; then
18631  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18632  for ac_prog in $COMPILER_CHECK_LIST
18633do
18634  # Extract the first word of "$ac_prog", so it can be a program name with args.
18635set dummy $ac_prog; ac_word=$2
18636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18637$as_echo_n "checking for $ac_word... " >&6; }
18638if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18639  $as_echo_n "(cached) " >&6
18640else
18641  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18642  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18643else
18644as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18645for as_dir in $PATH
18646do
18647  IFS=$as_save_IFS
18648  test -z "$as_dir" && as_dir=.
18649    for ac_exec_ext in '' $ac_executable_extensions; do
18650  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18651    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18653    break 2
18654  fi
18655done
18656  done
18657IFS=$as_save_IFS
18658
18659fi
18660fi
18661ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18662if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18664$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18665else
18666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18667$as_echo "no" >&6; }
18668fi
18669
18670
18671  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18672done
18673
18674  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18675    PROPER_COMPILER_CC=""
18676  else
18677    case $cross_compiling:$ac_tool_warned in
18678yes:)
18679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18681ac_tool_warned=yes ;;
18682esac
18683    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18684  fi
18685fi
18686
18687
18688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18689
18690  # First separate the path from the arguments. This will split at the first
18691  # space.
18692  complete="$PROPER_COMPILER_CC"
18693  path="${complete%% *}"
18694  tmp="$complete EOL"
18695  arguments="${tmp#* }"
18696
18697  # Input might be given as Windows format, start by converting to
18698  # unix format.
18699  new_path=`$CYGPATH -u "$path"`
18700
18701  # Now try to locate executable using which
18702  new_path=`$WHICH "$new_path" 2> /dev/null`
18703  # bat and cmd files are not always considered executable in cygwin causing which
18704  # to not find them
18705  if test "x$new_path" = x \
18706           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18707           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18708    new_path=`$CYGPATH -u "$path"`
18709  fi
18710  if test "x$new_path" = x; then
18711    # Oops. Which didn't find the executable.
18712    # The splitting of arguments from the executable at a space might have been incorrect,
18713    # since paths with space are more likely in Windows. Give it another try with the whole
18714    # argument.
18715    path="$complete"
18716    arguments="EOL"
18717    new_path=`$CYGPATH -u "$path"`
18718    new_path=`$WHICH "$new_path" 2> /dev/null`
18719    # bat and cmd files are not always considered executable in cygwin causing which
18720    # to not find them
18721    if test "x$new_path" = x \
18722             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18723             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18724      new_path=`$CYGPATH -u "$path"`
18725    fi
18726    if test "x$new_path" = x; then
18727      # It's still not found. Now this is an unrecoverable error.
18728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18729$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18730      has_space=`$ECHO "$complete" | $GREP " "`
18731      if test "x$has_space" != x; then
18732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18734      fi
18735      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18736    fi
18737  fi
18738
18739  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18740  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18741  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18742  # "foo.exe" is OK but "foo" is an error.
18743  #
18744  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18745  # It is also a way to make sure we got the proper file name for the real test later on.
18746  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18747  if test "x$test_shortpath" = x; then
18748    # Short path failed, file does not exist as specified.
18749    # Try adding .exe or .cmd
18750    if test -f "${new_path}.exe"; then
18751       input_to_shortpath="${new_path}.exe"
18752    elif test -f "${new_path}.cmd"; then
18753       input_to_shortpath="${new_path}.cmd"
18754    else
18755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18756$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18757      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18758$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18759      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18760    fi
18761  else
18762    input_to_shortpath="$new_path"
18763  fi
18764
18765  # Call helper function which possibly converts this using DOS-style short mode.
18766  # If so, the updated path is stored in $new_path.
18767  new_path="$input_to_shortpath"
18768
18769  input_path="$input_to_shortpath"
18770  # Check if we need to convert this using DOS-style short mode. If the path
18771  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18772  # take no chances and rewrite it.
18773  # Note: m4 eats our [], so we need to use [ and ] instead.
18774  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18775  if test "x$has_forbidden_chars" != x; then
18776    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18777    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18778    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18779    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18780      # Going to short mode and back again did indeed matter. Since short mode is
18781      # case insensitive, let's make it lowercase to improve readability.
18782      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18783      # Now convert it back to Unix-stile (cygpath)
18784      input_path=`$CYGPATH -u "$shortmode_path"`
18785      new_path="$input_path"
18786    fi
18787  fi
18788
18789  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18790  if test "x$test_cygdrive_prefix" = x; then
18791    # As a simple fix, exclude /usr/bin since it's not a real path.
18792    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18793      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18794      # a path prefixed by /cygdrive for fixpath to work.
18795      new_path="$CYGWIN_ROOT_PATH$input_path"
18796    fi
18797  fi
18798
18799  # remove trailing .exe if any
18800  new_path="${new_path/%.exe/}"
18801
18802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18803
18804  # First separate the path from the arguments. This will split at the first
18805  # space.
18806  complete="$PROPER_COMPILER_CC"
18807  path="${complete%% *}"
18808  tmp="$complete EOL"
18809  arguments="${tmp#* }"
18810
18811  # Input might be given as Windows format, start by converting to
18812  # unix format.
18813  new_path="$path"
18814
18815  windows_path="$new_path"
18816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18817    unix_path=`$CYGPATH -u "$windows_path"`
18818    new_path="$unix_path"
18819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18821    new_path="$unix_path"
18822  fi
18823
18824
18825  # Now try to locate executable using which
18826  new_path=`$WHICH "$new_path" 2> /dev/null`
18827
18828  if test "x$new_path" = x; then
18829    # Oops. Which didn't find the executable.
18830    # The splitting of arguments from the executable at a space might have been incorrect,
18831    # since paths with space are more likely in Windows. Give it another try with the whole
18832    # argument.
18833    path="$complete"
18834    arguments="EOL"
18835    new_path="$path"
18836
18837  windows_path="$new_path"
18838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18839    unix_path=`$CYGPATH -u "$windows_path"`
18840    new_path="$unix_path"
18841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18843    new_path="$unix_path"
18844  fi
18845
18846
18847    new_path=`$WHICH "$new_path" 2> /dev/null`
18848
18849    if test "x$new_path" = x; then
18850      # It's still not found. Now this is an unrecoverable error.
18851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18852$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18853      has_space=`$ECHO "$complete" | $GREP " "`
18854      if test "x$has_space" != x; then
18855        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18856$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18857      fi
18858      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18859    fi
18860  fi
18861
18862  # Now new_path has a complete unix path to the binary
18863  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18864    # Keep paths in /bin as-is, but remove trailing .exe if any
18865    new_path="${new_path/%.exe/}"
18866    # Do not save /bin paths to all_fixpath_prefixes!
18867  else
18868    # Not in mixed or Windows style, start by that.
18869    new_path=`cmd //c echo $new_path`
18870
18871  input_path="$new_path"
18872  # Check if we need to convert this using DOS-style short mode. If the path
18873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18874  # take no chances and rewrite it.
18875  # Note: m4 eats our [], so we need to use [ and ] instead.
18876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18877  if test "x$has_forbidden_chars" != x; then
18878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18880  fi
18881
18882    # Output is in $new_path
18883
18884  windows_path="$new_path"
18885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18886    unix_path=`$CYGPATH -u "$windows_path"`
18887    new_path="$unix_path"
18888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18890    new_path="$unix_path"
18891  fi
18892
18893    # remove trailing .exe if any
18894    new_path="${new_path/%.exe/}"
18895
18896    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18897    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18898  fi
18899
18900  else
18901    # We're on a posix platform. Hooray! :)
18902    # First separate the path from the arguments. This will split at the first
18903    # space.
18904    complete="$PROPER_COMPILER_CC"
18905    path="${complete%% *}"
18906    tmp="$complete EOL"
18907    arguments="${tmp#* }"
18908
18909    # Cannot rely on the command "which" here since it doesn't always work.
18910    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18911    if test -z "$is_absolute_path"; then
18912      # Path to executable is not absolute. Find it.
18913      IFS_save="$IFS"
18914      IFS=:
18915      for p in $PATH; do
18916        if test -f "$p/$path" && test -x "$p/$path"; then
18917          new_path="$p/$path"
18918          break
18919        fi
18920      done
18921      IFS="$IFS_save"
18922    else
18923      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18924$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18925      new_path="$path"
18926    fi
18927
18928    if test "x$new_path" = x; then
18929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18930$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18931        has_space=`$ECHO "$complete" | $GREP " "`
18932        if test "x$has_space" != x; then
18933          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18934$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18935        fi
18936        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18937      fi
18938  fi
18939
18940      # Now join together the path and the arguments once again
18941      if test "x$arguments" != xEOL; then
18942        new_complete="$new_path ${arguments% *}"
18943      else
18944        new_complete="$new_path"
18945      fi
18946
18947  if test "x$complete" != "x$new_complete"; then
18948      PROPER_COMPILER_CC="$new_complete"
18949      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18950$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18951    fi
18952
18953    PATH="$RETRY_COMPILER_SAVED_PATH"
18954
18955    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18956$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18957
18958    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18959        # Follow a chain of symbolic links. Use readlink
18960        # where it exists, else fall back to horribly
18961        # complicated shell code.
18962        if test "x$READLINK_TESTED" != yes; then
18963            # On MacOSX there is a readlink tool with a different
18964            # purpose than the GNU readlink tool. Check the found readlink.
18965            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18966            if test "x$ISGNU" = x; then
18967                 # A readlink that we do not know how to use.
18968                 # Are there other non-GNU readlinks out there?
18969                 READLINK_TESTED=yes
18970                 READLINK=
18971            fi
18972        fi
18973
18974        if test "x$READLINK" != x; then
18975            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18976        else
18977            # Save the current directory for restoring afterwards
18978            STARTDIR=$PWD
18979            COUNTER=0
18980            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18981            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18982            # Use the system pwd and not the shell builtin to resolve directory symlinks
18983            cd $sym_link_dir
18984            cd `$THEPWDCMD`
18985            sym_link_dir=`$THEPWDCMD`
18986            # Resolve file symlinks
18987            while test $COUNTER -lt 20; do
18988                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18989                if test "x$ISLINK" == x; then
18990                    # This is not a symbolic link! We are done!
18991                    break
18992                fi
18993                # Again resolve directory symlinks since the target of the just found
18994                # link could be in a different directory
18995                cd `$DIRNAME $ISLINK`
18996                sym_link_dir=`$THEPWDCMD`
18997                sym_link_file=`$BASENAME $ISLINK`
18998                let COUNTER=COUNTER+1
18999            done
19000            cd $STARTDIR
19001            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19002        fi
19003    fi
19004
19005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19006$as_echo "$PROPER_COMPILER_CC" >&6; }
19007    CC="$PROPER_COMPILER_CC"
19008  else
19009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19010$as_echo "no, keeping CC" >&6; }
19011    CC="$TEST_COMPILER"
19012  fi
19013
19014  COMPILER=$CC
19015  COMPILER_NAME=$COMPILER_NAME
19016
19017  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19018    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19019    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19020    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19021    if test $? -ne 0; then
19022      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19023
19024      { $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
19025$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19026      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19027$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19028      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19029    else
19030      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19031      COMPILER_VENDOR="Sun Studio"
19032    fi
19033  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19034    # First line typically looks something like:
19035    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19036    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19037    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19038    COMPILER_VENDOR="Microsoft CL.EXE"
19039    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19040    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19041      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19042        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19043      fi
19044    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19045      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19046        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19047      fi
19048    fi
19049  else
19050    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19051    # Check that this is likely to be GCC.
19052    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19053    if test $? -ne 0; then
19054      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19055$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19056      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19057$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19058      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19059    fi
19060
19061    # First line typically looks something like:
19062    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19063    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19064    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19065  fi
19066  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19067  CC_VERSION="$COMPILER_VERSION"
19068  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19069  CC_VENDOR="$COMPILER_VENDOR"
19070
19071  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19072$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19073
19074
19075# Now that we have resolved CC ourself, let autoconf have its go at it
19076ac_ext=c
19077ac_cpp='$CPP $CPPFLAGS'
19078ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19079ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19080ac_compiler_gnu=$ac_cv_c_compiler_gnu
19081if test -n "$ac_tool_prefix"; then
19082  for ac_prog in $CC
19083  do
19084    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19085set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19087$as_echo_n "checking for $ac_word... " >&6; }
19088if test "${ac_cv_prog_CC+set}" = set; then :
19089  $as_echo_n "(cached) " >&6
19090else
19091  if test -n "$CC"; then
19092  ac_cv_prog_CC="$CC" # Let the user override the test.
19093else
19094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19095for as_dir in $PATH
19096do
19097  IFS=$as_save_IFS
19098  test -z "$as_dir" && as_dir=.
19099    for ac_exec_ext in '' $ac_executable_extensions; do
19100  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19101    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19103    break 2
19104  fi
19105done
19106  done
19107IFS=$as_save_IFS
19108
19109fi
19110fi
19111CC=$ac_cv_prog_CC
19112if test -n "$CC"; then
19113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19114$as_echo "$CC" >&6; }
19115else
19116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19117$as_echo "no" >&6; }
19118fi
19119
19120
19121    test -n "$CC" && break
19122  done
19123fi
19124if test -z "$CC"; then
19125  ac_ct_CC=$CC
19126  for ac_prog in $CC
19127do
19128  # Extract the first word of "$ac_prog", so it can be a program name with args.
19129set dummy $ac_prog; ac_word=$2
19130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19131$as_echo_n "checking for $ac_word... " >&6; }
19132if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19133  $as_echo_n "(cached) " >&6
19134else
19135  if test -n "$ac_ct_CC"; then
19136  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19137else
19138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19139for as_dir in $PATH
19140do
19141  IFS=$as_save_IFS
19142  test -z "$as_dir" && as_dir=.
19143    for ac_exec_ext in '' $ac_executable_extensions; do
19144  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19145    ac_cv_prog_ac_ct_CC="$ac_prog"
19146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19147    break 2
19148  fi
19149done
19150  done
19151IFS=$as_save_IFS
19152
19153fi
19154fi
19155ac_ct_CC=$ac_cv_prog_ac_ct_CC
19156if test -n "$ac_ct_CC"; then
19157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19158$as_echo "$ac_ct_CC" >&6; }
19159else
19160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19161$as_echo "no" >&6; }
19162fi
19163
19164
19165  test -n "$ac_ct_CC" && break
19166done
19167
19168  if test "x$ac_ct_CC" = x; then
19169    CC=""
19170  else
19171    case $cross_compiling:$ac_tool_warned in
19172yes:)
19173{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19174$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19175ac_tool_warned=yes ;;
19176esac
19177    CC=$ac_ct_CC
19178  fi
19179fi
19180
19181
19182test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19183$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19184as_fn_error $? "no acceptable C compiler found in \$PATH
19185See \`config.log' for more details" "$LINENO" 5 ; }
19186
19187# Provide some information about the compiler.
19188$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19189set X $ac_compile
19190ac_compiler=$2
19191for ac_option in --version -v -V -qversion; do
19192  { { ac_try="$ac_compiler $ac_option >&5"
19193case "(($ac_try" in
19194  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19195  *) ac_try_echo=$ac_try;;
19196esac
19197eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19198$as_echo "$ac_try_echo"; } >&5
19199  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19200  ac_status=$?
19201  if test -s conftest.err; then
19202    sed '10a\
19203... rest of stderr output deleted ...
19204         10q' conftest.err >conftest.er1
19205    cat conftest.er1 >&5
19206  fi
19207  rm -f conftest.er1 conftest.err
19208  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19209  test $ac_status = 0; }
19210done
19211
19212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19213/* end confdefs.h.  */
19214
19215int
19216main ()
19217{
19218
19219  ;
19220  return 0;
19221}
19222_ACEOF
19223ac_clean_files_save=$ac_clean_files
19224ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19225# Try to create an executable without -o first, disregard a.out.
19226# It will help us diagnose broken compilers, and finding out an intuition
19227# of exeext.
19228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19229$as_echo_n "checking whether the C compiler works... " >&6; }
19230ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19231
19232# The possible output files:
19233ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19234
19235ac_rmfiles=
19236for ac_file in $ac_files
19237do
19238  case $ac_file in
19239    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19240    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19241  esac
19242done
19243rm -f $ac_rmfiles
19244
19245if { { ac_try="$ac_link_default"
19246case "(($ac_try" in
19247  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19248  *) ac_try_echo=$ac_try;;
19249esac
19250eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19251$as_echo "$ac_try_echo"; } >&5
19252  (eval "$ac_link_default") 2>&5
19253  ac_status=$?
19254  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19255  test $ac_status = 0; }; then :
19256  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19257# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19258# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19259# so that the user can short-circuit this test for compilers unknown to
19260# Autoconf.
19261for ac_file in $ac_files ''
19262do
19263  test -f "$ac_file" || continue
19264  case $ac_file in
19265    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19266	;;
19267    [ab].out )
19268	# We found the default executable, but exeext='' is most
19269	# certainly right.
19270	break;;
19271    *.* )
19272	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19273	then :; else
19274	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19275	fi
19276	# We set ac_cv_exeext here because the later test for it is not
19277	# safe: cross compilers may not add the suffix if given an `-o'
19278	# argument, so we may need to know it at that point already.
19279	# Even if this section looks crufty: it has the advantage of
19280	# actually working.
19281	break;;
19282    * )
19283	break;;
19284  esac
19285done
19286test "$ac_cv_exeext" = no && ac_cv_exeext=
19287
19288else
19289  ac_file=''
19290fi
19291if test -z "$ac_file"; then :
19292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19293$as_echo "no" >&6; }
19294$as_echo "$as_me: failed program was:" >&5
19295sed 's/^/| /' conftest.$ac_ext >&5
19296
19297{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19298$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19299as_fn_error 77 "C compiler cannot create executables
19300See \`config.log' for more details" "$LINENO" 5 ; }
19301else
19302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19303$as_echo "yes" >&6; }
19304fi
19305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19306$as_echo_n "checking for C compiler default output file name... " >&6; }
19307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19308$as_echo "$ac_file" >&6; }
19309ac_exeext=$ac_cv_exeext
19310
19311rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19312ac_clean_files=$ac_clean_files_save
19313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19314$as_echo_n "checking for suffix of executables... " >&6; }
19315if { { ac_try="$ac_link"
19316case "(($ac_try" in
19317  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19318  *) ac_try_echo=$ac_try;;
19319esac
19320eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19321$as_echo "$ac_try_echo"; } >&5
19322  (eval "$ac_link") 2>&5
19323  ac_status=$?
19324  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19325  test $ac_status = 0; }; then :
19326  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19327# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19328# work properly (i.e., refer to `conftest.exe'), while it won't with
19329# `rm'.
19330for ac_file in conftest.exe conftest conftest.*; do
19331  test -f "$ac_file" || continue
19332  case $ac_file in
19333    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19334    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19335	  break;;
19336    * ) break;;
19337  esac
19338done
19339else
19340  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19341$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19342as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19343See \`config.log' for more details" "$LINENO" 5 ; }
19344fi
19345rm -f conftest conftest$ac_cv_exeext
19346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19347$as_echo "$ac_cv_exeext" >&6; }
19348
19349rm -f conftest.$ac_ext
19350EXEEXT=$ac_cv_exeext
19351ac_exeext=$EXEEXT
19352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19353/* end confdefs.h.  */
19354#include <stdio.h>
19355int
19356main ()
19357{
19358FILE *f = fopen ("conftest.out", "w");
19359 return ferror (f) || fclose (f) != 0;
19360
19361  ;
19362  return 0;
19363}
19364_ACEOF
19365ac_clean_files="$ac_clean_files conftest.out"
19366# Check that the compiler produces executables we can run.  If not, either
19367# the compiler is broken, or we cross compile.
19368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19369$as_echo_n "checking whether we are cross compiling... " >&6; }
19370if test "$cross_compiling" != yes; then
19371  { { ac_try="$ac_link"
19372case "(($ac_try" in
19373  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19374  *) ac_try_echo=$ac_try;;
19375esac
19376eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19377$as_echo "$ac_try_echo"; } >&5
19378  (eval "$ac_link") 2>&5
19379  ac_status=$?
19380  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19381  test $ac_status = 0; }
19382  if { ac_try='./conftest$ac_cv_exeext'
19383  { { case "(($ac_try" in
19384  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19385  *) ac_try_echo=$ac_try;;
19386esac
19387eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19388$as_echo "$ac_try_echo"; } >&5
19389  (eval "$ac_try") 2>&5
19390  ac_status=$?
19391  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19392  test $ac_status = 0; }; }; then
19393    cross_compiling=no
19394  else
19395    if test "$cross_compiling" = maybe; then
19396	cross_compiling=yes
19397    else
19398	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19399$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19400as_fn_error $? "cannot run C compiled programs.
19401If you meant to cross compile, use \`--host'.
19402See \`config.log' for more details" "$LINENO" 5 ; }
19403    fi
19404  fi
19405fi
19406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19407$as_echo "$cross_compiling" >&6; }
19408
19409rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19410ac_clean_files=$ac_clean_files_save
19411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19412$as_echo_n "checking for suffix of object files... " >&6; }
19413if test "${ac_cv_objext+set}" = set; then :
19414  $as_echo_n "(cached) " >&6
19415else
19416  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19417/* end confdefs.h.  */
19418
19419int
19420main ()
19421{
19422
19423  ;
19424  return 0;
19425}
19426_ACEOF
19427rm -f conftest.o conftest.obj
19428if { { ac_try="$ac_compile"
19429case "(($ac_try" in
19430  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19431  *) ac_try_echo=$ac_try;;
19432esac
19433eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19434$as_echo "$ac_try_echo"; } >&5
19435  (eval "$ac_compile") 2>&5
19436  ac_status=$?
19437  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19438  test $ac_status = 0; }; then :
19439  for ac_file in conftest.o conftest.obj conftest.*; do
19440  test -f "$ac_file" || continue;
19441  case $ac_file in
19442    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19443    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19444       break;;
19445  esac
19446done
19447else
19448  $as_echo "$as_me: failed program was:" >&5
19449sed 's/^/| /' conftest.$ac_ext >&5
19450
19451{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19452$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19453as_fn_error $? "cannot compute suffix of object files: cannot compile
19454See \`config.log' for more details" "$LINENO" 5 ; }
19455fi
19456rm -f conftest.$ac_cv_objext conftest.$ac_ext
19457fi
19458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19459$as_echo "$ac_cv_objext" >&6; }
19460OBJEXT=$ac_cv_objext
19461ac_objext=$OBJEXT
19462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19463$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19464if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19465  $as_echo_n "(cached) " >&6
19466else
19467  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19468/* end confdefs.h.  */
19469
19470int
19471main ()
19472{
19473#ifndef __GNUC__
19474       choke me
19475#endif
19476
19477  ;
19478  return 0;
19479}
19480_ACEOF
19481if ac_fn_c_try_compile "$LINENO"; then :
19482  ac_compiler_gnu=yes
19483else
19484  ac_compiler_gnu=no
19485fi
19486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19487ac_cv_c_compiler_gnu=$ac_compiler_gnu
19488
19489fi
19490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19491$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19492if test $ac_compiler_gnu = yes; then
19493  GCC=yes
19494else
19495  GCC=
19496fi
19497ac_test_CFLAGS=${CFLAGS+set}
19498ac_save_CFLAGS=$CFLAGS
19499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19500$as_echo_n "checking whether $CC accepts -g... " >&6; }
19501if test "${ac_cv_prog_cc_g+set}" = set; then :
19502  $as_echo_n "(cached) " >&6
19503else
19504  ac_save_c_werror_flag=$ac_c_werror_flag
19505   ac_c_werror_flag=yes
19506   ac_cv_prog_cc_g=no
19507   CFLAGS="-g"
19508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19509/* end confdefs.h.  */
19510
19511int
19512main ()
19513{
19514
19515  ;
19516  return 0;
19517}
19518_ACEOF
19519if ac_fn_c_try_compile "$LINENO"; then :
19520  ac_cv_prog_cc_g=yes
19521else
19522  CFLAGS=""
19523      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19524/* end confdefs.h.  */
19525
19526int
19527main ()
19528{
19529
19530  ;
19531  return 0;
19532}
19533_ACEOF
19534if ac_fn_c_try_compile "$LINENO"; then :
19535
19536else
19537  ac_c_werror_flag=$ac_save_c_werror_flag
19538	 CFLAGS="-g"
19539	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19540/* end confdefs.h.  */
19541
19542int
19543main ()
19544{
19545
19546  ;
19547  return 0;
19548}
19549_ACEOF
19550if ac_fn_c_try_compile "$LINENO"; then :
19551  ac_cv_prog_cc_g=yes
19552fi
19553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19554fi
19555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19556fi
19557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19558   ac_c_werror_flag=$ac_save_c_werror_flag
19559fi
19560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19561$as_echo "$ac_cv_prog_cc_g" >&6; }
19562if test "$ac_test_CFLAGS" = set; then
19563  CFLAGS=$ac_save_CFLAGS
19564elif test $ac_cv_prog_cc_g = yes; then
19565  if test "$GCC" = yes; then
19566    CFLAGS="-g -O2"
19567  else
19568    CFLAGS="-g"
19569  fi
19570else
19571  if test "$GCC" = yes; then
19572    CFLAGS="-O2"
19573  else
19574    CFLAGS=
19575  fi
19576fi
19577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19578$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19579if test "${ac_cv_prog_cc_c89+set}" = set; then :
19580  $as_echo_n "(cached) " >&6
19581else
19582  ac_cv_prog_cc_c89=no
19583ac_save_CC=$CC
19584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19585/* end confdefs.h.  */
19586#include <stdarg.h>
19587#include <stdio.h>
19588#include <sys/types.h>
19589#include <sys/stat.h>
19590/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19591struct buf { int x; };
19592FILE * (*rcsopen) (struct buf *, struct stat *, int);
19593static char *e (p, i)
19594     char **p;
19595     int i;
19596{
19597  return p[i];
19598}
19599static char *f (char * (*g) (char **, int), char **p, ...)
19600{
19601  char *s;
19602  va_list v;
19603  va_start (v,p);
19604  s = g (p, va_arg (v,int));
19605  va_end (v);
19606  return s;
19607}
19608
19609/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19610   function prototypes and stuff, but not '\xHH' hex character constants.
19611   These don't provoke an error unfortunately, instead are silently treated
19612   as 'x'.  The following induces an error, until -std is added to get
19613   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19614   array size at least.  It's necessary to write '\x00'==0 to get something
19615   that's true only with -std.  */
19616int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19617
19618/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19619   inside strings and character constants.  */
19620#define FOO(x) 'x'
19621int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19622
19623int test (int i, double x);
19624struct s1 {int (*f) (int a);};
19625struct s2 {int (*f) (double a);};
19626int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19627int argc;
19628char **argv;
19629int
19630main ()
19631{
19632return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19633  ;
19634  return 0;
19635}
19636_ACEOF
19637for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19638	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19639do
19640  CC="$ac_save_CC $ac_arg"
19641  if ac_fn_c_try_compile "$LINENO"; then :
19642  ac_cv_prog_cc_c89=$ac_arg
19643fi
19644rm -f core conftest.err conftest.$ac_objext
19645  test "x$ac_cv_prog_cc_c89" != "xno" && break
19646done
19647rm -f conftest.$ac_ext
19648CC=$ac_save_CC
19649
19650fi
19651# AC_CACHE_VAL
19652case "x$ac_cv_prog_cc_c89" in
19653  x)
19654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19655$as_echo "none needed" >&6; } ;;
19656  xno)
19657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19658$as_echo "unsupported" >&6; } ;;
19659  *)
19660    CC="$CC $ac_cv_prog_cc_c89"
19661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19662$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19663esac
19664if test "x$ac_cv_prog_cc_c89" != xno; then :
19665
19666fi
19667
19668ac_ext=cpp
19669ac_cpp='$CXXCPP $CPPFLAGS'
19670ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19671ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19672ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19673
19674
19675### Locate C++ compiler (CXX)
19676
19677if test "x$CXX" != x; then
19678  COMPILER_CHECK_LIST="$CXX"
19679elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
19680  COMPILER_CHECK_LIST="cl"
19681elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
19682  COMPILER_CHECK_LIST="CC g++"
19683else
19684  COMPILER_CHECK_LIST="g++ CC"
19685fi
19686
19687
19688  COMPILER_NAME=C++
19689
19690  CXX=
19691  # If TOOLS_DIR is set, check for all compiler names in there first
19692  # before checking the rest of the PATH.
19693  if test -n "$TOOLS_DIR"; then
19694    PATH_save="$PATH"
19695    PATH="$TOOLS_DIR"
19696    for ac_prog in $COMPILER_CHECK_LIST
19697do
19698  # Extract the first word of "$ac_prog", so it can be a program name with args.
19699set dummy $ac_prog; ac_word=$2
19700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19701$as_echo_n "checking for $ac_word... " >&6; }
19702if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19703  $as_echo_n "(cached) " >&6
19704else
19705  case $TOOLS_DIR_CXX in
19706  [\\/]* | ?:[\\/]*)
19707  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19708  ;;
19709  *)
19710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19711for as_dir in $PATH
19712do
19713  IFS=$as_save_IFS
19714  test -z "$as_dir" && as_dir=.
19715    for ac_exec_ext in '' $ac_executable_extensions; do
19716  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19717    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19719    break 2
19720  fi
19721done
19722  done
19723IFS=$as_save_IFS
19724
19725  ;;
19726esac
19727fi
19728TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19729if test -n "$TOOLS_DIR_CXX"; then
19730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19731$as_echo "$TOOLS_DIR_CXX" >&6; }
19732else
19733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19734$as_echo "no" >&6; }
19735fi
19736
19737
19738  test -n "$TOOLS_DIR_CXX" && break
19739done
19740
19741    CXX=$TOOLS_DIR_CXX
19742    PATH="$PATH_save"
19743  fi
19744
19745  # AC_PATH_PROGS can't be run multiple times with the same variable,
19746  # so create a new name for this run.
19747  if test "x$CXX" = x; then
19748    for ac_prog in $COMPILER_CHECK_LIST
19749do
19750  # Extract the first word of "$ac_prog", so it can be a program name with args.
19751set dummy $ac_prog; ac_word=$2
19752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19753$as_echo_n "checking for $ac_word... " >&6; }
19754if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19755  $as_echo_n "(cached) " >&6
19756else
19757  case $POTENTIAL_CXX in
19758  [\\/]* | ?:[\\/]*)
19759  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19760  ;;
19761  *)
19762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19763for as_dir in $PATH
19764do
19765  IFS=$as_save_IFS
19766  test -z "$as_dir" && as_dir=.
19767    for ac_exec_ext in '' $ac_executable_extensions; do
19768  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19769    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19771    break 2
19772  fi
19773done
19774  done
19775IFS=$as_save_IFS
19776
19777  ;;
19778esac
19779fi
19780POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19781if test -n "$POTENTIAL_CXX"; then
19782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19783$as_echo "$POTENTIAL_CXX" >&6; }
19784else
19785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19786$as_echo "no" >&6; }
19787fi
19788
19789
19790  test -n "$POTENTIAL_CXX" && break
19791done
19792
19793    CXX=$POTENTIAL_CXX
19794  fi
19795
19796  if test "x$CXX" = x; then
19797
19798    # Print a helpful message on how to acquire the necessary build dependency.
19799    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19800    MISSING_DEPENDENCY=devkit
19801    PKGHANDLER_COMMAND=
19802
19803    case $PKGHANDLER in
19804	apt-get)
19805                apt_help     $MISSING_DEPENDENCY ;;
19806    yum)
19807                yum_help     $MISSING_DEPENDENCY ;;
19808	port)
19809                port_help    $MISSING_DEPENDENCY ;;
19810	pkgutil)
19811                pkgutil_help $MISSING_DEPENDENCY ;;
19812	pkgadd)
19813                pkgadd_help  $MISSING_DEPENDENCY ;;
19814    * )
19815      break ;;
19816    esac
19817
19818    if test "x$PKGHANDLER_COMMAND" != x; then
19819        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19820    fi
19821
19822      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19823  fi
19824
19825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19826
19827  # First separate the path from the arguments. This will split at the first
19828  # space.
19829  complete="$CXX"
19830  path="${complete%% *}"
19831  tmp="$complete EOL"
19832  arguments="${tmp#* }"
19833
19834  # Input might be given as Windows format, start by converting to
19835  # unix format.
19836  new_path=`$CYGPATH -u "$path"`
19837
19838  # Now try to locate executable using which
19839  new_path=`$WHICH "$new_path" 2> /dev/null`
19840  # bat and cmd files are not always considered executable in cygwin causing which
19841  # to not find them
19842  if test "x$new_path" = x \
19843           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19844           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19845    new_path=`$CYGPATH -u "$path"`
19846  fi
19847  if test "x$new_path" = x; then
19848    # Oops. Which didn't find the executable.
19849    # The splitting of arguments from the executable at a space might have been incorrect,
19850    # since paths with space are more likely in Windows. Give it another try with the whole
19851    # argument.
19852    path="$complete"
19853    arguments="EOL"
19854    new_path=`$CYGPATH -u "$path"`
19855    new_path=`$WHICH "$new_path" 2> /dev/null`
19856    # bat and cmd files are not always considered executable in cygwin causing which
19857    # to not find them
19858    if test "x$new_path" = x \
19859             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19860             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19861      new_path=`$CYGPATH -u "$path"`
19862    fi
19863    if test "x$new_path" = x; then
19864      # It's still not found. Now this is an unrecoverable error.
19865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19866$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19867      has_space=`$ECHO "$complete" | $GREP " "`
19868      if test "x$has_space" != x; then
19869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19871      fi
19872      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19873    fi
19874  fi
19875
19876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19879  # "foo.exe" is OK but "foo" is an error.
19880  #
19881  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19882  # It is also a way to make sure we got the proper file name for the real test later on.
19883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19884  if test "x$test_shortpath" = x; then
19885    # Short path failed, file does not exist as specified.
19886    # Try adding .exe or .cmd
19887    if test -f "${new_path}.exe"; then
19888       input_to_shortpath="${new_path}.exe"
19889    elif test -f "${new_path}.cmd"; then
19890       input_to_shortpath="${new_path}.cmd"
19891    else
19892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19893$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19896      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19897    fi
19898  else
19899    input_to_shortpath="$new_path"
19900  fi
19901
19902  # Call helper function which possibly converts this using DOS-style short mode.
19903  # If so, the updated path is stored in $new_path.
19904  new_path="$input_to_shortpath"
19905
19906  input_path="$input_to_shortpath"
19907  # Check if we need to convert this using DOS-style short mode. If the path
19908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19909  # take no chances and rewrite it.
19910  # Note: m4 eats our [], so we need to use [ and ] instead.
19911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19912  if test "x$has_forbidden_chars" != x; then
19913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19917      # Going to short mode and back again did indeed matter. Since short mode is
19918      # case insensitive, let's make it lowercase to improve readability.
19919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19920      # Now convert it back to Unix-stile (cygpath)
19921      input_path=`$CYGPATH -u "$shortmode_path"`
19922      new_path="$input_path"
19923    fi
19924  fi
19925
19926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19927  if test "x$test_cygdrive_prefix" = x; then
19928    # As a simple fix, exclude /usr/bin since it's not a real path.
19929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19931      # a path prefixed by /cygdrive for fixpath to work.
19932      new_path="$CYGWIN_ROOT_PATH$input_path"
19933    fi
19934  fi
19935
19936  # remove trailing .exe if any
19937  new_path="${new_path/%.exe/}"
19938
19939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19940
19941  # First separate the path from the arguments. This will split at the first
19942  # space.
19943  complete="$CXX"
19944  path="${complete%% *}"
19945  tmp="$complete EOL"
19946  arguments="${tmp#* }"
19947
19948  # Input might be given as Windows format, start by converting to
19949  # unix format.
19950  new_path="$path"
19951
19952  windows_path="$new_path"
19953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19954    unix_path=`$CYGPATH -u "$windows_path"`
19955    new_path="$unix_path"
19956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19958    new_path="$unix_path"
19959  fi
19960
19961
19962  # Now try to locate executable using which
19963  new_path=`$WHICH "$new_path" 2> /dev/null`
19964
19965  if test "x$new_path" = x; then
19966    # Oops. Which didn't find the executable.
19967    # The splitting of arguments from the executable at a space might have been incorrect,
19968    # since paths with space are more likely in Windows. Give it another try with the whole
19969    # argument.
19970    path="$complete"
19971    arguments="EOL"
19972    new_path="$path"
19973
19974  windows_path="$new_path"
19975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19976    unix_path=`$CYGPATH -u "$windows_path"`
19977    new_path="$unix_path"
19978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19980    new_path="$unix_path"
19981  fi
19982
19983
19984    new_path=`$WHICH "$new_path" 2> /dev/null`
19985
19986    if test "x$new_path" = x; then
19987      # It's still not found. Now this is an unrecoverable error.
19988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19989$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19990      has_space=`$ECHO "$complete" | $GREP " "`
19991      if test "x$has_space" != x; then
19992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19994      fi
19995      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19996    fi
19997  fi
19998
19999  # Now new_path has a complete unix path to the binary
20000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20001    # Keep paths in /bin as-is, but remove trailing .exe if any
20002    new_path="${new_path/%.exe/}"
20003    # Do not save /bin paths to all_fixpath_prefixes!
20004  else
20005    # Not in mixed or Windows style, start by that.
20006    new_path=`cmd //c echo $new_path`
20007
20008  input_path="$new_path"
20009  # Check if we need to convert this using DOS-style short mode. If the path
20010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20011  # take no chances and rewrite it.
20012  # Note: m4 eats our [], so we need to use [ and ] instead.
20013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20014  if test "x$has_forbidden_chars" != x; then
20015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20017  fi
20018
20019    # Output is in $new_path
20020
20021  windows_path="$new_path"
20022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20023    unix_path=`$CYGPATH -u "$windows_path"`
20024    new_path="$unix_path"
20025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20027    new_path="$unix_path"
20028  fi
20029
20030    # remove trailing .exe if any
20031    new_path="${new_path/%.exe/}"
20032
20033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20035  fi
20036
20037  else
20038    # We're on a posix platform. Hooray! :)
20039    # First separate the path from the arguments. This will split at the first
20040    # space.
20041    complete="$CXX"
20042    path="${complete%% *}"
20043    tmp="$complete EOL"
20044    arguments="${tmp#* }"
20045
20046    # Cannot rely on the command "which" here since it doesn't always work.
20047    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20048    if test -z "$is_absolute_path"; then
20049      # Path to executable is not absolute. Find it.
20050      IFS_save="$IFS"
20051      IFS=:
20052      for p in $PATH; do
20053        if test -f "$p/$path" && test -x "$p/$path"; then
20054          new_path="$p/$path"
20055          break
20056        fi
20057      done
20058      IFS="$IFS_save"
20059    else
20060      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20061$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20062      new_path="$path"
20063    fi
20064
20065    if test "x$new_path" = x; then
20066        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20067$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20068        has_space=`$ECHO "$complete" | $GREP " "`
20069        if test "x$has_space" != x; then
20070          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20071$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20072        fi
20073        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20074      fi
20075  fi
20076
20077      # Now join together the path and the arguments once again
20078      if test "x$arguments" != xEOL; then
20079        new_complete="$new_path ${arguments% *}"
20080      else
20081        new_complete="$new_path"
20082      fi
20083
20084  if test "x$complete" != "x$new_complete"; then
20085      CXX="$new_complete"
20086      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20087$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20088    fi
20089
20090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20091$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20092  TEST_COMPILER="$CXX"
20093
20094    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20095        # Follow a chain of symbolic links. Use readlink
20096        # where it exists, else fall back to horribly
20097        # complicated shell code.
20098        if test "x$READLINK_TESTED" != yes; then
20099            # On MacOSX there is a readlink tool with a different
20100            # purpose than the GNU readlink tool. Check the found readlink.
20101            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20102            if test "x$ISGNU" = x; then
20103                 # A readlink that we do not know how to use.
20104                 # Are there other non-GNU readlinks out there?
20105                 READLINK_TESTED=yes
20106                 READLINK=
20107            fi
20108        fi
20109
20110        if test "x$READLINK" != x; then
20111            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20112        else
20113            # Save the current directory for restoring afterwards
20114            STARTDIR=$PWD
20115            COUNTER=0
20116            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20117            sym_link_file=`$BASENAME $TEST_COMPILER`
20118            # Use the system pwd and not the shell builtin to resolve directory symlinks
20119            cd $sym_link_dir
20120            cd `$THEPWDCMD`
20121            sym_link_dir=`$THEPWDCMD`
20122            # Resolve file symlinks
20123            while test $COUNTER -lt 20; do
20124                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20125                if test "x$ISLINK" == x; then
20126                    # This is not a symbolic link! We are done!
20127                    break
20128                fi
20129                # Again resolve directory symlinks since the target of the just found
20130                # link could be in a different directory
20131                cd `$DIRNAME $ISLINK`
20132                sym_link_dir=`$THEPWDCMD`
20133                sym_link_file=`$BASENAME $ISLINK`
20134                let COUNTER=COUNTER+1
20135            done
20136            cd $STARTDIR
20137            TEST_COMPILER=$sym_link_dir/$sym_link_file
20138        fi
20139    fi
20140
20141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20142$as_echo "$TEST_COMPILER" >&6; }
20143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20144$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20145
20146  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20147  if test "x$COMPILER_BASENAME" = "xccache"; then
20148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20149$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20150    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20151    # We want to control ccache invocation ourselves, so ignore this cc and try
20152    # searching again.
20153
20154    # Remove the path to the fake ccache cc from the PATH
20155    RETRY_COMPILER_SAVED_PATH="$PATH"
20156    COMPILER_DIRNAME=`$DIRNAME $CXX`
20157    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20158
20159    # Try again looking for our compiler
20160    if test -n "$ac_tool_prefix"; then
20161  for ac_prog in $COMPILER_CHECK_LIST
20162  do
20163    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20164set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20166$as_echo_n "checking for $ac_word... " >&6; }
20167if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20168  $as_echo_n "(cached) " >&6
20169else
20170  if test -n "$PROPER_COMPILER_CXX"; then
20171  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20172else
20173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20174for as_dir in $PATH
20175do
20176  IFS=$as_save_IFS
20177  test -z "$as_dir" && as_dir=.
20178    for ac_exec_ext in '' $ac_executable_extensions; do
20179  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20180    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20182    break 2
20183  fi
20184done
20185  done
20186IFS=$as_save_IFS
20187
20188fi
20189fi
20190PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20191if test -n "$PROPER_COMPILER_CXX"; then
20192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20193$as_echo "$PROPER_COMPILER_CXX" >&6; }
20194else
20195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20196$as_echo "no" >&6; }
20197fi
20198
20199
20200    test -n "$PROPER_COMPILER_CXX" && break
20201  done
20202fi
20203if test -z "$PROPER_COMPILER_CXX"; then
20204  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20205  for ac_prog in $COMPILER_CHECK_LIST
20206do
20207  # Extract the first word of "$ac_prog", so it can be a program name with args.
20208set dummy $ac_prog; ac_word=$2
20209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20210$as_echo_n "checking for $ac_word... " >&6; }
20211if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20212  $as_echo_n "(cached) " >&6
20213else
20214  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20215  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20216else
20217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20218for as_dir in $PATH
20219do
20220  IFS=$as_save_IFS
20221  test -z "$as_dir" && as_dir=.
20222    for ac_exec_ext in '' $ac_executable_extensions; do
20223  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20224    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20226    break 2
20227  fi
20228done
20229  done
20230IFS=$as_save_IFS
20231
20232fi
20233fi
20234ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20235if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20237$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20238else
20239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20240$as_echo "no" >&6; }
20241fi
20242
20243
20244  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20245done
20246
20247  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20248    PROPER_COMPILER_CXX=""
20249  else
20250    case $cross_compiling:$ac_tool_warned in
20251yes:)
20252{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20253$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20254ac_tool_warned=yes ;;
20255esac
20256    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20257  fi
20258fi
20259
20260
20261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20262
20263  # First separate the path from the arguments. This will split at the first
20264  # space.
20265  complete="$PROPER_COMPILER_CXX"
20266  path="${complete%% *}"
20267  tmp="$complete EOL"
20268  arguments="${tmp#* }"
20269
20270  # Input might be given as Windows format, start by converting to
20271  # unix format.
20272  new_path=`$CYGPATH -u "$path"`
20273
20274  # Now try to locate executable using which
20275  new_path=`$WHICH "$new_path" 2> /dev/null`
20276  # bat and cmd files are not always considered executable in cygwin causing which
20277  # to not find them
20278  if test "x$new_path" = x \
20279           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20280           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20281    new_path=`$CYGPATH -u "$path"`
20282  fi
20283  if test "x$new_path" = x; then
20284    # Oops. Which didn't find the executable.
20285    # The splitting of arguments from the executable at a space might have been incorrect,
20286    # since paths with space are more likely in Windows. Give it another try with the whole
20287    # argument.
20288    path="$complete"
20289    arguments="EOL"
20290    new_path=`$CYGPATH -u "$path"`
20291    new_path=`$WHICH "$new_path" 2> /dev/null`
20292    # bat and cmd files are not always considered executable in cygwin causing which
20293    # to not find them
20294    if test "x$new_path" = x \
20295             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20296             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20297      new_path=`$CYGPATH -u "$path"`
20298    fi
20299    if test "x$new_path" = x; then
20300      # It's still not found. Now this is an unrecoverable error.
20301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20302$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20303      has_space=`$ECHO "$complete" | $GREP " "`
20304      if test "x$has_space" != x; then
20305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20307      fi
20308      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20309    fi
20310  fi
20311
20312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20315  # "foo.exe" is OK but "foo" is an error.
20316  #
20317  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20318  # It is also a way to make sure we got the proper file name for the real test later on.
20319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20320  if test "x$test_shortpath" = x; then
20321    # Short path failed, file does not exist as specified.
20322    # Try adding .exe or .cmd
20323    if test -f "${new_path}.exe"; then
20324       input_to_shortpath="${new_path}.exe"
20325    elif test -f "${new_path}.cmd"; then
20326       input_to_shortpath="${new_path}.cmd"
20327    else
20328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20329$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20332      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20333    fi
20334  else
20335    input_to_shortpath="$new_path"
20336  fi
20337
20338  # Call helper function which possibly converts this using DOS-style short mode.
20339  # If so, the updated path is stored in $new_path.
20340  new_path="$input_to_shortpath"
20341
20342  input_path="$input_to_shortpath"
20343  # Check if we need to convert this using DOS-style short mode. If the path
20344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20345  # take no chances and rewrite it.
20346  # Note: m4 eats our [], so we need to use [ and ] instead.
20347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20348  if test "x$has_forbidden_chars" != x; then
20349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20353      # Going to short mode and back again did indeed matter. Since short mode is
20354      # case insensitive, let's make it lowercase to improve readability.
20355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20356      # Now convert it back to Unix-stile (cygpath)
20357      input_path=`$CYGPATH -u "$shortmode_path"`
20358      new_path="$input_path"
20359    fi
20360  fi
20361
20362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20363  if test "x$test_cygdrive_prefix" = x; then
20364    # As a simple fix, exclude /usr/bin since it's not a real path.
20365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20367      # a path prefixed by /cygdrive for fixpath to work.
20368      new_path="$CYGWIN_ROOT_PATH$input_path"
20369    fi
20370  fi
20371
20372  # remove trailing .exe if any
20373  new_path="${new_path/%.exe/}"
20374
20375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20376
20377  # First separate the path from the arguments. This will split at the first
20378  # space.
20379  complete="$PROPER_COMPILER_CXX"
20380  path="${complete%% *}"
20381  tmp="$complete EOL"
20382  arguments="${tmp#* }"
20383
20384  # Input might be given as Windows format, start by converting to
20385  # unix format.
20386  new_path="$path"
20387
20388  windows_path="$new_path"
20389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20390    unix_path=`$CYGPATH -u "$windows_path"`
20391    new_path="$unix_path"
20392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20394    new_path="$unix_path"
20395  fi
20396
20397
20398  # Now try to locate executable using which
20399  new_path=`$WHICH "$new_path" 2> /dev/null`
20400
20401  if test "x$new_path" = x; then
20402    # Oops. Which didn't find the executable.
20403    # The splitting of arguments from the executable at a space might have been incorrect,
20404    # since paths with space are more likely in Windows. Give it another try with the whole
20405    # argument.
20406    path="$complete"
20407    arguments="EOL"
20408    new_path="$path"
20409
20410  windows_path="$new_path"
20411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20412    unix_path=`$CYGPATH -u "$windows_path"`
20413    new_path="$unix_path"
20414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20416    new_path="$unix_path"
20417  fi
20418
20419
20420    new_path=`$WHICH "$new_path" 2> /dev/null`
20421
20422    if test "x$new_path" = x; then
20423      # It's still not found. Now this is an unrecoverable error.
20424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20425$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20426      has_space=`$ECHO "$complete" | $GREP " "`
20427      if test "x$has_space" != x; then
20428        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20429$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20430      fi
20431      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20432    fi
20433  fi
20434
20435  # Now new_path has a complete unix path to the binary
20436  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20437    # Keep paths in /bin as-is, but remove trailing .exe if any
20438    new_path="${new_path/%.exe/}"
20439    # Do not save /bin paths to all_fixpath_prefixes!
20440  else
20441    # Not in mixed or Windows style, start by that.
20442    new_path=`cmd //c echo $new_path`
20443
20444  input_path="$new_path"
20445  # Check if we need to convert this using DOS-style short mode. If the path
20446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20447  # take no chances and rewrite it.
20448  # Note: m4 eats our [], so we need to use [ and ] instead.
20449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20450  if test "x$has_forbidden_chars" != x; then
20451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20452    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20453  fi
20454
20455    # Output is in $new_path
20456
20457  windows_path="$new_path"
20458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20459    unix_path=`$CYGPATH -u "$windows_path"`
20460    new_path="$unix_path"
20461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20463    new_path="$unix_path"
20464  fi
20465
20466    # remove trailing .exe if any
20467    new_path="${new_path/%.exe/}"
20468
20469    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20470    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20471  fi
20472
20473  else
20474    # We're on a posix platform. Hooray! :)
20475    # First separate the path from the arguments. This will split at the first
20476    # space.
20477    complete="$PROPER_COMPILER_CXX"
20478    path="${complete%% *}"
20479    tmp="$complete EOL"
20480    arguments="${tmp#* }"
20481
20482    # Cannot rely on the command "which" here since it doesn't always work.
20483    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20484    if test -z "$is_absolute_path"; then
20485      # Path to executable is not absolute. Find it.
20486      IFS_save="$IFS"
20487      IFS=:
20488      for p in $PATH; do
20489        if test -f "$p/$path" && test -x "$p/$path"; then
20490          new_path="$p/$path"
20491          break
20492        fi
20493      done
20494      IFS="$IFS_save"
20495    else
20496      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20497$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20498      new_path="$path"
20499    fi
20500
20501    if test "x$new_path" = x; then
20502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20503$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20504        has_space=`$ECHO "$complete" | $GREP " "`
20505        if test "x$has_space" != x; then
20506          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20507$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20508        fi
20509        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20510      fi
20511  fi
20512
20513      # Now join together the path and the arguments once again
20514      if test "x$arguments" != xEOL; then
20515        new_complete="$new_path ${arguments% *}"
20516      else
20517        new_complete="$new_path"
20518      fi
20519
20520  if test "x$complete" != "x$new_complete"; then
20521      PROPER_COMPILER_CXX="$new_complete"
20522      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20523$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20524    fi
20525
20526    PATH="$RETRY_COMPILER_SAVED_PATH"
20527
20528    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20529$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20530
20531    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20532        # Follow a chain of symbolic links. Use readlink
20533        # where it exists, else fall back to horribly
20534        # complicated shell code.
20535        if test "x$READLINK_TESTED" != yes; then
20536            # On MacOSX there is a readlink tool with a different
20537            # purpose than the GNU readlink tool. Check the found readlink.
20538            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20539            if test "x$ISGNU" = x; then
20540                 # A readlink that we do not know how to use.
20541                 # Are there other non-GNU readlinks out there?
20542                 READLINK_TESTED=yes
20543                 READLINK=
20544            fi
20545        fi
20546
20547        if test "x$READLINK" != x; then
20548            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20549        else
20550            # Save the current directory for restoring afterwards
20551            STARTDIR=$PWD
20552            COUNTER=0
20553            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20554            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20555            # Use the system pwd and not the shell builtin to resolve directory symlinks
20556            cd $sym_link_dir
20557            cd `$THEPWDCMD`
20558            sym_link_dir=`$THEPWDCMD`
20559            # Resolve file symlinks
20560            while test $COUNTER -lt 20; do
20561                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20562                if test "x$ISLINK" == x; then
20563                    # This is not a symbolic link! We are done!
20564                    break
20565                fi
20566                # Again resolve directory symlinks since the target of the just found
20567                # link could be in a different directory
20568                cd `$DIRNAME $ISLINK`
20569                sym_link_dir=`$THEPWDCMD`
20570                sym_link_file=`$BASENAME $ISLINK`
20571                let COUNTER=COUNTER+1
20572            done
20573            cd $STARTDIR
20574            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20575        fi
20576    fi
20577
20578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20579$as_echo "$PROPER_COMPILER_CXX" >&6; }
20580    CXX="$PROPER_COMPILER_CXX"
20581  else
20582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20583$as_echo "no, keeping CXX" >&6; }
20584    CXX="$TEST_COMPILER"
20585  fi
20586
20587  COMPILER=$CXX
20588  COMPILER_NAME=$COMPILER_NAME
20589
20590  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20591    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20592    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20593    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20594    if test $? -ne 0; then
20595      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20596
20597      { $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
20598$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20599      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20600$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20601      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20602    else
20603      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20604      COMPILER_VENDOR="Sun Studio"
20605    fi
20606  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20607    # First line typically looks something like:
20608    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20609    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20610    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20611    COMPILER_VENDOR="Microsoft CL.EXE"
20612    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20613    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20614      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20615        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20616      fi
20617    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20618      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20619        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20620      fi
20621    fi
20622  else
20623    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20624    # Check that this is likely to be GCC.
20625    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20626    if test $? -ne 0; then
20627      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20628$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20629      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20630$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20631      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20632    fi
20633
20634    # First line typically looks something like:
20635    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20636    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20637    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20638  fi
20639  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20640  CXX_VERSION="$COMPILER_VERSION"
20641  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20642  CXX_VENDOR="$COMPILER_VENDOR"
20643
20644  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20645$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20646
20647
20648# Now that we have resolved CXX ourself, let autoconf have its go at it
20649ac_ext=cpp
20650ac_cpp='$CXXCPP $CPPFLAGS'
20651ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20652ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20653ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20654if test -z "$CXX"; then
20655  if test -n "$CCC"; then
20656    CXX=$CCC
20657  else
20658    if test -n "$ac_tool_prefix"; then
20659  for ac_prog in $CXX
20660  do
20661    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20662set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20664$as_echo_n "checking for $ac_word... " >&6; }
20665if test "${ac_cv_prog_CXX+set}" = set; then :
20666  $as_echo_n "(cached) " >&6
20667else
20668  if test -n "$CXX"; then
20669  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20670else
20671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20672for as_dir in $PATH
20673do
20674  IFS=$as_save_IFS
20675  test -z "$as_dir" && as_dir=.
20676    for ac_exec_ext in '' $ac_executable_extensions; do
20677  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20678    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20680    break 2
20681  fi
20682done
20683  done
20684IFS=$as_save_IFS
20685
20686fi
20687fi
20688CXX=$ac_cv_prog_CXX
20689if test -n "$CXX"; then
20690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20691$as_echo "$CXX" >&6; }
20692else
20693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20694$as_echo "no" >&6; }
20695fi
20696
20697
20698    test -n "$CXX" && break
20699  done
20700fi
20701if test -z "$CXX"; then
20702  ac_ct_CXX=$CXX
20703  for ac_prog in $CXX
20704do
20705  # Extract the first word of "$ac_prog", so it can be a program name with args.
20706set dummy $ac_prog; ac_word=$2
20707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20708$as_echo_n "checking for $ac_word... " >&6; }
20709if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20710  $as_echo_n "(cached) " >&6
20711else
20712  if test -n "$ac_ct_CXX"; then
20713  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20714else
20715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20716for as_dir in $PATH
20717do
20718  IFS=$as_save_IFS
20719  test -z "$as_dir" && as_dir=.
20720    for ac_exec_ext in '' $ac_executable_extensions; do
20721  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20722    ac_cv_prog_ac_ct_CXX="$ac_prog"
20723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20724    break 2
20725  fi
20726done
20727  done
20728IFS=$as_save_IFS
20729
20730fi
20731fi
20732ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20733if test -n "$ac_ct_CXX"; then
20734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20735$as_echo "$ac_ct_CXX" >&6; }
20736else
20737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20738$as_echo "no" >&6; }
20739fi
20740
20741
20742  test -n "$ac_ct_CXX" && break
20743done
20744
20745  if test "x$ac_ct_CXX" = x; then
20746    CXX="g++"
20747  else
20748    case $cross_compiling:$ac_tool_warned in
20749yes:)
20750{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20751$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20752ac_tool_warned=yes ;;
20753esac
20754    CXX=$ac_ct_CXX
20755  fi
20756fi
20757
20758  fi
20759fi
20760# Provide some information about the compiler.
20761$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20762set X $ac_compile
20763ac_compiler=$2
20764for ac_option in --version -v -V -qversion; do
20765  { { ac_try="$ac_compiler $ac_option >&5"
20766case "(($ac_try" in
20767  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20768  *) ac_try_echo=$ac_try;;
20769esac
20770eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20771$as_echo "$ac_try_echo"; } >&5
20772  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20773  ac_status=$?
20774  if test -s conftest.err; then
20775    sed '10a\
20776... rest of stderr output deleted ...
20777         10q' conftest.err >conftest.er1
20778    cat conftest.er1 >&5
20779  fi
20780  rm -f conftest.er1 conftest.err
20781  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20782  test $ac_status = 0; }
20783done
20784
20785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20786$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20787if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20788  $as_echo_n "(cached) " >&6
20789else
20790  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20791/* end confdefs.h.  */
20792
20793int
20794main ()
20795{
20796#ifndef __GNUC__
20797       choke me
20798#endif
20799
20800  ;
20801  return 0;
20802}
20803_ACEOF
20804if ac_fn_cxx_try_compile "$LINENO"; then :
20805  ac_compiler_gnu=yes
20806else
20807  ac_compiler_gnu=no
20808fi
20809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20810ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20811
20812fi
20813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20814$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20815if test $ac_compiler_gnu = yes; then
20816  GXX=yes
20817else
20818  GXX=
20819fi
20820ac_test_CXXFLAGS=${CXXFLAGS+set}
20821ac_save_CXXFLAGS=$CXXFLAGS
20822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20823$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20824if test "${ac_cv_prog_cxx_g+set}" = set; then :
20825  $as_echo_n "(cached) " >&6
20826else
20827  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20828   ac_cxx_werror_flag=yes
20829   ac_cv_prog_cxx_g=no
20830   CXXFLAGS="-g"
20831   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20832/* end confdefs.h.  */
20833
20834int
20835main ()
20836{
20837
20838  ;
20839  return 0;
20840}
20841_ACEOF
20842if ac_fn_cxx_try_compile "$LINENO"; then :
20843  ac_cv_prog_cxx_g=yes
20844else
20845  CXXFLAGS=""
20846      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20847/* end confdefs.h.  */
20848
20849int
20850main ()
20851{
20852
20853  ;
20854  return 0;
20855}
20856_ACEOF
20857if ac_fn_cxx_try_compile "$LINENO"; then :
20858
20859else
20860  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20861	 CXXFLAGS="-g"
20862	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20863/* end confdefs.h.  */
20864
20865int
20866main ()
20867{
20868
20869  ;
20870  return 0;
20871}
20872_ACEOF
20873if ac_fn_cxx_try_compile "$LINENO"; then :
20874  ac_cv_prog_cxx_g=yes
20875fi
20876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20877fi
20878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20879fi
20880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20881   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20882fi
20883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20884$as_echo "$ac_cv_prog_cxx_g" >&6; }
20885if test "$ac_test_CXXFLAGS" = set; then
20886  CXXFLAGS=$ac_save_CXXFLAGS
20887elif test $ac_cv_prog_cxx_g = yes; then
20888  if test "$GXX" = yes; then
20889    CXXFLAGS="-g -O2"
20890  else
20891    CXXFLAGS="-g"
20892  fi
20893else
20894  if test "$GXX" = yes; then
20895    CXXFLAGS="-O2"
20896  else
20897    CXXFLAGS=
20898  fi
20899fi
20900ac_ext=cpp
20901ac_cpp='$CXXCPP $CPPFLAGS'
20902ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20903ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20904ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20905
20906
20907### Locate other tools
20908
20909if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20910    ac_ext=m
20911ac_cpp='$OBJCPP $CPPFLAGS'
20912ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20913ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20914ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20915if test -n "$ac_tool_prefix"; then
20916  for ac_prog in gcc objcc objc cc CC
20917  do
20918    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20921$as_echo_n "checking for $ac_word... " >&6; }
20922if test "${ac_cv_prog_OBJC+set}" = set; then :
20923  $as_echo_n "(cached) " >&6
20924else
20925  if test -n "$OBJC"; then
20926  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20927else
20928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20929for as_dir in $PATH
20930do
20931  IFS=$as_save_IFS
20932  test -z "$as_dir" && as_dir=.
20933    for ac_exec_ext in '' $ac_executable_extensions; do
20934  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20935    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20937    break 2
20938  fi
20939done
20940  done
20941IFS=$as_save_IFS
20942
20943fi
20944fi
20945OBJC=$ac_cv_prog_OBJC
20946if test -n "$OBJC"; then
20947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20948$as_echo "$OBJC" >&6; }
20949else
20950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20951$as_echo "no" >&6; }
20952fi
20953
20954
20955    test -n "$OBJC" && break
20956  done
20957fi
20958if test -z "$OBJC"; then
20959  ac_ct_OBJC=$OBJC
20960  for ac_prog in gcc objcc objc cc CC
20961do
20962  # Extract the first word of "$ac_prog", so it can be a program name with args.
20963set dummy $ac_prog; ac_word=$2
20964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20965$as_echo_n "checking for $ac_word... " >&6; }
20966if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20967  $as_echo_n "(cached) " >&6
20968else
20969  if test -n "$ac_ct_OBJC"; then
20970  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20971else
20972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20973for as_dir in $PATH
20974do
20975  IFS=$as_save_IFS
20976  test -z "$as_dir" && as_dir=.
20977    for ac_exec_ext in '' $ac_executable_extensions; do
20978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20979    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20981    break 2
20982  fi
20983done
20984  done
20985IFS=$as_save_IFS
20986
20987fi
20988fi
20989ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20990if test -n "$ac_ct_OBJC"; then
20991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20992$as_echo "$ac_ct_OBJC" >&6; }
20993else
20994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20995$as_echo "no" >&6; }
20996fi
20997
20998
20999  test -n "$ac_ct_OBJC" && break
21000done
21001
21002  if test "x$ac_ct_OBJC" = x; then
21003    OBJC="gcc"
21004  else
21005    case $cross_compiling:$ac_tool_warned in
21006yes:)
21007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21009ac_tool_warned=yes ;;
21010esac
21011    OBJC=$ac_ct_OBJC
21012  fi
21013fi
21014
21015# Provide some information about the compiler.
21016$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21017set X $ac_compile
21018ac_compiler=$2
21019for ac_option in --version -v -V -qversion; do
21020  { { ac_try="$ac_compiler $ac_option >&5"
21021case "(($ac_try" in
21022  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21023  *) ac_try_echo=$ac_try;;
21024esac
21025eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21026$as_echo "$ac_try_echo"; } >&5
21027  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21028  ac_status=$?
21029  if test -s conftest.err; then
21030    sed '10a\
21031... rest of stderr output deleted ...
21032         10q' conftest.err >conftest.er1
21033    cat conftest.er1 >&5
21034  fi
21035  rm -f conftest.er1 conftest.err
21036  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21037  test $ac_status = 0; }
21038done
21039
21040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21041$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21042if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21043  $as_echo_n "(cached) " >&6
21044else
21045  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21046/* end confdefs.h.  */
21047
21048int
21049main ()
21050{
21051#ifndef __GNUC__
21052       choke me
21053#endif
21054
21055  ;
21056  return 0;
21057}
21058_ACEOF
21059if ac_fn_objc_try_compile "$LINENO"; then :
21060  ac_compiler_gnu=yes
21061else
21062  ac_compiler_gnu=no
21063fi
21064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21065ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21066
21067fi
21068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21069$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21070if test $ac_compiler_gnu = yes; then
21071  GOBJC=yes
21072else
21073  GOBJC=
21074fi
21075ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21076ac_save_OBJCFLAGS=$OBJCFLAGS
21077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21078$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21079if test "${ac_cv_prog_objc_g+set}" = set; then :
21080  $as_echo_n "(cached) " >&6
21081else
21082  ac_save_objc_werror_flag=$ac_objc_werror_flag
21083   ac_objc_werror_flag=yes
21084   ac_cv_prog_objc_g=no
21085   OBJCFLAGS="-g"
21086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21087/* end confdefs.h.  */
21088
21089int
21090main ()
21091{
21092
21093  ;
21094  return 0;
21095}
21096_ACEOF
21097if ac_fn_objc_try_compile "$LINENO"; then :
21098  ac_cv_prog_objc_g=yes
21099else
21100  OBJCFLAGS=""
21101      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21102/* end confdefs.h.  */
21103
21104int
21105main ()
21106{
21107
21108  ;
21109  return 0;
21110}
21111_ACEOF
21112if ac_fn_objc_try_compile "$LINENO"; then :
21113
21114else
21115  ac_objc_werror_flag=$ac_save_objc_werror_flag
21116	 OBJCFLAGS="-g"
21117	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21118/* end confdefs.h.  */
21119
21120int
21121main ()
21122{
21123
21124  ;
21125  return 0;
21126}
21127_ACEOF
21128if ac_fn_objc_try_compile "$LINENO"; then :
21129  ac_cv_prog_objc_g=yes
21130fi
21131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21132fi
21133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21134fi
21135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21136   ac_objc_werror_flag=$ac_save_objc_werror_flag
21137fi
21138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21139$as_echo "$ac_cv_prog_objc_g" >&6; }
21140if test "$ac_test_OBJCFLAGS" = set; then
21141  OBJCFLAGS=$ac_save_OBJCFLAGS
21142elif test $ac_cv_prog_objc_g = yes; then
21143  if test "$GOBJC" = yes; then
21144    OBJCFLAGS="-g -O2"
21145  else
21146    OBJCFLAGS="-g"
21147  fi
21148else
21149  if test "$GOBJC" = yes; then
21150    OBJCFLAGS="-O2"
21151  else
21152    OBJCFLAGS=
21153  fi
21154fi
21155ac_ext=cpp
21156ac_cpp='$CXXCPP $CPPFLAGS'
21157ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21158ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21159ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21160
21161
21162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21163
21164  # First separate the path from the arguments. This will split at the first
21165  # space.
21166  complete="$OBJC"
21167  path="${complete%% *}"
21168  tmp="$complete EOL"
21169  arguments="${tmp#* }"
21170
21171  # Input might be given as Windows format, start by converting to
21172  # unix format.
21173  new_path=`$CYGPATH -u "$path"`
21174
21175  # Now try to locate executable using which
21176  new_path=`$WHICH "$new_path" 2> /dev/null`
21177  # bat and cmd files are not always considered executable in cygwin causing which
21178  # to not find them
21179  if test "x$new_path" = x \
21180           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21181           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21182    new_path=`$CYGPATH -u "$path"`
21183  fi
21184  if test "x$new_path" = x; then
21185    # Oops. Which didn't find the executable.
21186    # The splitting of arguments from the executable at a space might have been incorrect,
21187    # since paths with space are more likely in Windows. Give it another try with the whole
21188    # argument.
21189    path="$complete"
21190    arguments="EOL"
21191    new_path=`$CYGPATH -u "$path"`
21192    new_path=`$WHICH "$new_path" 2> /dev/null`
21193    # bat and cmd files are not always considered executable in cygwin causing which
21194    # to not find them
21195    if test "x$new_path" = x \
21196             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21197             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21198      new_path=`$CYGPATH -u "$path"`
21199    fi
21200    if test "x$new_path" = x; then
21201      # It's still not found. Now this is an unrecoverable error.
21202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21203$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21204      has_space=`$ECHO "$complete" | $GREP " "`
21205      if test "x$has_space" != x; then
21206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21208      fi
21209      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21210    fi
21211  fi
21212
21213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21216  # "foo.exe" is OK but "foo" is an error.
21217  #
21218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21219  # It is also a way to make sure we got the proper file name for the real test later on.
21220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21221  if test "x$test_shortpath" = x; then
21222    # Short path failed, file does not exist as specified.
21223    # Try adding .exe or .cmd
21224    if test -f "${new_path}.exe"; then
21225       input_to_shortpath="${new_path}.exe"
21226    elif test -f "${new_path}.cmd"; then
21227       input_to_shortpath="${new_path}.cmd"
21228    else
21229      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21230$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21231      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21232$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21233      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21234    fi
21235  else
21236    input_to_shortpath="$new_path"
21237  fi
21238
21239  # Call helper function which possibly converts this using DOS-style short mode.
21240  # If so, the updated path is stored in $new_path.
21241  new_path="$input_to_shortpath"
21242
21243  input_path="$input_to_shortpath"
21244  # Check if we need to convert this using DOS-style short mode. If the path
21245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21246  # take no chances and rewrite it.
21247  # Note: m4 eats our [], so we need to use [ and ] instead.
21248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21249  if test "x$has_forbidden_chars" != x; then
21250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21254      # Going to short mode and back again did indeed matter. Since short mode is
21255      # case insensitive, let's make it lowercase to improve readability.
21256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21257      # Now convert it back to Unix-stile (cygpath)
21258      input_path=`$CYGPATH -u "$shortmode_path"`
21259      new_path="$input_path"
21260    fi
21261  fi
21262
21263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21264  if test "x$test_cygdrive_prefix" = x; then
21265    # As a simple fix, exclude /usr/bin since it's not a real path.
21266    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21268      # a path prefixed by /cygdrive for fixpath to work.
21269      new_path="$CYGWIN_ROOT_PATH$input_path"
21270    fi
21271  fi
21272
21273  # remove trailing .exe if any
21274  new_path="${new_path/%.exe/}"
21275
21276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21277
21278  # First separate the path from the arguments. This will split at the first
21279  # space.
21280  complete="$OBJC"
21281  path="${complete%% *}"
21282  tmp="$complete EOL"
21283  arguments="${tmp#* }"
21284
21285  # Input might be given as Windows format, start by converting to
21286  # unix format.
21287  new_path="$path"
21288
21289  windows_path="$new_path"
21290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21291    unix_path=`$CYGPATH -u "$windows_path"`
21292    new_path="$unix_path"
21293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21295    new_path="$unix_path"
21296  fi
21297
21298
21299  # Now try to locate executable using which
21300  new_path=`$WHICH "$new_path" 2> /dev/null`
21301
21302  if test "x$new_path" = x; then
21303    # Oops. Which didn't find the executable.
21304    # The splitting of arguments from the executable at a space might have been incorrect,
21305    # since paths with space are more likely in Windows. Give it another try with the whole
21306    # argument.
21307    path="$complete"
21308    arguments="EOL"
21309    new_path="$path"
21310
21311  windows_path="$new_path"
21312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21313    unix_path=`$CYGPATH -u "$windows_path"`
21314    new_path="$unix_path"
21315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21317    new_path="$unix_path"
21318  fi
21319
21320
21321    new_path=`$WHICH "$new_path" 2> /dev/null`
21322
21323    if test "x$new_path" = x; then
21324      # It's still not found. Now this is an unrecoverable error.
21325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21326$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21327      has_space=`$ECHO "$complete" | $GREP " "`
21328      if test "x$has_space" != x; then
21329        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21330$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21331      fi
21332      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21333    fi
21334  fi
21335
21336  # Now new_path has a complete unix path to the binary
21337  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21338    # Keep paths in /bin as-is, but remove trailing .exe if any
21339    new_path="${new_path/%.exe/}"
21340    # Do not save /bin paths to all_fixpath_prefixes!
21341  else
21342    # Not in mixed or Windows style, start by that.
21343    new_path=`cmd //c echo $new_path`
21344
21345  input_path="$new_path"
21346  # Check if we need to convert this using DOS-style short mode. If the path
21347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21348  # take no chances and rewrite it.
21349  # Note: m4 eats our [], so we need to use [ and ] instead.
21350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21351  if test "x$has_forbidden_chars" != x; then
21352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21354  fi
21355
21356    # Output is in $new_path
21357
21358  windows_path="$new_path"
21359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21360    unix_path=`$CYGPATH -u "$windows_path"`
21361    new_path="$unix_path"
21362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21364    new_path="$unix_path"
21365  fi
21366
21367    # remove trailing .exe if any
21368    new_path="${new_path/%.exe/}"
21369
21370    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21371    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21372  fi
21373
21374  else
21375    # We're on a posix platform. Hooray! :)
21376    # First separate the path from the arguments. This will split at the first
21377    # space.
21378    complete="$OBJC"
21379    path="${complete%% *}"
21380    tmp="$complete EOL"
21381    arguments="${tmp#* }"
21382
21383    # Cannot rely on the command "which" here since it doesn't always work.
21384    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21385    if test -z "$is_absolute_path"; then
21386      # Path to executable is not absolute. Find it.
21387      IFS_save="$IFS"
21388      IFS=:
21389      for p in $PATH; do
21390        if test -f "$p/$path" && test -x "$p/$path"; then
21391          new_path="$p/$path"
21392          break
21393        fi
21394      done
21395      IFS="$IFS_save"
21396    else
21397      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21398$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21399      new_path="$path"
21400    fi
21401
21402    if test "x$new_path" = x; then
21403        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21404$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21405        has_space=`$ECHO "$complete" | $GREP " "`
21406        if test "x$has_space" != x; then
21407          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21408$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21409        fi
21410        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21411      fi
21412  fi
21413
21414      # Now join together the path and the arguments once again
21415      if test "x$arguments" != xEOL; then
21416        new_complete="$new_path ${arguments% *}"
21417      else
21418        new_complete="$new_path"
21419      fi
21420
21421  if test "x$complete" != "x$new_complete"; then
21422      OBJC="$new_complete"
21423      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21424$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21425    fi
21426
21427else
21428    OBJC=
21429fi
21430
21431# Restore the flags to the user specified values.
21432# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21433CFLAGS="$ORG_CFLAGS"
21434CXXFLAGS="$ORG_CXXFLAGS"
21435OBJCFLAGS="$ORG_OBJCFLAGS"
21436
21437LD="$CC"
21438LDEXE="$CC"
21439LDCXX="$CXX"
21440LDEXECXX="$CXX"
21441
21442# LDEXE is the linker to use, when creating executables.
21443
21444# Linking C++ libraries.
21445
21446# Linking C++ executables.
21447
21448
21449if test "x$OPENJDK_TARGET_OS" != xwindows; then
21450    if test -n "$ac_tool_prefix"; then
21451  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21452set dummy ${ac_tool_prefix}ar; ac_word=$2
21453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21454$as_echo_n "checking for $ac_word... " >&6; }
21455if test "${ac_cv_prog_AR+set}" = set; then :
21456  $as_echo_n "(cached) " >&6
21457else
21458  if test -n "$AR"; then
21459  ac_cv_prog_AR="$AR" # Let the user override the test.
21460else
21461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21462for as_dir in $PATH
21463do
21464  IFS=$as_save_IFS
21465  test -z "$as_dir" && as_dir=.
21466    for ac_exec_ext in '' $ac_executable_extensions; do
21467  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21468    ac_cv_prog_AR="${ac_tool_prefix}ar"
21469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21470    break 2
21471  fi
21472done
21473  done
21474IFS=$as_save_IFS
21475
21476fi
21477fi
21478AR=$ac_cv_prog_AR
21479if test -n "$AR"; then
21480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21481$as_echo "$AR" >&6; }
21482else
21483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21484$as_echo "no" >&6; }
21485fi
21486
21487
21488fi
21489if test -z "$ac_cv_prog_AR"; then
21490  ac_ct_AR=$AR
21491  # Extract the first word of "ar", so it can be a program name with args.
21492set dummy ar; ac_word=$2
21493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21494$as_echo_n "checking for $ac_word... " >&6; }
21495if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21496  $as_echo_n "(cached) " >&6
21497else
21498  if test -n "$ac_ct_AR"; then
21499  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21500else
21501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21502for as_dir in $PATH
21503do
21504  IFS=$as_save_IFS
21505  test -z "$as_dir" && as_dir=.
21506    for ac_exec_ext in '' $ac_executable_extensions; do
21507  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21508    ac_cv_prog_ac_ct_AR="ar"
21509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21510    break 2
21511  fi
21512done
21513  done
21514IFS=$as_save_IFS
21515
21516fi
21517fi
21518ac_ct_AR=$ac_cv_prog_ac_ct_AR
21519if test -n "$ac_ct_AR"; then
21520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21521$as_echo "$ac_ct_AR" >&6; }
21522else
21523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21524$as_echo "no" >&6; }
21525fi
21526
21527  if test "x$ac_ct_AR" = x; then
21528    AR=""
21529  else
21530    case $cross_compiling:$ac_tool_warned in
21531yes:)
21532{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21533$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21534ac_tool_warned=yes ;;
21535esac
21536    AR=$ac_ct_AR
21537  fi
21538else
21539  AR="$ac_cv_prog_AR"
21540fi
21541
21542
21543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21544
21545  # First separate the path from the arguments. This will split at the first
21546  # space.
21547  complete="$AR"
21548  path="${complete%% *}"
21549  tmp="$complete EOL"
21550  arguments="${tmp#* }"
21551
21552  # Input might be given as Windows format, start by converting to
21553  # unix format.
21554  new_path=`$CYGPATH -u "$path"`
21555
21556  # Now try to locate executable using which
21557  new_path=`$WHICH "$new_path" 2> /dev/null`
21558  # bat and cmd files are not always considered executable in cygwin causing which
21559  # to not find them
21560  if test "x$new_path" = x \
21561           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21562           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21563    new_path=`$CYGPATH -u "$path"`
21564  fi
21565  if test "x$new_path" = x; then
21566    # Oops. Which didn't find the executable.
21567    # The splitting of arguments from the executable at a space might have been incorrect,
21568    # since paths with space are more likely in Windows. Give it another try with the whole
21569    # argument.
21570    path="$complete"
21571    arguments="EOL"
21572    new_path=`$CYGPATH -u "$path"`
21573    new_path=`$WHICH "$new_path" 2> /dev/null`
21574    # bat and cmd files are not always considered executable in cygwin causing which
21575    # to not find them
21576    if test "x$new_path" = x \
21577             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21578             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21579      new_path=`$CYGPATH -u "$path"`
21580    fi
21581    if test "x$new_path" = x; then
21582      # It's still not found. Now this is an unrecoverable error.
21583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21584$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21585      has_space=`$ECHO "$complete" | $GREP " "`
21586      if test "x$has_space" != x; then
21587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21589      fi
21590      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21591    fi
21592  fi
21593
21594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21597  # "foo.exe" is OK but "foo" is an error.
21598  #
21599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21600  # It is also a way to make sure we got the proper file name for the real test later on.
21601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21602  if test "x$test_shortpath" = x; then
21603    # Short path failed, file does not exist as specified.
21604    # Try adding .exe or .cmd
21605    if test -f "${new_path}.exe"; then
21606       input_to_shortpath="${new_path}.exe"
21607    elif test -f "${new_path}.cmd"; then
21608       input_to_shortpath="${new_path}.cmd"
21609    else
21610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21611$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21612      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21613$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21614      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21615    fi
21616  else
21617    input_to_shortpath="$new_path"
21618  fi
21619
21620  # Call helper function which possibly converts this using DOS-style short mode.
21621  # If so, the updated path is stored in $new_path.
21622  new_path="$input_to_shortpath"
21623
21624  input_path="$input_to_shortpath"
21625  # Check if we need to convert this using DOS-style short mode. If the path
21626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21627  # take no chances and rewrite it.
21628  # Note: m4 eats our [], so we need to use [ and ] instead.
21629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21630  if test "x$has_forbidden_chars" != x; then
21631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21635      # Going to short mode and back again did indeed matter. Since short mode is
21636      # case insensitive, let's make it lowercase to improve readability.
21637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21638      # Now convert it back to Unix-stile (cygpath)
21639      input_path=`$CYGPATH -u "$shortmode_path"`
21640      new_path="$input_path"
21641    fi
21642  fi
21643
21644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21645  if test "x$test_cygdrive_prefix" = x; then
21646    # As a simple fix, exclude /usr/bin since it's not a real path.
21647    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21649      # a path prefixed by /cygdrive for fixpath to work.
21650      new_path="$CYGWIN_ROOT_PATH$input_path"
21651    fi
21652  fi
21653
21654  # remove trailing .exe if any
21655  new_path="${new_path/%.exe/}"
21656
21657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21658
21659  # First separate the path from the arguments. This will split at the first
21660  # space.
21661  complete="$AR"
21662  path="${complete%% *}"
21663  tmp="$complete EOL"
21664  arguments="${tmp#* }"
21665
21666  # Input might be given as Windows format, start by converting to
21667  # unix format.
21668  new_path="$path"
21669
21670  windows_path="$new_path"
21671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21672    unix_path=`$CYGPATH -u "$windows_path"`
21673    new_path="$unix_path"
21674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21676    new_path="$unix_path"
21677  fi
21678
21679
21680  # Now try to locate executable using which
21681  new_path=`$WHICH "$new_path" 2> /dev/null`
21682
21683  if test "x$new_path" = x; then
21684    # Oops. Which didn't find the executable.
21685    # The splitting of arguments from the executable at a space might have been incorrect,
21686    # since paths with space are more likely in Windows. Give it another try with the whole
21687    # argument.
21688    path="$complete"
21689    arguments="EOL"
21690    new_path="$path"
21691
21692  windows_path="$new_path"
21693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21694    unix_path=`$CYGPATH -u "$windows_path"`
21695    new_path="$unix_path"
21696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21698    new_path="$unix_path"
21699  fi
21700
21701
21702    new_path=`$WHICH "$new_path" 2> /dev/null`
21703
21704    if test "x$new_path" = x; then
21705      # It's still not found. Now this is an unrecoverable error.
21706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21707$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21708      has_space=`$ECHO "$complete" | $GREP " "`
21709      if test "x$has_space" != x; then
21710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21712      fi
21713      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21714    fi
21715  fi
21716
21717  # Now new_path has a complete unix path to the binary
21718  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21719    # Keep paths in /bin as-is, but remove trailing .exe if any
21720    new_path="${new_path/%.exe/}"
21721    # Do not save /bin paths to all_fixpath_prefixes!
21722  else
21723    # Not in mixed or Windows style, start by that.
21724    new_path=`cmd //c echo $new_path`
21725
21726  input_path="$new_path"
21727  # Check if we need to convert this using DOS-style short mode. If the path
21728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21729  # take no chances and rewrite it.
21730  # Note: m4 eats our [], so we need to use [ and ] instead.
21731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21732  if test "x$has_forbidden_chars" != x; then
21733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21735  fi
21736
21737    # Output is in $new_path
21738
21739  windows_path="$new_path"
21740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21741    unix_path=`$CYGPATH -u "$windows_path"`
21742    new_path="$unix_path"
21743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21745    new_path="$unix_path"
21746  fi
21747
21748    # remove trailing .exe if any
21749    new_path="${new_path/%.exe/}"
21750
21751    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21752    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21753  fi
21754
21755  else
21756    # We're on a posix platform. Hooray! :)
21757    # First separate the path from the arguments. This will split at the first
21758    # space.
21759    complete="$AR"
21760    path="${complete%% *}"
21761    tmp="$complete EOL"
21762    arguments="${tmp#* }"
21763
21764    # Cannot rely on the command "which" here since it doesn't always work.
21765    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21766    if test -z "$is_absolute_path"; then
21767      # Path to executable is not absolute. Find it.
21768      IFS_save="$IFS"
21769      IFS=:
21770      for p in $PATH; do
21771        if test -f "$p/$path" && test -x "$p/$path"; then
21772          new_path="$p/$path"
21773          break
21774        fi
21775      done
21776      IFS="$IFS_save"
21777    else
21778      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21779$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21780      new_path="$path"
21781    fi
21782
21783    if test "x$new_path" = x; then
21784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21785$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21786        has_space=`$ECHO "$complete" | $GREP " "`
21787        if test "x$has_space" != x; then
21788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21790        fi
21791        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21792      fi
21793  fi
21794
21795      # Now join together the path and the arguments once again
21796      if test "x$arguments" != xEOL; then
21797        new_complete="$new_path ${arguments% *}"
21798      else
21799        new_complete="$new_path"
21800      fi
21801
21802  if test "x$complete" != "x$new_complete"; then
21803      AR="$new_complete"
21804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21805$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21806    fi
21807
21808fi
21809if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21810    ARFLAGS="-r"
21811else
21812    ARFLAGS=""
21813fi
21814
21815
21816# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21817HOTSPOT_CXX="$CXX"
21818HOTSPOT_LD="$LD"
21819
21820
21821
21822COMPILER_NAME=gcc
21823COMPILER_TYPE=CC
21824if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21825
21826    # For now, assume that we are always compiling using cl.exe.
21827    CC_OUT_OPTION=-Fo
21828    EXE_OUT_OPTION=-out:
21829    LD_OUT_OPTION=-out:
21830    AR_OUT_OPTION=-out:
21831    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21832    # program for something completely different.
21833    # Extract the first word of "link", so it can be a program name with args.
21834set dummy link; ac_word=$2
21835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21836$as_echo_n "checking for $ac_word... " >&6; }
21837if test "${ac_cv_prog_WINLD+set}" = set; then :
21838  $as_echo_n "(cached) " >&6
21839else
21840  if test -n "$WINLD"; then
21841  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21842else
21843  ac_prog_rejected=no
21844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21845for as_dir in $PATH
21846do
21847  IFS=$as_save_IFS
21848  test -z "$as_dir" && as_dir=.
21849    for ac_exec_ext in '' $ac_executable_extensions; do
21850  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21851    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21852       ac_prog_rejected=yes
21853       continue
21854     fi
21855    ac_cv_prog_WINLD="link"
21856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21857    break 2
21858  fi
21859done
21860  done
21861IFS=$as_save_IFS
21862
21863if test $ac_prog_rejected = yes; then
21864  # We found a bogon in the path, so make sure we never use it.
21865  set dummy $ac_cv_prog_WINLD
21866  shift
21867  if test $# != 0; then
21868    # We chose a different compiler from the bogus one.
21869    # However, it has the same basename, so the bogon will be chosen
21870    # first if we set WINLD to just the basename; use the full file name.
21871    shift
21872    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21873  fi
21874fi
21875fi
21876fi
21877WINLD=$ac_cv_prog_WINLD
21878if test -n "$WINLD"; then
21879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21880$as_echo "$WINLD" >&6; }
21881else
21882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21883$as_echo "no" >&6; }
21884fi
21885
21886
21887    # Since we must ignore the first found link, WINLD will contain
21888    # the full path to the link.exe program.
21889
21890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21891
21892  # First separate the path from the arguments. This will split at the first
21893  # space.
21894  complete="$WINLD"
21895  path="${complete%% *}"
21896  tmp="$complete EOL"
21897  arguments="${tmp#* }"
21898
21899  # Input might be given as Windows format, start by converting to
21900  # unix format.
21901  new_path=`$CYGPATH -u "$path"`
21902
21903  # Now try to locate executable using which
21904  new_path=`$WHICH "$new_path" 2> /dev/null`
21905  # bat and cmd files are not always considered executable in cygwin causing which
21906  # to not find them
21907  if test "x$new_path" = x \
21908           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21909           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21910    new_path=`$CYGPATH -u "$path"`
21911  fi
21912  if test "x$new_path" = x; then
21913    # Oops. Which didn't find the executable.
21914    # The splitting of arguments from the executable at a space might have been incorrect,
21915    # since paths with space are more likely in Windows. Give it another try with the whole
21916    # argument.
21917    path="$complete"
21918    arguments="EOL"
21919    new_path=`$CYGPATH -u "$path"`
21920    new_path=`$WHICH "$new_path" 2> /dev/null`
21921    # bat and cmd files are not always considered executable in cygwin causing which
21922    # to not find them
21923    if test "x$new_path" = x \
21924             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21925             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21926      new_path=`$CYGPATH -u "$path"`
21927    fi
21928    if test "x$new_path" = x; then
21929      # It's still not found. Now this is an unrecoverable error.
21930      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21931$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21932      has_space=`$ECHO "$complete" | $GREP " "`
21933      if test "x$has_space" != x; then
21934        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21935$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21936      fi
21937      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21938    fi
21939  fi
21940
21941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21944  # "foo.exe" is OK but "foo" is an error.
21945  #
21946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21947  # It is also a way to make sure we got the proper file name for the real test later on.
21948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21949  if test "x$test_shortpath" = x; then
21950    # Short path failed, file does not exist as specified.
21951    # Try adding .exe or .cmd
21952    if test -f "${new_path}.exe"; then
21953       input_to_shortpath="${new_path}.exe"
21954    elif test -f "${new_path}.cmd"; then
21955       input_to_shortpath="${new_path}.cmd"
21956    else
21957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21958$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21959      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21960$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21961      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21962    fi
21963  else
21964    input_to_shortpath="$new_path"
21965  fi
21966
21967  # Call helper function which possibly converts this using DOS-style short mode.
21968  # If so, the updated path is stored in $new_path.
21969  new_path="$input_to_shortpath"
21970
21971  input_path="$input_to_shortpath"
21972  # Check if we need to convert this using DOS-style short mode. If the path
21973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21974  # take no chances and rewrite it.
21975  # Note: m4 eats our [], so we need to use [ and ] instead.
21976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21977  if test "x$has_forbidden_chars" != x; then
21978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21982      # Going to short mode and back again did indeed matter. Since short mode is
21983      # case insensitive, let's make it lowercase to improve readability.
21984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21985      # Now convert it back to Unix-stile (cygpath)
21986      input_path=`$CYGPATH -u "$shortmode_path"`
21987      new_path="$input_path"
21988    fi
21989  fi
21990
21991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21992  if test "x$test_cygdrive_prefix" = x; then
21993    # As a simple fix, exclude /usr/bin since it's not a real path.
21994    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21996      # a path prefixed by /cygdrive for fixpath to work.
21997      new_path="$CYGWIN_ROOT_PATH$input_path"
21998    fi
21999  fi
22000
22001  # remove trailing .exe if any
22002  new_path="${new_path/%.exe/}"
22003
22004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22005
22006  # First separate the path from the arguments. This will split at the first
22007  # space.
22008  complete="$WINLD"
22009  path="${complete%% *}"
22010  tmp="$complete EOL"
22011  arguments="${tmp#* }"
22012
22013  # Input might be given as Windows format, start by converting to
22014  # unix format.
22015  new_path="$path"
22016
22017  windows_path="$new_path"
22018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22019    unix_path=`$CYGPATH -u "$windows_path"`
22020    new_path="$unix_path"
22021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22022    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22023    new_path="$unix_path"
22024  fi
22025
22026
22027  # Now try to locate executable using which
22028  new_path=`$WHICH "$new_path" 2> /dev/null`
22029
22030  if test "x$new_path" = x; then
22031    # Oops. Which didn't find the executable.
22032    # The splitting of arguments from the executable at a space might have been incorrect,
22033    # since paths with space are more likely in Windows. Give it another try with the whole
22034    # argument.
22035    path="$complete"
22036    arguments="EOL"
22037    new_path="$path"
22038
22039  windows_path="$new_path"
22040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22041    unix_path=`$CYGPATH -u "$windows_path"`
22042    new_path="$unix_path"
22043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22045    new_path="$unix_path"
22046  fi
22047
22048
22049    new_path=`$WHICH "$new_path" 2> /dev/null`
22050
22051    if test "x$new_path" = x; then
22052      # It's still not found. Now this is an unrecoverable error.
22053      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22054$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22055      has_space=`$ECHO "$complete" | $GREP " "`
22056      if test "x$has_space" != x; then
22057        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22058$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22059      fi
22060      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22061    fi
22062  fi
22063
22064  # Now new_path has a complete unix path to the binary
22065  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22066    # Keep paths in /bin as-is, but remove trailing .exe if any
22067    new_path="${new_path/%.exe/}"
22068    # Do not save /bin paths to all_fixpath_prefixes!
22069  else
22070    # Not in mixed or Windows style, start by that.
22071    new_path=`cmd //c echo $new_path`
22072
22073  input_path="$new_path"
22074  # Check if we need to convert this using DOS-style short mode. If the path
22075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22076  # take no chances and rewrite it.
22077  # Note: m4 eats our [], so we need to use [ and ] instead.
22078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22079  if test "x$has_forbidden_chars" != x; then
22080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22082  fi
22083
22084    # Output is in $new_path
22085
22086  windows_path="$new_path"
22087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22088    unix_path=`$CYGPATH -u "$windows_path"`
22089    new_path="$unix_path"
22090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22092    new_path="$unix_path"
22093  fi
22094
22095    # remove trailing .exe if any
22096    new_path="${new_path/%.exe/}"
22097
22098    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22099    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22100  fi
22101
22102  else
22103    # We're on a posix platform. Hooray! :)
22104    # First separate the path from the arguments. This will split at the first
22105    # space.
22106    complete="$WINLD"
22107    path="${complete%% *}"
22108    tmp="$complete EOL"
22109    arguments="${tmp#* }"
22110
22111    # Cannot rely on the command "which" here since it doesn't always work.
22112    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22113    if test -z "$is_absolute_path"; then
22114      # Path to executable is not absolute. Find it.
22115      IFS_save="$IFS"
22116      IFS=:
22117      for p in $PATH; do
22118        if test -f "$p/$path" && test -x "$p/$path"; then
22119          new_path="$p/$path"
22120          break
22121        fi
22122      done
22123      IFS="$IFS_save"
22124    else
22125      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22126$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22127      new_path="$path"
22128    fi
22129
22130    if test "x$new_path" = x; then
22131        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22132$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22133        has_space=`$ECHO "$complete" | $GREP " "`
22134        if test "x$has_space" != x; then
22135          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22136$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22137        fi
22138        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22139      fi
22140  fi
22141
22142      # Now join together the path and the arguments once again
22143      if test "x$arguments" != xEOL; then
22144        new_complete="$new_path ${arguments% *}"
22145      else
22146        new_complete="$new_path"
22147      fi
22148
22149  if test "x$complete" != "x$new_complete"; then
22150      WINLD="$new_complete"
22151      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22152$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22153    fi
22154
22155    printf "Windows linker was found at $WINLD\n"
22156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22157$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22158    "$WINLD" --version > /dev/null
22159    if test $? -eq 0 ; then
22160      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22161$as_echo "no" >&6; }
22162      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22163    else
22164      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22165$as_echo "yes" >&6; }
22166    fi
22167    LD="$WINLD"
22168    LDEXE="$WINLD"
22169    LDCXX="$WINLD"
22170    LDEXECXX="$WINLD"
22171
22172    # Extract the first word of "mt", so it can be a program name with args.
22173set dummy mt; ac_word=$2
22174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22175$as_echo_n "checking for $ac_word... " >&6; }
22176if test "${ac_cv_prog_MT+set}" = set; then :
22177  $as_echo_n "(cached) " >&6
22178else
22179  if test -n "$MT"; then
22180  ac_cv_prog_MT="$MT" # Let the user override the test.
22181else
22182  ac_prog_rejected=no
22183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22184for as_dir in $PATH
22185do
22186  IFS=$as_save_IFS
22187  test -z "$as_dir" && as_dir=.
22188    for ac_exec_ext in '' $ac_executable_extensions; do
22189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22190    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22191       ac_prog_rejected=yes
22192       continue
22193     fi
22194    ac_cv_prog_MT="mt"
22195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22196    break 2
22197  fi
22198done
22199  done
22200IFS=$as_save_IFS
22201
22202if test $ac_prog_rejected = yes; then
22203  # We found a bogon in the path, so make sure we never use it.
22204  set dummy $ac_cv_prog_MT
22205  shift
22206  if test $# != 0; then
22207    # We chose a different compiler from the bogus one.
22208    # However, it has the same basename, so the bogon will be chosen
22209    # first if we set MT to just the basename; use the full file name.
22210    shift
22211    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22212  fi
22213fi
22214fi
22215fi
22216MT=$ac_cv_prog_MT
22217if test -n "$MT"; then
22218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22219$as_echo "$MT" >&6; }
22220else
22221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22222$as_echo "no" >&6; }
22223fi
22224
22225
22226
22227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22228
22229  # First separate the path from the arguments. This will split at the first
22230  # space.
22231  complete="$MT"
22232  path="${complete%% *}"
22233  tmp="$complete EOL"
22234  arguments="${tmp#* }"
22235
22236  # Input might be given as Windows format, start by converting to
22237  # unix format.
22238  new_path=`$CYGPATH -u "$path"`
22239
22240  # Now try to locate executable using which
22241  new_path=`$WHICH "$new_path" 2> /dev/null`
22242  # bat and cmd files are not always considered executable in cygwin causing which
22243  # to not find them
22244  if test "x$new_path" = x \
22245           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22246           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22247    new_path=`$CYGPATH -u "$path"`
22248  fi
22249  if test "x$new_path" = x; then
22250    # Oops. Which didn't find the executable.
22251    # The splitting of arguments from the executable at a space might have been incorrect,
22252    # since paths with space are more likely in Windows. Give it another try with the whole
22253    # argument.
22254    path="$complete"
22255    arguments="EOL"
22256    new_path=`$CYGPATH -u "$path"`
22257    new_path=`$WHICH "$new_path" 2> /dev/null`
22258    # bat and cmd files are not always considered executable in cygwin causing which
22259    # to not find them
22260    if test "x$new_path" = x \
22261             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22262             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22263      new_path=`$CYGPATH -u "$path"`
22264    fi
22265    if test "x$new_path" = x; then
22266      # It's still not found. Now this is an unrecoverable error.
22267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22268$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22269      has_space=`$ECHO "$complete" | $GREP " "`
22270      if test "x$has_space" != x; then
22271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22273      fi
22274      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22275    fi
22276  fi
22277
22278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22281  # "foo.exe" is OK but "foo" is an error.
22282  #
22283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22284  # It is also a way to make sure we got the proper file name for the real test later on.
22285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22286  if test "x$test_shortpath" = x; then
22287    # Short path failed, file does not exist as specified.
22288    # Try adding .exe or .cmd
22289    if test -f "${new_path}.exe"; then
22290       input_to_shortpath="${new_path}.exe"
22291    elif test -f "${new_path}.cmd"; then
22292       input_to_shortpath="${new_path}.cmd"
22293    else
22294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22295$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22298      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22299    fi
22300  else
22301    input_to_shortpath="$new_path"
22302  fi
22303
22304  # Call helper function which possibly converts this using DOS-style short mode.
22305  # If so, the updated path is stored in $new_path.
22306  new_path="$input_to_shortpath"
22307
22308  input_path="$input_to_shortpath"
22309  # Check if we need to convert this using DOS-style short mode. If the path
22310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22311  # take no chances and rewrite it.
22312  # Note: m4 eats our [], so we need to use [ and ] instead.
22313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22314  if test "x$has_forbidden_chars" != x; then
22315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22319      # Going to short mode and back again did indeed matter. Since short mode is
22320      # case insensitive, let's make it lowercase to improve readability.
22321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22322      # Now convert it back to Unix-stile (cygpath)
22323      input_path=`$CYGPATH -u "$shortmode_path"`
22324      new_path="$input_path"
22325    fi
22326  fi
22327
22328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22329  if test "x$test_cygdrive_prefix" = x; then
22330    # As a simple fix, exclude /usr/bin since it's not a real path.
22331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22333      # a path prefixed by /cygdrive for fixpath to work.
22334      new_path="$CYGWIN_ROOT_PATH$input_path"
22335    fi
22336  fi
22337
22338  # remove trailing .exe if any
22339  new_path="${new_path/%.exe/}"
22340
22341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22342
22343  # First separate the path from the arguments. This will split at the first
22344  # space.
22345  complete="$MT"
22346  path="${complete%% *}"
22347  tmp="$complete EOL"
22348  arguments="${tmp#* }"
22349
22350  # Input might be given as Windows format, start by converting to
22351  # unix format.
22352  new_path="$path"
22353
22354  windows_path="$new_path"
22355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22356    unix_path=`$CYGPATH -u "$windows_path"`
22357    new_path="$unix_path"
22358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22360    new_path="$unix_path"
22361  fi
22362
22363
22364  # Now try to locate executable using which
22365  new_path=`$WHICH "$new_path" 2> /dev/null`
22366
22367  if test "x$new_path" = x; then
22368    # Oops. Which didn't find the executable.
22369    # The splitting of arguments from the executable at a space might have been incorrect,
22370    # since paths with space are more likely in Windows. Give it another try with the whole
22371    # argument.
22372    path="$complete"
22373    arguments="EOL"
22374    new_path="$path"
22375
22376  windows_path="$new_path"
22377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22378    unix_path=`$CYGPATH -u "$windows_path"`
22379    new_path="$unix_path"
22380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22382    new_path="$unix_path"
22383  fi
22384
22385
22386    new_path=`$WHICH "$new_path" 2> /dev/null`
22387
22388    if test "x$new_path" = x; then
22389      # It's still not found. Now this is an unrecoverable error.
22390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22391$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22392      has_space=`$ECHO "$complete" | $GREP " "`
22393      if test "x$has_space" != x; then
22394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22396      fi
22397      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22398    fi
22399  fi
22400
22401  # Now new_path has a complete unix path to the binary
22402  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22403    # Keep paths in /bin as-is, but remove trailing .exe if any
22404    new_path="${new_path/%.exe/}"
22405    # Do not save /bin paths to all_fixpath_prefixes!
22406  else
22407    # Not in mixed or Windows style, start by that.
22408    new_path=`cmd //c echo $new_path`
22409
22410  input_path="$new_path"
22411  # Check if we need to convert this using DOS-style short mode. If the path
22412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22413  # take no chances and rewrite it.
22414  # Note: m4 eats our [], so we need to use [ and ] instead.
22415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22416  if test "x$has_forbidden_chars" != x; then
22417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22419  fi
22420
22421    # Output is in $new_path
22422
22423  windows_path="$new_path"
22424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22425    unix_path=`$CYGPATH -u "$windows_path"`
22426    new_path="$unix_path"
22427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22429    new_path="$unix_path"
22430  fi
22431
22432    # remove trailing .exe if any
22433    new_path="${new_path/%.exe/}"
22434
22435    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22436    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22437  fi
22438
22439  else
22440    # We're on a posix platform. Hooray! :)
22441    # First separate the path from the arguments. This will split at the first
22442    # space.
22443    complete="$MT"
22444    path="${complete%% *}"
22445    tmp="$complete EOL"
22446    arguments="${tmp#* }"
22447
22448    # Cannot rely on the command "which" here since it doesn't always work.
22449    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22450    if test -z "$is_absolute_path"; then
22451      # Path to executable is not absolute. Find it.
22452      IFS_save="$IFS"
22453      IFS=:
22454      for p in $PATH; do
22455        if test -f "$p/$path" && test -x "$p/$path"; then
22456          new_path="$p/$path"
22457          break
22458        fi
22459      done
22460      IFS="$IFS_save"
22461    else
22462      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22463$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22464      new_path="$path"
22465    fi
22466
22467    if test "x$new_path" = x; then
22468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22469$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22470        has_space=`$ECHO "$complete" | $GREP " "`
22471        if test "x$has_space" != x; then
22472          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22473$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22474        fi
22475        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22476      fi
22477  fi
22478
22479      # Now join together the path and the arguments once again
22480      if test "x$arguments" != xEOL; then
22481        new_complete="$new_path ${arguments% *}"
22482      else
22483        new_complete="$new_path"
22484      fi
22485
22486  if test "x$complete" != "x$new_complete"; then
22487      MT="$new_complete"
22488      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22489$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22490    fi
22491
22492    # The resource compiler
22493    # Extract the first word of "rc", so it can be a program name with args.
22494set dummy rc; ac_word=$2
22495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22496$as_echo_n "checking for $ac_word... " >&6; }
22497if test "${ac_cv_prog_RC+set}" = set; then :
22498  $as_echo_n "(cached) " >&6
22499else
22500  if test -n "$RC"; then
22501  ac_cv_prog_RC="$RC" # Let the user override the test.
22502else
22503  ac_prog_rejected=no
22504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22505for as_dir in $PATH
22506do
22507  IFS=$as_save_IFS
22508  test -z "$as_dir" && as_dir=.
22509    for ac_exec_ext in '' $ac_executable_extensions; do
22510  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22511    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22512       ac_prog_rejected=yes
22513       continue
22514     fi
22515    ac_cv_prog_RC="rc"
22516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22517    break 2
22518  fi
22519done
22520  done
22521IFS=$as_save_IFS
22522
22523if test $ac_prog_rejected = yes; then
22524  # We found a bogon in the path, so make sure we never use it.
22525  set dummy $ac_cv_prog_RC
22526  shift
22527  if test $# != 0; then
22528    # We chose a different compiler from the bogus one.
22529    # However, it has the same basename, so the bogon will be chosen
22530    # first if we set RC to just the basename; use the full file name.
22531    shift
22532    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22533  fi
22534fi
22535fi
22536fi
22537RC=$ac_cv_prog_RC
22538if test -n "$RC"; then
22539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22540$as_echo "$RC" >&6; }
22541else
22542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22543$as_echo "no" >&6; }
22544fi
22545
22546
22547
22548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22549
22550  # First separate the path from the arguments. This will split at the first
22551  # space.
22552  complete="$RC"
22553  path="${complete%% *}"
22554  tmp="$complete EOL"
22555  arguments="${tmp#* }"
22556
22557  # Input might be given as Windows format, start by converting to
22558  # unix format.
22559  new_path=`$CYGPATH -u "$path"`
22560
22561  # Now try to locate executable using which
22562  new_path=`$WHICH "$new_path" 2> /dev/null`
22563  # bat and cmd files are not always considered executable in cygwin causing which
22564  # to not find them
22565  if test "x$new_path" = x \
22566           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22567           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22568    new_path=`$CYGPATH -u "$path"`
22569  fi
22570  if test "x$new_path" = x; then
22571    # Oops. Which didn't find the executable.
22572    # The splitting of arguments from the executable at a space might have been incorrect,
22573    # since paths with space are more likely in Windows. Give it another try with the whole
22574    # argument.
22575    path="$complete"
22576    arguments="EOL"
22577    new_path=`$CYGPATH -u "$path"`
22578    new_path=`$WHICH "$new_path" 2> /dev/null`
22579    # bat and cmd files are not always considered executable in cygwin causing which
22580    # to not find them
22581    if test "x$new_path" = x \
22582             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22583             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22584      new_path=`$CYGPATH -u "$path"`
22585    fi
22586    if test "x$new_path" = x; then
22587      # It's still not found. Now this is an unrecoverable error.
22588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22589$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22590      has_space=`$ECHO "$complete" | $GREP " "`
22591      if test "x$has_space" != x; then
22592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22594      fi
22595      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22596    fi
22597  fi
22598
22599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22602  # "foo.exe" is OK but "foo" is an error.
22603  #
22604  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22605  # It is also a way to make sure we got the proper file name for the real test later on.
22606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22607  if test "x$test_shortpath" = x; then
22608    # Short path failed, file does not exist as specified.
22609    # Try adding .exe or .cmd
22610    if test -f "${new_path}.exe"; then
22611       input_to_shortpath="${new_path}.exe"
22612    elif test -f "${new_path}.cmd"; then
22613       input_to_shortpath="${new_path}.cmd"
22614    else
22615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22616$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22619      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22620    fi
22621  else
22622    input_to_shortpath="$new_path"
22623  fi
22624
22625  # Call helper function which possibly converts this using DOS-style short mode.
22626  # If so, the updated path is stored in $new_path.
22627  new_path="$input_to_shortpath"
22628
22629  input_path="$input_to_shortpath"
22630  # Check if we need to convert this using DOS-style short mode. If the path
22631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22632  # take no chances and rewrite it.
22633  # Note: m4 eats our [], so we need to use [ and ] instead.
22634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22635  if test "x$has_forbidden_chars" != x; then
22636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22640      # Going to short mode and back again did indeed matter. Since short mode is
22641      # case insensitive, let's make it lowercase to improve readability.
22642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22643      # Now convert it back to Unix-stile (cygpath)
22644      input_path=`$CYGPATH -u "$shortmode_path"`
22645      new_path="$input_path"
22646    fi
22647  fi
22648
22649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22650  if test "x$test_cygdrive_prefix" = x; then
22651    # As a simple fix, exclude /usr/bin since it's not a real path.
22652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22654      # a path prefixed by /cygdrive for fixpath to work.
22655      new_path="$CYGWIN_ROOT_PATH$input_path"
22656    fi
22657  fi
22658
22659  # remove trailing .exe if any
22660  new_path="${new_path/%.exe/}"
22661
22662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22663
22664  # First separate the path from the arguments. This will split at the first
22665  # space.
22666  complete="$RC"
22667  path="${complete%% *}"
22668  tmp="$complete EOL"
22669  arguments="${tmp#* }"
22670
22671  # Input might be given as Windows format, start by converting to
22672  # unix format.
22673  new_path="$path"
22674
22675  windows_path="$new_path"
22676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22677    unix_path=`$CYGPATH -u "$windows_path"`
22678    new_path="$unix_path"
22679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22681    new_path="$unix_path"
22682  fi
22683
22684
22685  # Now try to locate executable using which
22686  new_path=`$WHICH "$new_path" 2> /dev/null`
22687
22688  if test "x$new_path" = x; then
22689    # Oops. Which didn't find the executable.
22690    # The splitting of arguments from the executable at a space might have been incorrect,
22691    # since paths with space are more likely in Windows. Give it another try with the whole
22692    # argument.
22693    path="$complete"
22694    arguments="EOL"
22695    new_path="$path"
22696
22697  windows_path="$new_path"
22698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22699    unix_path=`$CYGPATH -u "$windows_path"`
22700    new_path="$unix_path"
22701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22703    new_path="$unix_path"
22704  fi
22705
22706
22707    new_path=`$WHICH "$new_path" 2> /dev/null`
22708
22709    if test "x$new_path" = x; then
22710      # It's still not found. Now this is an unrecoverable error.
22711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22712$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22713      has_space=`$ECHO "$complete" | $GREP " "`
22714      if test "x$has_space" != x; then
22715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22717      fi
22718      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22719    fi
22720  fi
22721
22722  # Now new_path has a complete unix path to the binary
22723  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22724    # Keep paths in /bin as-is, but remove trailing .exe if any
22725    new_path="${new_path/%.exe/}"
22726    # Do not save /bin paths to all_fixpath_prefixes!
22727  else
22728    # Not in mixed or Windows style, start by that.
22729    new_path=`cmd //c echo $new_path`
22730
22731  input_path="$new_path"
22732  # Check if we need to convert this using DOS-style short mode. If the path
22733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22734  # take no chances and rewrite it.
22735  # Note: m4 eats our [], so we need to use [ and ] instead.
22736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22737  if test "x$has_forbidden_chars" != x; then
22738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22739    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22740  fi
22741
22742    # Output is in $new_path
22743
22744  windows_path="$new_path"
22745  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22746    unix_path=`$CYGPATH -u "$windows_path"`
22747    new_path="$unix_path"
22748  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22749    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22750    new_path="$unix_path"
22751  fi
22752
22753    # remove trailing .exe if any
22754    new_path="${new_path/%.exe/}"
22755
22756    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22757    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22758  fi
22759
22760  else
22761    # We're on a posix platform. Hooray! :)
22762    # First separate the path from the arguments. This will split at the first
22763    # space.
22764    complete="$RC"
22765    path="${complete%% *}"
22766    tmp="$complete EOL"
22767    arguments="${tmp#* }"
22768
22769    # Cannot rely on the command "which" here since it doesn't always work.
22770    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22771    if test -z "$is_absolute_path"; then
22772      # Path to executable is not absolute. Find it.
22773      IFS_save="$IFS"
22774      IFS=:
22775      for p in $PATH; do
22776        if test -f "$p/$path" && test -x "$p/$path"; then
22777          new_path="$p/$path"
22778          break
22779        fi
22780      done
22781      IFS="$IFS_save"
22782    else
22783      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22784$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22785      new_path="$path"
22786    fi
22787
22788    if test "x$new_path" = x; then
22789        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22790$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22791        has_space=`$ECHO "$complete" | $GREP " "`
22792        if test "x$has_space" != x; then
22793          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22794$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22795        fi
22796        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22797      fi
22798  fi
22799
22800      # Now join together the path and the arguments once again
22801      if test "x$arguments" != xEOL; then
22802        new_complete="$new_path ${arguments% *}"
22803      else
22804        new_complete="$new_path"
22805      fi
22806
22807  if test "x$complete" != "x$new_complete"; then
22808      RC="$new_complete"
22809      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22810$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22811    fi
22812
22813
22814    # For hotspot, we need these in Windows mixed path,
22815    # so rewrite them all. Need added .exe suffix.
22816    HOTSPOT_CXX="$CXX.exe"
22817    HOTSPOT_LD="$LD.exe"
22818    HOTSPOT_MT="$MT.exe"
22819    HOTSPOT_RC="$RC.exe"
22820
22821  unix_path="$HOTSPOT_CXX"
22822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22823    windows_path=`$CYGPATH -m "$unix_path"`
22824    HOTSPOT_CXX="$windows_path"
22825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22826    windows_path=`cmd //c echo $unix_path`
22827    HOTSPOT_CXX="$windows_path"
22828  fi
22829
22830
22831  unix_path="$HOTSPOT_LD"
22832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22833    windows_path=`$CYGPATH -m "$unix_path"`
22834    HOTSPOT_LD="$windows_path"
22835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22836    windows_path=`cmd //c echo $unix_path`
22837    HOTSPOT_LD="$windows_path"
22838  fi
22839
22840
22841  unix_path="$HOTSPOT_MT"
22842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22843    windows_path=`$CYGPATH -m "$unix_path"`
22844    HOTSPOT_MT="$windows_path"
22845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22846    windows_path=`cmd //c echo $unix_path`
22847    HOTSPOT_MT="$windows_path"
22848  fi
22849
22850
22851  unix_path="$HOTSPOT_RC"
22852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22853    windows_path=`$CYGPATH -m "$unix_path"`
22854    HOTSPOT_RC="$windows_path"
22855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22856    windows_path=`cmd //c echo $unix_path`
22857    HOTSPOT_RC="$windows_path"
22858  fi
22859
22860
22861
22862
22863    RC_FLAGS="-nologo -l 0x409 -r"
22864    if test "x$VARIANT" = xOPT; then :
22865
22866        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22867
22868fi
22869    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22870    if test "x$JDK_UPDATE_VERSION" = x; then :
22871
22872        JDK_UPDATE_VERSION_NOTNULL=0
22873
22874fi
22875    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22876    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22877    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22878    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22879    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22880    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22881    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22882
22883    # lib.exe is used to create static libraries.
22884    # Extract the first word of "lib", so it can be a program name with args.
22885set dummy lib; ac_word=$2
22886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22887$as_echo_n "checking for $ac_word... " >&6; }
22888if test "${ac_cv_prog_WINAR+set}" = set; then :
22889  $as_echo_n "(cached) " >&6
22890else
22891  if test -n "$WINAR"; then
22892  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22893else
22894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22895for as_dir in $PATH
22896do
22897  IFS=$as_save_IFS
22898  test -z "$as_dir" && as_dir=.
22899    for ac_exec_ext in '' $ac_executable_extensions; do
22900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22901    ac_cv_prog_WINAR="lib"
22902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22903    break 2
22904  fi
22905done
22906  done
22907IFS=$as_save_IFS
22908
22909fi
22910fi
22911WINAR=$ac_cv_prog_WINAR
22912if test -n "$WINAR"; then
22913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22914$as_echo "$WINAR" >&6; }
22915else
22916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22917$as_echo "no" >&6; }
22918fi
22919
22920
22921
22922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22923
22924  # First separate the path from the arguments. This will split at the first
22925  # space.
22926  complete="$WINAR"
22927  path="${complete%% *}"
22928  tmp="$complete EOL"
22929  arguments="${tmp#* }"
22930
22931  # Input might be given as Windows format, start by converting to
22932  # unix format.
22933  new_path=`$CYGPATH -u "$path"`
22934
22935  # Now try to locate executable using which
22936  new_path=`$WHICH "$new_path" 2> /dev/null`
22937  # bat and cmd files are not always considered executable in cygwin causing which
22938  # to not find them
22939  if test "x$new_path" = x \
22940           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22941           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22942    new_path=`$CYGPATH -u "$path"`
22943  fi
22944  if test "x$new_path" = x; then
22945    # Oops. Which didn't find the executable.
22946    # The splitting of arguments from the executable at a space might have been incorrect,
22947    # since paths with space are more likely in Windows. Give it another try with the whole
22948    # argument.
22949    path="$complete"
22950    arguments="EOL"
22951    new_path=`$CYGPATH -u "$path"`
22952    new_path=`$WHICH "$new_path" 2> /dev/null`
22953    # bat and cmd files are not always considered executable in cygwin causing which
22954    # to not find them
22955    if test "x$new_path" = x \
22956             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22957             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22958      new_path=`$CYGPATH -u "$path"`
22959    fi
22960    if test "x$new_path" = x; then
22961      # It's still not found. Now this is an unrecoverable error.
22962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22963$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22964      has_space=`$ECHO "$complete" | $GREP " "`
22965      if test "x$has_space" != x; then
22966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22968      fi
22969      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22970    fi
22971  fi
22972
22973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22976  # "foo.exe" is OK but "foo" is an error.
22977  #
22978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22979  # It is also a way to make sure we got the proper file name for the real test later on.
22980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22981  if test "x$test_shortpath" = x; then
22982    # Short path failed, file does not exist as specified.
22983    # Try adding .exe or .cmd
22984    if test -f "${new_path}.exe"; then
22985       input_to_shortpath="${new_path}.exe"
22986    elif test -f "${new_path}.cmd"; then
22987       input_to_shortpath="${new_path}.cmd"
22988    else
22989      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22990$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22991      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22992$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22993      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22994    fi
22995  else
22996    input_to_shortpath="$new_path"
22997  fi
22998
22999  # Call helper function which possibly converts this using DOS-style short mode.
23000  # If so, the updated path is stored in $new_path.
23001  new_path="$input_to_shortpath"
23002
23003  input_path="$input_to_shortpath"
23004  # Check if we need to convert this using DOS-style short mode. If the path
23005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23006  # take no chances and rewrite it.
23007  # Note: m4 eats our [], so we need to use [ and ] instead.
23008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23009  if test "x$has_forbidden_chars" != x; then
23010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23011    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23012    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23013    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23014      # Going to short mode and back again did indeed matter. Since short mode is
23015      # case insensitive, let's make it lowercase to improve readability.
23016      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23017      # Now convert it back to Unix-stile (cygpath)
23018      input_path=`$CYGPATH -u "$shortmode_path"`
23019      new_path="$input_path"
23020    fi
23021  fi
23022
23023  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23024  if test "x$test_cygdrive_prefix" = x; then
23025    # As a simple fix, exclude /usr/bin since it's not a real path.
23026    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23027      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23028      # a path prefixed by /cygdrive for fixpath to work.
23029      new_path="$CYGWIN_ROOT_PATH$input_path"
23030    fi
23031  fi
23032
23033  # remove trailing .exe if any
23034  new_path="${new_path/%.exe/}"
23035
23036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23037
23038  # First separate the path from the arguments. This will split at the first
23039  # space.
23040  complete="$WINAR"
23041  path="${complete%% *}"
23042  tmp="$complete EOL"
23043  arguments="${tmp#* }"
23044
23045  # Input might be given as Windows format, start by converting to
23046  # unix format.
23047  new_path="$path"
23048
23049  windows_path="$new_path"
23050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23051    unix_path=`$CYGPATH -u "$windows_path"`
23052    new_path="$unix_path"
23053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23055    new_path="$unix_path"
23056  fi
23057
23058
23059  # Now try to locate executable using which
23060  new_path=`$WHICH "$new_path" 2> /dev/null`
23061
23062  if test "x$new_path" = x; then
23063    # Oops. Which didn't find the executable.
23064    # The splitting of arguments from the executable at a space might have been incorrect,
23065    # since paths with space are more likely in Windows. Give it another try with the whole
23066    # argument.
23067    path="$complete"
23068    arguments="EOL"
23069    new_path="$path"
23070
23071  windows_path="$new_path"
23072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23073    unix_path=`$CYGPATH -u "$windows_path"`
23074    new_path="$unix_path"
23075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23077    new_path="$unix_path"
23078  fi
23079
23080
23081    new_path=`$WHICH "$new_path" 2> /dev/null`
23082
23083    if test "x$new_path" = x; then
23084      # It's still not found. Now this is an unrecoverable error.
23085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23086$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23087      has_space=`$ECHO "$complete" | $GREP " "`
23088      if test "x$has_space" != x; then
23089        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23090$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23091      fi
23092      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23093    fi
23094  fi
23095
23096  # Now new_path has a complete unix path to the binary
23097  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23098    # Keep paths in /bin as-is, but remove trailing .exe if any
23099    new_path="${new_path/%.exe/}"
23100    # Do not save /bin paths to all_fixpath_prefixes!
23101  else
23102    # Not in mixed or Windows style, start by that.
23103    new_path=`cmd //c echo $new_path`
23104
23105  input_path="$new_path"
23106  # Check if we need to convert this using DOS-style short mode. If the path
23107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23108  # take no chances and rewrite it.
23109  # Note: m4 eats our [], so we need to use [ and ] instead.
23110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23111  if test "x$has_forbidden_chars" != x; then
23112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23113    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23114  fi
23115
23116    # Output is in $new_path
23117
23118  windows_path="$new_path"
23119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23120    unix_path=`$CYGPATH -u "$windows_path"`
23121    new_path="$unix_path"
23122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23124    new_path="$unix_path"
23125  fi
23126
23127    # remove trailing .exe if any
23128    new_path="${new_path/%.exe/}"
23129
23130    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23131    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23132  fi
23133
23134  else
23135    # We're on a posix platform. Hooray! :)
23136    # First separate the path from the arguments. This will split at the first
23137    # space.
23138    complete="$WINAR"
23139    path="${complete%% *}"
23140    tmp="$complete EOL"
23141    arguments="${tmp#* }"
23142
23143    # Cannot rely on the command "which" here since it doesn't always work.
23144    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23145    if test -z "$is_absolute_path"; then
23146      # Path to executable is not absolute. Find it.
23147      IFS_save="$IFS"
23148      IFS=:
23149      for p in $PATH; do
23150        if test -f "$p/$path" && test -x "$p/$path"; then
23151          new_path="$p/$path"
23152          break
23153        fi
23154      done
23155      IFS="$IFS_save"
23156    else
23157      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23158$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23159      new_path="$path"
23160    fi
23161
23162    if test "x$new_path" = x; then
23163        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23164$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23165        has_space=`$ECHO "$complete" | $GREP " "`
23166        if test "x$has_space" != x; then
23167          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23168$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23169        fi
23170        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23171      fi
23172  fi
23173
23174      # Now join together the path and the arguments once again
23175      if test "x$arguments" != xEOL; then
23176        new_complete="$new_path ${arguments% *}"
23177      else
23178        new_complete="$new_path"
23179      fi
23180
23181  if test "x$complete" != "x$new_complete"; then
23182      WINAR="$new_complete"
23183      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23184$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23185    fi
23186
23187    AR="$WINAR"
23188    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23189
23190    # Extract the first word of "dumpbin", so it can be a program name with args.
23191set dummy dumpbin; ac_word=$2
23192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23193$as_echo_n "checking for $ac_word... " >&6; }
23194if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23195  $as_echo_n "(cached) " >&6
23196else
23197  if test -n "$DUMPBIN"; then
23198  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23199else
23200as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23201for as_dir in $PATH
23202do
23203  IFS=$as_save_IFS
23204  test -z "$as_dir" && as_dir=.
23205    for ac_exec_ext in '' $ac_executable_extensions; do
23206  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23207    ac_cv_prog_DUMPBIN="dumpbin"
23208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23209    break 2
23210  fi
23211done
23212  done
23213IFS=$as_save_IFS
23214
23215fi
23216fi
23217DUMPBIN=$ac_cv_prog_DUMPBIN
23218if test -n "$DUMPBIN"; then
23219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23220$as_echo "$DUMPBIN" >&6; }
23221else
23222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23223$as_echo "no" >&6; }
23224fi
23225
23226
23227
23228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23229
23230  # First separate the path from the arguments. This will split at the first
23231  # space.
23232  complete="$DUMPBIN"
23233  path="${complete%% *}"
23234  tmp="$complete EOL"
23235  arguments="${tmp#* }"
23236
23237  # Input might be given as Windows format, start by converting to
23238  # unix format.
23239  new_path=`$CYGPATH -u "$path"`
23240
23241  # Now try to locate executable using which
23242  new_path=`$WHICH "$new_path" 2> /dev/null`
23243  # bat and cmd files are not always considered executable in cygwin causing which
23244  # to not find them
23245  if test "x$new_path" = x \
23246           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23247           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23248    new_path=`$CYGPATH -u "$path"`
23249  fi
23250  if test "x$new_path" = x; then
23251    # Oops. Which didn't find the executable.
23252    # The splitting of arguments from the executable at a space might have been incorrect,
23253    # since paths with space are more likely in Windows. Give it another try with the whole
23254    # argument.
23255    path="$complete"
23256    arguments="EOL"
23257    new_path=`$CYGPATH -u "$path"`
23258    new_path=`$WHICH "$new_path" 2> /dev/null`
23259    # bat and cmd files are not always considered executable in cygwin causing which
23260    # to not find them
23261    if test "x$new_path" = x \
23262             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23263             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23264      new_path=`$CYGPATH -u "$path"`
23265    fi
23266    if test "x$new_path" = x; then
23267      # It's still not found. Now this is an unrecoverable error.
23268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23269$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23270      has_space=`$ECHO "$complete" | $GREP " "`
23271      if test "x$has_space" != x; then
23272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23274      fi
23275      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23276    fi
23277  fi
23278
23279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23282  # "foo.exe" is OK but "foo" is an error.
23283  #
23284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23285  # It is also a way to make sure we got the proper file name for the real test later on.
23286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23287  if test "x$test_shortpath" = x; then
23288    # Short path failed, file does not exist as specified.
23289    # Try adding .exe or .cmd
23290    if test -f "${new_path}.exe"; then
23291       input_to_shortpath="${new_path}.exe"
23292    elif test -f "${new_path}.cmd"; then
23293       input_to_shortpath="${new_path}.cmd"
23294    else
23295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23296$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23297      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23298$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23299      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23300    fi
23301  else
23302    input_to_shortpath="$new_path"
23303  fi
23304
23305  # Call helper function which possibly converts this using DOS-style short mode.
23306  # If so, the updated path is stored in $new_path.
23307  new_path="$input_to_shortpath"
23308
23309  input_path="$input_to_shortpath"
23310  # Check if we need to convert this using DOS-style short mode. If the path
23311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23312  # take no chances and rewrite it.
23313  # Note: m4 eats our [], so we need to use [ and ] instead.
23314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23315  if test "x$has_forbidden_chars" != x; then
23316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23317    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23318    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23319    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23320      # Going to short mode and back again did indeed matter. Since short mode is
23321      # case insensitive, let's make it lowercase to improve readability.
23322      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23323      # Now convert it back to Unix-stile (cygpath)
23324      input_path=`$CYGPATH -u "$shortmode_path"`
23325      new_path="$input_path"
23326    fi
23327  fi
23328
23329  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23330  if test "x$test_cygdrive_prefix" = x; then
23331    # As a simple fix, exclude /usr/bin since it's not a real path.
23332    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23333      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23334      # a path prefixed by /cygdrive for fixpath to work.
23335      new_path="$CYGWIN_ROOT_PATH$input_path"
23336    fi
23337  fi
23338
23339  # remove trailing .exe if any
23340  new_path="${new_path/%.exe/}"
23341
23342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23343
23344  # First separate the path from the arguments. This will split at the first
23345  # space.
23346  complete="$DUMPBIN"
23347  path="${complete%% *}"
23348  tmp="$complete EOL"
23349  arguments="${tmp#* }"
23350
23351  # Input might be given as Windows format, start by converting to
23352  # unix format.
23353  new_path="$path"
23354
23355  windows_path="$new_path"
23356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23357    unix_path=`$CYGPATH -u "$windows_path"`
23358    new_path="$unix_path"
23359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23361    new_path="$unix_path"
23362  fi
23363
23364
23365  # Now try to locate executable using which
23366  new_path=`$WHICH "$new_path" 2> /dev/null`
23367
23368  if test "x$new_path" = x; then
23369    # Oops. Which didn't find the executable.
23370    # The splitting of arguments from the executable at a space might have been incorrect,
23371    # since paths with space are more likely in Windows. Give it another try with the whole
23372    # argument.
23373    path="$complete"
23374    arguments="EOL"
23375    new_path="$path"
23376
23377  windows_path="$new_path"
23378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23379    unix_path=`$CYGPATH -u "$windows_path"`
23380    new_path="$unix_path"
23381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23383    new_path="$unix_path"
23384  fi
23385
23386
23387    new_path=`$WHICH "$new_path" 2> /dev/null`
23388
23389    if test "x$new_path" = x; then
23390      # It's still not found. Now this is an unrecoverable error.
23391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23392$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23393      has_space=`$ECHO "$complete" | $GREP " "`
23394      if test "x$has_space" != x; then
23395        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23396$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23397      fi
23398      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23399    fi
23400  fi
23401
23402  # Now new_path has a complete unix path to the binary
23403  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23404    # Keep paths in /bin as-is, but remove trailing .exe if any
23405    new_path="${new_path/%.exe/}"
23406    # Do not save /bin paths to all_fixpath_prefixes!
23407  else
23408    # Not in mixed or Windows style, start by that.
23409    new_path=`cmd //c echo $new_path`
23410
23411  input_path="$new_path"
23412  # Check if we need to convert this using DOS-style short mode. If the path
23413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23414  # take no chances and rewrite it.
23415  # Note: m4 eats our [], so we need to use [ and ] instead.
23416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23417  if test "x$has_forbidden_chars" != x; then
23418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23420  fi
23421
23422    # Output is in $new_path
23423
23424  windows_path="$new_path"
23425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23426    unix_path=`$CYGPATH -u "$windows_path"`
23427    new_path="$unix_path"
23428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23430    new_path="$unix_path"
23431  fi
23432
23433    # remove trailing .exe if any
23434    new_path="${new_path/%.exe/}"
23435
23436    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23437    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23438  fi
23439
23440  else
23441    # We're on a posix platform. Hooray! :)
23442    # First separate the path from the arguments. This will split at the first
23443    # space.
23444    complete="$DUMPBIN"
23445    path="${complete%% *}"
23446    tmp="$complete EOL"
23447    arguments="${tmp#* }"
23448
23449    # Cannot rely on the command "which" here since it doesn't always work.
23450    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23451    if test -z "$is_absolute_path"; then
23452      # Path to executable is not absolute. Find it.
23453      IFS_save="$IFS"
23454      IFS=:
23455      for p in $PATH; do
23456        if test -f "$p/$path" && test -x "$p/$path"; then
23457          new_path="$p/$path"
23458          break
23459        fi
23460      done
23461      IFS="$IFS_save"
23462    else
23463      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23464$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23465      new_path="$path"
23466    fi
23467
23468    if test "x$new_path" = x; then
23469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23470$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23471        has_space=`$ECHO "$complete" | $GREP " "`
23472        if test "x$has_space" != x; then
23473          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23474$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23475        fi
23476        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23477      fi
23478  fi
23479
23480      # Now join together the path and the arguments once again
23481      if test "x$arguments" != xEOL; then
23482        new_complete="$new_path ${arguments% *}"
23483      else
23484        new_complete="$new_path"
23485      fi
23486
23487  if test "x$complete" != "x$new_complete"; then
23488      DUMPBIN="$new_complete"
23489      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23490$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23491    fi
23492
23493
23494    COMPILER_TYPE=CL
23495    CCXXFLAGS="$CCXXFLAGS -nologo"
23496
23497fi
23498
23499
23500
23501ac_ext=c
23502ac_cpp='$CPP $CPPFLAGS'
23503ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23504ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23505ac_compiler_gnu=$ac_cv_c_compiler_gnu
23506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23507$as_echo_n "checking how to run the C preprocessor... " >&6; }
23508# On Suns, sometimes $CPP names a directory.
23509if test -n "$CPP" && test -d "$CPP"; then
23510  CPP=
23511fi
23512if test -z "$CPP"; then
23513  if test "${ac_cv_prog_CPP+set}" = set; then :
23514  $as_echo_n "(cached) " >&6
23515else
23516      # Double quotes because CPP needs to be expanded
23517    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23518    do
23519      ac_preproc_ok=false
23520for ac_c_preproc_warn_flag in '' yes
23521do
23522  # Use a header file that comes with gcc, so configuring glibc
23523  # with a fresh cross-compiler works.
23524  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23525  # <limits.h> exists even on freestanding compilers.
23526  # On the NeXT, cc -E runs the code through the compiler's parser,
23527  # not just through cpp. "Syntax error" is here to catch this case.
23528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23529/* end confdefs.h.  */
23530#ifdef __STDC__
23531# include <limits.h>
23532#else
23533# include <assert.h>
23534#endif
23535		     Syntax error
23536_ACEOF
23537if ac_fn_c_try_cpp "$LINENO"; then :
23538
23539else
23540  # Broken: fails on valid input.
23541continue
23542fi
23543rm -f conftest.err conftest.i conftest.$ac_ext
23544
23545  # OK, works on sane cases.  Now check whether nonexistent headers
23546  # can be detected and how.
23547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23548/* end confdefs.h.  */
23549#include <ac_nonexistent.h>
23550_ACEOF
23551if ac_fn_c_try_cpp "$LINENO"; then :
23552  # Broken: success on invalid input.
23553continue
23554else
23555  # Passes both tests.
23556ac_preproc_ok=:
23557break
23558fi
23559rm -f conftest.err conftest.i conftest.$ac_ext
23560
23561done
23562# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23563rm -f conftest.i conftest.err conftest.$ac_ext
23564if $ac_preproc_ok; then :
23565  break
23566fi
23567
23568    done
23569    ac_cv_prog_CPP=$CPP
23570
23571fi
23572  CPP=$ac_cv_prog_CPP
23573else
23574  ac_cv_prog_CPP=$CPP
23575fi
23576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23577$as_echo "$CPP" >&6; }
23578ac_preproc_ok=false
23579for ac_c_preproc_warn_flag in '' yes
23580do
23581  # Use a header file that comes with gcc, so configuring glibc
23582  # with a fresh cross-compiler works.
23583  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23584  # <limits.h> exists even on freestanding compilers.
23585  # On the NeXT, cc -E runs the code through the compiler's parser,
23586  # not just through cpp. "Syntax error" is here to catch this case.
23587  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23588/* end confdefs.h.  */
23589#ifdef __STDC__
23590# include <limits.h>
23591#else
23592# include <assert.h>
23593#endif
23594		     Syntax error
23595_ACEOF
23596if ac_fn_c_try_cpp "$LINENO"; then :
23597
23598else
23599  # Broken: fails on valid input.
23600continue
23601fi
23602rm -f conftest.err conftest.i conftest.$ac_ext
23603
23604  # OK, works on sane cases.  Now check whether nonexistent headers
23605  # can be detected and how.
23606  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23607/* end confdefs.h.  */
23608#include <ac_nonexistent.h>
23609_ACEOF
23610if ac_fn_c_try_cpp "$LINENO"; then :
23611  # Broken: success on invalid input.
23612continue
23613else
23614  # Passes both tests.
23615ac_preproc_ok=:
23616break
23617fi
23618rm -f conftest.err conftest.i conftest.$ac_ext
23619
23620done
23621# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23622rm -f conftest.i conftest.err conftest.$ac_ext
23623if $ac_preproc_ok; then :
23624
23625else
23626  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23627$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23628as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23629See \`config.log' for more details" "$LINENO" 5 ; }
23630fi
23631
23632ac_ext=cpp
23633ac_cpp='$CXXCPP $CPPFLAGS'
23634ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23635ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23636ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23637
23638
23639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23640
23641  # First separate the path from the arguments. This will split at the first
23642  # space.
23643  complete="$CPP"
23644  path="${complete%% *}"
23645  tmp="$complete EOL"
23646  arguments="${tmp#* }"
23647
23648  # Input might be given as Windows format, start by converting to
23649  # unix format.
23650  new_path=`$CYGPATH -u "$path"`
23651
23652  # Now try to locate executable using which
23653  new_path=`$WHICH "$new_path" 2> /dev/null`
23654  # bat and cmd files are not always considered executable in cygwin causing which
23655  # to not find them
23656  if test "x$new_path" = x \
23657           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23658           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23659    new_path=`$CYGPATH -u "$path"`
23660  fi
23661  if test "x$new_path" = x; then
23662    # Oops. Which didn't find the executable.
23663    # The splitting of arguments from the executable at a space might have been incorrect,
23664    # since paths with space are more likely in Windows. Give it another try with the whole
23665    # argument.
23666    path="$complete"
23667    arguments="EOL"
23668    new_path=`$CYGPATH -u "$path"`
23669    new_path=`$WHICH "$new_path" 2> /dev/null`
23670    # bat and cmd files are not always considered executable in cygwin causing which
23671    # to not find them
23672    if test "x$new_path" = x \
23673             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23674             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23675      new_path=`$CYGPATH -u "$path"`
23676    fi
23677    if test "x$new_path" = x; then
23678      # It's still not found. Now this is an unrecoverable error.
23679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23680$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23681      has_space=`$ECHO "$complete" | $GREP " "`
23682      if test "x$has_space" != x; then
23683        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23684$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23685      fi
23686      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23687    fi
23688  fi
23689
23690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23693  # "foo.exe" is OK but "foo" is an error.
23694  #
23695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23696  # It is also a way to make sure we got the proper file name for the real test later on.
23697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23698  if test "x$test_shortpath" = x; then
23699    # Short path failed, file does not exist as specified.
23700    # Try adding .exe or .cmd
23701    if test -f "${new_path}.exe"; then
23702       input_to_shortpath="${new_path}.exe"
23703    elif test -f "${new_path}.cmd"; then
23704       input_to_shortpath="${new_path}.cmd"
23705    else
23706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23707$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23708      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23709$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23710      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23711    fi
23712  else
23713    input_to_shortpath="$new_path"
23714  fi
23715
23716  # Call helper function which possibly converts this using DOS-style short mode.
23717  # If so, the updated path is stored in $new_path.
23718  new_path="$input_to_shortpath"
23719
23720  input_path="$input_to_shortpath"
23721  # Check if we need to convert this using DOS-style short mode. If the path
23722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23723  # take no chances and rewrite it.
23724  # Note: m4 eats our [], so we need to use [ and ] instead.
23725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23726  if test "x$has_forbidden_chars" != x; then
23727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23731      # Going to short mode and back again did indeed matter. Since short mode is
23732      # case insensitive, let's make it lowercase to improve readability.
23733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23734      # Now convert it back to Unix-stile (cygpath)
23735      input_path=`$CYGPATH -u "$shortmode_path"`
23736      new_path="$input_path"
23737    fi
23738  fi
23739
23740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23741  if test "x$test_cygdrive_prefix" = x; then
23742    # As a simple fix, exclude /usr/bin since it's not a real path.
23743    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23745      # a path prefixed by /cygdrive for fixpath to work.
23746      new_path="$CYGWIN_ROOT_PATH$input_path"
23747    fi
23748  fi
23749
23750  # remove trailing .exe if any
23751  new_path="${new_path/%.exe/}"
23752
23753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23754
23755  # First separate the path from the arguments. This will split at the first
23756  # space.
23757  complete="$CPP"
23758  path="${complete%% *}"
23759  tmp="$complete EOL"
23760  arguments="${tmp#* }"
23761
23762  # Input might be given as Windows format, start by converting to
23763  # unix format.
23764  new_path="$path"
23765
23766  windows_path="$new_path"
23767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23768    unix_path=`$CYGPATH -u "$windows_path"`
23769    new_path="$unix_path"
23770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23772    new_path="$unix_path"
23773  fi
23774
23775
23776  # Now try to locate executable using which
23777  new_path=`$WHICH "$new_path" 2> /dev/null`
23778
23779  if test "x$new_path" = x; then
23780    # Oops. Which didn't find the executable.
23781    # The splitting of arguments from the executable at a space might have been incorrect,
23782    # since paths with space are more likely in Windows. Give it another try with the whole
23783    # argument.
23784    path="$complete"
23785    arguments="EOL"
23786    new_path="$path"
23787
23788  windows_path="$new_path"
23789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23790    unix_path=`$CYGPATH -u "$windows_path"`
23791    new_path="$unix_path"
23792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23794    new_path="$unix_path"
23795  fi
23796
23797
23798    new_path=`$WHICH "$new_path" 2> /dev/null`
23799
23800    if test "x$new_path" = x; then
23801      # It's still not found. Now this is an unrecoverable error.
23802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23803$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23804      has_space=`$ECHO "$complete" | $GREP " "`
23805      if test "x$has_space" != x; then
23806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23808      fi
23809      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23810    fi
23811  fi
23812
23813  # Now new_path has a complete unix path to the binary
23814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23815    # Keep paths in /bin as-is, but remove trailing .exe if any
23816    new_path="${new_path/%.exe/}"
23817    # Do not save /bin paths to all_fixpath_prefixes!
23818  else
23819    # Not in mixed or Windows style, start by that.
23820    new_path=`cmd //c echo $new_path`
23821
23822  input_path="$new_path"
23823  # Check if we need to convert this using DOS-style short mode. If the path
23824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23825  # take no chances and rewrite it.
23826  # Note: m4 eats our [], so we need to use [ and ] instead.
23827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23828  if test "x$has_forbidden_chars" != x; then
23829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23831  fi
23832
23833    # Output is in $new_path
23834
23835  windows_path="$new_path"
23836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23837    unix_path=`$CYGPATH -u "$windows_path"`
23838    new_path="$unix_path"
23839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23841    new_path="$unix_path"
23842  fi
23843
23844    # remove trailing .exe if any
23845    new_path="${new_path/%.exe/}"
23846
23847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23849  fi
23850
23851  else
23852    # We're on a posix platform. Hooray! :)
23853    # First separate the path from the arguments. This will split at the first
23854    # space.
23855    complete="$CPP"
23856    path="${complete%% *}"
23857    tmp="$complete EOL"
23858    arguments="${tmp#* }"
23859
23860    # Cannot rely on the command "which" here since it doesn't always work.
23861    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23862    if test -z "$is_absolute_path"; then
23863      # Path to executable is not absolute. Find it.
23864      IFS_save="$IFS"
23865      IFS=:
23866      for p in $PATH; do
23867        if test -f "$p/$path" && test -x "$p/$path"; then
23868          new_path="$p/$path"
23869          break
23870        fi
23871      done
23872      IFS="$IFS_save"
23873    else
23874      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23875$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23876      new_path="$path"
23877    fi
23878
23879    if test "x$new_path" = x; then
23880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23881$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23882        has_space=`$ECHO "$complete" | $GREP " "`
23883        if test "x$has_space" != x; then
23884          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23885$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23886        fi
23887        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23888      fi
23889  fi
23890
23891      # Now join together the path and the arguments once again
23892      if test "x$arguments" != xEOL; then
23893        new_complete="$new_path ${arguments% *}"
23894      else
23895        new_complete="$new_path"
23896      fi
23897
23898  if test "x$complete" != "x$new_complete"; then
23899      CPP="$new_complete"
23900      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23901$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23902    fi
23903
23904
23905ac_ext=cpp
23906ac_cpp='$CXXCPP $CPPFLAGS'
23907ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23908ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23909ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23911$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23912if test -z "$CXXCPP"; then
23913  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23914  $as_echo_n "(cached) " >&6
23915else
23916      # Double quotes because CXXCPP needs to be expanded
23917    for CXXCPP in "$CXX -E" "/lib/cpp"
23918    do
23919      ac_preproc_ok=false
23920for ac_cxx_preproc_warn_flag in '' yes
23921do
23922  # Use a header file that comes with gcc, so configuring glibc
23923  # with a fresh cross-compiler works.
23924  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23925  # <limits.h> exists even on freestanding compilers.
23926  # On the NeXT, cc -E runs the code through the compiler's parser,
23927  # not just through cpp. "Syntax error" is here to catch this case.
23928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23929/* end confdefs.h.  */
23930#ifdef __STDC__
23931# include <limits.h>
23932#else
23933# include <assert.h>
23934#endif
23935		     Syntax error
23936_ACEOF
23937if ac_fn_cxx_try_cpp "$LINENO"; then :
23938
23939else
23940  # Broken: fails on valid input.
23941continue
23942fi
23943rm -f conftest.err conftest.i conftest.$ac_ext
23944
23945  # OK, works on sane cases.  Now check whether nonexistent headers
23946  # can be detected and how.
23947  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23948/* end confdefs.h.  */
23949#include <ac_nonexistent.h>
23950_ACEOF
23951if ac_fn_cxx_try_cpp "$LINENO"; then :
23952  # Broken: success on invalid input.
23953continue
23954else
23955  # Passes both tests.
23956ac_preproc_ok=:
23957break
23958fi
23959rm -f conftest.err conftest.i conftest.$ac_ext
23960
23961done
23962# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23963rm -f conftest.i conftest.err conftest.$ac_ext
23964if $ac_preproc_ok; then :
23965  break
23966fi
23967
23968    done
23969    ac_cv_prog_CXXCPP=$CXXCPP
23970
23971fi
23972  CXXCPP=$ac_cv_prog_CXXCPP
23973else
23974  ac_cv_prog_CXXCPP=$CXXCPP
23975fi
23976{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23977$as_echo "$CXXCPP" >&6; }
23978ac_preproc_ok=false
23979for ac_cxx_preproc_warn_flag in '' yes
23980do
23981  # Use a header file that comes with gcc, so configuring glibc
23982  # with a fresh cross-compiler works.
23983  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23984  # <limits.h> exists even on freestanding compilers.
23985  # On the NeXT, cc -E runs the code through the compiler's parser,
23986  # not just through cpp. "Syntax error" is here to catch this case.
23987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23988/* end confdefs.h.  */
23989#ifdef __STDC__
23990# include <limits.h>
23991#else
23992# include <assert.h>
23993#endif
23994		     Syntax error
23995_ACEOF
23996if ac_fn_cxx_try_cpp "$LINENO"; then :
23997
23998else
23999  # Broken: fails on valid input.
24000continue
24001fi
24002rm -f conftest.err conftest.i conftest.$ac_ext
24003
24004  # OK, works on sane cases.  Now check whether nonexistent headers
24005  # can be detected and how.
24006  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24007/* end confdefs.h.  */
24008#include <ac_nonexistent.h>
24009_ACEOF
24010if ac_fn_cxx_try_cpp "$LINENO"; then :
24011  # Broken: success on invalid input.
24012continue
24013else
24014  # Passes both tests.
24015ac_preproc_ok=:
24016break
24017fi
24018rm -f conftest.err conftest.i conftest.$ac_ext
24019
24020done
24021# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24022rm -f conftest.i conftest.err conftest.$ac_ext
24023if $ac_preproc_ok; then :
24024
24025else
24026  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24028as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24029See \`config.log' for more details" "$LINENO" 5 ; }
24030fi
24031
24032ac_ext=cpp
24033ac_cpp='$CXXCPP $CPPFLAGS'
24034ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24035ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24036ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24037
24038
24039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24040
24041  # First separate the path from the arguments. This will split at the first
24042  # space.
24043  complete="$CXXCPP"
24044  path="${complete%% *}"
24045  tmp="$complete EOL"
24046  arguments="${tmp#* }"
24047
24048  # Input might be given as Windows format, start by converting to
24049  # unix format.
24050  new_path=`$CYGPATH -u "$path"`
24051
24052  # Now try to locate executable using which
24053  new_path=`$WHICH "$new_path" 2> /dev/null`
24054  # bat and cmd files are not always considered executable in cygwin causing which
24055  # to not find them
24056  if test "x$new_path" = x \
24057           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24058           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24059    new_path=`$CYGPATH -u "$path"`
24060  fi
24061  if test "x$new_path" = x; then
24062    # Oops. Which didn't find the executable.
24063    # The splitting of arguments from the executable at a space might have been incorrect,
24064    # since paths with space are more likely in Windows. Give it another try with the whole
24065    # argument.
24066    path="$complete"
24067    arguments="EOL"
24068    new_path=`$CYGPATH -u "$path"`
24069    new_path=`$WHICH "$new_path" 2> /dev/null`
24070    # bat and cmd files are not always considered executable in cygwin causing which
24071    # to not find them
24072    if test "x$new_path" = x \
24073             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24074             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24075      new_path=`$CYGPATH -u "$path"`
24076    fi
24077    if test "x$new_path" = x; then
24078      # It's still not found. Now this is an unrecoverable error.
24079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24080$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24081      has_space=`$ECHO "$complete" | $GREP " "`
24082      if test "x$has_space" != x; then
24083        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24084$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24085      fi
24086      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24087    fi
24088  fi
24089
24090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24093  # "foo.exe" is OK but "foo" is an error.
24094  #
24095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24096  # It is also a way to make sure we got the proper file name for the real test later on.
24097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24098  if test "x$test_shortpath" = x; then
24099    # Short path failed, file does not exist as specified.
24100    # Try adding .exe or .cmd
24101    if test -f "${new_path}.exe"; then
24102       input_to_shortpath="${new_path}.exe"
24103    elif test -f "${new_path}.cmd"; then
24104       input_to_shortpath="${new_path}.cmd"
24105    else
24106      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24107$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24108      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24109$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24110      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24111    fi
24112  else
24113    input_to_shortpath="$new_path"
24114  fi
24115
24116  # Call helper function which possibly converts this using DOS-style short mode.
24117  # If so, the updated path is stored in $new_path.
24118  new_path="$input_to_shortpath"
24119
24120  input_path="$input_to_shortpath"
24121  # Check if we need to convert this using DOS-style short mode. If the path
24122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24123  # take no chances and rewrite it.
24124  # Note: m4 eats our [], so we need to use [ and ] instead.
24125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24126  if test "x$has_forbidden_chars" != x; then
24127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24128    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24129    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24130    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24131      # Going to short mode and back again did indeed matter. Since short mode is
24132      # case insensitive, let's make it lowercase to improve readability.
24133      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24134      # Now convert it back to Unix-stile (cygpath)
24135      input_path=`$CYGPATH -u "$shortmode_path"`
24136      new_path="$input_path"
24137    fi
24138  fi
24139
24140  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24141  if test "x$test_cygdrive_prefix" = x; then
24142    # As a simple fix, exclude /usr/bin since it's not a real path.
24143    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24144      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24145      # a path prefixed by /cygdrive for fixpath to work.
24146      new_path="$CYGWIN_ROOT_PATH$input_path"
24147    fi
24148  fi
24149
24150  # remove trailing .exe if any
24151  new_path="${new_path/%.exe/}"
24152
24153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24154
24155  # First separate the path from the arguments. This will split at the first
24156  # space.
24157  complete="$CXXCPP"
24158  path="${complete%% *}"
24159  tmp="$complete EOL"
24160  arguments="${tmp#* }"
24161
24162  # Input might be given as Windows format, start by converting to
24163  # unix format.
24164  new_path="$path"
24165
24166  windows_path="$new_path"
24167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24168    unix_path=`$CYGPATH -u "$windows_path"`
24169    new_path="$unix_path"
24170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24172    new_path="$unix_path"
24173  fi
24174
24175
24176  # Now try to locate executable using which
24177  new_path=`$WHICH "$new_path" 2> /dev/null`
24178
24179  if test "x$new_path" = x; then
24180    # Oops. Which didn't find the executable.
24181    # The splitting of arguments from the executable at a space might have been incorrect,
24182    # since paths with space are more likely in Windows. Give it another try with the whole
24183    # argument.
24184    path="$complete"
24185    arguments="EOL"
24186    new_path="$path"
24187
24188  windows_path="$new_path"
24189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24190    unix_path=`$CYGPATH -u "$windows_path"`
24191    new_path="$unix_path"
24192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24194    new_path="$unix_path"
24195  fi
24196
24197
24198    new_path=`$WHICH "$new_path" 2> /dev/null`
24199
24200    if test "x$new_path" = x; then
24201      # It's still not found. Now this is an unrecoverable error.
24202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24203$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24204      has_space=`$ECHO "$complete" | $GREP " "`
24205      if test "x$has_space" != x; then
24206        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24207$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24208      fi
24209      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24210    fi
24211  fi
24212
24213  # Now new_path has a complete unix path to the binary
24214  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24215    # Keep paths in /bin as-is, but remove trailing .exe if any
24216    new_path="${new_path/%.exe/}"
24217    # Do not save /bin paths to all_fixpath_prefixes!
24218  else
24219    # Not in mixed or Windows style, start by that.
24220    new_path=`cmd //c echo $new_path`
24221
24222  input_path="$new_path"
24223  # Check if we need to convert this using DOS-style short mode. If the path
24224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24225  # take no chances and rewrite it.
24226  # Note: m4 eats our [], so we need to use [ and ] instead.
24227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24228  if test "x$has_forbidden_chars" != x; then
24229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24230    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24231  fi
24232
24233    # Output is in $new_path
24234
24235  windows_path="$new_path"
24236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24237    unix_path=`$CYGPATH -u "$windows_path"`
24238    new_path="$unix_path"
24239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24241    new_path="$unix_path"
24242  fi
24243
24244    # remove trailing .exe if any
24245    new_path="${new_path/%.exe/}"
24246
24247    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24248    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24249  fi
24250
24251  else
24252    # We're on a posix platform. Hooray! :)
24253    # First separate the path from the arguments. This will split at the first
24254    # space.
24255    complete="$CXXCPP"
24256    path="${complete%% *}"
24257    tmp="$complete EOL"
24258    arguments="${tmp#* }"
24259
24260    # Cannot rely on the command "which" here since it doesn't always work.
24261    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24262    if test -z "$is_absolute_path"; then
24263      # Path to executable is not absolute. Find it.
24264      IFS_save="$IFS"
24265      IFS=:
24266      for p in $PATH; do
24267        if test -f "$p/$path" && test -x "$p/$path"; then
24268          new_path="$p/$path"
24269          break
24270        fi
24271      done
24272      IFS="$IFS_save"
24273    else
24274      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24275$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24276      new_path="$path"
24277    fi
24278
24279    if test "x$new_path" = x; then
24280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24281$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24282        has_space=`$ECHO "$complete" | $GREP " "`
24283        if test "x$has_space" != x; then
24284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24286        fi
24287        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24288      fi
24289  fi
24290
24291      # Now join together the path and the arguments once again
24292      if test "x$arguments" != xEOL; then
24293        new_complete="$new_path ${arguments% *}"
24294      else
24295        new_complete="$new_path"
24296      fi
24297
24298  if test "x$complete" != "x$new_complete"; then
24299      CXXCPP="$new_complete"
24300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24301$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24302    fi
24303
24304
24305if test "x$COMPILE_TYPE" != "xcross"; then
24306    # If we are not cross compiling, use the same compilers for
24307    # building the build platform executables. The cross-compilation
24308    # case needed to be done earlier, but this can only be done after
24309    # the native tools have been localized.
24310    BUILD_CC="$CC"
24311    BUILD_CXX="$CXX"
24312    BUILD_LD="$LD"
24313fi
24314
24315# for solaris we really need solaris tools, and not gnu equivalent
24316#   these seems to normally reside in /usr/ccs/bin so add that to path before
24317#   starting to probe
24318#
24319#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24320#         so that it can be overriden --with-tools-dir
24321if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24322    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24323fi
24324
24325# Find the right assembler.
24326if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24327    # Extract the first word of "as", so it can be a program name with args.
24328set dummy as; ac_word=$2
24329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24330$as_echo_n "checking for $ac_word... " >&6; }
24331if test "${ac_cv_path_AS+set}" = set; then :
24332  $as_echo_n "(cached) " >&6
24333else
24334  case $AS in
24335  [\\/]* | ?:[\\/]*)
24336  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24337  ;;
24338  *)
24339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24340for as_dir in $PATH
24341do
24342  IFS=$as_save_IFS
24343  test -z "$as_dir" && as_dir=.
24344    for ac_exec_ext in '' $ac_executable_extensions; do
24345  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24346    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24348    break 2
24349  fi
24350done
24351  done
24352IFS=$as_save_IFS
24353
24354  ;;
24355esac
24356fi
24357AS=$ac_cv_path_AS
24358if test -n "$AS"; then
24359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24360$as_echo "$AS" >&6; }
24361else
24362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24363$as_echo "no" >&6; }
24364fi
24365
24366
24367
24368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24369
24370  # First separate the path from the arguments. This will split at the first
24371  # space.
24372  complete="$AS"
24373  path="${complete%% *}"
24374  tmp="$complete EOL"
24375  arguments="${tmp#* }"
24376
24377  # Input might be given as Windows format, start by converting to
24378  # unix format.
24379  new_path=`$CYGPATH -u "$path"`
24380
24381  # Now try to locate executable using which
24382  new_path=`$WHICH "$new_path" 2> /dev/null`
24383  # bat and cmd files are not always considered executable in cygwin causing which
24384  # to not find them
24385  if test "x$new_path" = x \
24386           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24387           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24388    new_path=`$CYGPATH -u "$path"`
24389  fi
24390  if test "x$new_path" = x; then
24391    # Oops. Which didn't find the executable.
24392    # The splitting of arguments from the executable at a space might have been incorrect,
24393    # since paths with space are more likely in Windows. Give it another try with the whole
24394    # argument.
24395    path="$complete"
24396    arguments="EOL"
24397    new_path=`$CYGPATH -u "$path"`
24398    new_path=`$WHICH "$new_path" 2> /dev/null`
24399    # bat and cmd files are not always considered executable in cygwin causing which
24400    # to not find them
24401    if test "x$new_path" = x \
24402             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24403             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24404      new_path=`$CYGPATH -u "$path"`
24405    fi
24406    if test "x$new_path" = x; then
24407      # It's still not found. Now this is an unrecoverable error.
24408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24409$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24410      has_space=`$ECHO "$complete" | $GREP " "`
24411      if test "x$has_space" != x; then
24412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24414      fi
24415      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24416    fi
24417  fi
24418
24419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24422  # "foo.exe" is OK but "foo" is an error.
24423  #
24424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24425  # It is also a way to make sure we got the proper file name for the real test later on.
24426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24427  if test "x$test_shortpath" = x; then
24428    # Short path failed, file does not exist as specified.
24429    # Try adding .exe or .cmd
24430    if test -f "${new_path}.exe"; then
24431       input_to_shortpath="${new_path}.exe"
24432    elif test -f "${new_path}.cmd"; then
24433       input_to_shortpath="${new_path}.cmd"
24434    else
24435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24436$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24437      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24438$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24439      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24440    fi
24441  else
24442    input_to_shortpath="$new_path"
24443  fi
24444
24445  # Call helper function which possibly converts this using DOS-style short mode.
24446  # If so, the updated path is stored in $new_path.
24447  new_path="$input_to_shortpath"
24448
24449  input_path="$input_to_shortpath"
24450  # Check if we need to convert this using DOS-style short mode. If the path
24451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24452  # take no chances and rewrite it.
24453  # Note: m4 eats our [], so we need to use [ and ] instead.
24454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24455  if test "x$has_forbidden_chars" != x; then
24456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24460      # Going to short mode and back again did indeed matter. Since short mode is
24461      # case insensitive, let's make it lowercase to improve readability.
24462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24463      # Now convert it back to Unix-stile (cygpath)
24464      input_path=`$CYGPATH -u "$shortmode_path"`
24465      new_path="$input_path"
24466    fi
24467  fi
24468
24469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24470  if test "x$test_cygdrive_prefix" = x; then
24471    # As a simple fix, exclude /usr/bin since it's not a real path.
24472    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24474      # a path prefixed by /cygdrive for fixpath to work.
24475      new_path="$CYGWIN_ROOT_PATH$input_path"
24476    fi
24477  fi
24478
24479  # remove trailing .exe if any
24480  new_path="${new_path/%.exe/}"
24481
24482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24483
24484  # First separate the path from the arguments. This will split at the first
24485  # space.
24486  complete="$AS"
24487  path="${complete%% *}"
24488  tmp="$complete EOL"
24489  arguments="${tmp#* }"
24490
24491  # Input might be given as Windows format, start by converting to
24492  # unix format.
24493  new_path="$path"
24494
24495  windows_path="$new_path"
24496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24497    unix_path=`$CYGPATH -u "$windows_path"`
24498    new_path="$unix_path"
24499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24501    new_path="$unix_path"
24502  fi
24503
24504
24505  # Now try to locate executable using which
24506  new_path=`$WHICH "$new_path" 2> /dev/null`
24507
24508  if test "x$new_path" = x; then
24509    # Oops. Which didn't find the executable.
24510    # The splitting of arguments from the executable at a space might have been incorrect,
24511    # since paths with space are more likely in Windows. Give it another try with the whole
24512    # argument.
24513    path="$complete"
24514    arguments="EOL"
24515    new_path="$path"
24516
24517  windows_path="$new_path"
24518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24519    unix_path=`$CYGPATH -u "$windows_path"`
24520    new_path="$unix_path"
24521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24523    new_path="$unix_path"
24524  fi
24525
24526
24527    new_path=`$WHICH "$new_path" 2> /dev/null`
24528
24529    if test "x$new_path" = x; then
24530      # It's still not found. Now this is an unrecoverable error.
24531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24532$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24533      has_space=`$ECHO "$complete" | $GREP " "`
24534      if test "x$has_space" != x; then
24535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24537      fi
24538      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24539    fi
24540  fi
24541
24542  # Now new_path has a complete unix path to the binary
24543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24544    # Keep paths in /bin as-is, but remove trailing .exe if any
24545    new_path="${new_path/%.exe/}"
24546    # Do not save /bin paths to all_fixpath_prefixes!
24547  else
24548    # Not in mixed or Windows style, start by that.
24549    new_path=`cmd //c echo $new_path`
24550
24551  input_path="$new_path"
24552  # Check if we need to convert this using DOS-style short mode. If the path
24553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24554  # take no chances and rewrite it.
24555  # Note: m4 eats our [], so we need to use [ and ] instead.
24556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24557  if test "x$has_forbidden_chars" != x; then
24558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24560  fi
24561
24562    # Output is in $new_path
24563
24564  windows_path="$new_path"
24565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24566    unix_path=`$CYGPATH -u "$windows_path"`
24567    new_path="$unix_path"
24568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24570    new_path="$unix_path"
24571  fi
24572
24573    # remove trailing .exe if any
24574    new_path="${new_path/%.exe/}"
24575
24576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24578  fi
24579
24580  else
24581    # We're on a posix platform. Hooray! :)
24582    # First separate the path from the arguments. This will split at the first
24583    # space.
24584    complete="$AS"
24585    path="${complete%% *}"
24586    tmp="$complete EOL"
24587    arguments="${tmp#* }"
24588
24589    # Cannot rely on the command "which" here since it doesn't always work.
24590    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24591    if test -z "$is_absolute_path"; then
24592      # Path to executable is not absolute. Find it.
24593      IFS_save="$IFS"
24594      IFS=:
24595      for p in $PATH; do
24596        if test -f "$p/$path" && test -x "$p/$path"; then
24597          new_path="$p/$path"
24598          break
24599        fi
24600      done
24601      IFS="$IFS_save"
24602    else
24603      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24604$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24605      new_path="$path"
24606    fi
24607
24608    if test "x$new_path" = x; then
24609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24610$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24611        has_space=`$ECHO "$complete" | $GREP " "`
24612        if test "x$has_space" != x; then
24613          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24615        fi
24616        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24617      fi
24618  fi
24619
24620      # Now join together the path and the arguments once again
24621      if test "x$arguments" != xEOL; then
24622        new_complete="$new_path ${arguments% *}"
24623      else
24624        new_complete="$new_path"
24625      fi
24626
24627  if test "x$complete" != "x$new_complete"; then
24628      AS="$new_complete"
24629      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24630$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24631    fi
24632
24633else
24634    AS="$CC -c"
24635fi
24636
24637
24638if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24639    for ac_prog in gnm nm
24640do
24641  # Extract the first word of "$ac_prog", so it can be a program name with args.
24642set dummy $ac_prog; ac_word=$2
24643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24644$as_echo_n "checking for $ac_word... " >&6; }
24645if test "${ac_cv_path_NM+set}" = set; then :
24646  $as_echo_n "(cached) " >&6
24647else
24648  case $NM in
24649  [\\/]* | ?:[\\/]*)
24650  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24651  ;;
24652  *)
24653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24654for as_dir in $PATH
24655do
24656  IFS=$as_save_IFS
24657  test -z "$as_dir" && as_dir=.
24658    for ac_exec_ext in '' $ac_executable_extensions; do
24659  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24660    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24662    break 2
24663  fi
24664done
24665  done
24666IFS=$as_save_IFS
24667
24668  ;;
24669esac
24670fi
24671NM=$ac_cv_path_NM
24672if test -n "$NM"; then
24673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24674$as_echo "$NM" >&6; }
24675else
24676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24677$as_echo "no" >&6; }
24678fi
24679
24680
24681  test -n "$NM" && break
24682done
24683
24684
24685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24686
24687  # First separate the path from the arguments. This will split at the first
24688  # space.
24689  complete="$NM"
24690  path="${complete%% *}"
24691  tmp="$complete EOL"
24692  arguments="${tmp#* }"
24693
24694  # Input might be given as Windows format, start by converting to
24695  # unix format.
24696  new_path=`$CYGPATH -u "$path"`
24697
24698  # Now try to locate executable using which
24699  new_path=`$WHICH "$new_path" 2> /dev/null`
24700  # bat and cmd files are not always considered executable in cygwin causing which
24701  # to not find them
24702  if test "x$new_path" = x \
24703           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24704           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24705    new_path=`$CYGPATH -u "$path"`
24706  fi
24707  if test "x$new_path" = x; then
24708    # Oops. Which didn't find the executable.
24709    # The splitting of arguments from the executable at a space might have been incorrect,
24710    # since paths with space are more likely in Windows. Give it another try with the whole
24711    # argument.
24712    path="$complete"
24713    arguments="EOL"
24714    new_path=`$CYGPATH -u "$path"`
24715    new_path=`$WHICH "$new_path" 2> /dev/null`
24716    # bat and cmd files are not always considered executable in cygwin causing which
24717    # to not find them
24718    if test "x$new_path" = x \
24719             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24720             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24721      new_path=`$CYGPATH -u "$path"`
24722    fi
24723    if test "x$new_path" = x; then
24724      # It's still not found. Now this is an unrecoverable error.
24725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24726$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24727      has_space=`$ECHO "$complete" | $GREP " "`
24728      if test "x$has_space" != x; then
24729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24731      fi
24732      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24733    fi
24734  fi
24735
24736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24739  # "foo.exe" is OK but "foo" is an error.
24740  #
24741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24742  # It is also a way to make sure we got the proper file name for the real test later on.
24743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24744  if test "x$test_shortpath" = x; then
24745    # Short path failed, file does not exist as specified.
24746    # Try adding .exe or .cmd
24747    if test -f "${new_path}.exe"; then
24748       input_to_shortpath="${new_path}.exe"
24749    elif test -f "${new_path}.cmd"; then
24750       input_to_shortpath="${new_path}.cmd"
24751    else
24752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24753$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24756      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24757    fi
24758  else
24759    input_to_shortpath="$new_path"
24760  fi
24761
24762  # Call helper function which possibly converts this using DOS-style short mode.
24763  # If so, the updated path is stored in $new_path.
24764  new_path="$input_to_shortpath"
24765
24766  input_path="$input_to_shortpath"
24767  # Check if we need to convert this using DOS-style short mode. If the path
24768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24769  # take no chances and rewrite it.
24770  # Note: m4 eats our [], so we need to use [ and ] instead.
24771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24772  if test "x$has_forbidden_chars" != x; then
24773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24777      # Going to short mode and back again did indeed matter. Since short mode is
24778      # case insensitive, let's make it lowercase to improve readability.
24779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24780      # Now convert it back to Unix-stile (cygpath)
24781      input_path=`$CYGPATH -u "$shortmode_path"`
24782      new_path="$input_path"
24783    fi
24784  fi
24785
24786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24787  if test "x$test_cygdrive_prefix" = x; then
24788    # As a simple fix, exclude /usr/bin since it's not a real path.
24789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24791      # a path prefixed by /cygdrive for fixpath to work.
24792      new_path="$CYGWIN_ROOT_PATH$input_path"
24793    fi
24794  fi
24795
24796  # remove trailing .exe if any
24797  new_path="${new_path/%.exe/}"
24798
24799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24800
24801  # First separate the path from the arguments. This will split at the first
24802  # space.
24803  complete="$NM"
24804  path="${complete%% *}"
24805  tmp="$complete EOL"
24806  arguments="${tmp#* }"
24807
24808  # Input might be given as Windows format, start by converting to
24809  # unix format.
24810  new_path="$path"
24811
24812  windows_path="$new_path"
24813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24814    unix_path=`$CYGPATH -u "$windows_path"`
24815    new_path="$unix_path"
24816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24818    new_path="$unix_path"
24819  fi
24820
24821
24822  # Now try to locate executable using which
24823  new_path=`$WHICH "$new_path" 2> /dev/null`
24824
24825  if test "x$new_path" = x; then
24826    # Oops. Which didn't find the executable.
24827    # The splitting of arguments from the executable at a space might have been incorrect,
24828    # since paths with space are more likely in Windows. Give it another try with the whole
24829    # argument.
24830    path="$complete"
24831    arguments="EOL"
24832    new_path="$path"
24833
24834  windows_path="$new_path"
24835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24836    unix_path=`$CYGPATH -u "$windows_path"`
24837    new_path="$unix_path"
24838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24840    new_path="$unix_path"
24841  fi
24842
24843
24844    new_path=`$WHICH "$new_path" 2> /dev/null`
24845
24846    if test "x$new_path" = x; then
24847      # It's still not found. Now this is an unrecoverable error.
24848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24849$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24850      has_space=`$ECHO "$complete" | $GREP " "`
24851      if test "x$has_space" != x; then
24852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24854      fi
24855      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24856    fi
24857  fi
24858
24859  # Now new_path has a complete unix path to the binary
24860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24861    # Keep paths in /bin as-is, but remove trailing .exe if any
24862    new_path="${new_path/%.exe/}"
24863    # Do not save /bin paths to all_fixpath_prefixes!
24864  else
24865    # Not in mixed or Windows style, start by that.
24866    new_path=`cmd //c echo $new_path`
24867
24868  input_path="$new_path"
24869  # Check if we need to convert this using DOS-style short mode. If the path
24870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24871  # take no chances and rewrite it.
24872  # Note: m4 eats our [], so we need to use [ and ] instead.
24873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24874  if test "x$has_forbidden_chars" != x; then
24875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24877  fi
24878
24879    # Output is in $new_path
24880
24881  windows_path="$new_path"
24882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24883    unix_path=`$CYGPATH -u "$windows_path"`
24884    new_path="$unix_path"
24885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24887    new_path="$unix_path"
24888  fi
24889
24890    # remove trailing .exe if any
24891    new_path="${new_path/%.exe/}"
24892
24893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24895  fi
24896
24897  else
24898    # We're on a posix platform. Hooray! :)
24899    # First separate the path from the arguments. This will split at the first
24900    # space.
24901    complete="$NM"
24902    path="${complete%% *}"
24903    tmp="$complete EOL"
24904    arguments="${tmp#* }"
24905
24906    # Cannot rely on the command "which" here since it doesn't always work.
24907    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24908    if test -z "$is_absolute_path"; then
24909      # Path to executable is not absolute. Find it.
24910      IFS_save="$IFS"
24911      IFS=:
24912      for p in $PATH; do
24913        if test -f "$p/$path" && test -x "$p/$path"; then
24914          new_path="$p/$path"
24915          break
24916        fi
24917      done
24918      IFS="$IFS_save"
24919    else
24920      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24921$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24922      new_path="$path"
24923    fi
24924
24925    if test "x$new_path" = x; then
24926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24927$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24928        has_space=`$ECHO "$complete" | $GREP " "`
24929        if test "x$has_space" != x; then
24930          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24931$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24932        fi
24933        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24934      fi
24935  fi
24936
24937      # Now join together the path and the arguments once again
24938      if test "x$arguments" != xEOL; then
24939        new_complete="$new_path ${arguments% *}"
24940      else
24941        new_complete="$new_path"
24942      fi
24943
24944  if test "x$complete" != "x$new_complete"; then
24945      NM="$new_complete"
24946      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24947$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24948    fi
24949
24950    # Extract the first word of "strip", so it can be a program name with args.
24951set dummy strip; ac_word=$2
24952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24953$as_echo_n "checking for $ac_word... " >&6; }
24954if test "${ac_cv_path_STRIP+set}" = set; then :
24955  $as_echo_n "(cached) " >&6
24956else
24957  case $STRIP in
24958  [\\/]* | ?:[\\/]*)
24959  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24960  ;;
24961  *)
24962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24963for as_dir in $PATH
24964do
24965  IFS=$as_save_IFS
24966  test -z "$as_dir" && as_dir=.
24967    for ac_exec_ext in '' $ac_executable_extensions; do
24968  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24969    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24971    break 2
24972  fi
24973done
24974  done
24975IFS=$as_save_IFS
24976
24977  ;;
24978esac
24979fi
24980STRIP=$ac_cv_path_STRIP
24981if test -n "$STRIP"; then
24982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24983$as_echo "$STRIP" >&6; }
24984else
24985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24986$as_echo "no" >&6; }
24987fi
24988
24989
24990
24991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24992
24993  # First separate the path from the arguments. This will split at the first
24994  # space.
24995  complete="$STRIP"
24996  path="${complete%% *}"
24997  tmp="$complete EOL"
24998  arguments="${tmp#* }"
24999
25000  # Input might be given as Windows format, start by converting to
25001  # unix format.
25002  new_path=`$CYGPATH -u "$path"`
25003
25004  # Now try to locate executable using which
25005  new_path=`$WHICH "$new_path" 2> /dev/null`
25006  # bat and cmd files are not always considered executable in cygwin causing which
25007  # to not find them
25008  if test "x$new_path" = x \
25009           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25010           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25011    new_path=`$CYGPATH -u "$path"`
25012  fi
25013  if test "x$new_path" = x; then
25014    # Oops. Which didn't find the executable.
25015    # The splitting of arguments from the executable at a space might have been incorrect,
25016    # since paths with space are more likely in Windows. Give it another try with the whole
25017    # argument.
25018    path="$complete"
25019    arguments="EOL"
25020    new_path=`$CYGPATH -u "$path"`
25021    new_path=`$WHICH "$new_path" 2> /dev/null`
25022    # bat and cmd files are not always considered executable in cygwin causing which
25023    # to not find them
25024    if test "x$new_path" = x \
25025             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25026             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25027      new_path=`$CYGPATH -u "$path"`
25028    fi
25029    if test "x$new_path" = x; then
25030      # It's still not found. Now this is an unrecoverable error.
25031      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25032$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25033      has_space=`$ECHO "$complete" | $GREP " "`
25034      if test "x$has_space" != x; then
25035        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25036$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25037      fi
25038      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25039    fi
25040  fi
25041
25042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25045  # "foo.exe" is OK but "foo" is an error.
25046  #
25047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25048  # It is also a way to make sure we got the proper file name for the real test later on.
25049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25050  if test "x$test_shortpath" = x; then
25051    # Short path failed, file does not exist as specified.
25052    # Try adding .exe or .cmd
25053    if test -f "${new_path}.exe"; then
25054       input_to_shortpath="${new_path}.exe"
25055    elif test -f "${new_path}.cmd"; then
25056       input_to_shortpath="${new_path}.cmd"
25057    else
25058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25059$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25060      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25061$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25062      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25063    fi
25064  else
25065    input_to_shortpath="$new_path"
25066  fi
25067
25068  # Call helper function which possibly converts this using DOS-style short mode.
25069  # If so, the updated path is stored in $new_path.
25070  new_path="$input_to_shortpath"
25071
25072  input_path="$input_to_shortpath"
25073  # Check if we need to convert this using DOS-style short mode. If the path
25074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25075  # take no chances and rewrite it.
25076  # Note: m4 eats our [], so we need to use [ and ] instead.
25077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25078  if test "x$has_forbidden_chars" != x; then
25079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25083      # Going to short mode and back again did indeed matter. Since short mode is
25084      # case insensitive, let's make it lowercase to improve readability.
25085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25086      # Now convert it back to Unix-stile (cygpath)
25087      input_path=`$CYGPATH -u "$shortmode_path"`
25088      new_path="$input_path"
25089    fi
25090  fi
25091
25092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25093  if test "x$test_cygdrive_prefix" = x; then
25094    # As a simple fix, exclude /usr/bin since it's not a real path.
25095    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25097      # a path prefixed by /cygdrive for fixpath to work.
25098      new_path="$CYGWIN_ROOT_PATH$input_path"
25099    fi
25100  fi
25101
25102  # remove trailing .exe if any
25103  new_path="${new_path/%.exe/}"
25104
25105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25106
25107  # First separate the path from the arguments. This will split at the first
25108  # space.
25109  complete="$STRIP"
25110  path="${complete%% *}"
25111  tmp="$complete EOL"
25112  arguments="${tmp#* }"
25113
25114  # Input might be given as Windows format, start by converting to
25115  # unix format.
25116  new_path="$path"
25117
25118  windows_path="$new_path"
25119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25120    unix_path=`$CYGPATH -u "$windows_path"`
25121    new_path="$unix_path"
25122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25124    new_path="$unix_path"
25125  fi
25126
25127
25128  # Now try to locate executable using which
25129  new_path=`$WHICH "$new_path" 2> /dev/null`
25130
25131  if test "x$new_path" = x; then
25132    # Oops. Which didn't find the executable.
25133    # The splitting of arguments from the executable at a space might have been incorrect,
25134    # since paths with space are more likely in Windows. Give it another try with the whole
25135    # argument.
25136    path="$complete"
25137    arguments="EOL"
25138    new_path="$path"
25139
25140  windows_path="$new_path"
25141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25142    unix_path=`$CYGPATH -u "$windows_path"`
25143    new_path="$unix_path"
25144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25146    new_path="$unix_path"
25147  fi
25148
25149
25150    new_path=`$WHICH "$new_path" 2> /dev/null`
25151
25152    if test "x$new_path" = x; then
25153      # It's still not found. Now this is an unrecoverable error.
25154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25155$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25156      has_space=`$ECHO "$complete" | $GREP " "`
25157      if test "x$has_space" != x; then
25158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25160      fi
25161      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25162    fi
25163  fi
25164
25165  # Now new_path has a complete unix path to the binary
25166  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25167    # Keep paths in /bin as-is, but remove trailing .exe if any
25168    new_path="${new_path/%.exe/}"
25169    # Do not save /bin paths to all_fixpath_prefixes!
25170  else
25171    # Not in mixed or Windows style, start by that.
25172    new_path=`cmd //c echo $new_path`
25173
25174  input_path="$new_path"
25175  # Check if we need to convert this using DOS-style short mode. If the path
25176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25177  # take no chances and rewrite it.
25178  # Note: m4 eats our [], so we need to use [ and ] instead.
25179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25180  if test "x$has_forbidden_chars" != x; then
25181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25183  fi
25184
25185    # Output is in $new_path
25186
25187  windows_path="$new_path"
25188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25189    unix_path=`$CYGPATH -u "$windows_path"`
25190    new_path="$unix_path"
25191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25193    new_path="$unix_path"
25194  fi
25195
25196    # remove trailing .exe if any
25197    new_path="${new_path/%.exe/}"
25198
25199    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25200    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25201  fi
25202
25203  else
25204    # We're on a posix platform. Hooray! :)
25205    # First separate the path from the arguments. This will split at the first
25206    # space.
25207    complete="$STRIP"
25208    path="${complete%% *}"
25209    tmp="$complete EOL"
25210    arguments="${tmp#* }"
25211
25212    # Cannot rely on the command "which" here since it doesn't always work.
25213    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25214    if test -z "$is_absolute_path"; then
25215      # Path to executable is not absolute. Find it.
25216      IFS_save="$IFS"
25217      IFS=:
25218      for p in $PATH; do
25219        if test -f "$p/$path" && test -x "$p/$path"; then
25220          new_path="$p/$path"
25221          break
25222        fi
25223      done
25224      IFS="$IFS_save"
25225    else
25226      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25227$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25228      new_path="$path"
25229    fi
25230
25231    if test "x$new_path" = x; then
25232        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25233$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25234        has_space=`$ECHO "$complete" | $GREP " "`
25235        if test "x$has_space" != x; then
25236          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25237$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25238        fi
25239        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25240      fi
25241  fi
25242
25243      # Now join together the path and the arguments once again
25244      if test "x$arguments" != xEOL; then
25245        new_complete="$new_path ${arguments% *}"
25246      else
25247        new_complete="$new_path"
25248      fi
25249
25250  if test "x$complete" != "x$new_complete"; then
25251      STRIP="$new_complete"
25252      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25253$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25254    fi
25255
25256    # Extract the first word of "mcs", so it can be a program name with args.
25257set dummy mcs; ac_word=$2
25258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25259$as_echo_n "checking for $ac_word... " >&6; }
25260if test "${ac_cv_path_MCS+set}" = set; then :
25261  $as_echo_n "(cached) " >&6
25262else
25263  case $MCS in
25264  [\\/]* | ?:[\\/]*)
25265  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25266  ;;
25267  *)
25268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25269for as_dir in $PATH
25270do
25271  IFS=$as_save_IFS
25272  test -z "$as_dir" && as_dir=.
25273    for ac_exec_ext in '' $ac_executable_extensions; do
25274  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25275    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25277    break 2
25278  fi
25279done
25280  done
25281IFS=$as_save_IFS
25282
25283  ;;
25284esac
25285fi
25286MCS=$ac_cv_path_MCS
25287if test -n "$MCS"; then
25288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25289$as_echo "$MCS" >&6; }
25290else
25291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25292$as_echo "no" >&6; }
25293fi
25294
25295
25296
25297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25298
25299  # First separate the path from the arguments. This will split at the first
25300  # space.
25301  complete="$MCS"
25302  path="${complete%% *}"
25303  tmp="$complete EOL"
25304  arguments="${tmp#* }"
25305
25306  # Input might be given as Windows format, start by converting to
25307  # unix format.
25308  new_path=`$CYGPATH -u "$path"`
25309
25310  # Now try to locate executable using which
25311  new_path=`$WHICH "$new_path" 2> /dev/null`
25312  # bat and cmd files are not always considered executable in cygwin causing which
25313  # to not find them
25314  if test "x$new_path" = x \
25315           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25316           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25317    new_path=`$CYGPATH -u "$path"`
25318  fi
25319  if test "x$new_path" = x; then
25320    # Oops. Which didn't find the executable.
25321    # The splitting of arguments from the executable at a space might have been incorrect,
25322    # since paths with space are more likely in Windows. Give it another try with the whole
25323    # argument.
25324    path="$complete"
25325    arguments="EOL"
25326    new_path=`$CYGPATH -u "$path"`
25327    new_path=`$WHICH "$new_path" 2> /dev/null`
25328    # bat and cmd files are not always considered executable in cygwin causing which
25329    # to not find them
25330    if test "x$new_path" = x \
25331             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25332             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25333      new_path=`$CYGPATH -u "$path"`
25334    fi
25335    if test "x$new_path" = x; then
25336      # It's still not found. Now this is an unrecoverable error.
25337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25338$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25339      has_space=`$ECHO "$complete" | $GREP " "`
25340      if test "x$has_space" != x; then
25341        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25342$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25343      fi
25344      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25345    fi
25346  fi
25347
25348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25351  # "foo.exe" is OK but "foo" is an error.
25352  #
25353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25354  # It is also a way to make sure we got the proper file name for the real test later on.
25355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25356  if test "x$test_shortpath" = x; then
25357    # Short path failed, file does not exist as specified.
25358    # Try adding .exe or .cmd
25359    if test -f "${new_path}.exe"; then
25360       input_to_shortpath="${new_path}.exe"
25361    elif test -f "${new_path}.cmd"; then
25362       input_to_shortpath="${new_path}.cmd"
25363    else
25364      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25365$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25366      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25367$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25368      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25369    fi
25370  else
25371    input_to_shortpath="$new_path"
25372  fi
25373
25374  # Call helper function which possibly converts this using DOS-style short mode.
25375  # If so, the updated path is stored in $new_path.
25376  new_path="$input_to_shortpath"
25377
25378  input_path="$input_to_shortpath"
25379  # Check if we need to convert this using DOS-style short mode. If the path
25380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25381  # take no chances and rewrite it.
25382  # Note: m4 eats our [], so we need to use [ and ] instead.
25383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25384  if test "x$has_forbidden_chars" != x; then
25385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25389      # Going to short mode and back again did indeed matter. Since short mode is
25390      # case insensitive, let's make it lowercase to improve readability.
25391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25392      # Now convert it back to Unix-stile (cygpath)
25393      input_path=`$CYGPATH -u "$shortmode_path"`
25394      new_path="$input_path"
25395    fi
25396  fi
25397
25398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25399  if test "x$test_cygdrive_prefix" = x; then
25400    # As a simple fix, exclude /usr/bin since it's not a real path.
25401    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25403      # a path prefixed by /cygdrive for fixpath to work.
25404      new_path="$CYGWIN_ROOT_PATH$input_path"
25405    fi
25406  fi
25407
25408  # remove trailing .exe if any
25409  new_path="${new_path/%.exe/}"
25410
25411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25412
25413  # First separate the path from the arguments. This will split at the first
25414  # space.
25415  complete="$MCS"
25416  path="${complete%% *}"
25417  tmp="$complete EOL"
25418  arguments="${tmp#* }"
25419
25420  # Input might be given as Windows format, start by converting to
25421  # unix format.
25422  new_path="$path"
25423
25424  windows_path="$new_path"
25425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25426    unix_path=`$CYGPATH -u "$windows_path"`
25427    new_path="$unix_path"
25428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25430    new_path="$unix_path"
25431  fi
25432
25433
25434  # Now try to locate executable using which
25435  new_path=`$WHICH "$new_path" 2> /dev/null`
25436
25437  if test "x$new_path" = x; then
25438    # Oops. Which didn't find the executable.
25439    # The splitting of arguments from the executable at a space might have been incorrect,
25440    # since paths with space are more likely in Windows. Give it another try with the whole
25441    # argument.
25442    path="$complete"
25443    arguments="EOL"
25444    new_path="$path"
25445
25446  windows_path="$new_path"
25447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25448    unix_path=`$CYGPATH -u "$windows_path"`
25449    new_path="$unix_path"
25450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25452    new_path="$unix_path"
25453  fi
25454
25455
25456    new_path=`$WHICH "$new_path" 2> /dev/null`
25457
25458    if test "x$new_path" = x; then
25459      # It's still not found. Now this is an unrecoverable error.
25460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25461$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25462      has_space=`$ECHO "$complete" | $GREP " "`
25463      if test "x$has_space" != x; then
25464        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25465$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25466      fi
25467      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25468    fi
25469  fi
25470
25471  # Now new_path has a complete unix path to the binary
25472  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25473    # Keep paths in /bin as-is, but remove trailing .exe if any
25474    new_path="${new_path/%.exe/}"
25475    # Do not save /bin paths to all_fixpath_prefixes!
25476  else
25477    # Not in mixed or Windows style, start by that.
25478    new_path=`cmd //c echo $new_path`
25479
25480  input_path="$new_path"
25481  # Check if we need to convert this using DOS-style short mode. If the path
25482  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25483  # take no chances and rewrite it.
25484  # Note: m4 eats our [], so we need to use [ and ] instead.
25485  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25486  if test "x$has_forbidden_chars" != x; then
25487    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25488    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25489  fi
25490
25491    # Output is in $new_path
25492
25493  windows_path="$new_path"
25494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25495    unix_path=`$CYGPATH -u "$windows_path"`
25496    new_path="$unix_path"
25497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25499    new_path="$unix_path"
25500  fi
25501
25502    # remove trailing .exe if any
25503    new_path="${new_path/%.exe/}"
25504
25505    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25506    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25507  fi
25508
25509  else
25510    # We're on a posix platform. Hooray! :)
25511    # First separate the path from the arguments. This will split at the first
25512    # space.
25513    complete="$MCS"
25514    path="${complete%% *}"
25515    tmp="$complete EOL"
25516    arguments="${tmp#* }"
25517
25518    # Cannot rely on the command "which" here since it doesn't always work.
25519    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25520    if test -z "$is_absolute_path"; then
25521      # Path to executable is not absolute. Find it.
25522      IFS_save="$IFS"
25523      IFS=:
25524      for p in $PATH; do
25525        if test -f "$p/$path" && test -x "$p/$path"; then
25526          new_path="$p/$path"
25527          break
25528        fi
25529      done
25530      IFS="$IFS_save"
25531    else
25532      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25533$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25534      new_path="$path"
25535    fi
25536
25537    if test "x$new_path" = x; then
25538        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25539$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25540        has_space=`$ECHO "$complete" | $GREP " "`
25541        if test "x$has_space" != x; then
25542          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25543$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25544        fi
25545        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25546      fi
25547  fi
25548
25549      # Now join together the path and the arguments once again
25550      if test "x$arguments" != xEOL; then
25551        new_complete="$new_path ${arguments% *}"
25552      else
25553        new_complete="$new_path"
25554      fi
25555
25556  if test "x$complete" != "x$new_complete"; then
25557      MCS="$new_complete"
25558      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25559$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25560    fi
25561
25562elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25563    if test -n "$ac_tool_prefix"; then
25564  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25565set dummy ${ac_tool_prefix}nm; ac_word=$2
25566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25567$as_echo_n "checking for $ac_word... " >&6; }
25568if test "${ac_cv_prog_NM+set}" = set; then :
25569  $as_echo_n "(cached) " >&6
25570else
25571  if test -n "$NM"; then
25572  ac_cv_prog_NM="$NM" # Let the user override the test.
25573else
25574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25575for as_dir in $PATH
25576do
25577  IFS=$as_save_IFS
25578  test -z "$as_dir" && as_dir=.
25579    for ac_exec_ext in '' $ac_executable_extensions; do
25580  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25581    ac_cv_prog_NM="${ac_tool_prefix}nm"
25582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25583    break 2
25584  fi
25585done
25586  done
25587IFS=$as_save_IFS
25588
25589fi
25590fi
25591NM=$ac_cv_prog_NM
25592if test -n "$NM"; then
25593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25594$as_echo "$NM" >&6; }
25595else
25596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25597$as_echo "no" >&6; }
25598fi
25599
25600
25601fi
25602if test -z "$ac_cv_prog_NM"; then
25603  ac_ct_NM=$NM
25604  # Extract the first word of "nm", so it can be a program name with args.
25605set dummy nm; ac_word=$2
25606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25607$as_echo_n "checking for $ac_word... " >&6; }
25608if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25609  $as_echo_n "(cached) " >&6
25610else
25611  if test -n "$ac_ct_NM"; then
25612  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25613else
25614as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25615for as_dir in $PATH
25616do
25617  IFS=$as_save_IFS
25618  test -z "$as_dir" && as_dir=.
25619    for ac_exec_ext in '' $ac_executable_extensions; do
25620  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25621    ac_cv_prog_ac_ct_NM="nm"
25622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25623    break 2
25624  fi
25625done
25626  done
25627IFS=$as_save_IFS
25628
25629fi
25630fi
25631ac_ct_NM=$ac_cv_prog_ac_ct_NM
25632if test -n "$ac_ct_NM"; then
25633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25634$as_echo "$ac_ct_NM" >&6; }
25635else
25636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25637$as_echo "no" >&6; }
25638fi
25639
25640  if test "x$ac_ct_NM" = x; then
25641    NM=""
25642  else
25643    case $cross_compiling:$ac_tool_warned in
25644yes:)
25645{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25646$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25647ac_tool_warned=yes ;;
25648esac
25649    NM=$ac_ct_NM
25650  fi
25651else
25652  NM="$ac_cv_prog_NM"
25653fi
25654
25655
25656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25657
25658  # First separate the path from the arguments. This will split at the first
25659  # space.
25660  complete="$NM"
25661  path="${complete%% *}"
25662  tmp="$complete EOL"
25663  arguments="${tmp#* }"
25664
25665  # Input might be given as Windows format, start by converting to
25666  # unix format.
25667  new_path=`$CYGPATH -u "$path"`
25668
25669  # Now try to locate executable using which
25670  new_path=`$WHICH "$new_path" 2> /dev/null`
25671  # bat and cmd files are not always considered executable in cygwin causing which
25672  # to not find them
25673  if test "x$new_path" = x \
25674           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25675           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25676    new_path=`$CYGPATH -u "$path"`
25677  fi
25678  if test "x$new_path" = x; then
25679    # Oops. Which didn't find the executable.
25680    # The splitting of arguments from the executable at a space might have been incorrect,
25681    # since paths with space are more likely in Windows. Give it another try with the whole
25682    # argument.
25683    path="$complete"
25684    arguments="EOL"
25685    new_path=`$CYGPATH -u "$path"`
25686    new_path=`$WHICH "$new_path" 2> /dev/null`
25687    # bat and cmd files are not always considered executable in cygwin causing which
25688    # to not find them
25689    if test "x$new_path" = x \
25690             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25691             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25692      new_path=`$CYGPATH -u "$path"`
25693    fi
25694    if test "x$new_path" = x; then
25695      # It's still not found. Now this is an unrecoverable error.
25696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25697$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25698      has_space=`$ECHO "$complete" | $GREP " "`
25699      if test "x$has_space" != x; then
25700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25702      fi
25703      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25704    fi
25705  fi
25706
25707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25710  # "foo.exe" is OK but "foo" is an error.
25711  #
25712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25713  # It is also a way to make sure we got the proper file name for the real test later on.
25714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25715  if test "x$test_shortpath" = x; then
25716    # Short path failed, file does not exist as specified.
25717    # Try adding .exe or .cmd
25718    if test -f "${new_path}.exe"; then
25719       input_to_shortpath="${new_path}.exe"
25720    elif test -f "${new_path}.cmd"; then
25721       input_to_shortpath="${new_path}.cmd"
25722    else
25723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25724$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25725      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25726$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25727      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25728    fi
25729  else
25730    input_to_shortpath="$new_path"
25731  fi
25732
25733  # Call helper function which possibly converts this using DOS-style short mode.
25734  # If so, the updated path is stored in $new_path.
25735  new_path="$input_to_shortpath"
25736
25737  input_path="$input_to_shortpath"
25738  # Check if we need to convert this using DOS-style short mode. If the path
25739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25740  # take no chances and rewrite it.
25741  # Note: m4 eats our [], so we need to use [ and ] instead.
25742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25743  if test "x$has_forbidden_chars" != x; then
25744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25748      # Going to short mode and back again did indeed matter. Since short mode is
25749      # case insensitive, let's make it lowercase to improve readability.
25750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25751      # Now convert it back to Unix-stile (cygpath)
25752      input_path=`$CYGPATH -u "$shortmode_path"`
25753      new_path="$input_path"
25754    fi
25755  fi
25756
25757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25758  if test "x$test_cygdrive_prefix" = x; then
25759    # As a simple fix, exclude /usr/bin since it's not a real path.
25760    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25762      # a path prefixed by /cygdrive for fixpath to work.
25763      new_path="$CYGWIN_ROOT_PATH$input_path"
25764    fi
25765  fi
25766
25767  # remove trailing .exe if any
25768  new_path="${new_path/%.exe/}"
25769
25770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25771
25772  # First separate the path from the arguments. This will split at the first
25773  # space.
25774  complete="$NM"
25775  path="${complete%% *}"
25776  tmp="$complete EOL"
25777  arguments="${tmp#* }"
25778
25779  # Input might be given as Windows format, start by converting to
25780  # unix format.
25781  new_path="$path"
25782
25783  windows_path="$new_path"
25784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25785    unix_path=`$CYGPATH -u "$windows_path"`
25786    new_path="$unix_path"
25787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25789    new_path="$unix_path"
25790  fi
25791
25792
25793  # Now try to locate executable using which
25794  new_path=`$WHICH "$new_path" 2> /dev/null`
25795
25796  if test "x$new_path" = x; then
25797    # Oops. Which didn't find the executable.
25798    # The splitting of arguments from the executable at a space might have been incorrect,
25799    # since paths with space are more likely in Windows. Give it another try with the whole
25800    # argument.
25801    path="$complete"
25802    arguments="EOL"
25803    new_path="$path"
25804
25805  windows_path="$new_path"
25806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25807    unix_path=`$CYGPATH -u "$windows_path"`
25808    new_path="$unix_path"
25809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25811    new_path="$unix_path"
25812  fi
25813
25814
25815    new_path=`$WHICH "$new_path" 2> /dev/null`
25816
25817    if test "x$new_path" = x; then
25818      # It's still not found. Now this is an unrecoverable error.
25819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25820$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25821      has_space=`$ECHO "$complete" | $GREP " "`
25822      if test "x$has_space" != x; then
25823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25825      fi
25826      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25827    fi
25828  fi
25829
25830  # Now new_path has a complete unix path to the binary
25831  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25832    # Keep paths in /bin as-is, but remove trailing .exe if any
25833    new_path="${new_path/%.exe/}"
25834    # Do not save /bin paths to all_fixpath_prefixes!
25835  else
25836    # Not in mixed or Windows style, start by that.
25837    new_path=`cmd //c echo $new_path`
25838
25839  input_path="$new_path"
25840  # Check if we need to convert this using DOS-style short mode. If the path
25841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25842  # take no chances and rewrite it.
25843  # Note: m4 eats our [], so we need to use [ and ] instead.
25844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25845  if test "x$has_forbidden_chars" != x; then
25846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25848  fi
25849
25850    # Output is in $new_path
25851
25852  windows_path="$new_path"
25853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25854    unix_path=`$CYGPATH -u "$windows_path"`
25855    new_path="$unix_path"
25856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25858    new_path="$unix_path"
25859  fi
25860
25861    # remove trailing .exe if any
25862    new_path="${new_path/%.exe/}"
25863
25864    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25865    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25866  fi
25867
25868  else
25869    # We're on a posix platform. Hooray! :)
25870    # First separate the path from the arguments. This will split at the first
25871    # space.
25872    complete="$NM"
25873    path="${complete%% *}"
25874    tmp="$complete EOL"
25875    arguments="${tmp#* }"
25876
25877    # Cannot rely on the command "which" here since it doesn't always work.
25878    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25879    if test -z "$is_absolute_path"; then
25880      # Path to executable is not absolute. Find it.
25881      IFS_save="$IFS"
25882      IFS=:
25883      for p in $PATH; do
25884        if test -f "$p/$path" && test -x "$p/$path"; then
25885          new_path="$p/$path"
25886          break
25887        fi
25888      done
25889      IFS="$IFS_save"
25890    else
25891      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25892$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25893      new_path="$path"
25894    fi
25895
25896    if test "x$new_path" = x; then
25897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25898$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25899        has_space=`$ECHO "$complete" | $GREP " "`
25900        if test "x$has_space" != x; then
25901          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25902$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25903        fi
25904        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25905      fi
25906  fi
25907
25908      # Now join together the path and the arguments once again
25909      if test "x$arguments" != xEOL; then
25910        new_complete="$new_path ${arguments% *}"
25911      else
25912        new_complete="$new_path"
25913      fi
25914
25915  if test "x$complete" != "x$new_complete"; then
25916      NM="$new_complete"
25917      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25918$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25919    fi
25920
25921    if test -n "$ac_tool_prefix"; then
25922  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25923set dummy ${ac_tool_prefix}strip; ac_word=$2
25924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25925$as_echo_n "checking for $ac_word... " >&6; }
25926if test "${ac_cv_prog_STRIP+set}" = set; then :
25927  $as_echo_n "(cached) " >&6
25928else
25929  if test -n "$STRIP"; then
25930  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25931else
25932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25933for as_dir in $PATH
25934do
25935  IFS=$as_save_IFS
25936  test -z "$as_dir" && as_dir=.
25937    for ac_exec_ext in '' $ac_executable_extensions; do
25938  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25939    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25941    break 2
25942  fi
25943done
25944  done
25945IFS=$as_save_IFS
25946
25947fi
25948fi
25949STRIP=$ac_cv_prog_STRIP
25950if test -n "$STRIP"; then
25951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25952$as_echo "$STRIP" >&6; }
25953else
25954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25955$as_echo "no" >&6; }
25956fi
25957
25958
25959fi
25960if test -z "$ac_cv_prog_STRIP"; then
25961  ac_ct_STRIP=$STRIP
25962  # Extract the first word of "strip", so it can be a program name with args.
25963set dummy strip; ac_word=$2
25964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25965$as_echo_n "checking for $ac_word... " >&6; }
25966if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25967  $as_echo_n "(cached) " >&6
25968else
25969  if test -n "$ac_ct_STRIP"; then
25970  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25971else
25972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25973for as_dir in $PATH
25974do
25975  IFS=$as_save_IFS
25976  test -z "$as_dir" && as_dir=.
25977    for ac_exec_ext in '' $ac_executable_extensions; do
25978  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25979    ac_cv_prog_ac_ct_STRIP="strip"
25980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25981    break 2
25982  fi
25983done
25984  done
25985IFS=$as_save_IFS
25986
25987fi
25988fi
25989ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25990if test -n "$ac_ct_STRIP"; then
25991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25992$as_echo "$ac_ct_STRIP" >&6; }
25993else
25994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25995$as_echo "no" >&6; }
25996fi
25997
25998  if test "x$ac_ct_STRIP" = x; then
25999    STRIP=""
26000  else
26001    case $cross_compiling:$ac_tool_warned in
26002yes:)
26003{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26004$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26005ac_tool_warned=yes ;;
26006esac
26007    STRIP=$ac_ct_STRIP
26008  fi
26009else
26010  STRIP="$ac_cv_prog_STRIP"
26011fi
26012
26013
26014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26015
26016  # First separate the path from the arguments. This will split at the first
26017  # space.
26018  complete="$STRIP"
26019  path="${complete%% *}"
26020  tmp="$complete EOL"
26021  arguments="${tmp#* }"
26022
26023  # Input might be given as Windows format, start by converting to
26024  # unix format.
26025  new_path=`$CYGPATH -u "$path"`
26026
26027  # Now try to locate executable using which
26028  new_path=`$WHICH "$new_path" 2> /dev/null`
26029  # bat and cmd files are not always considered executable in cygwin causing which
26030  # to not find them
26031  if test "x$new_path" = x \
26032           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26033           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26034    new_path=`$CYGPATH -u "$path"`
26035  fi
26036  if test "x$new_path" = x; then
26037    # Oops. Which didn't find the executable.
26038    # The splitting of arguments from the executable at a space might have been incorrect,
26039    # since paths with space are more likely in Windows. Give it another try with the whole
26040    # argument.
26041    path="$complete"
26042    arguments="EOL"
26043    new_path=`$CYGPATH -u "$path"`
26044    new_path=`$WHICH "$new_path" 2> /dev/null`
26045    # bat and cmd files are not always considered executable in cygwin causing which
26046    # to not find them
26047    if test "x$new_path" = x \
26048             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26049             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26050      new_path=`$CYGPATH -u "$path"`
26051    fi
26052    if test "x$new_path" = x; then
26053      # It's still not found. Now this is an unrecoverable error.
26054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26055$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26056      has_space=`$ECHO "$complete" | $GREP " "`
26057      if test "x$has_space" != x; then
26058        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26060      fi
26061      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26062    fi
26063  fi
26064
26065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26068  # "foo.exe" is OK but "foo" is an error.
26069  #
26070  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26071  # It is also a way to make sure we got the proper file name for the real test later on.
26072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26073  if test "x$test_shortpath" = x; then
26074    # Short path failed, file does not exist as specified.
26075    # Try adding .exe or .cmd
26076    if test -f "${new_path}.exe"; then
26077       input_to_shortpath="${new_path}.exe"
26078    elif test -f "${new_path}.cmd"; then
26079       input_to_shortpath="${new_path}.cmd"
26080    else
26081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26082$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26083      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26084$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26085      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26086    fi
26087  else
26088    input_to_shortpath="$new_path"
26089  fi
26090
26091  # Call helper function which possibly converts this using DOS-style short mode.
26092  # If so, the updated path is stored in $new_path.
26093  new_path="$input_to_shortpath"
26094
26095  input_path="$input_to_shortpath"
26096  # Check if we need to convert this using DOS-style short mode. If the path
26097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26098  # take no chances and rewrite it.
26099  # Note: m4 eats our [], so we need to use [ and ] instead.
26100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26101  if test "x$has_forbidden_chars" != x; then
26102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26106      # Going to short mode and back again did indeed matter. Since short mode is
26107      # case insensitive, let's make it lowercase to improve readability.
26108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26109      # Now convert it back to Unix-stile (cygpath)
26110      input_path=`$CYGPATH -u "$shortmode_path"`
26111      new_path="$input_path"
26112    fi
26113  fi
26114
26115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26116  if test "x$test_cygdrive_prefix" = x; then
26117    # As a simple fix, exclude /usr/bin since it's not a real path.
26118    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26120      # a path prefixed by /cygdrive for fixpath to work.
26121      new_path="$CYGWIN_ROOT_PATH$input_path"
26122    fi
26123  fi
26124
26125  # remove trailing .exe if any
26126  new_path="${new_path/%.exe/}"
26127
26128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26129
26130  # First separate the path from the arguments. This will split at the first
26131  # space.
26132  complete="$STRIP"
26133  path="${complete%% *}"
26134  tmp="$complete EOL"
26135  arguments="${tmp#* }"
26136
26137  # Input might be given as Windows format, start by converting to
26138  # unix format.
26139  new_path="$path"
26140
26141  windows_path="$new_path"
26142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26143    unix_path=`$CYGPATH -u "$windows_path"`
26144    new_path="$unix_path"
26145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26147    new_path="$unix_path"
26148  fi
26149
26150
26151  # Now try to locate executable using which
26152  new_path=`$WHICH "$new_path" 2> /dev/null`
26153
26154  if test "x$new_path" = x; then
26155    # Oops. Which didn't find the executable.
26156    # The splitting of arguments from the executable at a space might have been incorrect,
26157    # since paths with space are more likely in Windows. Give it another try with the whole
26158    # argument.
26159    path="$complete"
26160    arguments="EOL"
26161    new_path="$path"
26162
26163  windows_path="$new_path"
26164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26165    unix_path=`$CYGPATH -u "$windows_path"`
26166    new_path="$unix_path"
26167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26169    new_path="$unix_path"
26170  fi
26171
26172
26173    new_path=`$WHICH "$new_path" 2> /dev/null`
26174
26175    if test "x$new_path" = x; then
26176      # It's still not found. Now this is an unrecoverable error.
26177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26178$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26179      has_space=`$ECHO "$complete" | $GREP " "`
26180      if test "x$has_space" != x; then
26181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26183      fi
26184      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26185    fi
26186  fi
26187
26188  # Now new_path has a complete unix path to the binary
26189  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26190    # Keep paths in /bin as-is, but remove trailing .exe if any
26191    new_path="${new_path/%.exe/}"
26192    # Do not save /bin paths to all_fixpath_prefixes!
26193  else
26194    # Not in mixed or Windows style, start by that.
26195    new_path=`cmd //c echo $new_path`
26196
26197  input_path="$new_path"
26198  # Check if we need to convert this using DOS-style short mode. If the path
26199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26200  # take no chances and rewrite it.
26201  # Note: m4 eats our [], so we need to use [ and ] instead.
26202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26203  if test "x$has_forbidden_chars" != x; then
26204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26206  fi
26207
26208    # Output is in $new_path
26209
26210  windows_path="$new_path"
26211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26212    unix_path=`$CYGPATH -u "$windows_path"`
26213    new_path="$unix_path"
26214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26216    new_path="$unix_path"
26217  fi
26218
26219    # remove trailing .exe if any
26220    new_path="${new_path/%.exe/}"
26221
26222    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26223    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26224  fi
26225
26226  else
26227    # We're on a posix platform. Hooray! :)
26228    # First separate the path from the arguments. This will split at the first
26229    # space.
26230    complete="$STRIP"
26231    path="${complete%% *}"
26232    tmp="$complete EOL"
26233    arguments="${tmp#* }"
26234
26235    # Cannot rely on the command "which" here since it doesn't always work.
26236    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26237    if test -z "$is_absolute_path"; then
26238      # Path to executable is not absolute. Find it.
26239      IFS_save="$IFS"
26240      IFS=:
26241      for p in $PATH; do
26242        if test -f "$p/$path" && test -x "$p/$path"; then
26243          new_path="$p/$path"
26244          break
26245        fi
26246      done
26247      IFS="$IFS_save"
26248    else
26249      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26250$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26251      new_path="$path"
26252    fi
26253
26254    if test "x$new_path" = x; then
26255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26256$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26257        has_space=`$ECHO "$complete" | $GREP " "`
26258        if test "x$has_space" != x; then
26259          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26260$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26261        fi
26262        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26263      fi
26264  fi
26265
26266      # Now join together the path and the arguments once again
26267      if test "x$arguments" != xEOL; then
26268        new_complete="$new_path ${arguments% *}"
26269      else
26270        new_complete="$new_path"
26271      fi
26272
26273  if test "x$complete" != "x$new_complete"; then
26274      STRIP="$new_complete"
26275      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26276$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26277    fi
26278
26279fi
26280
26281# objcopy is used for moving debug symbols to separate files when
26282# full debug symbols are enabled.
26283if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26284    if test -n "$ac_tool_prefix"; then
26285  for ac_prog in gobjcopy objcopy
26286  do
26287    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26288set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26290$as_echo_n "checking for $ac_word... " >&6; }
26291if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26292  $as_echo_n "(cached) " >&6
26293else
26294  if test -n "$OBJCOPY"; then
26295  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26296else
26297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26298for as_dir in $PATH
26299do
26300  IFS=$as_save_IFS
26301  test -z "$as_dir" && as_dir=.
26302    for ac_exec_ext in '' $ac_executable_extensions; do
26303  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26304    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26306    break 2
26307  fi
26308done
26309  done
26310IFS=$as_save_IFS
26311
26312fi
26313fi
26314OBJCOPY=$ac_cv_prog_OBJCOPY
26315if test -n "$OBJCOPY"; then
26316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26317$as_echo "$OBJCOPY" >&6; }
26318else
26319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26320$as_echo "no" >&6; }
26321fi
26322
26323
26324    test -n "$OBJCOPY" && break
26325  done
26326fi
26327if test -z "$OBJCOPY"; then
26328  ac_ct_OBJCOPY=$OBJCOPY
26329  for ac_prog in gobjcopy objcopy
26330do
26331  # Extract the first word of "$ac_prog", so it can be a program name with args.
26332set dummy $ac_prog; ac_word=$2
26333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26334$as_echo_n "checking for $ac_word... " >&6; }
26335if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26336  $as_echo_n "(cached) " >&6
26337else
26338  if test -n "$ac_ct_OBJCOPY"; then
26339  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26340else
26341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26342for as_dir in $PATH
26343do
26344  IFS=$as_save_IFS
26345  test -z "$as_dir" && as_dir=.
26346    for ac_exec_ext in '' $ac_executable_extensions; do
26347  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26348    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26350    break 2
26351  fi
26352done
26353  done
26354IFS=$as_save_IFS
26355
26356fi
26357fi
26358ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26359if test -n "$ac_ct_OBJCOPY"; then
26360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26361$as_echo "$ac_ct_OBJCOPY" >&6; }
26362else
26363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26364$as_echo "no" >&6; }
26365fi
26366
26367
26368  test -n "$ac_ct_OBJCOPY" && break
26369done
26370
26371  if test "x$ac_ct_OBJCOPY" = x; then
26372    OBJCOPY=""
26373  else
26374    case $cross_compiling:$ac_tool_warned in
26375yes:)
26376{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26377$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26378ac_tool_warned=yes ;;
26379esac
26380    OBJCOPY=$ac_ct_OBJCOPY
26381  fi
26382fi
26383
26384    # Only call fixup if objcopy was found.
26385    if test -n "$OBJCOPY"; then
26386
26387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26388
26389  # First separate the path from the arguments. This will split at the first
26390  # space.
26391  complete="$OBJCOPY"
26392  path="${complete%% *}"
26393  tmp="$complete EOL"
26394  arguments="${tmp#* }"
26395
26396  # Input might be given as Windows format, start by converting to
26397  # unix format.
26398  new_path=`$CYGPATH -u "$path"`
26399
26400  # Now try to locate executable using which
26401  new_path=`$WHICH "$new_path" 2> /dev/null`
26402  # bat and cmd files are not always considered executable in cygwin causing which
26403  # to not find them
26404  if test "x$new_path" = x \
26405           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26406           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26407    new_path=`$CYGPATH -u "$path"`
26408  fi
26409  if test "x$new_path" = x; then
26410    # Oops. Which didn't find the executable.
26411    # The splitting of arguments from the executable at a space might have been incorrect,
26412    # since paths with space are more likely in Windows. Give it another try with the whole
26413    # argument.
26414    path="$complete"
26415    arguments="EOL"
26416    new_path=`$CYGPATH -u "$path"`
26417    new_path=`$WHICH "$new_path" 2> /dev/null`
26418    # bat and cmd files are not always considered executable in cygwin causing which
26419    # to not find them
26420    if test "x$new_path" = x \
26421             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26422             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26423      new_path=`$CYGPATH -u "$path"`
26424    fi
26425    if test "x$new_path" = x; then
26426      # It's still not found. Now this is an unrecoverable error.
26427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26428$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26429      has_space=`$ECHO "$complete" | $GREP " "`
26430      if test "x$has_space" != x; then
26431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26433      fi
26434      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26435    fi
26436  fi
26437
26438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26441  # "foo.exe" is OK but "foo" is an error.
26442  #
26443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26444  # It is also a way to make sure we got the proper file name for the real test later on.
26445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26446  if test "x$test_shortpath" = x; then
26447    # Short path failed, file does not exist as specified.
26448    # Try adding .exe or .cmd
26449    if test -f "${new_path}.exe"; then
26450       input_to_shortpath="${new_path}.exe"
26451    elif test -f "${new_path}.cmd"; then
26452       input_to_shortpath="${new_path}.cmd"
26453    else
26454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26455$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26456      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26457$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26458      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26459    fi
26460  else
26461    input_to_shortpath="$new_path"
26462  fi
26463
26464  # Call helper function which possibly converts this using DOS-style short mode.
26465  # If so, the updated path is stored in $new_path.
26466  new_path="$input_to_shortpath"
26467
26468  input_path="$input_to_shortpath"
26469  # Check if we need to convert this using DOS-style short mode. If the path
26470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26471  # take no chances and rewrite it.
26472  # Note: m4 eats our [], so we need to use [ and ] instead.
26473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26474  if test "x$has_forbidden_chars" != x; then
26475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26479      # Going to short mode and back again did indeed matter. Since short mode is
26480      # case insensitive, let's make it lowercase to improve readability.
26481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26482      # Now convert it back to Unix-stile (cygpath)
26483      input_path=`$CYGPATH -u "$shortmode_path"`
26484      new_path="$input_path"
26485    fi
26486  fi
26487
26488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26489  if test "x$test_cygdrive_prefix" = x; then
26490    # As a simple fix, exclude /usr/bin since it's not a real path.
26491    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26493      # a path prefixed by /cygdrive for fixpath to work.
26494      new_path="$CYGWIN_ROOT_PATH$input_path"
26495    fi
26496  fi
26497
26498  # remove trailing .exe if any
26499  new_path="${new_path/%.exe/}"
26500
26501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26502
26503  # First separate the path from the arguments. This will split at the first
26504  # space.
26505  complete="$OBJCOPY"
26506  path="${complete%% *}"
26507  tmp="$complete EOL"
26508  arguments="${tmp#* }"
26509
26510  # Input might be given as Windows format, start by converting to
26511  # unix format.
26512  new_path="$path"
26513
26514  windows_path="$new_path"
26515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26516    unix_path=`$CYGPATH -u "$windows_path"`
26517    new_path="$unix_path"
26518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26520    new_path="$unix_path"
26521  fi
26522
26523
26524  # Now try to locate executable using which
26525  new_path=`$WHICH "$new_path" 2> /dev/null`
26526
26527  if test "x$new_path" = x; then
26528    # Oops. Which didn't find the executable.
26529    # The splitting of arguments from the executable at a space might have been incorrect,
26530    # since paths with space are more likely in Windows. Give it another try with the whole
26531    # argument.
26532    path="$complete"
26533    arguments="EOL"
26534    new_path="$path"
26535
26536  windows_path="$new_path"
26537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26538    unix_path=`$CYGPATH -u "$windows_path"`
26539    new_path="$unix_path"
26540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26542    new_path="$unix_path"
26543  fi
26544
26545
26546    new_path=`$WHICH "$new_path" 2> /dev/null`
26547
26548    if test "x$new_path" = x; then
26549      # It's still not found. Now this is an unrecoverable error.
26550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26551$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26552      has_space=`$ECHO "$complete" | $GREP " "`
26553      if test "x$has_space" != x; then
26554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26556      fi
26557      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26558    fi
26559  fi
26560
26561  # Now new_path has a complete unix path to the binary
26562  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26563    # Keep paths in /bin as-is, but remove trailing .exe if any
26564    new_path="${new_path/%.exe/}"
26565    # Do not save /bin paths to all_fixpath_prefixes!
26566  else
26567    # Not in mixed or Windows style, start by that.
26568    new_path=`cmd //c echo $new_path`
26569
26570  input_path="$new_path"
26571  # Check if we need to convert this using DOS-style short mode. If the path
26572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26573  # take no chances and rewrite it.
26574  # Note: m4 eats our [], so we need to use [ and ] instead.
26575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26576  if test "x$has_forbidden_chars" != x; then
26577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26579  fi
26580
26581    # Output is in $new_path
26582
26583  windows_path="$new_path"
26584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26585    unix_path=`$CYGPATH -u "$windows_path"`
26586    new_path="$unix_path"
26587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26589    new_path="$unix_path"
26590  fi
26591
26592    # remove trailing .exe if any
26593    new_path="${new_path/%.exe/}"
26594
26595    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26596    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26597  fi
26598
26599  else
26600    # We're on a posix platform. Hooray! :)
26601    # First separate the path from the arguments. This will split at the first
26602    # space.
26603    complete="$OBJCOPY"
26604    path="${complete%% *}"
26605    tmp="$complete EOL"
26606    arguments="${tmp#* }"
26607
26608    # Cannot rely on the command "which" here since it doesn't always work.
26609    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26610    if test -z "$is_absolute_path"; then
26611      # Path to executable is not absolute. Find it.
26612      IFS_save="$IFS"
26613      IFS=:
26614      for p in $PATH; do
26615        if test -f "$p/$path" && test -x "$p/$path"; then
26616          new_path="$p/$path"
26617          break
26618        fi
26619      done
26620      IFS="$IFS_save"
26621    else
26622      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26623$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26624      new_path="$path"
26625    fi
26626
26627    if test "x$new_path" = x; then
26628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26629$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26630        has_space=`$ECHO "$complete" | $GREP " "`
26631        if test "x$has_space" != x; then
26632          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26634        fi
26635        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26636      fi
26637  fi
26638
26639      # Now join together the path and the arguments once again
26640      if test "x$arguments" != xEOL; then
26641        new_complete="$new_path ${arguments% *}"
26642      else
26643        new_complete="$new_path"
26644      fi
26645
26646  if test "x$complete" != "x$new_complete"; then
26647      OBJCOPY="$new_complete"
26648      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26649$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26650    fi
26651
26652    fi
26653fi
26654
26655if test -n "$ac_tool_prefix"; then
26656  for ac_prog in gobjdump objdump
26657  do
26658    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26659set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26661$as_echo_n "checking for $ac_word... " >&6; }
26662if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26663  $as_echo_n "(cached) " >&6
26664else
26665  if test -n "$OBJDUMP"; then
26666  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26667else
26668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26669for as_dir in $PATH
26670do
26671  IFS=$as_save_IFS
26672  test -z "$as_dir" && as_dir=.
26673    for ac_exec_ext in '' $ac_executable_extensions; do
26674  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26675    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26677    break 2
26678  fi
26679done
26680  done
26681IFS=$as_save_IFS
26682
26683fi
26684fi
26685OBJDUMP=$ac_cv_prog_OBJDUMP
26686if test -n "$OBJDUMP"; then
26687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26688$as_echo "$OBJDUMP" >&6; }
26689else
26690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26691$as_echo "no" >&6; }
26692fi
26693
26694
26695    test -n "$OBJDUMP" && break
26696  done
26697fi
26698if test -z "$OBJDUMP"; then
26699  ac_ct_OBJDUMP=$OBJDUMP
26700  for ac_prog in gobjdump objdump
26701do
26702  # Extract the first word of "$ac_prog", so it can be a program name with args.
26703set dummy $ac_prog; ac_word=$2
26704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26705$as_echo_n "checking for $ac_word... " >&6; }
26706if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26707  $as_echo_n "(cached) " >&6
26708else
26709  if test -n "$ac_ct_OBJDUMP"; then
26710  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26711else
26712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26713for as_dir in $PATH
26714do
26715  IFS=$as_save_IFS
26716  test -z "$as_dir" && as_dir=.
26717    for ac_exec_ext in '' $ac_executable_extensions; do
26718  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26719    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26721    break 2
26722  fi
26723done
26724  done
26725IFS=$as_save_IFS
26726
26727fi
26728fi
26729ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26730if test -n "$ac_ct_OBJDUMP"; then
26731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26732$as_echo "$ac_ct_OBJDUMP" >&6; }
26733else
26734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26735$as_echo "no" >&6; }
26736fi
26737
26738
26739  test -n "$ac_ct_OBJDUMP" && break
26740done
26741
26742  if test "x$ac_ct_OBJDUMP" = x; then
26743    OBJDUMP=""
26744  else
26745    case $cross_compiling:$ac_tool_warned in
26746yes:)
26747{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26748$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26749ac_tool_warned=yes ;;
26750esac
26751    OBJDUMP=$ac_ct_OBJDUMP
26752  fi
26753fi
26754
26755if test "x$OBJDUMP" != x; then
26756  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26757
26758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26759
26760  # First separate the path from the arguments. This will split at the first
26761  # space.
26762  complete="$OBJDUMP"
26763  path="${complete%% *}"
26764  tmp="$complete EOL"
26765  arguments="${tmp#* }"
26766
26767  # Input might be given as Windows format, start by converting to
26768  # unix format.
26769  new_path=`$CYGPATH -u "$path"`
26770
26771  # Now try to locate executable using which
26772  new_path=`$WHICH "$new_path" 2> /dev/null`
26773  # bat and cmd files are not always considered executable in cygwin causing which
26774  # to not find them
26775  if test "x$new_path" = x \
26776           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26777           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26778    new_path=`$CYGPATH -u "$path"`
26779  fi
26780  if test "x$new_path" = x; then
26781    # Oops. Which didn't find the executable.
26782    # The splitting of arguments from the executable at a space might have been incorrect,
26783    # since paths with space are more likely in Windows. Give it another try with the whole
26784    # argument.
26785    path="$complete"
26786    arguments="EOL"
26787    new_path=`$CYGPATH -u "$path"`
26788    new_path=`$WHICH "$new_path" 2> /dev/null`
26789    # bat and cmd files are not always considered executable in cygwin causing which
26790    # to not find them
26791    if test "x$new_path" = x \
26792             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26793             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26794      new_path=`$CYGPATH -u "$path"`
26795    fi
26796    if test "x$new_path" = x; then
26797      # It's still not found. Now this is an unrecoverable error.
26798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26799$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26800      has_space=`$ECHO "$complete" | $GREP " "`
26801      if test "x$has_space" != x; then
26802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26804      fi
26805      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26806    fi
26807  fi
26808
26809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26812  # "foo.exe" is OK but "foo" is an error.
26813  #
26814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26815  # It is also a way to make sure we got the proper file name for the real test later on.
26816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26817  if test "x$test_shortpath" = x; then
26818    # Short path failed, file does not exist as specified.
26819    # Try adding .exe or .cmd
26820    if test -f "${new_path}.exe"; then
26821       input_to_shortpath="${new_path}.exe"
26822    elif test -f "${new_path}.cmd"; then
26823       input_to_shortpath="${new_path}.cmd"
26824    else
26825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26826$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26829      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26830    fi
26831  else
26832    input_to_shortpath="$new_path"
26833  fi
26834
26835  # Call helper function which possibly converts this using DOS-style short mode.
26836  # If so, the updated path is stored in $new_path.
26837  new_path="$input_to_shortpath"
26838
26839  input_path="$input_to_shortpath"
26840  # Check if we need to convert this using DOS-style short mode. If the path
26841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26842  # take no chances and rewrite it.
26843  # Note: m4 eats our [], so we need to use [ and ] instead.
26844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26845  if test "x$has_forbidden_chars" != x; then
26846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26850      # Going to short mode and back again did indeed matter. Since short mode is
26851      # case insensitive, let's make it lowercase to improve readability.
26852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26853      # Now convert it back to Unix-stile (cygpath)
26854      input_path=`$CYGPATH -u "$shortmode_path"`
26855      new_path="$input_path"
26856    fi
26857  fi
26858
26859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26860  if test "x$test_cygdrive_prefix" = x; then
26861    # As a simple fix, exclude /usr/bin since it's not a real path.
26862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26864      # a path prefixed by /cygdrive for fixpath to work.
26865      new_path="$CYGWIN_ROOT_PATH$input_path"
26866    fi
26867  fi
26868
26869  # remove trailing .exe if any
26870  new_path="${new_path/%.exe/}"
26871
26872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26873
26874  # First separate the path from the arguments. This will split at the first
26875  # space.
26876  complete="$OBJDUMP"
26877  path="${complete%% *}"
26878  tmp="$complete EOL"
26879  arguments="${tmp#* }"
26880
26881  # Input might be given as Windows format, start by converting to
26882  # unix format.
26883  new_path="$path"
26884
26885  windows_path="$new_path"
26886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26887    unix_path=`$CYGPATH -u "$windows_path"`
26888    new_path="$unix_path"
26889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26891    new_path="$unix_path"
26892  fi
26893
26894
26895  # Now try to locate executable using which
26896  new_path=`$WHICH "$new_path" 2> /dev/null`
26897
26898  if test "x$new_path" = x; then
26899    # Oops. Which didn't find the executable.
26900    # The splitting of arguments from the executable at a space might have been incorrect,
26901    # since paths with space are more likely in Windows. Give it another try with the whole
26902    # argument.
26903    path="$complete"
26904    arguments="EOL"
26905    new_path="$path"
26906
26907  windows_path="$new_path"
26908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26909    unix_path=`$CYGPATH -u "$windows_path"`
26910    new_path="$unix_path"
26911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26913    new_path="$unix_path"
26914  fi
26915
26916
26917    new_path=`$WHICH "$new_path" 2> /dev/null`
26918
26919    if test "x$new_path" = x; then
26920      # It's still not found. Now this is an unrecoverable error.
26921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26922$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26923      has_space=`$ECHO "$complete" | $GREP " "`
26924      if test "x$has_space" != x; then
26925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26927      fi
26928      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26929    fi
26930  fi
26931
26932  # Now new_path has a complete unix path to the binary
26933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26934    # Keep paths in /bin as-is, but remove trailing .exe if any
26935    new_path="${new_path/%.exe/}"
26936    # Do not save /bin paths to all_fixpath_prefixes!
26937  else
26938    # Not in mixed or Windows style, start by that.
26939    new_path=`cmd //c echo $new_path`
26940
26941  input_path="$new_path"
26942  # Check if we need to convert this using DOS-style short mode. If the path
26943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26944  # take no chances and rewrite it.
26945  # Note: m4 eats our [], so we need to use [ and ] instead.
26946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26947  if test "x$has_forbidden_chars" != x; then
26948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26950  fi
26951
26952    # Output is in $new_path
26953
26954  windows_path="$new_path"
26955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26956    unix_path=`$CYGPATH -u "$windows_path"`
26957    new_path="$unix_path"
26958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26960    new_path="$unix_path"
26961  fi
26962
26963    # remove trailing .exe if any
26964    new_path="${new_path/%.exe/}"
26965
26966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26968  fi
26969
26970  else
26971    # We're on a posix platform. Hooray! :)
26972    # First separate the path from the arguments. This will split at the first
26973    # space.
26974    complete="$OBJDUMP"
26975    path="${complete%% *}"
26976    tmp="$complete EOL"
26977    arguments="${tmp#* }"
26978
26979    # Cannot rely on the command "which" here since it doesn't always work.
26980    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26981    if test -z "$is_absolute_path"; then
26982      # Path to executable is not absolute. Find it.
26983      IFS_save="$IFS"
26984      IFS=:
26985      for p in $PATH; do
26986        if test -f "$p/$path" && test -x "$p/$path"; then
26987          new_path="$p/$path"
26988          break
26989        fi
26990      done
26991      IFS="$IFS_save"
26992    else
26993      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26994$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26995      new_path="$path"
26996    fi
26997
26998    if test "x$new_path" = x; then
26999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27000$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27001        has_space=`$ECHO "$complete" | $GREP " "`
27002        if test "x$has_space" != x; then
27003          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27004$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27005        fi
27006        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27007      fi
27008  fi
27009
27010      # Now join together the path and the arguments once again
27011      if test "x$arguments" != xEOL; then
27012        new_complete="$new_path ${arguments% *}"
27013      else
27014        new_complete="$new_path"
27015      fi
27016
27017  if test "x$complete" != "x$new_complete"; then
27018      OBJDUMP="$new_complete"
27019      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27020$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27021    fi
27022
27023fi
27024
27025if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27026   # Extract the first word of "lipo", so it can be a program name with args.
27027set dummy lipo; ac_word=$2
27028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27029$as_echo_n "checking for $ac_word... " >&6; }
27030if test "${ac_cv_path_LIPO+set}" = set; then :
27031  $as_echo_n "(cached) " >&6
27032else
27033  case $LIPO in
27034  [\\/]* | ?:[\\/]*)
27035  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27036  ;;
27037  *)
27038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27039for as_dir in $PATH
27040do
27041  IFS=$as_save_IFS
27042  test -z "$as_dir" && as_dir=.
27043    for ac_exec_ext in '' $ac_executable_extensions; do
27044  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27045    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27047    break 2
27048  fi
27049done
27050  done
27051IFS=$as_save_IFS
27052
27053  ;;
27054esac
27055fi
27056LIPO=$ac_cv_path_LIPO
27057if test -n "$LIPO"; then
27058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27059$as_echo "$LIPO" >&6; }
27060else
27061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27062$as_echo "no" >&6; }
27063fi
27064
27065
27066
27067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27068
27069  # First separate the path from the arguments. This will split at the first
27070  # space.
27071  complete="$LIPO"
27072  path="${complete%% *}"
27073  tmp="$complete EOL"
27074  arguments="${tmp#* }"
27075
27076  # Input might be given as Windows format, start by converting to
27077  # unix format.
27078  new_path=`$CYGPATH -u "$path"`
27079
27080  # Now try to locate executable using which
27081  new_path=`$WHICH "$new_path" 2> /dev/null`
27082  # bat and cmd files are not always considered executable in cygwin causing which
27083  # to not find them
27084  if test "x$new_path" = x \
27085           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27086           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27087    new_path=`$CYGPATH -u "$path"`
27088  fi
27089  if test "x$new_path" = x; then
27090    # Oops. Which didn't find the executable.
27091    # The splitting of arguments from the executable at a space might have been incorrect,
27092    # since paths with space are more likely in Windows. Give it another try with the whole
27093    # argument.
27094    path="$complete"
27095    arguments="EOL"
27096    new_path=`$CYGPATH -u "$path"`
27097    new_path=`$WHICH "$new_path" 2> /dev/null`
27098    # bat and cmd files are not always considered executable in cygwin causing which
27099    # to not find them
27100    if test "x$new_path" = x \
27101             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27102             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27103      new_path=`$CYGPATH -u "$path"`
27104    fi
27105    if test "x$new_path" = x; then
27106      # It's still not found. Now this is an unrecoverable error.
27107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27108$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27109      has_space=`$ECHO "$complete" | $GREP " "`
27110      if test "x$has_space" != x; then
27111        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27112$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27113      fi
27114      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27115    fi
27116  fi
27117
27118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27121  # "foo.exe" is OK but "foo" is an error.
27122  #
27123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27124  # It is also a way to make sure we got the proper file name for the real test later on.
27125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27126  if test "x$test_shortpath" = x; then
27127    # Short path failed, file does not exist as specified.
27128    # Try adding .exe or .cmd
27129    if test -f "${new_path}.exe"; then
27130       input_to_shortpath="${new_path}.exe"
27131    elif test -f "${new_path}.cmd"; then
27132       input_to_shortpath="${new_path}.cmd"
27133    else
27134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27135$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27136      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27137$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27138      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27139    fi
27140  else
27141    input_to_shortpath="$new_path"
27142  fi
27143
27144  # Call helper function which possibly converts this using DOS-style short mode.
27145  # If so, the updated path is stored in $new_path.
27146  new_path="$input_to_shortpath"
27147
27148  input_path="$input_to_shortpath"
27149  # Check if we need to convert this using DOS-style short mode. If the path
27150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27151  # take no chances and rewrite it.
27152  # Note: m4 eats our [], so we need to use [ and ] instead.
27153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27154  if test "x$has_forbidden_chars" != x; then
27155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27159      # Going to short mode and back again did indeed matter. Since short mode is
27160      # case insensitive, let's make it lowercase to improve readability.
27161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27162      # Now convert it back to Unix-stile (cygpath)
27163      input_path=`$CYGPATH -u "$shortmode_path"`
27164      new_path="$input_path"
27165    fi
27166  fi
27167
27168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27169  if test "x$test_cygdrive_prefix" = x; then
27170    # As a simple fix, exclude /usr/bin since it's not a real path.
27171    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27173      # a path prefixed by /cygdrive for fixpath to work.
27174      new_path="$CYGWIN_ROOT_PATH$input_path"
27175    fi
27176  fi
27177
27178  # remove trailing .exe if any
27179  new_path="${new_path/%.exe/}"
27180
27181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27182
27183  # First separate the path from the arguments. This will split at the first
27184  # space.
27185  complete="$LIPO"
27186  path="${complete%% *}"
27187  tmp="$complete EOL"
27188  arguments="${tmp#* }"
27189
27190  # Input might be given as Windows format, start by converting to
27191  # unix format.
27192  new_path="$path"
27193
27194  windows_path="$new_path"
27195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27196    unix_path=`$CYGPATH -u "$windows_path"`
27197    new_path="$unix_path"
27198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27200    new_path="$unix_path"
27201  fi
27202
27203
27204  # Now try to locate executable using which
27205  new_path=`$WHICH "$new_path" 2> /dev/null`
27206
27207  if test "x$new_path" = x; then
27208    # Oops. Which didn't find the executable.
27209    # The splitting of arguments from the executable at a space might have been incorrect,
27210    # since paths with space are more likely in Windows. Give it another try with the whole
27211    # argument.
27212    path="$complete"
27213    arguments="EOL"
27214    new_path="$path"
27215
27216  windows_path="$new_path"
27217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27218    unix_path=`$CYGPATH -u "$windows_path"`
27219    new_path="$unix_path"
27220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27222    new_path="$unix_path"
27223  fi
27224
27225
27226    new_path=`$WHICH "$new_path" 2> /dev/null`
27227
27228    if test "x$new_path" = x; then
27229      # It's still not found. Now this is an unrecoverable error.
27230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27231$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27232      has_space=`$ECHO "$complete" | $GREP " "`
27233      if test "x$has_space" != x; then
27234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27236      fi
27237      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27238    fi
27239  fi
27240
27241  # Now new_path has a complete unix path to the binary
27242  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27243    # Keep paths in /bin as-is, but remove trailing .exe if any
27244    new_path="${new_path/%.exe/}"
27245    # Do not save /bin paths to all_fixpath_prefixes!
27246  else
27247    # Not in mixed or Windows style, start by that.
27248    new_path=`cmd //c echo $new_path`
27249
27250  input_path="$new_path"
27251  # Check if we need to convert this using DOS-style short mode. If the path
27252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27253  # take no chances and rewrite it.
27254  # Note: m4 eats our [], so we need to use [ and ] instead.
27255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27256  if test "x$has_forbidden_chars" != x; then
27257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27259  fi
27260
27261    # Output is in $new_path
27262
27263  windows_path="$new_path"
27264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27265    unix_path=`$CYGPATH -u "$windows_path"`
27266    new_path="$unix_path"
27267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27269    new_path="$unix_path"
27270  fi
27271
27272    # remove trailing .exe if any
27273    new_path="${new_path/%.exe/}"
27274
27275    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27276    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27277  fi
27278
27279  else
27280    # We're on a posix platform. Hooray! :)
27281    # First separate the path from the arguments. This will split at the first
27282    # space.
27283    complete="$LIPO"
27284    path="${complete%% *}"
27285    tmp="$complete EOL"
27286    arguments="${tmp#* }"
27287
27288    # Cannot rely on the command "which" here since it doesn't always work.
27289    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27290    if test -z "$is_absolute_path"; then
27291      # Path to executable is not absolute. Find it.
27292      IFS_save="$IFS"
27293      IFS=:
27294      for p in $PATH; do
27295        if test -f "$p/$path" && test -x "$p/$path"; then
27296          new_path="$p/$path"
27297          break
27298        fi
27299      done
27300      IFS="$IFS_save"
27301    else
27302      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27303$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27304      new_path="$path"
27305    fi
27306
27307    if test "x$new_path" = x; then
27308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27309$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27310        has_space=`$ECHO "$complete" | $GREP " "`
27311        if test "x$has_space" != x; then
27312          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27313$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27314        fi
27315        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27316      fi
27317  fi
27318
27319      # Now join together the path and the arguments once again
27320      if test "x$arguments" != xEOL; then
27321        new_complete="$new_path ${arguments% *}"
27322      else
27323        new_complete="$new_path"
27324      fi
27325
27326  if test "x$complete" != "x$new_complete"; then
27327      LIPO="$new_complete"
27328      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27329$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27330    fi
27331
27332fi
27333
27334# Restore old path without tools dir
27335PATH="$OLD_PATH"
27336
27337
27338# FIXME: Currently we must test this after paths but before flags. Fix!
27339
27340# And we can test some aspects on the target using configure macros.
27341
27342
27343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27344$as_echo_n "checking for ANSI C header files... " >&6; }
27345if test "${ac_cv_header_stdc+set}" = set; then :
27346  $as_echo_n "(cached) " >&6
27347else
27348  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27349/* end confdefs.h.  */
27350#include <stdlib.h>
27351#include <stdarg.h>
27352#include <string.h>
27353#include <float.h>
27354
27355int
27356main ()
27357{
27358
27359  ;
27360  return 0;
27361}
27362_ACEOF
27363if ac_fn_cxx_try_compile "$LINENO"; then :
27364  ac_cv_header_stdc=yes
27365else
27366  ac_cv_header_stdc=no
27367fi
27368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27369
27370if test $ac_cv_header_stdc = yes; then
27371  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27372  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27373/* end confdefs.h.  */
27374#include <string.h>
27375
27376_ACEOF
27377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27378  $EGREP "memchr" >/dev/null 2>&1; then :
27379
27380else
27381  ac_cv_header_stdc=no
27382fi
27383rm -f conftest*
27384
27385fi
27386
27387if test $ac_cv_header_stdc = yes; then
27388  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27390/* end confdefs.h.  */
27391#include <stdlib.h>
27392
27393_ACEOF
27394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27395  $EGREP "free" >/dev/null 2>&1; then :
27396
27397else
27398  ac_cv_header_stdc=no
27399fi
27400rm -f conftest*
27401
27402fi
27403
27404if test $ac_cv_header_stdc = yes; then
27405  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27406  if test "$cross_compiling" = yes; then :
27407  :
27408else
27409  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27410/* end confdefs.h.  */
27411#include <ctype.h>
27412#include <stdlib.h>
27413#if ((' ' & 0x0FF) == 0x020)
27414# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27415# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27416#else
27417# define ISLOWER(c) \
27418		   (('a' <= (c) && (c) <= 'i') \
27419		     || ('j' <= (c) && (c) <= 'r') \
27420		     || ('s' <= (c) && (c) <= 'z'))
27421# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27422#endif
27423
27424#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27425int
27426main ()
27427{
27428  int i;
27429  for (i = 0; i < 256; i++)
27430    if (XOR (islower (i), ISLOWER (i))
27431	|| toupper (i) != TOUPPER (i))
27432      return 2;
27433  return 0;
27434}
27435_ACEOF
27436if ac_fn_cxx_try_run "$LINENO"; then :
27437
27438else
27439  ac_cv_header_stdc=no
27440fi
27441rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27442  conftest.$ac_objext conftest.beam conftest.$ac_ext
27443fi
27444
27445fi
27446fi
27447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27448$as_echo "$ac_cv_header_stdc" >&6; }
27449if test $ac_cv_header_stdc = yes; then
27450
27451$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27452
27453fi
27454
27455# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27456for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27457		  inttypes.h stdint.h unistd.h
27458do :
27459  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27460ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27461"
27462if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27463  cat >>confdefs.h <<_ACEOF
27464#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27465_ACEOF
27466
27467fi
27468
27469done
27470
27471
27472
27473###############################################################################
27474#
27475# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27476# (The JVM can use 32 or 64 bit Java pointers but that decision
27477# is made at runtime.)
27478#
27479if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27480  # Always specify -m flags on Solaris
27481
27482  # keep track of c/cxx flags that we added outselves...
27483  #   to prevent emitting warning...
27484  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27485  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27486  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27487
27488  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27489  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27490  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27491
27492  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27493  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27494  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27495
27496elif test "x$COMPILE_TYPE" = xreduced; then
27497  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27498    # Specify -m if running reduced on other Posix platforms
27499
27500  # keep track of c/cxx flags that we added outselves...
27501  #   to prevent emitting warning...
27502  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27503  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27504  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27505
27506  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27507  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27508  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27509
27510  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27511  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27512  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27513
27514  fi
27515fi
27516
27517# Make compilation sanity check
27518for ac_header in stdio.h
27519do :
27520  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27521if test "x$ac_cv_header_stdio_h" = x""yes; then :
27522  cat >>confdefs.h <<_ACEOF
27523#define HAVE_STDIO_H 1
27524_ACEOF
27525
27526else
27527
27528  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27529$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27530  if test "x$COMPILE_TYPE" = xreduced; then
27531    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27532$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27533  elif test "x$COMPILE_TYPE" = xcross; then
27534    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27535$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27536  fi
27537  as_fn_error $? "Cannot continue." "$LINENO" 5
27538
27539fi
27540
27541done
27542
27543
27544# The cast to long int works around a bug in the HP C Compiler
27545# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27546# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27547# This bug is HP SR number 8606223364.
27548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27549$as_echo_n "checking size of int *... " >&6; }
27550if test "${ac_cv_sizeof_int_p+set}" = set; then :
27551  $as_echo_n "(cached) " >&6
27552else
27553  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27554
27555else
27556  if test "$ac_cv_type_int_p" = yes; then
27557     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27558$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27559as_fn_error 77 "cannot compute sizeof (int *)
27560See \`config.log' for more details" "$LINENO" 5 ; }
27561   else
27562     ac_cv_sizeof_int_p=0
27563   fi
27564fi
27565
27566fi
27567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27568$as_echo "$ac_cv_sizeof_int_p" >&6; }
27569
27570
27571
27572cat >>confdefs.h <<_ACEOF
27573#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27574_ACEOF
27575
27576
27577
27578if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27579  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27580  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27581fi
27582
27583if test "x$SIZEOF_INT_P" = x; then
27584    # The test failed, lets stick to the assumed value.
27585    { $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
27586$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27587else
27588    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27589
27590    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27591        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
27592    fi
27593fi
27594
27595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27596$as_echo_n "checking for target address size... " >&6; }
27597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27598$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27599
27600
27601###############################################################################
27602#
27603# Is the target little of big endian?
27604#
27605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27606$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27607if test "${ac_cv_c_bigendian+set}" = set; then :
27608  $as_echo_n "(cached) " >&6
27609else
27610  ac_cv_c_bigendian=unknown
27611    # See if we're dealing with a universal compiler.
27612    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27613/* end confdefs.h.  */
27614#ifndef __APPLE_CC__
27615	       not a universal capable compiler
27616	     #endif
27617	     typedef int dummy;
27618
27619_ACEOF
27620if ac_fn_cxx_try_compile "$LINENO"; then :
27621
27622	# Check for potential -arch flags.  It is not universal unless
27623	# there are at least two -arch flags with different values.
27624	ac_arch=
27625	ac_prev=
27626	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27627	 if test -n "$ac_prev"; then
27628	   case $ac_word in
27629	     i?86 | x86_64 | ppc | ppc64)
27630	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27631		 ac_arch=$ac_word
27632	       else
27633		 ac_cv_c_bigendian=universal
27634		 break
27635	       fi
27636	       ;;
27637	   esac
27638	   ac_prev=
27639	 elif test "x$ac_word" = "x-arch"; then
27640	   ac_prev=arch
27641	 fi
27642       done
27643fi
27644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27645    if test $ac_cv_c_bigendian = unknown; then
27646      # See if sys/param.h defines the BYTE_ORDER macro.
27647      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27648/* end confdefs.h.  */
27649#include <sys/types.h>
27650	     #include <sys/param.h>
27651
27652int
27653main ()
27654{
27655#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27656		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27657		     && LITTLE_ENDIAN)
27658	      bogus endian macros
27659	     #endif
27660
27661  ;
27662  return 0;
27663}
27664_ACEOF
27665if ac_fn_cxx_try_compile "$LINENO"; then :
27666  # It does; now see whether it defined to BIG_ENDIAN or not.
27667	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27668/* end confdefs.h.  */
27669#include <sys/types.h>
27670		#include <sys/param.h>
27671
27672int
27673main ()
27674{
27675#if BYTE_ORDER != BIG_ENDIAN
27676		 not big endian
27677		#endif
27678
27679  ;
27680  return 0;
27681}
27682_ACEOF
27683if ac_fn_cxx_try_compile "$LINENO"; then :
27684  ac_cv_c_bigendian=yes
27685else
27686  ac_cv_c_bigendian=no
27687fi
27688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27689fi
27690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27691    fi
27692    if test $ac_cv_c_bigendian = unknown; then
27693      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27694      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27695/* end confdefs.h.  */
27696#include <limits.h>
27697
27698int
27699main ()
27700{
27701#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27702	      bogus endian macros
27703	     #endif
27704
27705  ;
27706  return 0;
27707}
27708_ACEOF
27709if ac_fn_cxx_try_compile "$LINENO"; then :
27710  # It does; now see whether it defined to _BIG_ENDIAN or not.
27711	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27712/* end confdefs.h.  */
27713#include <limits.h>
27714
27715int
27716main ()
27717{
27718#ifndef _BIG_ENDIAN
27719		 not big endian
27720		#endif
27721
27722  ;
27723  return 0;
27724}
27725_ACEOF
27726if ac_fn_cxx_try_compile "$LINENO"; then :
27727  ac_cv_c_bigendian=yes
27728else
27729  ac_cv_c_bigendian=no
27730fi
27731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27732fi
27733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27734    fi
27735    if test $ac_cv_c_bigendian = unknown; then
27736      # Compile a test program.
27737      if test "$cross_compiling" = yes; then :
27738  # Try to guess by grepping values from an object file.
27739	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27740/* end confdefs.h.  */
27741short int ascii_mm[] =
27742		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27743		short int ascii_ii[] =
27744		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27745		int use_ascii (int i) {
27746		  return ascii_mm[i] + ascii_ii[i];
27747		}
27748		short int ebcdic_ii[] =
27749		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27750		short int ebcdic_mm[] =
27751		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27752		int use_ebcdic (int i) {
27753		  return ebcdic_mm[i] + ebcdic_ii[i];
27754		}
27755		extern int foo;
27756
27757int
27758main ()
27759{
27760return use_ascii (foo) == use_ebcdic (foo);
27761  ;
27762  return 0;
27763}
27764_ACEOF
27765if ac_fn_cxx_try_compile "$LINENO"; then :
27766  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27767	      ac_cv_c_bigendian=yes
27768	    fi
27769	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27770	      if test "$ac_cv_c_bigendian" = unknown; then
27771		ac_cv_c_bigendian=no
27772	      else
27773		# finding both strings is unlikely to happen, but who knows?
27774		ac_cv_c_bigendian=unknown
27775	      fi
27776	    fi
27777fi
27778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27779else
27780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27781/* end confdefs.h.  */
27782$ac_includes_default
27783int
27784main ()
27785{
27786
27787	     /* Are we little or big endian?  From Harbison&Steele.  */
27788	     union
27789	     {
27790	       long int l;
27791	       char c[sizeof (long int)];
27792	     } u;
27793	     u.l = 1;
27794	     return u.c[sizeof (long int) - 1] == 1;
27795
27796  ;
27797  return 0;
27798}
27799_ACEOF
27800if ac_fn_cxx_try_run "$LINENO"; then :
27801  ac_cv_c_bigendian=no
27802else
27803  ac_cv_c_bigendian=yes
27804fi
27805rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27806  conftest.$ac_objext conftest.beam conftest.$ac_ext
27807fi
27808
27809    fi
27810fi
27811{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27812$as_echo "$ac_cv_c_bigendian" >&6; }
27813 case $ac_cv_c_bigendian in #(
27814   yes)
27815     ENDIAN="big";; #(
27816   no)
27817     ENDIAN="little" ;; #(
27818   universal)
27819     ENDIAN="universal_endianness"
27820     ;; #(
27821   *)
27822     ENDIAN="unknown" ;;
27823 esac
27824
27825
27826if test "x$ENDIAN" = xuniversal_endianness; then
27827    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27828fi
27829if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27830    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
27831fi
27832
27833
27834# Configure flags for the tools
27835
27836
27837###############################################################################
27838#
27839# How to compile shared libraries.
27840#
27841
27842if test "x$GCC" = xyes; then
27843    COMPILER_NAME=gcc
27844    PICFLAG="-fPIC"
27845    LIBRARY_PREFIX=lib
27846    SHARED_LIBRARY='lib$1.so'
27847    STATIC_LIBRARY='lib$1.a'
27848    SHARED_LIBRARY_FLAGS="-shared"
27849    SHARED_LIBRARY_SUFFIX='.so'
27850    STATIC_LIBRARY_SUFFIX='.a'
27851    OBJ_SUFFIX='.o'
27852    EXE_SUFFIX=''
27853    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27854    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27855    C_FLAG_REORDER=''
27856    CXX_FLAG_REORDER=''
27857    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27858    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27859    LD="$CC"
27860    LDEXE="$CC"
27861    LDCXX="$CXX"
27862    LDEXECXX="$CXX"
27863    POST_STRIP_CMD="$STRIP -g"
27864
27865    # Linking is different on MacOSX
27866    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27867        # Might change in the future to clang.
27868        COMPILER_NAME=gcc
27869        SHARED_LIBRARY='lib$1.dylib'
27870        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27871        SHARED_LIBRARY_SUFFIX='.dylib'
27872        EXE_SUFFIX=''
27873        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27874        SET_SHARED_LIBRARY_MAPFILE=''
27875        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27876        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27877        POST_STRIP_CMD="$STRIP -S"
27878    fi
27879else
27880    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27881        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27882        COMPILER_NAME=ossc
27883        PICFLAG="-KPIC"
27884        LIBRARY_PREFIX=lib
27885        SHARED_LIBRARY='lib$1.so'
27886        STATIC_LIBRARY='lib$1.a'
27887        SHARED_LIBRARY_FLAGS="-G"
27888        SHARED_LIBRARY_SUFFIX='.so'
27889        STATIC_LIBRARY_SUFFIX='.a'
27890        OBJ_SUFFIX='.o'
27891        EXE_SUFFIX=''
27892        SET_SHARED_LIBRARY_NAME=''
27893        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27894	C_FLAG_REORDER='-xF'
27895	CXX_FLAG_REORDER='-xF'
27896        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27897        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27898        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27899        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27900        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27901        POST_STRIP_CMD="$STRIP -x"
27902        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27903    fi
27904    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27905        # If it is not gcc, then assume it is the MS Visual Studio compiler
27906        COMPILER_NAME=cl
27907        PICFLAG=""
27908        LIBRARY_PREFIX=
27909        SHARED_LIBRARY='$1.dll'
27910        STATIC_LIBRARY='$1.lib'
27911        SHARED_LIBRARY_FLAGS="-LD"
27912        SHARED_LIBRARY_SUFFIX='.dll'
27913        STATIC_LIBRARY_SUFFIX='.lib'
27914        OBJ_SUFFIX='.obj'
27915        EXE_SUFFIX='.exe'
27916        SET_SHARED_LIBRARY_NAME=''
27917        SET_SHARED_LIBRARY_MAPFILE=''
27918        SET_SHARED_LIBRARY_ORIGIN=''
27919        SET_EXECUTABLE_ORIGIN=''
27920    fi
27921fi
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940# The (cross) compiler is now configured, we can now test capabilities
27941# of the target platform.
27942
27943
27944
27945###############################################################################
27946#
27947# Setup the opt flags for different compilers
27948# and different operating systems.
27949#
27950
27951#
27952# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27953#
27954if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27955    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27956    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27957    CFLAGS="$CFLAGS -mstackrealign"
27958    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27959$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27960    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27961/* end confdefs.h.  */
27962int main() { return 0; }
27963_ACEOF
27964if ac_fn_cxx_try_link "$LINENO"; then :
27965
27966		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27967$as_echo "yes" >&6; }
27968
27969else
27970
27971		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27972$as_echo "no" >&6; }
27973	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27974
27975fi
27976rm -f core conftest.err conftest.$ac_objext \
27977    conftest$ac_exeext conftest.$ac_ext
27978fi
27979
27980C_FLAG_DEPS="-MMD -MF"
27981CXX_FLAG_DEPS="-MMD -MF"
27982
27983case $COMPILER_TYPE in
27984  CC )
27985    D_FLAG="-g"
27986    case $COMPILER_NAME in
27987      gcc )
27988      	case $OPENJDK_TARGET_OS in
27989	  macosx )
27990	    # On MacOSX we optimize for size, something
27991	    # we should do for all platforms?
27992	    C_O_FLAG_HI="-Os"
27993	    C_O_FLAG_NORM="-Os"
27994	    C_O_FLAG_NONE=""
27995	    ;;
27996	  *)
27997	    C_O_FLAG_HI="-O3"
27998	    C_O_FLAG_NORM="-O2"
27999	    C_O_FLAG_NONE="-O0"
28000	    CFLAGS_DEBUG_SYMBOLS="-g"
28001	    CXXFLAGS_DEBUG_SYMBOLS="-g"
28002	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
28003	       CFLAGS_DEBUG_SYMBOLS="-g1"
28004	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
28005	    fi
28006	    ;;
28007	esac
28008        CXX_O_FLAG_HI="$C_O_FLAG_HI"
28009        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28010        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28011        ;;
28012      ossc )
28013        #
28014        # Forte has different names for this with their C++ compiler...
28015        #
28016        C_FLAG_DEPS="-xMMD -xMF"
28017        CXX_FLAG_DEPS="-xMMD -xMF"
28018
28019        # Extra options used with HIGHEST
28020        #
28021        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28022        #          done with care, there are some assumptions below that need to
28023        #          be understood about the use of pointers, and IEEE behavior.
28024        #
28025        # Use non-standard floating point mode (not IEEE 754)
28026        CC_HIGHEST="$CC_HIGHEST -fns"
28027        # Do some simplification of floating point arithmetic (not IEEE 754)
28028        CC_HIGHEST="$CC_HIGHEST -fsimple"
28029        # Use single precision floating point with 'float'
28030        CC_HIGHEST="$CC_HIGHEST -fsingle"
28031        # Assume memory references via basic pointer types do not alias
28032        #   (Source with excessing pointer casting and data access with mixed
28033        #    pointer types are not recommended)
28034        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28035        # Use intrinsic or inline versions for math/std functions
28036        #   (If you expect perfect errno behavior, do not use this)
28037        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28038        # Loop data dependency optimizations (need -xO3 or higher)
28039        CC_HIGHEST="$CC_HIGHEST -xdepend"
28040        # Pointer parameters to functions do not overlap
28041        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28042        #    If you pass in multiple pointers to the same data, do not use this)
28043        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28044        # Inline some library routines
28045        #   (If you expect perfect errno behavior, do not use this)
28046        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28047        # Use optimized math routines
28048        #   (If you expect perfect errno behavior, do not use this)
28049        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28050        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28051
28052        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28053          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28054          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28055        fi
28056
28057        case $OPENJDK_TARGET_CPU_ARCH in
28058          x86)
28059            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28060            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28061            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28062            C_O_FLAG_NONE="-xregs=no%frameptr"
28063            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28064            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28065            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28066            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28067            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28068               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28069               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28070            fi
28071            ;;
28072          sparc)
28073            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28074            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28075            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28076            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28077            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28078            C_O_FLAG_NONE=""
28079            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28080            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28081            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28082            CXX_O_FLAG_NONE=""
28083            ;;
28084        esac
28085
28086    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28087    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28088    esac
28089    ;;
28090  CL )
28091    D_FLAG=
28092    C_O_FLAG_HIGHEST="-O2"
28093    C_O_FLAG_HI="-O1"
28094    C_O_FLAG_NORM="-O1"
28095    C_O_FLAG_NONE="-Od"
28096    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28097    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28098    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28099    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28100    ;;
28101esac
28102
28103if test -z "$C_O_FLAG_HIGHEST"; then
28104   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28105fi
28106
28107if test -z "$CXX_O_FLAG_HIGHEST"; then
28108   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28109fi
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28125   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28126$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28127fi
28128
28129if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28130   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28131$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28132fi
28133
28134if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28135   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28136$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28137fi
28138
28139
28140# Check whether --with-extra-cflags was given.
28141if test "${with_extra_cflags+set}" = set; then :
28142  withval=$with_extra_cflags;
28143fi
28144
28145
28146
28147# Check whether --with-extra-cxxflags was given.
28148if test "${with_extra_cxxflags+set}" = set; then :
28149  withval=$with_extra_cxxflags;
28150fi
28151
28152
28153
28154# Check whether --with-extra-ldflags was given.
28155if test "${with_extra_ldflags+set}" = set; then :
28156  withval=$with_extra_ldflags;
28157fi
28158
28159
28160CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28161CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28162LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28163
28164# Hotspot needs these set in their legacy form
28165LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28166LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28167LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28168
28169
28170
28171
28172
28173###############################################################################
28174#
28175# Now setup the CFLAGS and LDFLAGS for the JDK build.
28176# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28177#
28178case $COMPILER_NAME in
28179      gcc )
28180      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28181                          -pipe \
28182                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28183	  case $OPENJDK_TARGET_CPU_ARCH in
28184	  arm )
28185            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28186	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28187	  ;;
28188	  ppc )
28189            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28190	  ;;
28191	  * )
28192	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28193	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28194          ;;
28195	  esac
28196          ;;
28197      ossc )
28198          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28199          case $OPENJDK_TARGET_CPU_ARCH in
28200          x86 )
28201            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28202       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28203          ;;
28204          esac
28205
28206      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28207      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28208
28209          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28210          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28211          ;;
28212      cl )
28213          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28214               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28215	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28216	       -DWIN32 -DIAL"
28217          case $OPENJDK_TARGET_CPU in
28218              x86 )
28219                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28220                  ;;
28221              x86_64 )
28222                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28223                  ;;
28224          esac
28225          ;;
28226esac
28227
28228###############################################################################
28229
28230CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28231
28232# The package path is used only on macosx?
28233PACKAGE_PATH=/opt/local
28234
28235
28236if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28237    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28238    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28239    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28240    #   Note: -Dmacro         is the same as    #define macro 1
28241    #         -Dmacro=	    is the same as    #define macro
28242    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28243        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28244    else
28245        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28246    fi
28247else
28248    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28249fi
28250if test "x$OPENJDK_TARGET_OS" = xlinux; then
28251    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28252fi
28253if test "x$OPENJDK_TARGET_OS" = xwindows; then
28254    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28255fi
28256if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28257    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28258fi
28259if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28260    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28261    # Setting these parameters makes it an error to link to macosx APIs that are
28262    # newer than the given OS version and makes the linked binaries compatible even
28263    # if built on a newer version of the OS.
28264    # The expected format is X.Y.Z
28265    MACOSX_VERSION_MIN=10.7.0
28266
28267    # The macro takes the version with no dots, ex: 1070
28268    # Let the flags variables get resolved in make for easier override on make
28269    # command line.
28270    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28271    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28272fi
28273if test "x$OPENJDK_TARGET_OS" = xbsd; then
28274    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28275fi
28276if test "x$DEBUG_LEVEL" = xrelease; then
28277    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28278    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28279        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28280    fi
28281else
28282    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28283fi
28284
28285CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28286CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28287
28288CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28289        -I${JDK_OUTPUTDIR}/include \
28290        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28291        -I${JDK_TOPDIR}/src/share/javavm/export \
28292        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28293        -I${JDK_TOPDIR}/src/share/native/common \
28294        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28295
28296# The shared libraries are compiled using the picflag.
28297CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28298CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28299
28300# Executable flags
28301CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28302CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28303
28304# Now this is odd. The JDK native libraries have to link against libjvm.so
28305# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28306# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28307# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28308# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28309# libraries will link to whatever is in memory. Yuck.
28310#
28311# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28312if test "x$COMPILER_NAME" = xcl; then
28313    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28314    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28315        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28316    fi
28317    # TODO: make -debug optional "--disable-full-debug-symbols"
28318    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28319    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28320    LDFLAGS_JDKLIB_SUFFIX=""
28321    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28322        LDFLAGS_STACK_SIZE=1048576
28323    else
28324        LDFLAGS_STACK_SIZE=327680
28325    fi
28326    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28327else
28328    if test "x$COMPILER_NAME" = xgcc; then
28329        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28330        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28331        if test -n "$HAS_GNU_HASH"; then
28332            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28333        fi
28334        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28335          # And since we now know that the linker is gnu, then add -z defs, to forbid
28336          # undefined symbols in object files.
28337          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28338          if test "x$DEBUG_LEVEL" = "xrelease"; then
28339              # When building release libraries, tell the linker optimize them.
28340              # Should this be supplied to the OSS linker as well?
28341              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28342          fi
28343        fi
28344    fi
28345    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28346                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28347
28348    # On some platforms (mac) the linker warns about non existing -L dirs.
28349    # Add server first if available. Linking aginst client does not always produce the same results.
28350    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28351    # Default to server for other variants.
28352    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28353        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28354    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28355        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28356    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28357        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28358    else
28359        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28360    fi
28361
28362    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28363    if test "x$COMPILER_NAME" = xossc; then
28364        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28365    fi
28366
28367    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28368    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28369        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28370    fi
28371fi
28372
28373# Adjust flags according to debug level.
28374case $DEBUG_LEVEL in
28375      fastdebug )
28376              CFLAGS="$CFLAGS $D_FLAG"
28377              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28378              ;;
28379      slowdebug )
28380              CFLAGS="$CFLAGS $D_FLAG"
28381	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28382	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28383	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28384	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28385              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28386              ;;
28387esac
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403# Setup debug symbols (need objcopy from the toolchain for that)
28404
28405#
28406# ENABLE_DEBUG_SYMBOLS
28407# This must be done after the toolchain is setup, since we're looking at objcopy.
28408#
28409# Check whether --enable-debug-symbols was given.
28410if test "${enable_debug_symbols+set}" = set; then :
28411  enableval=$enable_debug_symbols;
28412fi
28413
28414
28415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28416$as_echo_n "checking if we should generate debug symbols... " >&6; }
28417
28418if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28419   # explicit enabling of enable-debug-symbols and can't find objcopy
28420   #   this is an error
28421   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28422fi
28423
28424if test "x$enable_debug_symbols" = "xyes"; then
28425  ENABLE_DEBUG_SYMBOLS=true
28426elif test "x$enable_debug_symbols" = "xno"; then
28427  ENABLE_DEBUG_SYMBOLS=false
28428else
28429  # default on macosx is false
28430  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28431    ENABLE_DEBUG_SYMBOLS=false
28432  # Default is on if objcopy is found, otherwise off
28433  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28434    ENABLE_DEBUG_SYMBOLS=true
28435  else
28436    ENABLE_DEBUG_SYMBOLS=false
28437  fi
28438fi
28439
28440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28441$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28442
28443#
28444# ZIP_DEBUGINFO_FILES
28445#
28446# Check whether --enable-zip-debug-info was given.
28447if test "${enable_zip_debug_info+set}" = set; then :
28448  enableval=$enable_zip_debug_info;
28449fi
28450
28451
28452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28453$as_echo_n "checking if we should zip debug-info files... " >&6; }
28454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28455$as_echo "${enable_zip_debug_info}" >&6; }
28456
28457if test "x${enable_zip_debug_info}" = "xno"; then
28458   ZIP_DEBUGINFO_FILES=false
28459else
28460   ZIP_DEBUGINFO_FILES=true
28461fi
28462
28463
28464
28465
28466
28467
28468
28469###############################################################################
28470#
28471# Check dependencies for external and internal libraries.
28472#
28473###############################################################################
28474
28475
28476
28477###############################################################################
28478#
28479# OS specific settings that we never will need to probe.
28480#
28481if test "x$OPENJDK_TARGET_OS" = xlinux; then
28482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28483$as_echo_n "checking what is not needed on Linux?... " >&6; }
28484    PULSE_NOT_NEEDED=yes
28485    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28486$as_echo "pulse" >&6; }
28487fi
28488
28489if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28490    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28491$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28492    ALSA_NOT_NEEDED=yes
28493    PULSE_NOT_NEEDED=yes
28494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28495$as_echo "alsa pulse" >&6; }
28496fi
28497
28498if test "x$OPENJDK_TARGET_OS" = xwindows; then
28499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28500$as_echo_n "checking what is not needed on Windows?... " >&6; }
28501    CUPS_NOT_NEEDED=yes
28502    ALSA_NOT_NEEDED=yes
28503    PULSE_NOT_NEEDED=yes
28504    X11_NOT_NEEDED=yes
28505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28506$as_echo "alsa cups pulse x11" >&6; }
28507fi
28508
28509if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28511$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28512    ALSA_NOT_NEEDED=yes
28513    PULSE_NOT_NEEDED=yes
28514    X11_NOT_NEEDED=yes
28515    FREETYPE2_NOT_NEEDED=yes
28516    # If the java runtime framework is disabled, then we need X11.
28517    # This will be adjusted below.
28518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28519$as_echo "alsa pulse x11" >&6; }
28520fi
28521
28522if test "x$OPENJDK_TARGET_OS" = xbsd; then
28523    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28524$as_echo_n "checking what is not needed on bsd?... " >&6; }
28525    ALSA_NOT_NEEDED=yes
28526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28527$as_echo "alsa" >&6; }
28528fi
28529
28530if test "x$OPENJDK" = "xfalse"; then
28531    FREETYPE2_NOT_NEEDED=yes
28532fi
28533
28534if test "x$SUPPORT_HEADFUL" = xno; then
28535    X11_NOT_NEEDED=yes
28536fi
28537
28538###############################################################################
28539#
28540# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28541# that uses this API.
28542#
28543# Check whether --enable-macosx-runtime-support was given.
28544if test "${enable_macosx_runtime_support+set}" = set; then :
28545  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28546else
28547  MACOSX_RUNTIME_SUPPORT="no"
28548fi
28549
28550
28551USE_MACOSX_RUNTIME_SUPPORT=no
28552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28553$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28554if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28555    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28556        MACOSX_RUNTIME_SUPPORT=yes
28557        USE_MACOSX_RUNTIME_SUPPORT=yes
28558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28559$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28560    else
28561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28562$as_echo "yes, but explicitly disabled." >&6; }
28563    fi
28564else
28565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28566$as_echo "no" >&6; }
28567fi
28568
28569if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28570    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28571$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28572    X11_NOT_NEEDED=
28573    FREETYPE2_NOT_NEEDED=
28574    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28575$as_echo "alsa pulse" >&6; }
28576fi
28577
28578
28579
28580
28581###############################################################################
28582#
28583# Check for X Windows
28584#
28585
28586# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28587# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28588# --x-libraries for the sysroot, if that seems to be correct.
28589if test "x$SYS_ROOT" != "x/"; then
28590  if test "x$x_includes" = xNONE; then
28591    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28592      x_includes="$SYS_ROOT/usr/X11R6/include"
28593    fi
28594  fi
28595  if test "x$x_libraries" = xNONE; then
28596    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28597      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28598    fi
28599  fi
28600fi
28601
28602# Now let autoconf do it's magic
28603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28604$as_echo_n "checking for X... " >&6; }
28605
28606
28607# Check whether --with-x was given.
28608if test "${with_x+set}" = set; then :
28609  withval=$with_x;
28610fi
28611
28612# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28613if test "x$with_x" = xno; then
28614  # The user explicitly disabled X.
28615  have_x=disabled
28616else
28617  case $x_includes,$x_libraries in #(
28618    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28619    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28620  $as_echo_n "(cached) " >&6
28621else
28622  # One or both of the vars are not set, and there is no cached value.
28623ac_x_includes=no ac_x_libraries=no
28624rm -f -r conftest.dir
28625if mkdir conftest.dir; then
28626  cd conftest.dir
28627  cat >Imakefile <<'_ACEOF'
28628incroot:
28629	@echo incroot='${INCROOT}'
28630usrlibdir:
28631	@echo usrlibdir='${USRLIBDIR}'
28632libdir:
28633	@echo libdir='${LIBDIR}'
28634_ACEOF
28635  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28636    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28637    for ac_var in incroot usrlibdir libdir; do
28638      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28639    done
28640    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28641    for ac_extension in a so sl dylib la dll; do
28642      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28643	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28644	ac_im_usrlibdir=$ac_im_libdir; break
28645      fi
28646    done
28647    # Screen out bogus values from the imake configuration.  They are
28648    # bogus both because they are the default anyway, and because
28649    # using them would break gcc on systems where it needs fixed includes.
28650    case $ac_im_incroot in
28651	/usr/include) ac_x_includes= ;;
28652	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28653    esac
28654    case $ac_im_usrlibdir in
28655	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28656	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28657    esac
28658  fi
28659  cd ..
28660  rm -f -r conftest.dir
28661fi
28662
28663# Standard set of common directories for X headers.
28664# Check X11 before X11Rn because it is often a symlink to the current release.
28665ac_x_header_dirs='
28666/usr/X11/include
28667/usr/X11R7/include
28668/usr/X11R6/include
28669/usr/X11R5/include
28670/usr/X11R4/include
28671
28672/usr/include/X11
28673/usr/include/X11R7
28674/usr/include/X11R6
28675/usr/include/X11R5
28676/usr/include/X11R4
28677
28678/usr/local/X11/include
28679/usr/local/X11R7/include
28680/usr/local/X11R6/include
28681/usr/local/X11R5/include
28682/usr/local/X11R4/include
28683
28684/usr/local/include/X11
28685/usr/local/include/X11R7
28686/usr/local/include/X11R6
28687/usr/local/include/X11R5
28688/usr/local/include/X11R4
28689
28690/usr/X386/include
28691/usr/x386/include
28692/usr/XFree86/include/X11
28693
28694/usr/include
28695/usr/local/include
28696/usr/unsupported/include
28697/usr/athena/include
28698/usr/local/x11r5/include
28699/usr/lpp/Xamples/include
28700
28701/usr/openwin/include
28702/usr/openwin/share/include'
28703
28704if test "$ac_x_includes" = no; then
28705  # Guess where to find include files, by looking for Xlib.h.
28706  # First, try using that file with no special directory specified.
28707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28708/* end confdefs.h.  */
28709#include <X11/Xlib.h>
28710_ACEOF
28711if ac_fn_cxx_try_cpp "$LINENO"; then :
28712  # We can compile using X headers with no special include directory.
28713ac_x_includes=
28714else
28715  for ac_dir in $ac_x_header_dirs; do
28716  if test -r "$ac_dir/X11/Xlib.h"; then
28717    ac_x_includes=$ac_dir
28718    break
28719  fi
28720done
28721fi
28722rm -f conftest.err conftest.i conftest.$ac_ext
28723fi # $ac_x_includes = no
28724
28725if test "$ac_x_libraries" = no; then
28726  # Check for the libraries.
28727  # See if we find them without any special options.
28728  # Don't add to $LIBS permanently.
28729  ac_save_LIBS=$LIBS
28730  LIBS="-lX11 $LIBS"
28731  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28732/* end confdefs.h.  */
28733#include <X11/Xlib.h>
28734int
28735main ()
28736{
28737XrmInitialize ()
28738  ;
28739  return 0;
28740}
28741_ACEOF
28742if ac_fn_cxx_try_link "$LINENO"; then :
28743  LIBS=$ac_save_LIBS
28744# We can link X programs with no special library path.
28745ac_x_libraries=
28746else
28747  LIBS=$ac_save_LIBS
28748for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28749do
28750  # Don't even attempt the hair of trying to link an X program!
28751  for ac_extension in a so sl dylib la dll; do
28752    if test -r "$ac_dir/libX11.$ac_extension"; then
28753      ac_x_libraries=$ac_dir
28754      break 2
28755    fi
28756  done
28757done
28758fi
28759rm -f core conftest.err conftest.$ac_objext \
28760    conftest$ac_exeext conftest.$ac_ext
28761fi # $ac_x_libraries = no
28762
28763case $ac_x_includes,$ac_x_libraries in #(
28764  no,* | *,no | *\'*)
28765    # Didn't find X, or a directory has "'" in its name.
28766    ac_cv_have_x="have_x=no";; #(
28767  *)
28768    # Record where we found X for the cache.
28769    ac_cv_have_x="have_x=yes\
28770	ac_x_includes='$ac_x_includes'\
28771	ac_x_libraries='$ac_x_libraries'"
28772esac
28773fi
28774;; #(
28775    *) have_x=yes;;
28776  esac
28777  eval "$ac_cv_have_x"
28778fi # $with_x != no
28779
28780if test "$have_x" != yes; then
28781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28782$as_echo "$have_x" >&6; }
28783  no_x=yes
28784else
28785  # If each of the values was on the command line, it overrides each guess.
28786  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28787  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28788  # Update the cache value to reflect the command line values.
28789  ac_cv_have_x="have_x=yes\
28790	ac_x_includes='$x_includes'\
28791	ac_x_libraries='$x_libraries'"
28792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28793$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28794fi
28795
28796if test "$no_x" = yes; then
28797  # Not all programs may use this symbol, but it does not hurt to define it.
28798
28799$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28800
28801  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28802else
28803  if test -n "$x_includes"; then
28804    X_CFLAGS="$X_CFLAGS -I$x_includes"
28805  fi
28806
28807  # It would also be nice to do this for all -L options, not just this one.
28808  if test -n "$x_libraries"; then
28809    X_LIBS="$X_LIBS -L$x_libraries"
28810    # For Solaris; some versions of Sun CC require a space after -R and
28811    # others require no space.  Words are not sufficient . . . .
28812    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28813$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28814    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28815    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28816    ac_cxx_werror_flag=yes
28817    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28818/* end confdefs.h.  */
28819
28820int
28821main ()
28822{
28823
28824  ;
28825  return 0;
28826}
28827_ACEOF
28828if ac_fn_cxx_try_link "$LINENO"; then :
28829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28830$as_echo "no" >&6; }
28831       X_LIBS="$X_LIBS -R$x_libraries"
28832else
28833  LIBS="$ac_xsave_LIBS -R $x_libraries"
28834       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28835/* end confdefs.h.  */
28836
28837int
28838main ()
28839{
28840
28841  ;
28842  return 0;
28843}
28844_ACEOF
28845if ac_fn_cxx_try_link "$LINENO"; then :
28846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28847$as_echo "yes" >&6; }
28848	  X_LIBS="$X_LIBS -R $x_libraries"
28849else
28850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28851$as_echo "neither works" >&6; }
28852fi
28853rm -f core conftest.err conftest.$ac_objext \
28854    conftest$ac_exeext conftest.$ac_ext
28855fi
28856rm -f core conftest.err conftest.$ac_objext \
28857    conftest$ac_exeext conftest.$ac_ext
28858    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28859    LIBS=$ac_xsave_LIBS
28860  fi
28861
28862  # Check for system-dependent libraries X programs must link with.
28863  # Do this before checking for the system-independent R6 libraries
28864  # (-lICE), since we may need -lsocket or whatever for X linking.
28865
28866  if test "$ISC" = yes; then
28867    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28868  else
28869    # Martyn Johnson says this is needed for Ultrix, if the X
28870    # libraries were built with DECnet support.  And Karl Berry says
28871    # the Alpha needs dnet_stub (dnet does not exist).
28872    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28873    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28874/* end confdefs.h.  */
28875
28876/* Override any GCC internal prototype to avoid an error.
28877   Use char because int might match the return type of a GCC
28878   builtin and then its argument prototype would still apply.  */
28879#ifdef __cplusplus
28880extern "C"
28881#endif
28882char XOpenDisplay ();
28883int
28884main ()
28885{
28886return XOpenDisplay ();
28887  ;
28888  return 0;
28889}
28890_ACEOF
28891if ac_fn_cxx_try_link "$LINENO"; then :
28892
28893else
28894  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28895$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28896if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28897  $as_echo_n "(cached) " >&6
28898else
28899  ac_check_lib_save_LIBS=$LIBS
28900LIBS="-ldnet  $LIBS"
28901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28902/* end confdefs.h.  */
28903
28904/* Override any GCC internal prototype to avoid an error.
28905   Use char because int might match the return type of a GCC
28906   builtin and then its argument prototype would still apply.  */
28907#ifdef __cplusplus
28908extern "C"
28909#endif
28910char dnet_ntoa ();
28911int
28912main ()
28913{
28914return dnet_ntoa ();
28915  ;
28916  return 0;
28917}
28918_ACEOF
28919if ac_fn_cxx_try_link "$LINENO"; then :
28920  ac_cv_lib_dnet_dnet_ntoa=yes
28921else
28922  ac_cv_lib_dnet_dnet_ntoa=no
28923fi
28924rm -f core conftest.err conftest.$ac_objext \
28925    conftest$ac_exeext conftest.$ac_ext
28926LIBS=$ac_check_lib_save_LIBS
28927fi
28928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28929$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28930if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28931  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28932fi
28933
28934    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28935      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28936$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28937if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28938  $as_echo_n "(cached) " >&6
28939else
28940  ac_check_lib_save_LIBS=$LIBS
28941LIBS="-ldnet_stub  $LIBS"
28942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28943/* end confdefs.h.  */
28944
28945/* Override any GCC internal prototype to avoid an error.
28946   Use char because int might match the return type of a GCC
28947   builtin and then its argument prototype would still apply.  */
28948#ifdef __cplusplus
28949extern "C"
28950#endif
28951char dnet_ntoa ();
28952int
28953main ()
28954{
28955return dnet_ntoa ();
28956  ;
28957  return 0;
28958}
28959_ACEOF
28960if ac_fn_cxx_try_link "$LINENO"; then :
28961  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28962else
28963  ac_cv_lib_dnet_stub_dnet_ntoa=no
28964fi
28965rm -f core conftest.err conftest.$ac_objext \
28966    conftest$ac_exeext conftest.$ac_ext
28967LIBS=$ac_check_lib_save_LIBS
28968fi
28969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28970$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28971if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28972  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28973fi
28974
28975    fi
28976fi
28977rm -f core conftest.err conftest.$ac_objext \
28978    conftest$ac_exeext conftest.$ac_ext
28979    LIBS="$ac_xsave_LIBS"
28980
28981    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28982    # to get the SysV transport functions.
28983    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28984    # needs -lnsl.
28985    # The nsl library prevents programs from opening the X display
28986    # on Irix 5.2, according to T.E. Dickey.
28987    # The functions gethostbyname, getservbyname, and inet_addr are
28988    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28989    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28990if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28991
28992fi
28993
28994    if test $ac_cv_func_gethostbyname = no; then
28995      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28996$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28997if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28998  $as_echo_n "(cached) " >&6
28999else
29000  ac_check_lib_save_LIBS=$LIBS
29001LIBS="-lnsl  $LIBS"
29002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29003/* end confdefs.h.  */
29004
29005/* Override any GCC internal prototype to avoid an error.
29006   Use char because int might match the return type of a GCC
29007   builtin and then its argument prototype would still apply.  */
29008#ifdef __cplusplus
29009extern "C"
29010#endif
29011char gethostbyname ();
29012int
29013main ()
29014{
29015return gethostbyname ();
29016  ;
29017  return 0;
29018}
29019_ACEOF
29020if ac_fn_cxx_try_link "$LINENO"; then :
29021  ac_cv_lib_nsl_gethostbyname=yes
29022else
29023  ac_cv_lib_nsl_gethostbyname=no
29024fi
29025rm -f core conftest.err conftest.$ac_objext \
29026    conftest$ac_exeext conftest.$ac_ext
29027LIBS=$ac_check_lib_save_LIBS
29028fi
29029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29030$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29031if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
29032  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29033fi
29034
29035      if test $ac_cv_lib_nsl_gethostbyname = no; then
29036	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29037$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29038if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29039  $as_echo_n "(cached) " >&6
29040else
29041  ac_check_lib_save_LIBS=$LIBS
29042LIBS="-lbsd  $LIBS"
29043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29044/* end confdefs.h.  */
29045
29046/* Override any GCC internal prototype to avoid an error.
29047   Use char because int might match the return type of a GCC
29048   builtin and then its argument prototype would still apply.  */
29049#ifdef __cplusplus
29050extern "C"
29051#endif
29052char gethostbyname ();
29053int
29054main ()
29055{
29056return gethostbyname ();
29057  ;
29058  return 0;
29059}
29060_ACEOF
29061if ac_fn_cxx_try_link "$LINENO"; then :
29062  ac_cv_lib_bsd_gethostbyname=yes
29063else
29064  ac_cv_lib_bsd_gethostbyname=no
29065fi
29066rm -f core conftest.err conftest.$ac_objext \
29067    conftest$ac_exeext conftest.$ac_ext
29068LIBS=$ac_check_lib_save_LIBS
29069fi
29070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29071$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29072if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29073  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29074fi
29075
29076      fi
29077    fi
29078
29079    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29080    # socket/setsockopt and other routines are undefined under SCO ODT
29081    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29082    # on later versions), says Simon Leinen: it contains gethostby*
29083    # variants that don't use the name server (or something).  -lsocket
29084    # must be given before -lnsl if both are needed.  We assume that
29085    # if connect needs -lnsl, so does gethostbyname.
29086    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29087if test "x$ac_cv_func_connect" = x""yes; then :
29088
29089fi
29090
29091    if test $ac_cv_func_connect = no; then
29092      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29093$as_echo_n "checking for connect in -lsocket... " >&6; }
29094if test "${ac_cv_lib_socket_connect+set}" = set; then :
29095  $as_echo_n "(cached) " >&6
29096else
29097  ac_check_lib_save_LIBS=$LIBS
29098LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29099cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29100/* end confdefs.h.  */
29101
29102/* Override any GCC internal prototype to avoid an error.
29103   Use char because int might match the return type of a GCC
29104   builtin and then its argument prototype would still apply.  */
29105#ifdef __cplusplus
29106extern "C"
29107#endif
29108char connect ();
29109int
29110main ()
29111{
29112return connect ();
29113  ;
29114  return 0;
29115}
29116_ACEOF
29117if ac_fn_cxx_try_link "$LINENO"; then :
29118  ac_cv_lib_socket_connect=yes
29119else
29120  ac_cv_lib_socket_connect=no
29121fi
29122rm -f core conftest.err conftest.$ac_objext \
29123    conftest$ac_exeext conftest.$ac_ext
29124LIBS=$ac_check_lib_save_LIBS
29125fi
29126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29127$as_echo "$ac_cv_lib_socket_connect" >&6; }
29128if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29129  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29130fi
29131
29132    fi
29133
29134    # Guillermo Gomez says -lposix is necessary on A/UX.
29135    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29136if test "x$ac_cv_func_remove" = x""yes; then :
29137
29138fi
29139
29140    if test $ac_cv_func_remove = no; then
29141      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29142$as_echo_n "checking for remove in -lposix... " >&6; }
29143if test "${ac_cv_lib_posix_remove+set}" = set; then :
29144  $as_echo_n "(cached) " >&6
29145else
29146  ac_check_lib_save_LIBS=$LIBS
29147LIBS="-lposix  $LIBS"
29148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29149/* end confdefs.h.  */
29150
29151/* Override any GCC internal prototype to avoid an error.
29152   Use char because int might match the return type of a GCC
29153   builtin and then its argument prototype would still apply.  */
29154#ifdef __cplusplus
29155extern "C"
29156#endif
29157char remove ();
29158int
29159main ()
29160{
29161return remove ();
29162  ;
29163  return 0;
29164}
29165_ACEOF
29166if ac_fn_cxx_try_link "$LINENO"; then :
29167  ac_cv_lib_posix_remove=yes
29168else
29169  ac_cv_lib_posix_remove=no
29170fi
29171rm -f core conftest.err conftest.$ac_objext \
29172    conftest$ac_exeext conftest.$ac_ext
29173LIBS=$ac_check_lib_save_LIBS
29174fi
29175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29176$as_echo "$ac_cv_lib_posix_remove" >&6; }
29177if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29178  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29179fi
29180
29181    fi
29182
29183    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29184    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29185if test "x$ac_cv_func_shmat" = x""yes; then :
29186
29187fi
29188
29189    if test $ac_cv_func_shmat = no; then
29190      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29191$as_echo_n "checking for shmat in -lipc... " >&6; }
29192if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29193  $as_echo_n "(cached) " >&6
29194else
29195  ac_check_lib_save_LIBS=$LIBS
29196LIBS="-lipc  $LIBS"
29197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29198/* end confdefs.h.  */
29199
29200/* Override any GCC internal prototype to avoid an error.
29201   Use char because int might match the return type of a GCC
29202   builtin and then its argument prototype would still apply.  */
29203#ifdef __cplusplus
29204extern "C"
29205#endif
29206char shmat ();
29207int
29208main ()
29209{
29210return shmat ();
29211  ;
29212  return 0;
29213}
29214_ACEOF
29215if ac_fn_cxx_try_link "$LINENO"; then :
29216  ac_cv_lib_ipc_shmat=yes
29217else
29218  ac_cv_lib_ipc_shmat=no
29219fi
29220rm -f core conftest.err conftest.$ac_objext \
29221    conftest$ac_exeext conftest.$ac_ext
29222LIBS=$ac_check_lib_save_LIBS
29223fi
29224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29225$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29226if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29227  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29228fi
29229
29230    fi
29231  fi
29232
29233  # Check for libraries that X11R6 Xt/Xaw programs need.
29234  ac_save_LDFLAGS=$LDFLAGS
29235  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29236  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29237  # check for ICE first), but we must link in the order -lSM -lICE or
29238  # we get undefined symbols.  So assume we have SM if we have ICE.
29239  # These have to be linked with before -lX11, unlike the other
29240  # libraries we check for below, so use a different variable.
29241  # John Interrante, Karl Berry
29242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29243$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29244if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29245  $as_echo_n "(cached) " >&6
29246else
29247  ac_check_lib_save_LIBS=$LIBS
29248LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29250/* end confdefs.h.  */
29251
29252/* Override any GCC internal prototype to avoid an error.
29253   Use char because int might match the return type of a GCC
29254   builtin and then its argument prototype would still apply.  */
29255#ifdef __cplusplus
29256extern "C"
29257#endif
29258char IceConnectionNumber ();
29259int
29260main ()
29261{
29262return IceConnectionNumber ();
29263  ;
29264  return 0;
29265}
29266_ACEOF
29267if ac_fn_cxx_try_link "$LINENO"; then :
29268  ac_cv_lib_ICE_IceConnectionNumber=yes
29269else
29270  ac_cv_lib_ICE_IceConnectionNumber=no
29271fi
29272rm -f core conftest.err conftest.$ac_objext \
29273    conftest$ac_exeext conftest.$ac_ext
29274LIBS=$ac_check_lib_save_LIBS
29275fi
29276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29277$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29278if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29279  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29280fi
29281
29282  LDFLAGS=$ac_save_LDFLAGS
29283
29284fi
29285
29286
29287# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29288# this doesn't make sense so we remove it.
29289if test "x$COMPILE_TYPE" = xcross; then
29290  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29291fi
29292
29293if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29294
29295    # Print a helpful message on how to acquire the necessary build dependency.
29296    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29297    MISSING_DEPENDENCY=x11
29298    PKGHANDLER_COMMAND=
29299
29300    case $PKGHANDLER in
29301	apt-get)
29302                apt_help     $MISSING_DEPENDENCY ;;
29303    yum)
29304                yum_help     $MISSING_DEPENDENCY ;;
29305	port)
29306                port_help    $MISSING_DEPENDENCY ;;
29307	pkgutil)
29308                pkgutil_help $MISSING_DEPENDENCY ;;
29309	pkgadd)
29310                pkgadd_help  $MISSING_DEPENDENCY ;;
29311    * )
29312      break ;;
29313    esac
29314
29315    if test "x$PKGHANDLER_COMMAND" != x; then
29316        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29317    fi
29318
29319    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29320fi
29321
29322# Some of the old makefiles require a setting of OPENWIN_HOME
29323# Since the X11R6 directory has disappeared on later Linuxes,
29324# we need to probe for it.
29325if test "x$OPENJDK_TARGET_OS" = xlinux; then
29326    if test -d "$SYS_ROOT/usr/X11R6"; then
29327        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29328    fi
29329    if test -d "$SYS_ROOT/usr/include/X11"; then
29330        OPENWIN_HOME="$SYS_ROOT/usr"
29331    fi
29332fi
29333if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29334    OPENWIN_HOME="/usr/openwin"
29335fi
29336
29337
29338
29339#
29340# Weird Sol10 something check...TODO change to try compile
29341#
29342if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29343  if test "`uname -r`" = "5.10"; then
29344     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29345     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29346     fi
29347  fi
29348fi
29349
29350ac_ext=c
29351ac_cpp='$CPP $CPPFLAGS'
29352ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29353ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29354ac_compiler_gnu=$ac_cv_c_compiler_gnu
29355
29356OLD_CFLAGS="$CFLAGS"
29357CFLAGS="$CFLAGS $X_CFLAGS"
29358
29359# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29360for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29361do :
29362  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29363ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29364                   # include <X11/Xutil.h>
29365
29366"
29367if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29368  cat >>confdefs.h <<_ACEOF
29369#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29370_ACEOF
29371 X11_A_OK=yes
29372else
29373  X11_A_OK=no
29374fi
29375
29376done
29377
29378
29379CFLAGS="$OLD_CFLAGS"
29380ac_ext=cpp
29381ac_cpp='$CXXCPP $CPPFLAGS'
29382ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29383ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29384ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29385
29386
29387if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29388
29389    # Print a helpful message on how to acquire the necessary build dependency.
29390    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29391    MISSING_DEPENDENCY=x11
29392    PKGHANDLER_COMMAND=
29393
29394    case $PKGHANDLER in
29395	apt-get)
29396                apt_help     $MISSING_DEPENDENCY ;;
29397    yum)
29398                yum_help     $MISSING_DEPENDENCY ;;
29399	port)
29400                port_help    $MISSING_DEPENDENCY ;;
29401	pkgutil)
29402                pkgutil_help $MISSING_DEPENDENCY ;;
29403	pkgadd)
29404                pkgadd_help  $MISSING_DEPENDENCY ;;
29405    * )
29406      break ;;
29407    esac
29408
29409    if test "x$PKGHANDLER_COMMAND" != x; then
29410        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29411    fi
29412
29413    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29414fi
29415
29416
29417
29418
29419
29420
29421###############################################################################
29422#
29423# The common unix printing system cups is used to print from java.
29424#
29425
29426# Check whether --with-cups was given.
29427if test "${with_cups+set}" = set; then :
29428  withval=$with_cups;
29429fi
29430
29431
29432# Check whether --with-cups-include was given.
29433if test "${with_cups_include+set}" = set; then :
29434  withval=$with_cups_include;
29435fi
29436
29437
29438if test "x$CUPS_NOT_NEEDED" = xyes; then
29439	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29440		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29441$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29442	fi
29443	CUPS_CFLAGS=
29444else
29445	CUPS_FOUND=no
29446
29447	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29448	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29449	fi
29450
29451	if test "x${with_cups}" != x; then
29452	    CUPS_CFLAGS="-I${with_cups}/include"
29453	    CUPS_FOUND=yes
29454	fi
29455	if test "x${with_cups_include}" != x; then
29456	    CUPS_CFLAGS="-I${with_cups_include}"
29457	    CUPS_FOUND=yes
29458	fi
29459	if test "x$CUPS_FOUND" = xno; then
29460
29461
29462    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29463        # Source the builddeps file again, to make sure it uses the latest variables!
29464        . $builddepsfile
29465        # Look for a target and build machine specific resource!
29466        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29467        if test "x$resource" = x; then
29468            # Ok, lets instead look for a target specific resource
29469            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29470        fi
29471        if test "x$resource" = x; then
29472            # Ok, lets instead look for a build specific resource
29473            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29474        fi
29475        if test "x$resource" = x; then
29476            # Ok, lets instead look for a generic resource
29477            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29478            resource=${builddep_cups}
29479        fi
29480        if test "x$resource" != x; then
29481            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29482$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29483	    # If the resource in the builddeps.conf file is an existing directory,
29484	    # for example /java/linux/cups
29485	    if test -d ${resource}; then
29486	       depdir=${resource}
29487	    else
29488
29489# cups is for example mymodule
29490# $resource is for example libs/general/libmymod_1_2_3.zip
29491# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29492# $with_builddeps_dir is for example /localhome/builddeps
29493# depdir is the name of the variable into which we store the depdir, eg MYMOD
29494# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29495# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29496    filename=`basename $resource`
29497    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29498    filebase=${filename%%.*}
29499    extension=${filename#*.}
29500    installdir=$with_builddeps_dir/$filebase
29501    if test ! -f $installdir/$filename.unpacked; then
29502        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29503$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29504        if test ! -d $installdir; then
29505            mkdir -p $installdir
29506        fi
29507        if test ! -d $installdir; then
29508            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29509        fi
29510        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29511        touch $tmpfile
29512        if test ! -f $tmpfile; then
29513            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29514        fi
29515
29516    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29517    # $tmpfile is the local file name for the downloaded file.
29518    VALID_TOOL=no
29519    if test "x$BDEPS_FTP" = xwget; then
29520       VALID_TOOL=yes
29521       wget -O $tmpfile $with_builddeps_server/$resource
29522    fi
29523    if test "x$BDEPS_FTP" = xlftp; then
29524       VALID_TOOL=yes
29525       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29526    fi
29527    if test "x$BDEPS_FTP" = xftp; then
29528        VALID_TOOL=yes
29529        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29530        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29531        FTPUSERPWD=${FTPSERVER%%@*}
29532        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29533            FTPUSER=${userpwd%%:*}
29534            FTPPWD=${userpwd#*@}
29535            FTPSERVER=${FTPSERVER#*@}
29536        else
29537            FTPUSER=ftp
29538            FTPPWD=ftp
29539        fi
29540        # the "pass" command does not work on some
29541        # ftp clients (read ftp.exe) but if it works,
29542        # passive mode is better!
29543        (\
29544            echo "user $FTPUSER $FTPPWD"        ;\
29545            echo "pass"                         ;\
29546            echo "bin"                          ;\
29547            echo "get $FTPPATH $tmpfile"              ;\
29548        ) | ftp -in $FTPSERVER
29549    fi
29550    if test "x$VALID_TOOL" != xyes; then
29551       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29552    fi
29553
29554        mv $tmpfile $installdir/$filename
29555        if test ! -s $installdir/$filename; then
29556            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29557        fi
29558        case "$extension" in
29559            zip)  echo "Unzipping $installdir/$filename..."
29560               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29561            ;;
29562            tar.gz) echo "Untaring $installdir/$filename..."
29563               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29564            ;;
29565            tgz) echo "Untaring $installdir/$filename..."
29566               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29567            ;;
29568            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29569            ;;
29570        esac
29571    fi
29572    if test -f $installdir/$filename.unpacked; then
29573        depdir=$installdir
29574    fi
29575
29576	    fi
29577            # Source the builddeps file again, because in the previous command, the depdir
29578            # was updated to point at the current build dependency install directory.
29579            . $builddepsfile
29580            # Now extract variables from the builddeps.conf files.
29581            theroot=${builddep_cups_ROOT}
29582            thecflags=${builddep_cups_CFLAGS}
29583            thelibs=${builddep_cups_LIBS}
29584            if test "x$depdir" = x; then
29585                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29586            fi
29587            CUPS=$depdir
29588            if test "x$theroot" != x; then
29589               CUPS="$theroot"
29590            fi
29591            if test "x$thecflags" != x; then
29592               CUPS_CFLAGS="$thecflags"
29593            fi
29594            if test "x$thelibs" != x; then
29595               CUPS_LIBS="$thelibs"
29596            fi
29597            CUPS_FOUND=yes
29598
29599        fi
29600
29601    fi
29602
29603	fi
29604	if test "x$CUPS_FOUND" = xno; then
29605	    # Are the cups headers installed in the default /usr/include location?
29606	    for ac_header in cups/cups.h cups/ppd.h
29607do :
29608  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29609ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29610if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29611  cat >>confdefs.h <<_ACEOF
29612#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29613_ACEOF
29614 CUPS_FOUND=yes
29615	                      CUPS_CFLAGS=
29616	                      DEFAULT_CUPS=yes
29617fi
29618
29619done
29620
29621	fi
29622	if test "x$CUPS_FOUND" = xno; then
29623	    # Getting nervous now? Lets poke around for standard Solaris third-party
29624	    # package installation locations.
29625	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29626$as_echo_n "checking for cups headers... " >&6; }
29627	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29628	       # An SFW package seems to be installed!
29629	       CUPS_FOUND=yes
29630	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29631	    elif test -s /opt/csw/include/cups/cups.h; then
29632	       # A CSW package seems to be installed!
29633	       CUPS_FOUND=yes
29634	       CUPS_CFLAGS="-I/opt/csw/include"
29635	    fi
29636	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29637$as_echo "$CUPS_FOUND" >&6; }
29638	fi
29639	if test "x$CUPS_FOUND" = xno; then
29640
29641    # Print a helpful message on how to acquire the necessary build dependency.
29642    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29643    MISSING_DEPENDENCY=cups
29644    PKGHANDLER_COMMAND=
29645
29646    case $PKGHANDLER in
29647	apt-get)
29648                apt_help     $MISSING_DEPENDENCY ;;
29649    yum)
29650                yum_help     $MISSING_DEPENDENCY ;;
29651	port)
29652                port_help    $MISSING_DEPENDENCY ;;
29653	pkgutil)
29654                pkgutil_help $MISSING_DEPENDENCY ;;
29655	pkgadd)
29656                pkgadd_help  $MISSING_DEPENDENCY ;;
29657    * )
29658      break ;;
29659    esac
29660
29661    if test "x$PKGHANDLER_COMMAND" != x; then
29662        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29663    fi
29664
29665	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29666	fi
29667fi
29668
29669
29670
29671
29672
29673
29674###############################################################################
29675#
29676# The ubiquitous freetype2 library is used to render fonts.
29677#
29678
29679# Check whether --with-freetype was given.
29680if test "${with_freetype+set}" = set; then :
29681  withval=$with_freetype;
29682fi
29683
29684
29685# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29686USING_SYSTEM_FT_LIB=false
29687
29688if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29689	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29690		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29691$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29692	fi
29693	FREETYPE2_CFLAGS=
29694	FREETYPE2_LIBS=
29695        FREETYPE2_LIB_PATH=
29696else
29697	FREETYPE2_FOUND=no
29698
29699	if test "x$with_freetype" != x; then
29700
29701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29702
29703  # Input might be given as Windows format, start by converting to
29704  # unix format.
29705  path="$with_freetype"
29706  new_path=`$CYGPATH -u "$path"`
29707
29708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29711  # "foo.exe" is OK but "foo" is an error.
29712  #
29713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29714  # It is also a way to make sure we got the proper file name for the real test later on.
29715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29716  if test "x$test_shortpath" = x; then
29717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29718$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29719    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29720  fi
29721
29722  # Call helper function which possibly converts this using DOS-style short mode.
29723  # If so, the updated path is stored in $new_path.
29724
29725  input_path="$new_path"
29726  # Check if we need to convert this using DOS-style short mode. If the path
29727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29728  # take no chances and rewrite it.
29729  # Note: m4 eats our [], so we need to use [ and ] instead.
29730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29731  if test "x$has_forbidden_chars" != x; then
29732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29736      # Going to short mode and back again did indeed matter. Since short mode is
29737      # case insensitive, let's make it lowercase to improve readability.
29738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29739      # Now convert it back to Unix-stile (cygpath)
29740      input_path=`$CYGPATH -u "$shortmode_path"`
29741      new_path="$input_path"
29742    fi
29743  fi
29744
29745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29746  if test "x$test_cygdrive_prefix" = x; then
29747    # As a simple fix, exclude /usr/bin since it's not a real path.
29748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29750      # a path prefixed by /cygdrive for fixpath to work.
29751      new_path="$CYGWIN_ROOT_PATH$input_path"
29752    fi
29753  fi
29754
29755
29756  if test "x$path" != "x$new_path"; then
29757    with_freetype="$new_path"
29758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29759$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29760  fi
29761
29762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29763
29764  path="$with_freetype"
29765  has_colon=`$ECHO $path | $GREP ^.:`
29766  new_path="$path"
29767  if test "x$has_colon" = x; then
29768    # Not in mixed or Windows style, start by that.
29769    new_path=`cmd //c echo $path`
29770  fi
29771
29772
29773  input_path="$new_path"
29774  # Check if we need to convert this using DOS-style short mode. If the path
29775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29776  # take no chances and rewrite it.
29777  # Note: m4 eats our [], so we need to use [ and ] instead.
29778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29779  if test "x$has_forbidden_chars" != x; then
29780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29782  fi
29783
29784
29785  windows_path="$new_path"
29786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29787    unix_path=`$CYGPATH -u "$windows_path"`
29788    new_path="$unix_path"
29789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29791    new_path="$unix_path"
29792  fi
29793
29794  if test "x$path" != "x$new_path"; then
29795    with_freetype="$new_path"
29796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29797$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29798  fi
29799
29800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29802
29803  else
29804    # We're on a posix platform. Hooray! :)
29805    path="$with_freetype"
29806
29807    if test ! -f "$path" && test ! -d "$path"; then
29808      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29809    fi
29810
29811    has_space=`$ECHO "$path" | $GREP " "`
29812    if test "x$has_space" != x; then
29813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29814$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29815      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29816    fi
29817  fi
29818
29819	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29820            FREETYPE2_LIB_PATH="$with_freetype/lib"
29821            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29822                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29823                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29824            fi
29825            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29826                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29827            fi
29828	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29829            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29830                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29831            fi
29832 	    FREETYPE2_FOUND=yes
29833   	    if test "x$FREETYPE2_FOUND" = xyes; then
29834	        # Verify that the directories exist
29835                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29836		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29837		fi
29838	        # List the contents of the lib.
29839		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29840                if test "x$FREETYPELIB" = x; then
29841		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29842		fi
29843	        # Check one h-file
29844                if ! test -s "$with_freetype/include/ft2build.h"; then
29845		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29846		fi
29847            fi
29848        fi
29849	if test "x$FREETYPE2_FOUND" = xno; then
29850
29851
29852    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29853        # Source the builddeps file again, to make sure it uses the latest variables!
29854        . $builddepsfile
29855        # Look for a target and build machine specific resource!
29856        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29857        if test "x$resource" = x; then
29858            # Ok, lets instead look for a target specific resource
29859            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29860        fi
29861        if test "x$resource" = x; then
29862            # Ok, lets instead look for a build specific resource
29863            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29864        fi
29865        if test "x$resource" = x; then
29866            # Ok, lets instead look for a generic resource
29867            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29868            resource=${builddep_freetype2}
29869        fi
29870        if test "x$resource" != x; then
29871            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29872$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29873	    # If the resource in the builddeps.conf file is an existing directory,
29874	    # for example /java/linux/cups
29875	    if test -d ${resource}; then
29876	       depdir=${resource}
29877	    else
29878
29879# freetype2 is for example mymodule
29880# $resource is for example libs/general/libmymod_1_2_3.zip
29881# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29882# $with_builddeps_dir is for example /localhome/builddeps
29883# depdir is the name of the variable into which we store the depdir, eg MYMOD
29884# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29885# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29886    filename=`basename $resource`
29887    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29888    filebase=${filename%%.*}
29889    extension=${filename#*.}
29890    installdir=$with_builddeps_dir/$filebase
29891    if test ! -f $installdir/$filename.unpacked; then
29892        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29893$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29894        if test ! -d $installdir; then
29895            mkdir -p $installdir
29896        fi
29897        if test ! -d $installdir; then
29898            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29899        fi
29900        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29901        touch $tmpfile
29902        if test ! -f $tmpfile; then
29903            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29904        fi
29905
29906    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29907    # $tmpfile is the local file name for the downloaded file.
29908    VALID_TOOL=no
29909    if test "x$BDEPS_FTP" = xwget; then
29910       VALID_TOOL=yes
29911       wget -O $tmpfile $with_builddeps_server/$resource
29912    fi
29913    if test "x$BDEPS_FTP" = xlftp; then
29914       VALID_TOOL=yes
29915       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29916    fi
29917    if test "x$BDEPS_FTP" = xftp; then
29918        VALID_TOOL=yes
29919        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29920        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29921        FTPUSERPWD=${FTPSERVER%%@*}
29922        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29923            FTPUSER=${userpwd%%:*}
29924            FTPPWD=${userpwd#*@}
29925            FTPSERVER=${FTPSERVER#*@}
29926        else
29927            FTPUSER=ftp
29928            FTPPWD=ftp
29929        fi
29930        # the "pass" command does not work on some
29931        # ftp clients (read ftp.exe) but if it works,
29932        # passive mode is better!
29933        (\
29934            echo "user $FTPUSER $FTPPWD"        ;\
29935            echo "pass"                         ;\
29936            echo "bin"                          ;\
29937            echo "get $FTPPATH $tmpfile"              ;\
29938        ) | ftp -in $FTPSERVER
29939    fi
29940    if test "x$VALID_TOOL" != xyes; then
29941       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29942    fi
29943
29944        mv $tmpfile $installdir/$filename
29945        if test ! -s $installdir/$filename; then
29946            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29947        fi
29948        case "$extension" in
29949            zip)  echo "Unzipping $installdir/$filename..."
29950               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29951            ;;
29952            tar.gz) echo "Untaring $installdir/$filename..."
29953               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29954            ;;
29955            tgz) echo "Untaring $installdir/$filename..."
29956               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29957            ;;
29958            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29959            ;;
29960        esac
29961    fi
29962    if test -f $installdir/$filename.unpacked; then
29963        depdir=$installdir
29964    fi
29965
29966	    fi
29967            # Source the builddeps file again, because in the previous command, the depdir
29968            # was updated to point at the current build dependency install directory.
29969            . $builddepsfile
29970            # Now extract variables from the builddeps.conf files.
29971            theroot=${builddep_freetype2_ROOT}
29972            thecflags=${builddep_freetype2_CFLAGS}
29973            thelibs=${builddep_freetype2_LIBS}
29974            if test "x$depdir" = x; then
29975                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29976            fi
29977            FREETYPE2=$depdir
29978            if test "x$theroot" != x; then
29979               FREETYPE2="$theroot"
29980            fi
29981            if test "x$thecflags" != x; then
29982               FREETYPE2_CFLAGS="$thecflags"
29983            fi
29984            if test "x$thelibs" != x; then
29985               FREETYPE2_LIBS="$thelibs"
29986            fi
29987            FREETYPE2_FOUND=yes
29988            else FREETYPE2_FOUND=no
29989
29990        fi
29991        else FREETYPE2_FOUND=no
29992
29993    fi
29994
29995            USING_SYSTEM_FT_LIB=true
29996	fi
29997	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29998            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29999
30000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30001
30002  # Input might be given as Windows format, start by converting to
30003  # unix format.
30004  path="$FREETYPELOCATION"
30005  new_path=`$CYGPATH -u "$path"`
30006
30007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30010  # "foo.exe" is OK but "foo" is an error.
30011  #
30012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30013  # It is also a way to make sure we got the proper file name for the real test later on.
30014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30015  if test "x$test_shortpath" = x; then
30016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30017$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30018    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30019  fi
30020
30021  # Call helper function which possibly converts this using DOS-style short mode.
30022  # If so, the updated path is stored in $new_path.
30023
30024  input_path="$new_path"
30025  # Check if we need to convert this using DOS-style short mode. If the path
30026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30027  # take no chances and rewrite it.
30028  # Note: m4 eats our [], so we need to use [ and ] instead.
30029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30030  if test "x$has_forbidden_chars" != x; then
30031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30035      # Going to short mode and back again did indeed matter. Since short mode is
30036      # case insensitive, let's make it lowercase to improve readability.
30037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30038      # Now convert it back to Unix-stile (cygpath)
30039      input_path=`$CYGPATH -u "$shortmode_path"`
30040      new_path="$input_path"
30041    fi
30042  fi
30043
30044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30045  if test "x$test_cygdrive_prefix" = x; then
30046    # As a simple fix, exclude /usr/bin since it's not a real path.
30047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30049      # a path prefixed by /cygdrive for fixpath to work.
30050      new_path="$CYGWIN_ROOT_PATH$input_path"
30051    fi
30052  fi
30053
30054
30055  if test "x$path" != "x$new_path"; then
30056    FREETYPELOCATION="$new_path"
30057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30058$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30059  fi
30060
30061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30062
30063  path="$FREETYPELOCATION"
30064  has_colon=`$ECHO $path | $GREP ^.:`
30065  new_path="$path"
30066  if test "x$has_colon" = x; then
30067    # Not in mixed or Windows style, start by that.
30068    new_path=`cmd //c echo $path`
30069  fi
30070
30071
30072  input_path="$new_path"
30073  # Check if we need to convert this using DOS-style short mode. If the path
30074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30075  # take no chances and rewrite it.
30076  # Note: m4 eats our [], so we need to use [ and ] instead.
30077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30078  if test "x$has_forbidden_chars" != x; then
30079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30081  fi
30082
30083
30084  windows_path="$new_path"
30085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30086    unix_path=`$CYGPATH -u "$windows_path"`
30087    new_path="$unix_path"
30088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30090    new_path="$unix_path"
30091  fi
30092
30093  if test "x$path" != "x$new_path"; then
30094    FREETYPELOCATION="$new_path"
30095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30096$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30097  fi
30098
30099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30101
30102  else
30103    # We're on a posix platform. Hooray! :)
30104    path="$FREETYPELOCATION"
30105
30106    if test ! -f "$path" && test ! -d "$path"; then
30107      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30108    fi
30109
30110    has_space=`$ECHO "$path" | $GREP " "`
30111    if test "x$has_space" != x; then
30112      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30113$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30114      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30115    fi
30116  fi
30117
30118	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30119$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30120	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30121	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30122	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30123 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30124                if ! test -s "$FREETYPE2_LIBS"; then
30125		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30126		fi
30127                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30128		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30129		fi
30130                USING_SYSTEM_FT_LIB=true
30131                FREETYPE2_FOUND=yes
30132	    fi
30133	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30134$as_echo "$FREETYPE2_FOUND" >&6; }
30135        fi
30136	if test "x$FREETYPE2_FOUND" = xno; then
30137
30138pkg_failed=no
30139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30140$as_echo_n "checking for FREETYPE2... " >&6; }
30141
30142if test -n "$FREETYPE2_CFLAGS"; then
30143    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30144 elif test -n "$PKG_CONFIG"; then
30145    if test -n "$PKG_CONFIG" && \
30146    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30147  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30148  ac_status=$?
30149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30150  test $ac_status = 0; }; then
30151  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30152else
30153  pkg_failed=yes
30154fi
30155 else
30156    pkg_failed=untried
30157fi
30158if test -n "$FREETYPE2_LIBS"; then
30159    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30160 elif test -n "$PKG_CONFIG"; then
30161    if test -n "$PKG_CONFIG" && \
30162    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30163  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30164  ac_status=$?
30165  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30166  test $ac_status = 0; }; then
30167  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30168else
30169  pkg_failed=yes
30170fi
30171 else
30172    pkg_failed=untried
30173fi
30174
30175
30176
30177if test $pkg_failed = yes; then
30178
30179if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30180        _pkg_short_errors_supported=yes
30181else
30182        _pkg_short_errors_supported=no
30183fi
30184        if test $_pkg_short_errors_supported = yes; then
30185	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30186        else
30187	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30188        fi
30189	# Put the nasty error message in config.log where it belongs
30190	echo "$FREETYPE2_PKG_ERRORS" >&5
30191
30192	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30193$as_echo "no" >&6; }
30194                FREETYPE2_FOUND=no
30195elif test $pkg_failed = untried; then
30196	FREETYPE2_FOUND=no
30197else
30198	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30199	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30201$as_echo "yes" >&6; }
30202	FREETYPE2_FOUND=yes
30203fi
30204            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30205            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30206            USING_SYSTEM_FT_LIB=true
30207            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30208            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30209              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30210            fi
30211	fi
30212	if test "x$FREETYPE2_FOUND" = xno; then
30213	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30214$as_echo_n "checking for freetype in some standard locations... " >&6; }
30215
30216	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30217	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30218	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30219	    fi
30220	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30221	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30222	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30223	    fi
30224
30225	    PREV_CXXCFLAGS="$CXXFLAGS"
30226	    PREV_LDFLAGS="$LDFLAGS"
30227	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30228	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30229	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30230/* end confdefs.h.  */
30231#include<ft2build.h>
30232	                    #include FT_FREETYPE_H
30233	                   int main() { return 0; }
30234
30235_ACEOF
30236if ac_fn_cxx_try_link "$LINENO"; then :
30237
30238	                      # Yes, the default cflags and libs did the trick.
30239	                      FREETYPE2_FOUND=yes
30240	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30241	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30242
30243else
30244
30245	                      FREETYPE2_FOUND=no
30246
30247fi
30248rm -f core conftest.err conftest.$ac_objext \
30249    conftest$ac_exeext conftest.$ac_ext
30250            CXXCFLAGS="$PREV_CXXFLAGS"
30251	    LDFLAGS="$PREV_LDFLAGS"
30252	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30253$as_echo "$FREETYPE2_FOUND" >&6; }
30254            USING_SYSTEM_FT_LIB=true
30255	fi
30256	if test "x$FREETYPE2_FOUND" = xno; then
30257
30258    # Print a helpful message on how to acquire the necessary build dependency.
30259    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30260    MISSING_DEPENDENCY=freetype2
30261    PKGHANDLER_COMMAND=
30262
30263    case $PKGHANDLER in
30264	apt-get)
30265                apt_help     $MISSING_DEPENDENCY ;;
30266    yum)
30267                yum_help     $MISSING_DEPENDENCY ;;
30268	port)
30269                port_help    $MISSING_DEPENDENCY ;;
30270	pkgutil)
30271                pkgutil_help $MISSING_DEPENDENCY ;;
30272	pkgadd)
30273                pkgadd_help  $MISSING_DEPENDENCY ;;
30274    * )
30275      break ;;
30276    esac
30277
30278    if test "x$PKGHANDLER_COMMAND" != x; then
30279        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30280    fi
30281
30282		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30283	fi
30284
30285        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30286            # AC_CHECK_LIB does not support use of cl.exe
30287            PREV_LDFLAGS="$LDFLAGS"
30288            LDFLAGS="$FREETYPE2_LIBS"
30289            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30290$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30291if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30292  $as_echo_n "(cached) " >&6
30293else
30294  ac_check_lib_save_LIBS=$LIBS
30295LIBS="-lfreetype  $LIBS"
30296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30297/* end confdefs.h.  */
30298
30299/* Override any GCC internal prototype to avoid an error.
30300   Use char because int might match the return type of a GCC
30301   builtin and then its argument prototype would still apply.  */
30302#ifdef __cplusplus
30303extern "C"
30304#endif
30305char FT_Init_FreeType ();
30306int
30307main ()
30308{
30309return FT_Init_FreeType ();
30310  ;
30311  return 0;
30312}
30313_ACEOF
30314if ac_fn_cxx_try_link "$LINENO"; then :
30315  ac_cv_lib_freetype_FT_Init_FreeType=yes
30316else
30317  ac_cv_lib_freetype_FT_Init_FreeType=no
30318fi
30319rm -f core conftest.err conftest.$ac_objext \
30320    conftest$ac_exeext conftest.$ac_ext
30321LIBS=$ac_check_lib_save_LIBS
30322fi
30323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30324$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30325if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30326  FREETYPE2_FOUND=true
30327else
30328  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30329fi
30330
30331            LDFLAGS="$PREV_LDFLAGS"
30332        fi
30333fi
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343###############################################################################
30344#
30345# Check for alsa headers and libraries. Used on Linux/GNU systems.
30346#
30347
30348# Check whether --with-alsa was given.
30349if test "${with_alsa+set}" = set; then :
30350  withval=$with_alsa;
30351fi
30352
30353
30354# Check whether --with-alsa-include was given.
30355if test "${with_alsa_include+set}" = set; then :
30356  withval=$with_alsa_include;
30357fi
30358
30359
30360# Check whether --with-alsa-lib was given.
30361if test "${with_alsa_lib+set}" = set; then :
30362  withval=$with_alsa_lib;
30363fi
30364
30365
30366if test "x$ALSA_NOT_NEEDED" = xyes; then
30367	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30368		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30369$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30370	fi
30371	ALSA_CFLAGS=
30372	ALSA_LIBS=
30373else
30374	ALSA_FOUND=no
30375
30376	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30377	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30378	fi
30379
30380	if test "x${with_alsa}" != x; then
30381	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30382	    ALSA_CFLAGS="-I${with_alsa}/include"
30383	    ALSA_FOUND=yes
30384	fi
30385	if test "x${with_alsa_include}" != x; then
30386	    ALSA_CFLAGS="-I${with_alsa_include}"
30387	    ALSA_FOUND=yes
30388	fi
30389	if test "x${with_alsa_lib}" != x; then
30390	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30391	    ALSA_FOUND=yes
30392	fi
30393	if test "x$ALSA_FOUND" = xno; then
30394
30395
30396    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30397        # Source the builddeps file again, to make sure it uses the latest variables!
30398        . $builddepsfile
30399        # Look for a target and build machine specific resource!
30400        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30401        if test "x$resource" = x; then
30402            # Ok, lets instead look for a target specific resource
30403            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30404        fi
30405        if test "x$resource" = x; then
30406            # Ok, lets instead look for a build specific resource
30407            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30408        fi
30409        if test "x$resource" = x; then
30410            # Ok, lets instead look for a generic resource
30411            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30412            resource=${builddep_alsa}
30413        fi
30414        if test "x$resource" != x; then
30415            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30416$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30417	    # If the resource in the builddeps.conf file is an existing directory,
30418	    # for example /java/linux/cups
30419	    if test -d ${resource}; then
30420	       depdir=${resource}
30421	    else
30422
30423# alsa is for example mymodule
30424# $resource is for example libs/general/libmymod_1_2_3.zip
30425# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30426# $with_builddeps_dir is for example /localhome/builddeps
30427# depdir is the name of the variable into which we store the depdir, eg MYMOD
30428# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30429# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30430    filename=`basename $resource`
30431    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30432    filebase=${filename%%.*}
30433    extension=${filename#*.}
30434    installdir=$with_builddeps_dir/$filebase
30435    if test ! -f $installdir/$filename.unpacked; then
30436        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30437$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30438        if test ! -d $installdir; then
30439            mkdir -p $installdir
30440        fi
30441        if test ! -d $installdir; then
30442            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30443        fi
30444        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30445        touch $tmpfile
30446        if test ! -f $tmpfile; then
30447            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30448        fi
30449
30450    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30451    # $tmpfile is the local file name for the downloaded file.
30452    VALID_TOOL=no
30453    if test "x$BDEPS_FTP" = xwget; then
30454       VALID_TOOL=yes
30455       wget -O $tmpfile $with_builddeps_server/$resource
30456    fi
30457    if test "x$BDEPS_FTP" = xlftp; then
30458       VALID_TOOL=yes
30459       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30460    fi
30461    if test "x$BDEPS_FTP" = xftp; then
30462        VALID_TOOL=yes
30463        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30464        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30465        FTPUSERPWD=${FTPSERVER%%@*}
30466        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30467            FTPUSER=${userpwd%%:*}
30468            FTPPWD=${userpwd#*@}
30469            FTPSERVER=${FTPSERVER#*@}
30470        else
30471            FTPUSER=ftp
30472            FTPPWD=ftp
30473        fi
30474        # the "pass" command does not work on some
30475        # ftp clients (read ftp.exe) but if it works,
30476        # passive mode is better!
30477        (\
30478            echo "user $FTPUSER $FTPPWD"        ;\
30479            echo "pass"                         ;\
30480            echo "bin"                          ;\
30481            echo "get $FTPPATH $tmpfile"              ;\
30482        ) | ftp -in $FTPSERVER
30483    fi
30484    if test "x$VALID_TOOL" != xyes; then
30485       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30486    fi
30487
30488        mv $tmpfile $installdir/$filename
30489        if test ! -s $installdir/$filename; then
30490            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30491        fi
30492        case "$extension" in
30493            zip)  echo "Unzipping $installdir/$filename..."
30494               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30495            ;;
30496            tar.gz) echo "Untaring $installdir/$filename..."
30497               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30498            ;;
30499            tgz) echo "Untaring $installdir/$filename..."
30500               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30501            ;;
30502            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30503            ;;
30504        esac
30505    fi
30506    if test -f $installdir/$filename.unpacked; then
30507        depdir=$installdir
30508    fi
30509
30510	    fi
30511            # Source the builddeps file again, because in the previous command, the depdir
30512            # was updated to point at the current build dependency install directory.
30513            . $builddepsfile
30514            # Now extract variables from the builddeps.conf files.
30515            theroot=${builddep_alsa_ROOT}
30516            thecflags=${builddep_alsa_CFLAGS}
30517            thelibs=${builddep_alsa_LIBS}
30518            if test "x$depdir" = x; then
30519                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30520            fi
30521            ALSA=$depdir
30522            if test "x$theroot" != x; then
30523               ALSA="$theroot"
30524            fi
30525            if test "x$thecflags" != x; then
30526               ALSA_CFLAGS="$thecflags"
30527            fi
30528            if test "x$thelibs" != x; then
30529               ALSA_LIBS="$thelibs"
30530            fi
30531            ALSA_FOUND=yes
30532            else ALSA_FOUND=no
30533
30534        fi
30535        else ALSA_FOUND=no
30536
30537    fi
30538
30539	fi
30540	if test "x$ALSA_FOUND" = xno; then
30541
30542pkg_failed=no
30543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30544$as_echo_n "checking for ALSA... " >&6; }
30545
30546if test -n "$ALSA_CFLAGS"; then
30547    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30548 elif test -n "$PKG_CONFIG"; then
30549    if test -n "$PKG_CONFIG" && \
30550    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30551  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30552  ac_status=$?
30553  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30554  test $ac_status = 0; }; then
30555  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30556else
30557  pkg_failed=yes
30558fi
30559 else
30560    pkg_failed=untried
30561fi
30562if test -n "$ALSA_LIBS"; then
30563    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30564 elif test -n "$PKG_CONFIG"; then
30565    if test -n "$PKG_CONFIG" && \
30566    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30567  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30568  ac_status=$?
30569  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30570  test $ac_status = 0; }; then
30571  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30572else
30573  pkg_failed=yes
30574fi
30575 else
30576    pkg_failed=untried
30577fi
30578
30579
30580
30581if test $pkg_failed = yes; then
30582
30583if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30584        _pkg_short_errors_supported=yes
30585else
30586        _pkg_short_errors_supported=no
30587fi
30588        if test $_pkg_short_errors_supported = yes; then
30589	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30590        else
30591	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30592        fi
30593	# Put the nasty error message in config.log where it belongs
30594	echo "$ALSA_PKG_ERRORS" >&5
30595
30596	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30597$as_echo "no" >&6; }
30598                ALSA_FOUND=no
30599elif test $pkg_failed = untried; then
30600	ALSA_FOUND=no
30601else
30602	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30603	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30605$as_echo "yes" >&6; }
30606	ALSA_FOUND=yes
30607fi
30608	fi
30609	if test "x$ALSA_FOUND" = xno; then
30610	    for ac_header in alsa/asoundlib.h
30611do :
30612  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30613if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30614  cat >>confdefs.h <<_ACEOF
30615#define HAVE_ALSA_ASOUNDLIB_H 1
30616_ACEOF
30617 ALSA_FOUND=yes
30618	                      ALSA_CFLAGS=-Iignoreme
30619	                      ALSA_LIBS=-lasound
30620	                      DEFAULT_ALSA=yes
30621else
30622  ALSA_FOUND=no
30623fi
30624
30625done
30626
30627	fi
30628	if test "x$ALSA_FOUND" = xno; then
30629
30630    # Print a helpful message on how to acquire the necessary build dependency.
30631    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30632    MISSING_DEPENDENCY=alsa
30633    PKGHANDLER_COMMAND=
30634
30635    case $PKGHANDLER in
30636	apt-get)
30637                apt_help     $MISSING_DEPENDENCY ;;
30638    yum)
30639                yum_help     $MISSING_DEPENDENCY ;;
30640	port)
30641                port_help    $MISSING_DEPENDENCY ;;
30642	pkgutil)
30643                pkgutil_help $MISSING_DEPENDENCY ;;
30644	pkgadd)
30645                pkgadd_help  $MISSING_DEPENDENCY ;;
30646    * )
30647      break ;;
30648    esac
30649
30650    if test "x$PKGHANDLER_COMMAND" != x; then
30651        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30652    fi
30653
30654	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30655	fi
30656fi
30657
30658
30659
30660
30661
30662
30663
30664###############################################################################
30665#
30666# Check for the jpeg library
30667#
30668
30669USE_EXTERNAL_LIBJPEG=true
30670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30671$as_echo_n "checking for main in -ljpeg... " >&6; }
30672if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30673  $as_echo_n "(cached) " >&6
30674else
30675  ac_check_lib_save_LIBS=$LIBS
30676LIBS="-ljpeg  $LIBS"
30677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30678/* end confdefs.h.  */
30679
30680
30681int
30682main ()
30683{
30684return main ();
30685  ;
30686  return 0;
30687}
30688_ACEOF
30689if ac_fn_cxx_try_link "$LINENO"; then :
30690  ac_cv_lib_jpeg_main=yes
30691else
30692  ac_cv_lib_jpeg_main=no
30693fi
30694rm -f core conftest.err conftest.$ac_objext \
30695    conftest$ac_exeext conftest.$ac_ext
30696LIBS=$ac_check_lib_save_LIBS
30697fi
30698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30699$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30700if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30701  cat >>confdefs.h <<_ACEOF
30702#define HAVE_LIBJPEG 1
30703_ACEOF
30704
30705  LIBS="-ljpeg $LIBS"
30706
30707else
30708   USE_EXTERNAL_LIBJPEG=false
30709               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30710$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30711
30712fi
30713
30714
30715
30716###############################################################################
30717#
30718# Check for the gif library
30719#
30720
30721USE_EXTERNAL_LIBJPEG=true
30722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30723$as_echo_n "checking for main in -lgif... " >&6; }
30724if test "${ac_cv_lib_gif_main+set}" = set; then :
30725  $as_echo_n "(cached) " >&6
30726else
30727  ac_check_lib_save_LIBS=$LIBS
30728LIBS="-lgif  $LIBS"
30729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30730/* end confdefs.h.  */
30731
30732
30733int
30734main ()
30735{
30736return main ();
30737  ;
30738  return 0;
30739}
30740_ACEOF
30741if ac_fn_cxx_try_link "$LINENO"; then :
30742  ac_cv_lib_gif_main=yes
30743else
30744  ac_cv_lib_gif_main=no
30745fi
30746rm -f core conftest.err conftest.$ac_objext \
30747    conftest$ac_exeext conftest.$ac_ext
30748LIBS=$ac_check_lib_save_LIBS
30749fi
30750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30751$as_echo "$ac_cv_lib_gif_main" >&6; }
30752if test "x$ac_cv_lib_gif_main" = x""yes; then :
30753  cat >>confdefs.h <<_ACEOF
30754#define HAVE_LIBGIF 1
30755_ACEOF
30756
30757  LIBS="-lgif $LIBS"
30758
30759else
30760   USE_EXTERNAL_LIBGIF=false
30761               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30762$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30763
30764fi
30765
30766
30767
30768###############################################################################
30769#
30770# Check for the zlib library
30771#
30772
30773
30774# Check whether --with-zlib was given.
30775if test "${with_zlib+set}" = set; then :
30776  withval=$with_zlib;
30777fi
30778
30779
30780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30781$as_echo_n "checking for compress in -lz... " >&6; }
30782if test "${ac_cv_lib_z_compress+set}" = set; then :
30783  $as_echo_n "(cached) " >&6
30784else
30785  ac_check_lib_save_LIBS=$LIBS
30786LIBS="-lz  $LIBS"
30787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30788/* end confdefs.h.  */
30789
30790/* Override any GCC internal prototype to avoid an error.
30791   Use char because int might match the return type of a GCC
30792   builtin and then its argument prototype would still apply.  */
30793#ifdef __cplusplus
30794extern "C"
30795#endif
30796char compress ();
30797int
30798main ()
30799{
30800return compress ();
30801  ;
30802  return 0;
30803}
30804_ACEOF
30805if ac_fn_cxx_try_link "$LINENO"; then :
30806  ac_cv_lib_z_compress=yes
30807else
30808  ac_cv_lib_z_compress=no
30809fi
30810rm -f core conftest.err conftest.$ac_objext \
30811    conftest$ac_exeext conftest.$ac_ext
30812LIBS=$ac_check_lib_save_LIBS
30813fi
30814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30815$as_echo "$ac_cv_lib_z_compress" >&6; }
30816if test "x$ac_cv_lib_z_compress" = x""yes; then :
30817   ZLIB_FOUND=yes
30818else
30819   ZLIB_FOUND=no
30820fi
30821
30822
30823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30824$as_echo_n "checking for which zlib to use... " >&6; }
30825
30826DEFAULT_ZLIB=bundled
30827if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30828#
30829# On macosx default is system...on others default is
30830#
30831    DEFAULT_ZLIB=system
30832fi
30833
30834if test "x${ZLIB_FOUND}" != "xyes"; then
30835#
30836# If we don't find any system...set default to bundled
30837#
30838    DEFAULT_ZLIB=bundled
30839fi
30840
30841#
30842# If user didn't specify, use DEFAULT_ZLIB
30843#
30844if test "x${with_zlib}" = "x"; then
30845    with_zlib=${DEFAULT_ZLIB}
30846fi
30847
30848if test "x${with_zlib}" = "xbundled"; then
30849    USE_EXTERNAL_LIBZ=false
30850    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30851$as_echo "bundled" >&6; }
30852elif test "x${with_zlib}" = "xsystem"; then
30853    if test "x${ZLIB_FOUND}" = "xyes"; then
30854        USE_EXTERNAL_LIBZ=true
30855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30856$as_echo "system" >&6; }
30857    else
30858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30859$as_echo "system not found" >&6; }
30860        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30861    fi
30862else
30863    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30864fi
30865
30866
30867
30868###############################################################################
30869LIBZIP_CAN_USE_MMAP=true
30870
30871
30872
30873###############################################################################
30874#
30875# Check if altzone exists in time.h
30876#
30877
30878cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30879/* end confdefs.h.  */
30880#include <time.h>
30881int
30882main ()
30883{
30884return (int)altzone;
30885  ;
30886  return 0;
30887}
30888_ACEOF
30889if ac_fn_cxx_try_link "$LINENO"; then :
30890  has_altzone=yes
30891else
30892  has_altzone=no
30893fi
30894rm -f core conftest.err conftest.$ac_objext \
30895    conftest$ac_exeext conftest.$ac_ext
30896if test "x$has_altzone" = xyes; then
30897
30898$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30899
30900fi
30901
30902###############################################################################
30903#
30904# Check the maths library
30905#
30906
30907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30908$as_echo_n "checking for cos in -lm... " >&6; }
30909if test "${ac_cv_lib_m_cos+set}" = set; then :
30910  $as_echo_n "(cached) " >&6
30911else
30912  ac_check_lib_save_LIBS=$LIBS
30913LIBS="-lm  $LIBS"
30914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30915/* end confdefs.h.  */
30916
30917/* Override any GCC internal prototype to avoid an error.
30918   Use char because int might match the return type of a GCC
30919   builtin and then its argument prototype would still apply.  */
30920#ifdef __cplusplus
30921extern "C"
30922#endif
30923char cos ();
30924int
30925main ()
30926{
30927return cos ();
30928  ;
30929  return 0;
30930}
30931_ACEOF
30932if ac_fn_cxx_try_link "$LINENO"; then :
30933  ac_cv_lib_m_cos=yes
30934else
30935  ac_cv_lib_m_cos=no
30936fi
30937rm -f core conftest.err conftest.$ac_objext \
30938    conftest$ac_exeext conftest.$ac_ext
30939LIBS=$ac_check_lib_save_LIBS
30940fi
30941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30942$as_echo "$ac_cv_lib_m_cos" >&6; }
30943if test "x$ac_cv_lib_m_cos" = x""yes; then :
30944  cat >>confdefs.h <<_ACEOF
30945#define HAVE_LIBM 1
30946_ACEOF
30947
30948  LIBS="-lm $LIBS"
30949
30950else
30951
30952                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30953$as_echo "$as_me: Maths library was not found" >&6;}
30954
30955fi
30956
30957
30958
30959###############################################################################
30960#
30961# Check for libdl.so
30962
30963save_LIBS="$LIBS"
30964LIBS=""
30965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30966$as_echo_n "checking for dlopen in -ldl... " >&6; }
30967if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30968  $as_echo_n "(cached) " >&6
30969else
30970  ac_check_lib_save_LIBS=$LIBS
30971LIBS="-ldl  $LIBS"
30972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30973/* end confdefs.h.  */
30974
30975/* Override any GCC internal prototype to avoid an error.
30976   Use char because int might match the return type of a GCC
30977   builtin and then its argument prototype would still apply.  */
30978#ifdef __cplusplus
30979extern "C"
30980#endif
30981char dlopen ();
30982int
30983main ()
30984{
30985return dlopen ();
30986  ;
30987  return 0;
30988}
30989_ACEOF
30990if ac_fn_cxx_try_link "$LINENO"; then :
30991  ac_cv_lib_dl_dlopen=yes
30992else
30993  ac_cv_lib_dl_dlopen=no
30994fi
30995rm -f core conftest.err conftest.$ac_objext \
30996    conftest$ac_exeext conftest.$ac_ext
30997LIBS=$ac_check_lib_save_LIBS
30998fi
30999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
31000$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
31001if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
31002  cat >>confdefs.h <<_ACEOF
31003#define HAVE_LIBDL 1
31004_ACEOF
31005
31006  LIBS="-ldl $LIBS"
31007
31008fi
31009
31010LIBDL="$LIBS"
31011
31012LIBS="$save_LIBS"
31013
31014
31015
31016###############################################################################
31017#
31018# statically link libstdc++ before C++ ABI is stablized on Linux unless
31019# dynamic build is configured on command line.
31020#
31021
31022# Check whether --with-stdc++lib was given.
31023if test "${with_stdc__lib+set}" = set; then :
31024  withval=$with_stdc__lib;
31025    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31026        && test "x$with_stdc__lib" != xdefault; then
31027      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31028    fi
31029
31030else
31031  with_stdc__lib=default
31032
31033fi
31034
31035
31036if test "x$OPENJDK_TARGET_OS" = xlinux; then
31037    # Test if -lstdc++ works.
31038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31039$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31040    ac_ext=cpp
31041ac_cpp='$CXXCPP $CPPFLAGS'
31042ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31043ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31044ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31045
31046    OLD_CXXFLAGS="$CXXFLAGS"
31047    CXXFLAGS="$CXXFLAGS -lstdc++"
31048    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31049/* end confdefs.h.  */
31050
31051int
31052main ()
31053{
31054return 0;
31055  ;
31056  return 0;
31057}
31058_ACEOF
31059if ac_fn_cxx_try_link "$LINENO"; then :
31060  has_dynamic_libstdcxx=yes
31061else
31062  has_dynamic_libstdcxx=no
31063fi
31064rm -f core conftest.err conftest.$ac_objext \
31065    conftest$ac_exeext conftest.$ac_ext
31066    CXXFLAGS="$OLD_CXXFLAGS"
31067    ac_ext=cpp
31068ac_cpp='$CXXCPP $CPPFLAGS'
31069ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31070ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31071ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31072
31073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31074$as_echo "$has_dynamic_libstdcxx" >&6; }
31075
31076    # Test if stdc++ can be linked statically.
31077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31078$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31079    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31080    ac_ext=cpp
31081ac_cpp='$CXXCPP $CPPFLAGS'
31082ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31083ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31084ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31085
31086    OLD_LIBS="$LIBS"
31087    OLD_CXX="$CXX"
31088    LIBS="$STATIC_STDCXX_FLAGS"
31089    CXX="$CC"
31090    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31091/* end confdefs.h.  */
31092
31093int
31094main ()
31095{
31096return 0;
31097  ;
31098  return 0;
31099}
31100_ACEOF
31101if ac_fn_cxx_try_link "$LINENO"; then :
31102  has_static_libstdcxx=yes
31103else
31104  has_static_libstdcxx=no
31105fi
31106rm -f core conftest.err conftest.$ac_objext \
31107    conftest$ac_exeext conftest.$ac_ext
31108    LIBS="$OLD_LIBS"
31109    CXX="$OLD_CXX"
31110    ac_ext=cpp
31111ac_cpp='$CXXCPP $CPPFLAGS'
31112ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31113ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31114ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31115
31116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31117$as_echo "$has_static_libstdcxx" >&6; }
31118
31119    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31120        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31121    fi
31122
31123    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31124        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31125    fi
31126
31127    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31128        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31129    fi
31130
31131    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31132$as_echo_n "checking how to link with libstdc++... " >&6; }
31133    # If dynamic was requested, it's available since it would fail above otherwise.
31134    # If dynamic wasn't requested, go with static unless it isn't available.
31135    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31136        LIBCXX="$LIBCXX -lstdc++"
31137        LDCXX="$CXX"
31138        STATIC_CXX_SETTING="STATIC_CXX=false"
31139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31140$as_echo "dynamic" >&6; }
31141    else
31142        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31143        LDCXX="$CC"
31144        STATIC_CXX_SETTING="STATIC_CXX=true"
31145        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31146$as_echo "static" >&6; }
31147    fi
31148fi
31149
31150
31151# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31152if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31153    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31154fi
31155
31156# TODO better (platform agnostic) test
31157if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31158    LIBCXX="-lstdc++"
31159fi
31160
31161
31162
31163
31164
31165# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31166
31167# When using cygwin or msys, we need a wrapper binary that renames
31168# /cygdrive/c/ arguments into c:/ arguments and peeks into
31169# @files and rewrites these too! This wrapper binary is
31170# called fixpath.
31171FIXPATH=
31172if test "x$OPENJDK_BUILD_OS" = xwindows; then
31173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31174$as_echo_n "checking if fixpath can be created... " >&6; }
31175    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31176    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31177    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31178      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31179      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31180      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31181      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31182    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31183      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31184      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31185
31186      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31187      # @ was chosen as separator to minimize risk of other tools messing around with it
31188      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31189      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31190
31191      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31192    fi
31193    rm -f $OUTPUT_ROOT/fixpath*
31194    cd $OUTPUT_ROOT
31195    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31196    cd $CURDIR
31197
31198    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31200$as_echo "no" >&6; }
31201        cat $OUTPUT_ROOT/fixpath1.log
31202        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31203    fi
31204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31205$as_echo "yes" >&6; }
31206    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31207$as_echo_n "checking if fixpath.exe works... " >&6; }
31208    cd $OUTPUT_ROOT
31209    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31210    cd $CURDIR
31211    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31213$as_echo "no" >&6; }
31214        cat $OUTPUT_ROOT/fixpath2.log
31215        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31216    fi
31217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31218$as_echo "yes" >&6; }
31219    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31220fi
31221
31222
31223
31224
31225###############################################################################
31226#
31227# We need to do some final tweaking, when everything else is done.
31228#
31229###############################################################################
31230
31231
31232HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31233
31234
31235# The name of the Service Agent jar.
31236SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31237if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31238  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31239fi
31240
31241
31242
31243
31244###############################################################################
31245#
31246# Configure parts of the build that only affect the build performance,
31247# not the result.
31248#
31249###############################################################################
31250
31251
31252# How many cores do we have on this build system?
31253
31254# Check whether --with-num-cores was given.
31255if test "${with_num_cores+set}" = set; then :
31256  withval=$with_num_cores;
31257fi
31258
31259if test "x$with_num_cores" = x; then
31260    # The number of cores were not specified, try to probe them.
31261
31262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31263$as_echo_n "checking for number of cores... " >&6; }
31264    NUM_CORES=1
31265    FOUND_CORES=no
31266
31267    if test -f /proc/cpuinfo; then
31268        # Looks like a Linux (or cygwin) system
31269        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31270        FOUND_CORES=yes
31271    elif test -x /usr/sbin/psrinfo; then
31272        # Looks like a Solaris system
31273        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31274        FOUND_CORES=yes
31275    elif test -x /usr/sbin/system_profiler; then
31276        # Looks like a MacOSX system
31277        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31278        FOUND_CORES=yes
31279    elif test -n "$NUMBER_OF_PROCESSORS"; then
31280        # On windows, look in the env
31281        NUM_CORES=$NUMBER_OF_PROCESSORS
31282        FOUND_CORES=yes
31283    fi
31284
31285    # For c/c++ code we run twice as many concurrent build
31286    # jobs than we have cores, otherwise we will stall on io.
31287    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31288
31289    if test "x$FOUND_CORES" = xyes; then
31290        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31291$as_echo "$NUM_CORES" >&6; }
31292    else
31293        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31294$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31295        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31296$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31297    fi
31298
31299
31300else
31301    NUM_CORES=$with_num_cores
31302    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31303fi
31304
31305
31306
31307
31308# How much memory do we have on this build system?
31309
31310# Check whether --with-memory-size was given.
31311if test "${with_memory_size+set}" = set; then :
31312  withval=$with_memory_size;
31313fi
31314
31315if test "x$with_memory_size" = x; then
31316    # The memory size was not specified, try to probe it.
31317
31318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31319$as_echo_n "checking for memory size... " >&6; }
31320    # Default to 1024 MB
31321    MEMORY_SIZE=1024
31322    FOUND_MEM=no
31323
31324    if test -f /proc/meminfo; then
31325        # Looks like a Linux (or cygwin) system
31326        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31327        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31328        FOUND_MEM=yes
31329    elif test -x /usr/sbin/prtconf; then
31330        # Looks like a Solaris system
31331        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31332        FOUND_MEM=yes
31333    elif test -x /usr/sbin/system_profiler; then
31334        # Looks like a MacOSX system
31335        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31336        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31337        FOUND_MEM=yes
31338    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31339        # Windows, but without cygwin
31340        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31341        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31342        FOUND_MEM=yes
31343    fi
31344
31345    if test "x$FOUND_MEM" = xyes; then
31346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31347$as_echo "$MEMORY_SIZE MB" >&6; }
31348    else
31349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31350$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31352$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31353    fi
31354
31355else
31356    MEMORY_SIZE=$with_memory_size
31357fi
31358
31359
31360
31361# Setup smart javac (after cores and memory have been setup)
31362
31363
31364# Check whether --with-sjavac-server-java was given.
31365if test "${with_sjavac_server_java+set}" = set; then :
31366  withval=$with_sjavac_server_java;
31367fi
31368
31369
31370if test "x$with_sjavac_server_java" != x; then
31371    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31372    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31373    if test "x$FOUND_VERSION" = x; then
31374        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31375    fi
31376else
31377    SJAVAC_SERVER_JAVA=""
31378    # Hotspot specific options.
31379
31380    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31381    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31382    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31383    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31384    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31385        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31386    fi
31387
31388    # JRockit specific options.
31389
31390    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31391    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31392    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31393    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31394    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31395        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31396    fi
31397
31398    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31399fi
31400
31401
31402
31403# Check whether --with-sjavac-server-cores was given.
31404if test "${with_sjavac_server_cores+set}" = set; then :
31405  withval=$with_sjavac_server_cores;
31406fi
31407
31408if test "x$with_sjavac_server_cores" != x; then
31409    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31410else
31411    if test "$NUM_CORES" -gt 16; then
31412        # We set this arbitrary limit because we want to limit the heap
31413        # size of the javac server.
31414        # In the future we will make the javac compilers in the server
31415        # share more and more state, thus enabling us to use more and
31416        # more concurrent threads in the server.
31417        SJAVAC_SERVER_CORES="16"
31418    else
31419        SJAVAC_SERVER_CORES="$NUM_CORES"
31420    fi
31421
31422    if test "$MEMORY_SIZE" -gt "17000"; then
31423        MAX_HEAP_MEM=10000
31424
31425    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31426    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31427    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31428    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31429    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31430        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31431    fi
31432
31433
31434    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31435    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31436    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31437    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31438    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31439        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31440    fi
31441
31442    elif test "$MEMORY_SIZE" -gt "10000"; then
31443        MAX_HEAP_MEM=6000
31444
31445    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31446    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31447    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31448    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31449    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31450        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31451    fi
31452
31453
31454    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31455    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31456    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31457    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31458    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31459        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31460    fi
31461
31462    elif test "$MEMORY_SIZE" -gt "5000"; then
31463        MAX_HEAP_MEM=3000
31464
31465    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31466    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31467    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31468    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31469    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31470        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31471    fi
31472
31473
31474    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31475    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31476    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31477    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31478    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31479        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31480    fi
31481
31482    elif test "$MEMORY_SIZE" -gt "3800"; then
31483        MAX_HEAP_MEM=2500
31484
31485    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31486    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31487    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31488    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31489    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31490        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31491    fi
31492
31493    elif test "$MEMORY_SIZE" -gt "1900"; then
31494        MAX_HEAP_MEM=1200
31495
31496    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31497    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31498    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31499    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31500    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31501        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31502    fi
31503
31504    elif test "$MEMORY_SIZE" -gt "1000"; then
31505        MAX_HEAP_MEM=900
31506
31507    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31508    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31509    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31510    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31511    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31512        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31513    fi
31514
31515    else
31516        MAX_HEAP_MEM=512
31517
31518    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31519    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31520    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31521    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31522    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31523        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31524    fi
31525
31526    fi
31527
31528
31529    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31530    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31531    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31532    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31533    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31534        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31535    fi
31536
31537
31538    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31539    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31540    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31541    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31542    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31543        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31544    fi
31545
31546
31547    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31548    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31549    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31550    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31551    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31552        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31553    fi
31554
31555
31556    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31557    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31559$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31560        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31562$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31563    fi
31564fi
31565
31566
31567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31568$as_echo_n "checking whether to use sjavac... " >&6; }
31569# Check whether --enable-sjavac was given.
31570if test "${enable_sjavac+set}" = set; then :
31571  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31572else
31573  ENABLE_SJAVAC='no'
31574fi
31575
31576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31577$as_echo "$ENABLE_SJAVAC" >&6; }
31578
31579
31580if test "x$ENABLE_SJAVAC" = xyes; then
31581    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31582else
31583    SJAVAC_SERVER_DIR=
31584fi
31585
31586
31587
31588
31589# Can the C/C++ compiler use precompiled headers?
31590
31591
31592###############################################################################
31593#
31594# Can the C/C++ compiler use precompiled headers?
31595#
31596# Check whether --enable-precompiled-headers was given.
31597if test "${enable_precompiled_headers+set}" = set; then :
31598  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31599else
31600  ENABLE_PRECOMPH=yes
31601fi
31602
31603
31604USE_PRECOMPILED_HEADER=1
31605if test "x$ENABLE_PRECOMPH" = xno; then
31606    USE_PRECOMPILED_HEADER=0
31607fi
31608
31609if test "x$ENABLE_PRECOMPH" = xyes; then
31610    # Check that the compiler actually supports precomp headers.
31611    if test "x$GCC" = xyes; then
31612         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31613$as_echo_n "checking that precompiled headers work... " >&6; }
31614         echo "int alfa();" > conftest.h
31615         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31616         if test ! -f conftest.hpp.gch; then
31617             USE_PRECOMPILED_HEADER=0
31618             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31619$as_echo "no" >&6; }
31620         else
31621             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31622$as_echo "yes" >&6; }
31623         fi
31624         rm -f conftest.h conftest.hpp.gch
31625    fi
31626fi
31627
31628
31629
31630
31631# Setup use of ccache, if available
31632
31633    # Check whether --enable-ccache was given.
31634if test "${enable_ccache+set}" = set; then :
31635  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31636else
31637  ENABLE_CCACHE=yes
31638fi
31639
31640    if test "x$ENABLE_CCACHE" = xyes; then
31641        # Extract the first word of "ccache", so it can be a program name with args.
31642set dummy ccache; ac_word=$2
31643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31644$as_echo_n "checking for $ac_word... " >&6; }
31645if test "${ac_cv_path_CCACHE+set}" = set; then :
31646  $as_echo_n "(cached) " >&6
31647else
31648  case $CCACHE in
31649  [\\/]* | ?:[\\/]*)
31650  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31651  ;;
31652  *)
31653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31654for as_dir in $PATH
31655do
31656  IFS=$as_save_IFS
31657  test -z "$as_dir" && as_dir=.
31658    for ac_exec_ext in '' $ac_executable_extensions; do
31659  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31660    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31662    break 2
31663  fi
31664done
31665  done
31666IFS=$as_save_IFS
31667
31668  ;;
31669esac
31670fi
31671CCACHE=$ac_cv_path_CCACHE
31672if test -n "$CCACHE"; then
31673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31674$as_echo "$CCACHE" >&6; }
31675else
31676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31677$as_echo "no" >&6; }
31678fi
31679
31680
31681    else
31682        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31683$as_echo_n "checking for ccache... " >&6; }
31684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31685$as_echo "explicitly disabled" >&6; }
31686        CCACHE=
31687    fi
31688
31689
31690
31691# Check whether --with-ccache-dir was given.
31692if test "${with_ccache_dir+set}" = set; then :
31693  withval=$with_ccache_dir;
31694fi
31695
31696
31697    if test "x$with_ccache_dir" != x; then
31698        # When using a non home ccache directory, assume the use is to share ccache files
31699        # with other users. Thus change the umask.
31700        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31701    fi
31702    CCACHE_FOUND=""
31703    if test "x$CCACHE" != x; then
31704
31705    if test "x$CCACHE" != x; then
31706        CCACHE_FOUND="true"
31707        # Only use ccache if it is 3.1.4 or later, which supports
31708        # precompiled headers.
31709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31710$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31711        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31712        if test "x$HAS_GOOD_CCACHE" = x; then
31713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31714$as_echo "no, disabling ccache" >&6; }
31715            CCACHE=
31716        else
31717            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31718$as_echo "yes" >&6; }
31719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31720$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31721            PUSHED_FLAGS="$CXXFLAGS"
31722            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31723            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31724/* end confdefs.h.  */
31725
31726int
31727main ()
31728{
31729
31730  ;
31731  return 0;
31732}
31733_ACEOF
31734if ac_fn_cxx_try_compile "$LINENO"; then :
31735  CC_KNOWS_CCACHE_TRICK=yes
31736else
31737  CC_KNOWS_CCACHE_TRICK=no
31738fi
31739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31740            CXXFLAGS="$PUSHED_FLAGS"
31741            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31742                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31743$as_echo "yes" >&6; }
31744            else
31745                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31746$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31747                CCACHE=
31748            fi
31749        fi
31750    fi
31751
31752    if test "x$CCACHE" != x; then
31753        CCACHE_SLOPPINESS=time_macros
31754        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31755        CCACHE_FLAGS=-fpch-preprocess
31756
31757        if test "x$SET_CCACHE_DIR" != x; then
31758            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31759	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31760        fi
31761    fi
31762
31763    fi
31764
31765
31766###############################################################################
31767#
31768# And now the finish...
31769#
31770###############################################################################
31771
31772# Check for some common pitfalls
31773
31774  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31775    file_to_test="$SRC_ROOT/LICENSE"
31776    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31777      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
31778    fi
31779  fi
31780
31781
31782
31783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31784$as_echo_n "checking if build directory is on local disk... " >&6; }
31785
31786	# df -l lists only local disks; if the given directory is not found then
31787	# a non-zero exit code is given
31788  if test "x$DF" = x; then
31789    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31790      # msys does not have df; use Windows "net use" instead.
31791      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31792      if test "x$IS_NETWORK_DISK" = x; then
31793        OUTPUT_DIR_IS_LOCAL="yes"
31794      else
31795        OUTPUT_DIR_IS_LOCAL="no"
31796      fi
31797    else
31798      # No df here, say it's local
31799      OUTPUT_DIR_IS_LOCAL="yes"
31800    fi
31801  else
31802    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31803      OUTPUT_DIR_IS_LOCAL="yes"
31804    else
31805      OUTPUT_DIR_IS_LOCAL="no"
31806    fi
31807  fi
31808
31809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31810$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31811
31812
31813
31814# Check if the user has any old-style ALT_ variables set.
31815FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31816
31817# Before generating output files, test if they exist. If they do, this is a reconfigure.
31818# Since we can't properly handle the dependencies for this, warn the user about the situation
31819if test -e $OUTPUT_ROOT/spec.gmk; then
31820  IS_RECONFIGURE=yes
31821else
31822  IS_RECONFIGURE=no
31823fi
31824
31825if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31826  HIDE_PERFORMANCE_HINTS=yes
31827else
31828  HIDE_PERFORMANCE_HINTS=no
31829  # Hide it the next time around...
31830  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31831fi
31832
31833
31834
31835# At the end, call the custom hook. (Dummy macro if no custom sources available)
31836
31837
31838# We're messing a bit with internal autoconf variables to put the config.status
31839# in the output directory instead of the current directory.
31840CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31841# Create the actual output files. Now the main work of configure is done.
31842cat >confcache <<\_ACEOF
31843# This file is a shell script that caches the results of configure
31844# tests run on this system so they can be shared between configure
31845# scripts and configure runs, see configure's option --config-cache.
31846# It is not useful on other systems.  If it contains results you don't
31847# want to keep, you may remove or edit it.
31848#
31849# config.status only pays attention to the cache file if you give it
31850# the --recheck option to rerun configure.
31851#
31852# `ac_cv_env_foo' variables (set or unset) will be overridden when
31853# loading this file, other *unset* `ac_cv_foo' will be assigned the
31854# following values.
31855
31856_ACEOF
31857
31858# The following way of writing the cache mishandles newlines in values,
31859# but we know of no workaround that is simple, portable, and efficient.
31860# So, we kill variables containing newlines.
31861# Ultrix sh set writes to stderr and can't be redirected directly,
31862# and sets the high bit in the cache file unless we assign to the vars.
31863(
31864  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31865    eval ac_val=\$$ac_var
31866    case $ac_val in #(
31867    *${as_nl}*)
31868      case $ac_var in #(
31869      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31870$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31871      esac
31872      case $ac_var in #(
31873      _ | IFS | as_nl) ;; #(
31874      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31875      *) { eval $ac_var=; unset $ac_var;} ;;
31876      esac ;;
31877    esac
31878  done
31879
31880  (set) 2>&1 |
31881    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31882    *${as_nl}ac_space=\ *)
31883      # `set' does not quote correctly, so add quotes: double-quote
31884      # substitution turns \\\\ into \\, and sed turns \\ into \.
31885      sed -n \
31886	"s/'/'\\\\''/g;
31887	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31888      ;; #(
31889    *)
31890      # `set' quotes correctly as required by POSIX, so do not add quotes.
31891      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31892      ;;
31893    esac |
31894    sort
31895) |
31896  sed '
31897     /^ac_cv_env_/b end
31898     t clear
31899     :clear
31900     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31901     t end
31902     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31903     :end' >>confcache
31904if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31905  if test -w "$cache_file"; then
31906    test "x$cache_file" != "x/dev/null" &&
31907      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31908$as_echo "$as_me: updating cache $cache_file" >&6;}
31909    cat confcache >$cache_file
31910  else
31911    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31912$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31913  fi
31914fi
31915rm -f confcache
31916
31917test "x$prefix" = xNONE && prefix=$ac_default_prefix
31918# Let make expand exec_prefix.
31919test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31920
31921DEFS=-DHAVE_CONFIG_H
31922
31923ac_libobjs=
31924ac_ltlibobjs=
31925U=
31926for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31927  # 1. Remove the extension, and $U if already installed.
31928  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31929  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31930  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31931  #    will be set to the directory where LIBOBJS objects are built.
31932  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31933  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31934done
31935LIBOBJS=$ac_libobjs
31936
31937LTLIBOBJS=$ac_ltlibobjs
31938
31939
31940
31941: ${CONFIG_STATUS=./config.status}
31942ac_write_fail=0
31943ac_clean_files_save=$ac_clean_files
31944ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31945{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31946$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31947as_write_fail=0
31948cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31949#! $SHELL
31950# Generated by $as_me.
31951# Run this file to recreate the current configuration.
31952# Compiler output produced by configure, useful for debugging
31953# configure, is in config.log if it exists.
31954
31955debug=false
31956ac_cs_recheck=false
31957ac_cs_silent=false
31958
31959SHELL=\${CONFIG_SHELL-$SHELL}
31960export SHELL
31961_ASEOF
31962cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31963## -------------------- ##
31964## M4sh Initialization. ##
31965## -------------------- ##
31966
31967# Be more Bourne compatible
31968DUALCASE=1; export DUALCASE # for MKS sh
31969if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31970  emulate sh
31971  NULLCMD=:
31972  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31973  # is contrary to our usage.  Disable this feature.
31974  alias -g '${1+"$@"}'='"$@"'
31975  setopt NO_GLOB_SUBST
31976else
31977  case `(set -o) 2>/dev/null` in #(
31978  *posix*) :
31979    set -o posix ;; #(
31980  *) :
31981     ;;
31982esac
31983fi
31984
31985
31986as_nl='
31987'
31988export as_nl
31989# Printing a long string crashes Solaris 7 /usr/bin/printf.
31990as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31991as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31992as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31993# Prefer a ksh shell builtin over an external printf program on Solaris,
31994# but without wasting forks for bash or zsh.
31995if test -z "$BASH_VERSION$ZSH_VERSION" \
31996    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31997  as_echo='print -r --'
31998  as_echo_n='print -rn --'
31999elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32000  as_echo='printf %s\n'
32001  as_echo_n='printf %s'
32002else
32003  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32004    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32005    as_echo_n='/usr/ucb/echo -n'
32006  else
32007    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32008    as_echo_n_body='eval
32009      arg=$1;
32010      case $arg in #(
32011      *"$as_nl"*)
32012	expr "X$arg" : "X\\(.*\\)$as_nl";
32013	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32014      esac;
32015      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32016    '
32017    export as_echo_n_body
32018    as_echo_n='sh -c $as_echo_n_body as_echo'
32019  fi
32020  export as_echo_body
32021  as_echo='sh -c $as_echo_body as_echo'
32022fi
32023
32024# The user is always right.
32025if test "${PATH_SEPARATOR+set}" != set; then
32026  PATH_SEPARATOR=:
32027  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32028    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32029      PATH_SEPARATOR=';'
32030  }
32031fi
32032
32033
32034# IFS
32035# We need space, tab and new line, in precisely that order.  Quoting is
32036# there to prevent editors from complaining about space-tab.
32037# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32038# splitting by setting IFS to empty value.)
32039IFS=" ""	$as_nl"
32040
32041# Find who we are.  Look in the path if we contain no directory separator.
32042case $0 in #((
32043  *[\\/]* ) as_myself=$0 ;;
32044  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32045for as_dir in $PATH
32046do
32047  IFS=$as_save_IFS
32048  test -z "$as_dir" && as_dir=.
32049    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32050  done
32051IFS=$as_save_IFS
32052
32053     ;;
32054esac
32055# We did not find ourselves, most probably we were run as `sh COMMAND'
32056# in which case we are not to be found in the path.
32057if test "x$as_myself" = x; then
32058  as_myself=$0
32059fi
32060if test ! -f "$as_myself"; then
32061  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32062  exit 1
32063fi
32064
32065# Unset variables that we do not need and which cause bugs (e.g. in
32066# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32067# suppresses any "Segmentation fault" message there.  '((' could
32068# trigger a bug in pdksh 5.2.14.
32069for as_var in BASH_ENV ENV MAIL MAILPATH
32070do eval test x\${$as_var+set} = xset \
32071  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32072done
32073PS1='$ '
32074PS2='> '
32075PS4='+ '
32076
32077# NLS nuisances.
32078LC_ALL=C
32079export LC_ALL
32080LANGUAGE=C
32081export LANGUAGE
32082
32083# CDPATH.
32084(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32085
32086
32087# as_fn_error STATUS ERROR [LINENO LOG_FD]
32088# ----------------------------------------
32089# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32090# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32091# script with STATUS, using 1 if that was 0.
32092as_fn_error ()
32093{
32094  as_status=$1; test $as_status -eq 0 && as_status=1
32095  if test "$4"; then
32096    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32097    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32098  fi
32099  $as_echo "$as_me: error: $2" >&2
32100  as_fn_exit $as_status
32101} # as_fn_error
32102
32103
32104# as_fn_set_status STATUS
32105# -----------------------
32106# Set $? to STATUS, without forking.
32107as_fn_set_status ()
32108{
32109  return $1
32110} # as_fn_set_status
32111
32112# as_fn_exit STATUS
32113# -----------------
32114# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32115as_fn_exit ()
32116{
32117  set +e
32118  as_fn_set_status $1
32119  exit $1
32120} # as_fn_exit
32121
32122# as_fn_unset VAR
32123# ---------------
32124# Portably unset VAR.
32125as_fn_unset ()
32126{
32127  { eval $1=; unset $1;}
32128}
32129as_unset=as_fn_unset
32130# as_fn_append VAR VALUE
32131# ----------------------
32132# Append the text in VALUE to the end of the definition contained in VAR. Take
32133# advantage of any shell optimizations that allow amortized linear growth over
32134# repeated appends, instead of the typical quadratic growth present in naive
32135# implementations.
32136if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32137  eval 'as_fn_append ()
32138  {
32139    eval $1+=\$2
32140  }'
32141else
32142  as_fn_append ()
32143  {
32144    eval $1=\$$1\$2
32145  }
32146fi # as_fn_append
32147
32148# as_fn_arith ARG...
32149# ------------------
32150# Perform arithmetic evaluation on the ARGs, and store the result in the
32151# global $as_val. Take advantage of shells that can avoid forks. The arguments
32152# must be portable across $(()) and expr.
32153if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32154  eval 'as_fn_arith ()
32155  {
32156    as_val=$(( $* ))
32157  }'
32158else
32159  as_fn_arith ()
32160  {
32161    as_val=`expr "$@" || test $? -eq 1`
32162  }
32163fi # as_fn_arith
32164
32165
32166if expr a : '\(a\)' >/dev/null 2>&1 &&
32167   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32168  as_expr=expr
32169else
32170  as_expr=false
32171fi
32172
32173if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32174  as_basename=basename
32175else
32176  as_basename=false
32177fi
32178
32179if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32180  as_dirname=dirname
32181else
32182  as_dirname=false
32183fi
32184
32185as_me=`$as_basename -- "$0" ||
32186$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32187	 X"$0" : 'X\(//\)$' \| \
32188	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32189$as_echo X/"$0" |
32190    sed '/^.*\/\([^/][^/]*\)\/*$/{
32191	    s//\1/
32192	    q
32193	  }
32194	  /^X\/\(\/\/\)$/{
32195	    s//\1/
32196	    q
32197	  }
32198	  /^X\/\(\/\).*/{
32199	    s//\1/
32200	    q
32201	  }
32202	  s/.*/./; q'`
32203
32204# Avoid depending upon Character Ranges.
32205as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32206as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32207as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32208as_cr_digits='0123456789'
32209as_cr_alnum=$as_cr_Letters$as_cr_digits
32210
32211ECHO_C= ECHO_N= ECHO_T=
32212case `echo -n x` in #(((((
32213-n*)
32214  case `echo 'xy\c'` in
32215  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32216  xy)  ECHO_C='\c';;
32217  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32218       ECHO_T='	';;
32219  esac;;
32220*)
32221  ECHO_N='-n';;
32222esac
32223
32224rm -f conf$$ conf$$.exe conf$$.file
32225if test -d conf$$.dir; then
32226  rm -f conf$$.dir/conf$$.file
32227else
32228  rm -f conf$$.dir
32229  mkdir conf$$.dir 2>/dev/null
32230fi
32231if (echo >conf$$.file) 2>/dev/null; then
32232  if ln -s conf$$.file conf$$ 2>/dev/null; then
32233    as_ln_s='ln -s'
32234    # ... but there are two gotchas:
32235    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32236    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32237    # In both cases, we have to default to `cp -p'.
32238    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32239      as_ln_s='cp -p'
32240  elif ln conf$$.file conf$$ 2>/dev/null; then
32241    as_ln_s=ln
32242  else
32243    as_ln_s='cp -p'
32244  fi
32245else
32246  as_ln_s='cp -p'
32247fi
32248rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32249rmdir conf$$.dir 2>/dev/null
32250
32251
32252# as_fn_mkdir_p
32253# -------------
32254# Create "$as_dir" as a directory, including parents if necessary.
32255as_fn_mkdir_p ()
32256{
32257
32258  case $as_dir in #(
32259  -*) as_dir=./$as_dir;;
32260  esac
32261  test -d "$as_dir" || eval $as_mkdir_p || {
32262    as_dirs=
32263    while :; do
32264      case $as_dir in #(
32265      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32266      *) as_qdir=$as_dir;;
32267      esac
32268      as_dirs="'$as_qdir' $as_dirs"
32269      as_dir=`$as_dirname -- "$as_dir" ||
32270$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32271	 X"$as_dir" : 'X\(//\)[^/]' \| \
32272	 X"$as_dir" : 'X\(//\)$' \| \
32273	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32274$as_echo X"$as_dir" |
32275    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32276	    s//\1/
32277	    q
32278	  }
32279	  /^X\(\/\/\)[^/].*/{
32280	    s//\1/
32281	    q
32282	  }
32283	  /^X\(\/\/\)$/{
32284	    s//\1/
32285	    q
32286	  }
32287	  /^X\(\/\).*/{
32288	    s//\1/
32289	    q
32290	  }
32291	  s/.*/./; q'`
32292      test -d "$as_dir" && break
32293    done
32294    test -z "$as_dirs" || eval "mkdir $as_dirs"
32295  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32296
32297
32298} # as_fn_mkdir_p
32299if mkdir -p . 2>/dev/null; then
32300  as_mkdir_p='mkdir -p "$as_dir"'
32301else
32302  test -d ./-p && rmdir ./-p
32303  as_mkdir_p=false
32304fi
32305
32306if test -x / >/dev/null 2>&1; then
32307  as_test_x='test -x'
32308else
32309  if ls -dL / >/dev/null 2>&1; then
32310    as_ls_L_option=L
32311  else
32312    as_ls_L_option=
32313  fi
32314  as_test_x='
32315    eval sh -c '\''
32316      if test -d "$1"; then
32317	test -d "$1/.";
32318      else
32319	case $1 in #(
32320	-*)set "./$1";;
32321	esac;
32322	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32323	???[sx]*):;;*)false;;esac;fi
32324    '\'' sh
32325  '
32326fi
32327as_executable_p=$as_test_x
32328
32329# Sed expression to map a string onto a valid CPP name.
32330as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32331
32332# Sed expression to map a string onto a valid variable name.
32333as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32334
32335
32336exec 6>&1
32337## ----------------------------------- ##
32338## Main body of $CONFIG_STATUS script. ##
32339## ----------------------------------- ##
32340_ASEOF
32341test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32342
32343cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32344# Save the log message, to keep $0 and so on meaningful, and to
32345# report actual input values of CONFIG_FILES etc. instead of their
32346# values after options handling.
32347ac_log="
32348This file was extended by OpenJDK $as_me jdk8, which was
32349generated by GNU Autoconf 2.67.  Invocation command line was
32350
32351  CONFIG_FILES    = $CONFIG_FILES
32352  CONFIG_HEADERS  = $CONFIG_HEADERS
32353  CONFIG_LINKS    = $CONFIG_LINKS
32354  CONFIG_COMMANDS = $CONFIG_COMMANDS
32355  $ $0 $@
32356
32357on `(hostname || uname -n) 2>/dev/null | sed 1q`
32358"
32359
32360_ACEOF
32361
32362case $ac_config_files in *"
32363"*) set x $ac_config_files; shift; ac_config_files=$*;;
32364esac
32365
32366case $ac_config_headers in *"
32367"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32368esac
32369
32370
32371cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32372# Files that config.status was made for.
32373config_files="$ac_config_files"
32374config_headers="$ac_config_headers"
32375
32376_ACEOF
32377
32378cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32379ac_cs_usage="\
32380\`$as_me' instantiates files and other configuration actions
32381from templates according to the current configuration.  Unless the files
32382and actions are specified as TAGs, all are instantiated by default.
32383
32384Usage: $0 [OPTION]... [TAG]...
32385
32386  -h, --help       print this help, then exit
32387  -V, --version    print version number and configuration settings, then exit
32388      --config     print configuration, then exit
32389  -q, --quiet, --silent
32390                   do not print progress messages
32391  -d, --debug      don't remove temporary files
32392      --recheck    update $as_me by reconfiguring in the same conditions
32393      --file=FILE[:TEMPLATE]
32394                   instantiate the configuration file FILE
32395      --header=FILE[:TEMPLATE]
32396                   instantiate the configuration header FILE
32397
32398Configuration files:
32399$config_files
32400
32401Configuration headers:
32402$config_headers
32403
32404Report bugs to <build-dev@openjdk.java.net>.
32405OpenJDK home page: <http://openjdk.java.net>."
32406
32407_ACEOF
32408cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32409ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32410ac_cs_version="\\
32411OpenJDK config.status jdk8
32412configured by $0, generated by GNU Autoconf 2.67,
32413  with options \\"\$ac_cs_config\\"
32414
32415Copyright (C) 2010 Free Software Foundation, Inc.
32416This config.status script is free software; the Free Software Foundation
32417gives unlimited permission to copy, distribute and modify it."
32418
32419ac_pwd='$ac_pwd'
32420srcdir='$srcdir'
32421AWK='$AWK'
32422test -n "\$AWK" || AWK=awk
32423_ACEOF
32424
32425cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32426# The default lists apply if the user does not specify any file.
32427ac_need_defaults=:
32428while test $# != 0
32429do
32430  case $1 in
32431  --*=?*)
32432    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32433    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32434    ac_shift=:
32435    ;;
32436  --*=)
32437    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32438    ac_optarg=
32439    ac_shift=:
32440    ;;
32441  *)
32442    ac_option=$1
32443    ac_optarg=$2
32444    ac_shift=shift
32445    ;;
32446  esac
32447
32448  case $ac_option in
32449  # Handling of the options.
32450  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32451    ac_cs_recheck=: ;;
32452  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32453    $as_echo "$ac_cs_version"; exit ;;
32454  --config | --confi | --conf | --con | --co | --c )
32455    $as_echo "$ac_cs_config"; exit ;;
32456  --debug | --debu | --deb | --de | --d | -d )
32457    debug=: ;;
32458  --file | --fil | --fi | --f )
32459    $ac_shift
32460    case $ac_optarg in
32461    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32462    '') as_fn_error $? "missing file argument" ;;
32463    esac
32464    as_fn_append CONFIG_FILES " '$ac_optarg'"
32465    ac_need_defaults=false;;
32466  --header | --heade | --head | --hea )
32467    $ac_shift
32468    case $ac_optarg in
32469    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32470    esac
32471    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32472    ac_need_defaults=false;;
32473  --he | --h)
32474    # Conflict between --help and --header
32475    as_fn_error $? "ambiguous option: \`$1'
32476Try \`$0 --help' for more information.";;
32477  --help | --hel | -h )
32478    $as_echo "$ac_cs_usage"; exit ;;
32479  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32480  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32481    ac_cs_silent=: ;;
32482
32483  # This is an error.
32484  -*) as_fn_error $? "unrecognized option: \`$1'
32485Try \`$0 --help' for more information." ;;
32486
32487  *) as_fn_append ac_config_targets " $1"
32488     ac_need_defaults=false ;;
32489
32490  esac
32491  shift
32492done
32493
32494ac_configure_extra_args=
32495
32496if $ac_cs_silent; then
32497  exec 6>/dev/null
32498  ac_configure_extra_args="$ac_configure_extra_args --silent"
32499fi
32500
32501_ACEOF
32502cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32503if \$ac_cs_recheck; then
32504  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32505  shift
32506  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32507  CONFIG_SHELL='$SHELL'
32508  export CONFIG_SHELL
32509  exec "\$@"
32510fi
32511
32512_ACEOF
32513cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32514exec 5>>config.log
32515{
32516  echo
32517  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32518## Running $as_me. ##
32519_ASBOX
32520  $as_echo "$ac_log"
32521} >&5
32522
32523_ACEOF
32524cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32525_ACEOF
32526
32527cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32528
32529# Handling of arguments.
32530for ac_config_target in $ac_config_targets
32531do
32532  case $ac_config_target in
32533    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32534    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32535    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32536    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32537    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32538    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32539    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32540
32541  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32542  esac
32543done
32544
32545
32546# If the user did not use the arguments to specify the items to instantiate,
32547# then the envvar interface is used.  Set only those that are not.
32548# We use the long form for the default assignment because of an extremely
32549# bizarre bug on SunOS 4.1.3.
32550if $ac_need_defaults; then
32551  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32552  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32553fi
32554
32555# Have a temporary directory for convenience.  Make it in the build tree
32556# simply because there is no reason against having it here, and in addition,
32557# creating and moving files from /tmp can sometimes cause problems.
32558# Hook for its removal unless debugging.
32559# Note that there is a small window in which the directory will not be cleaned:
32560# after its creation but before its name has been assigned to `$tmp'.
32561$debug ||
32562{
32563  tmp=
32564  trap 'exit_status=$?
32565  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32566' 0
32567  trap 'as_fn_exit 1' 1 2 13 15
32568}
32569# Create a (secure) tmp directory for tmp files.
32570
32571{
32572  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32573  test -n "$tmp" && test -d "$tmp"
32574}  ||
32575{
32576  tmp=./conf$$-$RANDOM
32577  (umask 077 && mkdir "$tmp")
32578} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32579
32580# Set up the scripts for CONFIG_FILES section.
32581# No need to generate them if there are no CONFIG_FILES.
32582# This happens for instance with `./config.status config.h'.
32583if test -n "$CONFIG_FILES"; then
32584
32585
32586ac_cr=`echo X | tr X '\015'`
32587# On cygwin, bash can eat \r inside `` if the user requested igncr.
32588# But we know of no other shell where ac_cr would be empty at this
32589# point, so we can use a bashism as a fallback.
32590if test "x$ac_cr" = x; then
32591  eval ac_cr=\$\'\\r\'
32592fi
32593ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32594if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32595  ac_cs_awk_cr='\\r'
32596else
32597  ac_cs_awk_cr=$ac_cr
32598fi
32599
32600echo 'BEGIN {' >"$tmp/subs1.awk" &&
32601_ACEOF
32602
32603
32604{
32605  echo "cat >conf$$subs.awk <<_ACEOF" &&
32606  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32607  echo "_ACEOF"
32608} >conf$$subs.sh ||
32609  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32610ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32611ac_delim='%!_!# '
32612for ac_last_try in false false false false false :; do
32613  . ./conf$$subs.sh ||
32614    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32615
32616  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32617  if test $ac_delim_n = $ac_delim_num; then
32618    break
32619  elif $ac_last_try; then
32620    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32621  else
32622    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32623  fi
32624done
32625rm -f conf$$subs.sh
32626
32627cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32628cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32629_ACEOF
32630sed -n '
32631h
32632s/^/S["/; s/!.*/"]=/
32633p
32634g
32635s/^[^!]*!//
32636:repl
32637t repl
32638s/'"$ac_delim"'$//
32639t delim
32640:nl
32641h
32642s/\(.\{148\}\)..*/\1/
32643t more1
32644s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32645p
32646n
32647b repl
32648:more1
32649s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32650p
32651g
32652s/.\{148\}//
32653t nl
32654:delim
32655h
32656s/\(.\{148\}\)..*/\1/
32657t more2
32658s/["\\]/\\&/g; s/^/"/; s/$/"/
32659p
32660b
32661:more2
32662s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32663p
32664g
32665s/.\{148\}//
32666t delim
32667' <conf$$subs.awk | sed '
32668/^[^""]/{
32669  N
32670  s/\n//
32671}
32672' >>$CONFIG_STATUS || ac_write_fail=1
32673rm -f conf$$subs.awk
32674cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32675_ACAWK
32676cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32677  for (key in S) S_is_set[key] = 1
32678  FS = ""
32679
32680}
32681{
32682  line = $ 0
32683  nfields = split(line, field, "@")
32684  substed = 0
32685  len = length(field[1])
32686  for (i = 2; i < nfields; i++) {
32687    key = field[i]
32688    keylen = length(key)
32689    if (S_is_set[key]) {
32690      value = S[key]
32691      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32692      len += length(value) + length(field[++i])
32693      substed = 1
32694    } else
32695      len += 1 + keylen
32696  }
32697
32698  print line
32699}
32700
32701_ACAWK
32702_ACEOF
32703cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32704if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32705  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32706else
32707  cat
32708fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32709  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32710_ACEOF
32711
32712# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32713# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32714# trailing colons and then remove the whole line if VPATH becomes empty
32715# (actually we leave an empty line to preserve line numbers).
32716if test "x$srcdir" = x.; then
32717  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32718h
32719s///
32720s/^/:/
32721s/[	 ]*$/:/
32722s/:\$(srcdir):/:/g
32723s/:\${srcdir}:/:/g
32724s/:@srcdir@:/:/g
32725s/^:*//
32726s/:*$//
32727x
32728s/\(=[	 ]*\).*/\1/
32729G
32730s/\n//
32731s/^[^=]*=[	 ]*$//
32732}'
32733fi
32734
32735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32736fi # test -n "$CONFIG_FILES"
32737
32738# Set up the scripts for CONFIG_HEADERS section.
32739# No need to generate them if there are no CONFIG_HEADERS.
32740# This happens for instance with `./config.status Makefile'.
32741if test -n "$CONFIG_HEADERS"; then
32742cat >"$tmp/defines.awk" <<\_ACAWK ||
32743BEGIN {
32744_ACEOF
32745
32746# Transform confdefs.h into an awk script `defines.awk', embedded as
32747# here-document in config.status, that substitutes the proper values into
32748# config.h.in to produce config.h.
32749
32750# Create a delimiter string that does not exist in confdefs.h, to ease
32751# handling of long lines.
32752ac_delim='%!_!# '
32753for ac_last_try in false false :; do
32754  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32755  if test -z "$ac_t"; then
32756    break
32757  elif $ac_last_try; then
32758    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32759  else
32760    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32761  fi
32762done
32763
32764# For the awk script, D is an array of macro values keyed by name,
32765# likewise P contains macro parameters if any.  Preserve backslash
32766# newline sequences.
32767
32768ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32769sed -n '
32770s/.\{148\}/&'"$ac_delim"'/g
32771t rset
32772:rset
32773s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32774t def
32775d
32776:def
32777s/\\$//
32778t bsnl
32779s/["\\]/\\&/g
32780s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32781D["\1"]=" \3"/p
32782s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32783d
32784:bsnl
32785s/["\\]/\\&/g
32786s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32787D["\1"]=" \3\\\\\\n"\\/p
32788t cont
32789s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32790t cont
32791d
32792:cont
32793n
32794s/.\{148\}/&'"$ac_delim"'/g
32795t clear
32796:clear
32797s/\\$//
32798t bsnlc
32799s/["\\]/\\&/g; s/^/"/; s/$/"/p
32800d
32801:bsnlc
32802s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32803b cont
32804' <confdefs.h | sed '
32805s/'"$ac_delim"'/"\\\
32806"/g' >>$CONFIG_STATUS || ac_write_fail=1
32807
32808cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32809  for (key in D) D_is_set[key] = 1
32810  FS = ""
32811}
32812/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32813  line = \$ 0
32814  split(line, arg, " ")
32815  if (arg[1] == "#") {
32816    defundef = arg[2]
32817    mac1 = arg[3]
32818  } else {
32819    defundef = substr(arg[1], 2)
32820    mac1 = arg[2]
32821  }
32822  split(mac1, mac2, "(") #)
32823  macro = mac2[1]
32824  prefix = substr(line, 1, index(line, defundef) - 1)
32825  if (D_is_set[macro]) {
32826    # Preserve the white space surrounding the "#".
32827    print prefix "define", macro P[macro] D[macro]
32828    next
32829  } else {
32830    # Replace #undef with comments.  This is necessary, for example,
32831    # in the case of _POSIX_SOURCE, which is predefined and required
32832    # on some systems where configure will not decide to define it.
32833    if (defundef == "undef") {
32834      print "/*", prefix defundef, macro, "*/"
32835      next
32836    }
32837  }
32838}
32839{ print }
32840_ACAWK
32841_ACEOF
32842cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32843  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32844fi # test -n "$CONFIG_HEADERS"
32845
32846
32847eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32848shift
32849for ac_tag
32850do
32851  case $ac_tag in
32852  :[FHLC]) ac_mode=$ac_tag; continue;;
32853  esac
32854  case $ac_mode$ac_tag in
32855  :[FHL]*:*);;
32856  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32857  :[FH]-) ac_tag=-:-;;
32858  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32859  esac
32860  ac_save_IFS=$IFS
32861  IFS=:
32862  set x $ac_tag
32863  IFS=$ac_save_IFS
32864  shift
32865  ac_file=$1
32866  shift
32867
32868  case $ac_mode in
32869  :L) ac_source=$1;;
32870  :[FH])
32871    ac_file_inputs=
32872    for ac_f
32873    do
32874      case $ac_f in
32875      -) ac_f="$tmp/stdin";;
32876      *) # Look for the file first in the build tree, then in the source tree
32877	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32878	 # because $ac_f cannot contain `:'.
32879	 test -f "$ac_f" ||
32880	   case $ac_f in
32881	   [\\/$]*) false;;
32882	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32883	   esac ||
32884	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32885      esac
32886      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32887      as_fn_append ac_file_inputs " '$ac_f'"
32888    done
32889
32890    # Let's still pretend it is `configure' which instantiates (i.e., don't
32891    # use $as_me), people would be surprised to read:
32892    #    /* config.h.  Generated by config.status.  */
32893    configure_input='Generated from '`
32894	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32895	`' by configure.'
32896    if test x"$ac_file" != x-; then
32897      configure_input="$ac_file.  $configure_input"
32898      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32899$as_echo "$as_me: creating $ac_file" >&6;}
32900    fi
32901    # Neutralize special characters interpreted by sed in replacement strings.
32902    case $configure_input in #(
32903    *\&* | *\|* | *\\* )
32904       ac_sed_conf_input=`$as_echo "$configure_input" |
32905       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32906    *) ac_sed_conf_input=$configure_input;;
32907    esac
32908
32909    case $ac_tag in
32910    *:-:* | *:-) cat >"$tmp/stdin" \
32911      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32912    esac
32913    ;;
32914  esac
32915
32916  ac_dir=`$as_dirname -- "$ac_file" ||
32917$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32918	 X"$ac_file" : 'X\(//\)[^/]' \| \
32919	 X"$ac_file" : 'X\(//\)$' \| \
32920	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32921$as_echo X"$ac_file" |
32922    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32923	    s//\1/
32924	    q
32925	  }
32926	  /^X\(\/\/\)[^/].*/{
32927	    s//\1/
32928	    q
32929	  }
32930	  /^X\(\/\/\)$/{
32931	    s//\1/
32932	    q
32933	  }
32934	  /^X\(\/\).*/{
32935	    s//\1/
32936	    q
32937	  }
32938	  s/.*/./; q'`
32939  as_dir="$ac_dir"; as_fn_mkdir_p
32940  ac_builddir=.
32941
32942case "$ac_dir" in
32943.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32944*)
32945  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32946  # A ".." for each directory in $ac_dir_suffix.
32947  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32948  case $ac_top_builddir_sub in
32949  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32950  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32951  esac ;;
32952esac
32953ac_abs_top_builddir=$ac_pwd
32954ac_abs_builddir=$ac_pwd$ac_dir_suffix
32955# for backward compatibility:
32956ac_top_builddir=$ac_top_build_prefix
32957
32958case $srcdir in
32959  .)  # We are building in place.
32960    ac_srcdir=.
32961    ac_top_srcdir=$ac_top_builddir_sub
32962    ac_abs_top_srcdir=$ac_pwd ;;
32963  [\\/]* | ?:[\\/]* )  # Absolute name.
32964    ac_srcdir=$srcdir$ac_dir_suffix;
32965    ac_top_srcdir=$srcdir
32966    ac_abs_top_srcdir=$srcdir ;;
32967  *) # Relative name.
32968    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32969    ac_top_srcdir=$ac_top_build_prefix$srcdir
32970    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32971esac
32972ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32973
32974
32975  case $ac_mode in
32976  :F)
32977  #
32978  # CONFIG_FILE
32979  #
32980
32981_ACEOF
32982
32983cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32984# If the template does not know about datarootdir, expand it.
32985# FIXME: This hack should be removed a few years after 2.60.
32986ac_datarootdir_hack=; ac_datarootdir_seen=
32987ac_sed_dataroot='
32988/datarootdir/ {
32989  p
32990  q
32991}
32992/@datadir@/p
32993/@docdir@/p
32994/@infodir@/p
32995/@localedir@/p
32996/@mandir@/p'
32997case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32998*datarootdir*) ac_datarootdir_seen=yes;;
32999*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33000  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33001$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33002_ACEOF
33003cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33004  ac_datarootdir_hack='
33005  s&@datadir@&$datadir&g
33006  s&@docdir@&$docdir&g
33007  s&@infodir@&$infodir&g
33008  s&@localedir@&$localedir&g
33009  s&@mandir@&$mandir&g
33010  s&\\\${datarootdir}&$datarootdir&g' ;;
33011esac
33012_ACEOF
33013
33014# Neutralize VPATH when `$srcdir' = `.'.
33015# Shell code in configure.ac might set extrasub.
33016# FIXME: do we really want to maintain this feature?
33017cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33018ac_sed_extra="$ac_vpsub
33019$extrasub
33020_ACEOF
33021cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33022:t
33023/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33024s|@configure_input@|$ac_sed_conf_input|;t t
33025s&@top_builddir@&$ac_top_builddir_sub&;t t
33026s&@top_build_prefix@&$ac_top_build_prefix&;t t
33027s&@srcdir@&$ac_srcdir&;t t
33028s&@abs_srcdir@&$ac_abs_srcdir&;t t
33029s&@top_srcdir@&$ac_top_srcdir&;t t
33030s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33031s&@builddir@&$ac_builddir&;t t
33032s&@abs_builddir@&$ac_abs_builddir&;t t
33033s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33034$ac_datarootdir_hack
33035"
33036eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33037  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33038
33039test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33040  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33041  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33042  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33043which seems to be undefined.  Please make sure it is defined" >&5
33044$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33045which seems to be undefined.  Please make sure it is defined" >&2;}
33046
33047  rm -f "$tmp/stdin"
33048  case $ac_file in
33049  -) cat "$tmp/out" && rm -f "$tmp/out";;
33050  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33051  esac \
33052  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33053 ;;
33054  :H)
33055  #
33056  # CONFIG_HEADER
33057  #
33058  if test x"$ac_file" != x-; then
33059    {
33060      $as_echo "/* $configure_input  */" \
33061      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33062    } >"$tmp/config.h" \
33063      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33064    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33065      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33066$as_echo "$as_me: $ac_file is unchanged" >&6;}
33067    else
33068      rm -f "$ac_file"
33069      mv "$tmp/config.h" "$ac_file" \
33070	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33071    fi
33072  else
33073    $as_echo "/* $configure_input  */" \
33074      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33075      || as_fn_error $? "could not create -" "$LINENO" 5
33076  fi
33077 ;;
33078
33079
33080  esac
33081
33082done # for ac_tag
33083
33084
33085as_fn_exit 0
33086_ACEOF
33087ac_clean_files=$ac_clean_files_save
33088
33089test $ac_write_fail = 0 ||
33090  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33091
33092
33093# configure is writing to config.log, and then calls config.status.
33094# config.status does its own redirection, appending to config.log.
33095# Unfortunately, on DOS this fails, as config.log is still kept open
33096# by configure, so config.status won't be able to write to it; its
33097# output is simply discarded.  So we exec the FD to /dev/null,
33098# effectively closing config.log, so it can be properly (re)opened and
33099# appended to by config.status.  When coming back to configure, we
33100# need to make the FD available again.
33101if test "$no_create" != yes; then
33102  ac_cs_success=:
33103  ac_config_status_args=
33104  test "$silent" = yes &&
33105    ac_config_status_args="$ac_config_status_args --quiet"
33106  exec 5>/dev/null
33107  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33108  exec 5>>config.log
33109  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33110  # would make configure fail if this is the last instruction.
33111  $ac_cs_success || as_fn_exit 1
33112fi
33113if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33114  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33115$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33116fi
33117
33118
33119# Make the compare script executable
33120$CHMOD +x $OUTPUT_ROOT/compare.sh
33121
33122# Finally output some useful information to the user
33123
33124# Finally output some useful information to the user
33125
33126if test "x$CCACHE_FOUND" != x; then
33127	if  test "x$HAS_GOOD_CCACHE" = x; then
33128		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33129		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33130	else
33131		CCACHE_STATUS="installed and in use"
33132	fi
33133else
33134	if test "x$GCC" = xyes; then
33135		CCACHE_STATUS="not installed (consider installing)"
33136		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33137	else
33138		CCACHE_STATUS="not available for your system"
33139	fi
33140fi
33141
33142printf "\n"
33143printf "====================================================\n"
33144printf "A new configuration has been successfully created in\n"
33145printf "$OUTPUT_ROOT\n"
33146if test "x$CONFIGURE_COMMAND_LINE" != x; then
33147	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33148else
33149	printf "using default settings.\n"
33150fi
33151
33152printf "\n"
33153printf "Configuration summary:\n"
33154printf "* Debug level:    $DEBUG_LEVEL\n"
33155printf "* JDK variant:    $JDK_VARIANT\n"
33156printf "* JVM variants:   $with_jvm_variants\n"
33157printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33158
33159printf "\n"
33160printf "Tools summary:\n"
33161if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33162  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33163fi
33164printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33165printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33166printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33167
33168printf "\n"
33169printf "Build performance summary:\n"
33170printf "* Cores to use:   $NUM_CORES\n"
33171printf "* Memory limit:   $MEMORY_SIZE MB\n"
33172printf "* ccache status:  $CCACHE_STATUS\n"
33173printf "\n"
33174
33175if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33176	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33177	printf "$CCACHE_HELP_MSG\n"
33178
33179    # Print a helpful message on how to acquire the necessary build dependency.
33180    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33181    MISSING_DEPENDENCY=ccache
33182    PKGHANDLER_COMMAND=
33183
33184    case $PKGHANDLER in
33185	apt-get)
33186                apt_help     $MISSING_DEPENDENCY ;;
33187    yum)
33188                yum_help     $MISSING_DEPENDENCY ;;
33189	port)
33190                port_help    $MISSING_DEPENDENCY ;;
33191	pkgutil)
33192                pkgutil_help $MISSING_DEPENDENCY ;;
33193	pkgadd)
33194                pkgadd_help  $MISSING_DEPENDENCY ;;
33195    * )
33196      break ;;
33197    esac
33198
33199    if test "x$PKGHANDLER_COMMAND" != x; then
33200        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33201    fi
33202
33203	printf "$HELP_MSG\n"
33204	printf "\n"
33205fi
33206
33207if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33208	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33209	printf "will result in longer build times.\n"
33210	printf "\n"
33211fi
33212
33213if test "x$FOUND_ALT_VARIABLES" != "x"; then
33214	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33215	printf "These are not respected, and will be ignored. It is recommended\n"
33216	printf "that you clean your environment. The following variables are set:\n"
33217	printf "$FOUND_ALT_VARIABLES\n"
33218	printf "\n"
33219fi
33220
33221if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33222	printf "WARNING: Your build output directory is not on a local disk.\n"
33223	printf "This will severely degrade build performance!\n"
33224	printf "It is recommended that you create an output directory on a local disk,\n"
33225	printf "and run the configure script again from that directory.\n"
33226	printf "\n"
33227fi
33228
33229if test "x$IS_RECONFIGURE" = "xyes"; then
33230	printf "WARNING: The result of this configuration has overridden an older\n"
33231	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33232	printf "proper build. Failure to do so might result in strange build problems.\n"
33233	printf "\n"
33234fi
33235
33236