generated-configure.sh revision 633:907a926d3c96
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
604JOBS
605MEMORY_SIZE
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
742HOTSPOT_TOPDIR
743JAXWS_TOPDIR
744JAXP_TOPDIR
745CORBA_TOPDIR
746LANGTOOLS_TOPDIR
747BOOT_JDK_JVMARGS
748JAVAC_FLAGS
749BOOT_JDK_SOURCETARGET
750BOOT_JDK
751BOOT_TOOLSJAR
752BOOT_RTJAR
753JAVA_CHECK
754JAVAC_CHECK
755COOKED_BUILD_NUMBER
756JDK_VERSION
757COPYRIGHT_YEAR
758MACOSX_BUNDLE_ID_BASE
759MACOSX_BUNDLE_NAME_BASE
760COMPANY_NAME
761JDK_RC_PLATFORM_NAME
762PRODUCT_SUFFIX
763PRODUCT_NAME
764LAUNCHER_NAME
765MILESTONE
766JDK_BUILD_NUMBER
767JDK_UPDATE_VERSION
768JDK_MICRO_VERSION
769JDK_MINOR_VERSION
770JDK_MAJOR_VERSION
771USER_RELEASE_SUFFIX
772COMPRESS_JARS
773UNLIMITED_CRYPTO
774CACERTS_FILE
775TEST_IN_BUILD
776BUILD_HEADLESS
777SUPPORT_HEADFUL
778SUPPORT_HEADLESS
779BDEPS_FTP
780BDEPS_UNZIP
781OS_VERSION_MICRO
782OS_VERSION_MINOR
783OS_VERSION_MAJOR
784PKG_CONFIG
785TIME
786STAT
787HG
788READELF
789OTOOL
790LDD
791ZIP
792UNZIP
793FIND_DELETE
794MAKE
795CHECK_TOOLSDIR_MAKE
796CHECK_TOOLSDIR_GMAKE
797CHECK_MAKE
798CHECK_GMAKE
799PKGHANDLER
800OUTPUT_ROOT
801CONF_NAME
802SPEC
803BUILD_VARIANT_RELEASE
804DEBUG_CLASSFILES
805FASTDEBUG
806VARIANT
807DEBUG_LEVEL
808MACOSX_UNIVERSAL
809JVM_VARIANT_ZEROSHARK
810JVM_VARIANT_ZERO
811JVM_VARIANT_KERNEL
812JVM_VARIANT_MINIMAL1
813JVM_VARIANT_CLIENT
814JVM_VARIANT_SERVER
815JVM_VARIANTS
816JDK_VARIANT
817SET_OPENJDK
818BUILD_LOG_WRAPPER
819BUILD_LOG_PREVIOUS
820BUILD_LOG
821SYS_ROOT
822PATH_SEP
823SRC_ROOT
824DEFINE_CROSS_COMPILE_ARCH
825LP64
826OPENJDK_TARGET_OS_API_DIR
827OPENJDK_TARGET_CPU_JLI_CFLAGS
828OPENJDK_TARGET_CPU_OSARCH
829OPENJDK_TARGET_CPU_ISADIR
830OPENJDK_TARGET_CPU_LIBDIR
831OPENJDK_TARGET_CPU_LEGACY_LIB
832OPENJDK_TARGET_CPU_LEGACY
833REQUIRED_OS_VERSION
834REQUIRED_OS_NAME
835COMPILE_TYPE
836OPENJDK_TARGET_CPU_ENDIAN
837OPENJDK_TARGET_CPU_BITS
838OPENJDK_TARGET_CPU_ARCH
839OPENJDK_TARGET_CPU
840OPENJDK_TARGET_OS_API
841OPENJDK_TARGET_OS
842OPENJDK_BUILD_CPU_ENDIAN
843OPENJDK_BUILD_CPU_BITS
844OPENJDK_BUILD_CPU_ARCH
845OPENJDK_BUILD_CPU
846OPENJDK_BUILD_OS_API
847OPENJDK_BUILD_OS
848OPENJDK_BUILD_AUTOCONF_NAME
849OPENJDK_TARGET_AUTOCONF_NAME
850target_os
851target_vendor
852target_cpu
853target
854host_os
855host_vendor
856host_cpu
857host
858build_os
859build_vendor
860build_cpu
861build
862SETFILE
863DF
864READLINK
865CYGPATH
866NAWK
867SED
868FGREP
869EGREP
870GREP
871AWK
872XARGS
873WHICH
874WC
875UNIQ
876UNAME
877TR
878TOUCH
879TEE
880TAR
881TAIL
882SORT
883SH
884RM
885THEPWDCMD
886PRINTF
887MV
888MKTEMP
889MKDIR
890LS
891LN
892HEAD
893FIND
894FILE
895EXPR
896ECHO
897DIRNAME
898DIFF
899DATE
900CUT
901CPIO
902CP
903COMM
904CMP
905CHMOD
906CAT
907BASH
908BASENAME
909DATE_WHEN_CONFIGURED
910CONFIGURE_COMMAND_LINE
911CUSTOM_MAKE_DIR
912target_alias
913host_alias
914build_alias
915LIBS
916ECHO_T
917ECHO_N
918ECHO_C
919DEFS
920mandir
921localedir
922libdir
923psdir
924pdfdir
925dvidir
926htmldir
927infodir
928docdir
929oldincludedir
930includedir
931localstatedir
932sharedstatedir
933sysconfdir
934datadir
935datarootdir
936libexecdir
937sbindir
938bindir
939program_transform_name
940prefix
941exec_prefix
942PACKAGE_URL
943PACKAGE_BUGREPORT
944PACKAGE_STRING
945PACKAGE_VERSION
946PACKAGE_TARNAME
947PACKAGE_NAME
948PATH_SEPARATOR
949SHELL'
950ac_subst_files=''
951ac_user_opts='
952enable_option_checking
953with_custom_make_dir
954with_target_bits
955with_sys_root
956with_tools_dir
957with_devkit
958enable_openjdk_only
959with_jdk_variant
960with_jvm_variants
961enable_debug
962with_debug_level
963with_conf_name
964with_builddeps_conf
965with_builddeps_server
966with_builddeps_dir
967with_builddeps_group
968enable_headful
969enable_hotspot_test_in_build
970with_cacerts_file
971enable_unlimited_crypto
972with_milestone
973with_build_number
974with_user_release_suffix
975with_boot_jdk
976with_boot_jdk_jvmargs
977with_add_source_root
978with_override_source_root
979with_adds_and_overrides
980with_override_langtools
981with_override_corba
982with_override_jaxp
983with_override_jaxws
984with_override_hotspot
985with_override_jdk
986with_import_hotspot
987with_msvcr_dll
988with_extra_cflags
989with_extra_cxxflags
990with_extra_ldflags
991enable_debug_symbols
992enable_zip_debug_info
993enable_macosx_runtime_support
994with_x
995with_cups
996with_cups_include
997with_freetype
998with_alsa
999with_alsa_include
1000with_alsa_lib
1001with_zlib
1002with_stdc__lib
1003with_num_cores
1004with_memory_size
1005with_jobs
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-jobs             number of parallel jobs to let make run [calculated
1765                          based on cores and memory]
1766  --with-sjavac-server-java
1767                          use this java binary for running the sjavac
1768                          background server [Boot JDK java]
1769  --with-sjavac-server-cores
1770                          use at most this number of concurrent threads on the
1771                          sjavac server [probed]
1772  --with-ccache-dir       where to store ccache files [~/.ccache]
1773
1774Some influential environment variables:
1775  PKG_CONFIG  path to pkg-config utility
1776  CC          C compiler command
1777  CFLAGS      C compiler flags
1778  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1779              nonstandard directory <lib dir>
1780  LIBS        libraries to pass to the linker, e.g. -l<library>
1781  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1782              you have headers in a nonstandard directory <include dir>
1783  CXX         C++ compiler command
1784  CXXFLAGS    C++ compiler flags
1785  OBJC        Objective C compiler command
1786  OBJCFLAGS   Objective C compiler flags
1787  CPP         C preprocessor
1788  CXXCPP      C++ preprocessor
1789  XMKMF       Path to xmkmf, Makefile generator for X Window System
1790  FREETYPE2_CFLAGS
1791              C compiler flags for FREETYPE2, overriding pkg-config
1792  FREETYPE2_LIBS
1793              linker flags for FREETYPE2, overriding pkg-config
1794  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1795  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1796
1797Use these variables to override the choices made by `configure' or to help
1798it to find libraries and programs with nonstandard names/locations.
1799
1800Report bugs to <build-dev@openjdk.java.net>.
1801OpenJDK home page: <http://openjdk.java.net>.
1802_ACEOF
1803ac_status=$?
1804fi
1805
1806if test "$ac_init_help" = "recursive"; then
1807  # If there are subdirs, report their specific --help.
1808  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1809    test -d "$ac_dir" ||
1810      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1811      continue
1812    ac_builddir=.
1813
1814case "$ac_dir" in
1815.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1816*)
1817  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1818  # A ".." for each directory in $ac_dir_suffix.
1819  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1820  case $ac_top_builddir_sub in
1821  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1822  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1823  esac ;;
1824esac
1825ac_abs_top_builddir=$ac_pwd
1826ac_abs_builddir=$ac_pwd$ac_dir_suffix
1827# for backward compatibility:
1828ac_top_builddir=$ac_top_build_prefix
1829
1830case $srcdir in
1831  .)  # We are building in place.
1832    ac_srcdir=.
1833    ac_top_srcdir=$ac_top_builddir_sub
1834    ac_abs_top_srcdir=$ac_pwd ;;
1835  [\\/]* | ?:[\\/]* )  # Absolute name.
1836    ac_srcdir=$srcdir$ac_dir_suffix;
1837    ac_top_srcdir=$srcdir
1838    ac_abs_top_srcdir=$srcdir ;;
1839  *) # Relative name.
1840    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1841    ac_top_srcdir=$ac_top_build_prefix$srcdir
1842    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1843esac
1844ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1845
1846    cd "$ac_dir" || { ac_status=$?; continue; }
1847    # Check for guested configure.
1848    if test -f "$ac_srcdir/configure.gnu"; then
1849      echo &&
1850      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1851    elif test -f "$ac_srcdir/configure"; then
1852      echo &&
1853      $SHELL "$ac_srcdir/configure" --help=recursive
1854    else
1855      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1856    fi || ac_status=$?
1857    cd "$ac_pwd" || { ac_status=$?; break; }
1858  done
1859fi
1860
1861test -n "$ac_init_help" && exit $ac_status
1862if $ac_init_version; then
1863  cat <<\_ACEOF
1864OpenJDK configure jdk8
1865generated by GNU Autoconf 2.67
1866
1867Copyright (C) 2010 Free Software Foundation, Inc.
1868This configure script is free software; the Free Software Foundation
1869gives unlimited permission to copy, distribute and modify it.
1870_ACEOF
1871  exit
1872fi
1873
1874## ------------------------ ##
1875## Autoconf initialization. ##
1876## ------------------------ ##
1877
1878# ac_fn_c_try_compile LINENO
1879# --------------------------
1880# Try to compile conftest.$ac_ext, and return whether this succeeded.
1881ac_fn_c_try_compile ()
1882{
1883  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1884  rm -f conftest.$ac_objext
1885  if { { ac_try="$ac_compile"
1886case "(($ac_try" in
1887  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1888  *) ac_try_echo=$ac_try;;
1889esac
1890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1891$as_echo "$ac_try_echo"; } >&5
1892  (eval "$ac_compile") 2>conftest.err
1893  ac_status=$?
1894  if test -s conftest.err; then
1895    grep -v '^ *+' conftest.err >conftest.er1
1896    cat conftest.er1 >&5
1897    mv -f conftest.er1 conftest.err
1898  fi
1899  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1900  test $ac_status = 0; } && {
1901	 test -z "$ac_c_werror_flag" ||
1902	 test ! -s conftest.err
1903       } && test -s conftest.$ac_objext; then :
1904  ac_retval=0
1905else
1906  $as_echo "$as_me: failed program was:" >&5
1907sed 's/^/| /' conftest.$ac_ext >&5
1908
1909	ac_retval=1
1910fi
1911  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1912  as_fn_set_status $ac_retval
1913
1914} # ac_fn_c_try_compile
1915
1916# ac_fn_cxx_try_compile LINENO
1917# ----------------------------
1918# Try to compile conftest.$ac_ext, and return whether this succeeded.
1919ac_fn_cxx_try_compile ()
1920{
1921  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1922  rm -f conftest.$ac_objext
1923  if { { ac_try="$ac_compile"
1924case "(($ac_try" in
1925  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1926  *) ac_try_echo=$ac_try;;
1927esac
1928eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1929$as_echo "$ac_try_echo"; } >&5
1930  (eval "$ac_compile") 2>conftest.err
1931  ac_status=$?
1932  if test -s conftest.err; then
1933    grep -v '^ *+' conftest.err >conftest.er1
1934    cat conftest.er1 >&5
1935    mv -f conftest.er1 conftest.err
1936  fi
1937  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1938  test $ac_status = 0; } && {
1939	 test -z "$ac_cxx_werror_flag" ||
1940	 test ! -s conftest.err
1941       } && test -s conftest.$ac_objext; then :
1942  ac_retval=0
1943else
1944  $as_echo "$as_me: failed program was:" >&5
1945sed 's/^/| /' conftest.$ac_ext >&5
1946
1947	ac_retval=1
1948fi
1949  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1950  as_fn_set_status $ac_retval
1951
1952} # ac_fn_cxx_try_compile
1953
1954# ac_fn_objc_try_compile LINENO
1955# -----------------------------
1956# Try to compile conftest.$ac_ext, and return whether this succeeded.
1957ac_fn_objc_try_compile ()
1958{
1959  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1960  rm -f conftest.$ac_objext
1961  if { { ac_try="$ac_compile"
1962case "(($ac_try" in
1963  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1964  *) ac_try_echo=$ac_try;;
1965esac
1966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1967$as_echo "$ac_try_echo"; } >&5
1968  (eval "$ac_compile") 2>conftest.err
1969  ac_status=$?
1970  if test -s conftest.err; then
1971    grep -v '^ *+' conftest.err >conftest.er1
1972    cat conftest.er1 >&5
1973    mv -f conftest.er1 conftest.err
1974  fi
1975  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1976  test $ac_status = 0; } && {
1977	 test -z "$ac_objc_werror_flag" ||
1978	 test ! -s conftest.err
1979       } && test -s conftest.$ac_objext; then :
1980  ac_retval=0
1981else
1982  $as_echo "$as_me: failed program was:" >&5
1983sed 's/^/| /' conftest.$ac_ext >&5
1984
1985	ac_retval=1
1986fi
1987  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1988  as_fn_set_status $ac_retval
1989
1990} # ac_fn_objc_try_compile
1991
1992# ac_fn_c_try_cpp LINENO
1993# ----------------------
1994# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1995ac_fn_c_try_cpp ()
1996{
1997  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1998  if { { ac_try="$ac_cpp conftest.$ac_ext"
1999case "(($ac_try" in
2000  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2001  *) ac_try_echo=$ac_try;;
2002esac
2003eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2004$as_echo "$ac_try_echo"; } >&5
2005  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2006  ac_status=$?
2007  if test -s conftest.err; then
2008    grep -v '^ *+' conftest.err >conftest.er1
2009    cat conftest.er1 >&5
2010    mv -f conftest.er1 conftest.err
2011  fi
2012  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2013  test $ac_status = 0; } > conftest.i && {
2014	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2015	 test ! -s conftest.err
2016       }; then :
2017  ac_retval=0
2018else
2019  $as_echo "$as_me: failed program was:" >&5
2020sed 's/^/| /' conftest.$ac_ext >&5
2021
2022    ac_retval=1
2023fi
2024  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2025  as_fn_set_status $ac_retval
2026
2027} # ac_fn_c_try_cpp
2028
2029# ac_fn_cxx_try_cpp LINENO
2030# ------------------------
2031# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2032ac_fn_cxx_try_cpp ()
2033{
2034  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2035  if { { ac_try="$ac_cpp conftest.$ac_ext"
2036case "(($ac_try" in
2037  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2038  *) ac_try_echo=$ac_try;;
2039esac
2040eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2041$as_echo "$ac_try_echo"; } >&5
2042  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2043  ac_status=$?
2044  if test -s conftest.err; then
2045    grep -v '^ *+' conftest.err >conftest.er1
2046    cat conftest.er1 >&5
2047    mv -f conftest.er1 conftest.err
2048  fi
2049  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2050  test $ac_status = 0; } > conftest.i && {
2051	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2052	 test ! -s conftest.err
2053       }; then :
2054  ac_retval=0
2055else
2056  $as_echo "$as_me: failed program was:" >&5
2057sed 's/^/| /' conftest.$ac_ext >&5
2058
2059    ac_retval=1
2060fi
2061  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2062  as_fn_set_status $ac_retval
2063
2064} # ac_fn_cxx_try_cpp
2065
2066# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2067# ---------------------------------------------------------
2068# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2069# the include files in INCLUDES and setting the cache variable VAR
2070# accordingly.
2071ac_fn_cxx_check_header_mongrel ()
2072{
2073  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2074  if eval "test \"\${$3+set}\"" = set; then :
2075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2076$as_echo_n "checking for $2... " >&6; }
2077if eval "test \"\${$3+set}\"" = set; then :
2078  $as_echo_n "(cached) " >&6
2079fi
2080eval ac_res=\$$3
2081	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2082$as_echo "$ac_res" >&6; }
2083else
2084  # Is the header compilable?
2085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2086$as_echo_n "checking $2 usability... " >&6; }
2087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2088/* end confdefs.h.  */
2089$4
2090#include <$2>
2091_ACEOF
2092if ac_fn_cxx_try_compile "$LINENO"; then :
2093  ac_header_compiler=yes
2094else
2095  ac_header_compiler=no
2096fi
2097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2099$as_echo "$ac_header_compiler" >&6; }
2100
2101# Is the header present?
2102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2103$as_echo_n "checking $2 presence... " >&6; }
2104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2105/* end confdefs.h.  */
2106#include <$2>
2107_ACEOF
2108if ac_fn_cxx_try_cpp "$LINENO"; then :
2109  ac_header_preproc=yes
2110else
2111  ac_header_preproc=no
2112fi
2113rm -f conftest.err conftest.i conftest.$ac_ext
2114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2115$as_echo "$ac_header_preproc" >&6; }
2116
2117# So?  What about this header?
2118case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2119  yes:no: )
2120    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2121$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2123$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2124    ;;
2125  no:yes:* )
2126    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2127$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2128    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2129$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2130    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2131$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2132    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2133$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2134    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2135$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2136( $as_echo "## ----------------------------------------- ##
2137## Report this to build-dev@openjdk.java.net ##
2138## ----------------------------------------- ##"
2139     ) | sed "s/^/$as_me: WARNING:     /" >&2
2140    ;;
2141esac
2142  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2143$as_echo_n "checking for $2... " >&6; }
2144if eval "test \"\${$3+set}\"" = set; then :
2145  $as_echo_n "(cached) " >&6
2146else
2147  eval "$3=\$ac_header_compiler"
2148fi
2149eval ac_res=\$$3
2150	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2151$as_echo "$ac_res" >&6; }
2152fi
2153  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2154
2155} # ac_fn_cxx_check_header_mongrel
2156
2157# ac_fn_cxx_try_run LINENO
2158# ------------------------
2159# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2160# that executables *can* be run.
2161ac_fn_cxx_try_run ()
2162{
2163  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2164  if { { ac_try="$ac_link"
2165case "(($ac_try" in
2166  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2167  *) ac_try_echo=$ac_try;;
2168esac
2169eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2170$as_echo "$ac_try_echo"; } >&5
2171  (eval "$ac_link") 2>&5
2172  ac_status=$?
2173  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2174  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2175  { { case "(($ac_try" in
2176  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2177  *) ac_try_echo=$ac_try;;
2178esac
2179eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2180$as_echo "$ac_try_echo"; } >&5
2181  (eval "$ac_try") 2>&5
2182  ac_status=$?
2183  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2184  test $ac_status = 0; }; }; then :
2185  ac_retval=0
2186else
2187  $as_echo "$as_me: program exited with status $ac_status" >&5
2188       $as_echo "$as_me: failed program was:" >&5
2189sed 's/^/| /' conftest.$ac_ext >&5
2190
2191       ac_retval=$ac_status
2192fi
2193  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2194  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2195  as_fn_set_status $ac_retval
2196
2197} # ac_fn_cxx_try_run
2198
2199# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2200# ---------------------------------------------------------
2201# Tests whether HEADER exists and can be compiled using the include files in
2202# INCLUDES, setting the cache variable VAR accordingly.
2203ac_fn_cxx_check_header_compile ()
2204{
2205  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2207$as_echo_n "checking for $2... " >&6; }
2208if eval "test \"\${$3+set}\"" = set; then :
2209  $as_echo_n "(cached) " >&6
2210else
2211  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2212/* end confdefs.h.  */
2213$4
2214#include <$2>
2215_ACEOF
2216if ac_fn_cxx_try_compile "$LINENO"; then :
2217  eval "$3=yes"
2218else
2219  eval "$3=no"
2220fi
2221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2222fi
2223eval ac_res=\$$3
2224	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2225$as_echo "$ac_res" >&6; }
2226  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2227
2228} # ac_fn_cxx_check_header_compile
2229
2230# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2231# ----------------------------------------------
2232# Tries to find the compile-time value of EXPR in a program that includes
2233# INCLUDES, setting VAR accordingly. Returns whether the value could be
2234# computed
2235ac_fn_cxx_compute_int ()
2236{
2237  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238  if test "$cross_compiling" = yes; then
2239    # Depending upon the size, compute the lo and hi bounds.
2240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h.  */
2242$4
2243int
2244main ()
2245{
2246static int test_array [1 - 2 * !(($2) >= 0)];
2247test_array [0] = 0
2248
2249  ;
2250  return 0;
2251}
2252_ACEOF
2253if ac_fn_cxx_try_compile "$LINENO"; then :
2254  ac_lo=0 ac_mid=0
2255  while :; do
2256    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2257/* end confdefs.h.  */
2258$4
2259int
2260main ()
2261{
2262static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2263test_array [0] = 0
2264
2265  ;
2266  return 0;
2267}
2268_ACEOF
2269if ac_fn_cxx_try_compile "$LINENO"; then :
2270  ac_hi=$ac_mid; break
2271else
2272  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2273			if test $ac_lo -le $ac_mid; then
2274			  ac_lo= ac_hi=
2275			  break
2276			fi
2277			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2278fi
2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2280  done
2281else
2282  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283/* end confdefs.h.  */
2284$4
2285int
2286main ()
2287{
2288static int test_array [1 - 2 * !(($2) < 0)];
2289test_array [0] = 0
2290
2291  ;
2292  return 0;
2293}
2294_ACEOF
2295if ac_fn_cxx_try_compile "$LINENO"; then :
2296  ac_hi=-1 ac_mid=-1
2297  while :; do
2298    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299/* end confdefs.h.  */
2300$4
2301int
2302main ()
2303{
2304static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2305test_array [0] = 0
2306
2307  ;
2308  return 0;
2309}
2310_ACEOF
2311if ac_fn_cxx_try_compile "$LINENO"; then :
2312  ac_lo=$ac_mid; break
2313else
2314  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2315			if test $ac_mid -le $ac_hi; then
2316			  ac_lo= ac_hi=
2317			  break
2318			fi
2319			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2320fi
2321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2322  done
2323else
2324  ac_lo= ac_hi=
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2329# Binary search between lo and hi bounds.
2330while test "x$ac_lo" != "x$ac_hi"; do
2331  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2332  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2333/* end confdefs.h.  */
2334$4
2335int
2336main ()
2337{
2338static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2339test_array [0] = 0
2340
2341  ;
2342  return 0;
2343}
2344_ACEOF
2345if ac_fn_cxx_try_compile "$LINENO"; then :
2346  ac_hi=$ac_mid
2347else
2348  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2349fi
2350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2351done
2352case $ac_lo in #((
2353?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2354'') ac_retval=1 ;;
2355esac
2356  else
2357    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2358/* end confdefs.h.  */
2359$4
2360static long int longval () { return $2; }
2361static unsigned long int ulongval () { return $2; }
2362#include <stdio.h>
2363#include <stdlib.h>
2364int
2365main ()
2366{
2367
2368  FILE *f = fopen ("conftest.val", "w");
2369  if (! f)
2370    return 1;
2371  if (($2) < 0)
2372    {
2373      long int i = longval ();
2374      if (i != ($2))
2375	return 1;
2376      fprintf (f, "%ld", i);
2377    }
2378  else
2379    {
2380      unsigned long int i = ulongval ();
2381      if (i != ($2))
2382	return 1;
2383      fprintf (f, "%lu", i);
2384    }
2385  /* Do not output a trailing newline, as this causes \r\n confusion
2386     on some platforms.  */
2387  return ferror (f) || fclose (f) != 0;
2388
2389  ;
2390  return 0;
2391}
2392_ACEOF
2393if ac_fn_cxx_try_run "$LINENO"; then :
2394  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2395else
2396  ac_retval=1
2397fi
2398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2399  conftest.$ac_objext conftest.beam conftest.$ac_ext
2400rm -f conftest.val
2401
2402  fi
2403  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2404  as_fn_set_status $ac_retval
2405
2406} # ac_fn_cxx_compute_int
2407
2408# ac_fn_cxx_try_link LINENO
2409# -------------------------
2410# Try to link conftest.$ac_ext, and return whether this succeeded.
2411ac_fn_cxx_try_link ()
2412{
2413  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2414  rm -f conftest.$ac_objext conftest$ac_exeext
2415  if { { ac_try="$ac_link"
2416case "(($ac_try" in
2417  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2418  *) ac_try_echo=$ac_try;;
2419esac
2420eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2421$as_echo "$ac_try_echo"; } >&5
2422  (eval "$ac_link") 2>conftest.err
2423  ac_status=$?
2424  if test -s conftest.err; then
2425    grep -v '^ *+' conftest.err >conftest.er1
2426    cat conftest.er1 >&5
2427    mv -f conftest.er1 conftest.err
2428  fi
2429  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2430  test $ac_status = 0; } && {
2431	 test -z "$ac_cxx_werror_flag" ||
2432	 test ! -s conftest.err
2433       } && test -s conftest$ac_exeext && {
2434	 test "$cross_compiling" = yes ||
2435	 $as_test_x conftest$ac_exeext
2436       }; then :
2437  ac_retval=0
2438else
2439  $as_echo "$as_me: failed program was:" >&5
2440sed 's/^/| /' conftest.$ac_ext >&5
2441
2442	ac_retval=1
2443fi
2444  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2445  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2446  # interfere with the next link command; also delete a directory that is
2447  # left behind by Apple's compiler.  We do this before executing the actions.
2448  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2449  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2450  as_fn_set_status $ac_retval
2451
2452} # ac_fn_cxx_try_link
2453
2454# ac_fn_cxx_check_func LINENO FUNC VAR
2455# ------------------------------------
2456# Tests whether FUNC exists, setting the cache variable VAR accordingly
2457ac_fn_cxx_check_func ()
2458{
2459  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2461$as_echo_n "checking for $2... " >&6; }
2462if eval "test \"\${$3+set}\"" = set; then :
2463  $as_echo_n "(cached) " >&6
2464else
2465  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2466/* end confdefs.h.  */
2467/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2468   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2469#define $2 innocuous_$2
2470
2471/* System header to define __stub macros and hopefully few prototypes,
2472    which can conflict with char $2 (); below.
2473    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2474    <limits.h> exists even on freestanding compilers.  */
2475
2476#ifdef __STDC__
2477# include <limits.h>
2478#else
2479# include <assert.h>
2480#endif
2481
2482#undef $2
2483
2484/* Override any GCC internal prototype to avoid an error.
2485   Use char because int might match the return type of a GCC
2486   builtin and then its argument prototype would still apply.  */
2487#ifdef __cplusplus
2488extern "C"
2489#endif
2490char $2 ();
2491/* The GNU C library defines this for functions which it implements
2492    to always fail with ENOSYS.  Some functions are actually named
2493    something starting with __ and the normal name is an alias.  */
2494#if defined __stub_$2 || defined __stub___$2
2495choke me
2496#endif
2497
2498int
2499main ()
2500{
2501return $2 ();
2502  ;
2503  return 0;
2504}
2505_ACEOF
2506if ac_fn_cxx_try_link "$LINENO"; then :
2507  eval "$3=yes"
2508else
2509  eval "$3=no"
2510fi
2511rm -f core conftest.err conftest.$ac_objext \
2512    conftest$ac_exeext conftest.$ac_ext
2513fi
2514eval ac_res=\$$3
2515	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2516$as_echo "$ac_res" >&6; }
2517  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2518
2519} # ac_fn_cxx_check_func
2520
2521# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2522# -------------------------------------------------------
2523# Tests whether HEADER exists and can be compiled using the include files in
2524# INCLUDES, setting the cache variable VAR accordingly.
2525ac_fn_c_check_header_compile ()
2526{
2527  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2529$as_echo_n "checking for $2... " >&6; }
2530if eval "test \"\${$3+set}\"" = set; then :
2531  $as_echo_n "(cached) " >&6
2532else
2533  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2534/* end confdefs.h.  */
2535$4
2536#include <$2>
2537_ACEOF
2538if ac_fn_c_try_compile "$LINENO"; then :
2539  eval "$3=yes"
2540else
2541  eval "$3=no"
2542fi
2543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2544fi
2545eval ac_res=\$$3
2546	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2547$as_echo "$ac_res" >&6; }
2548  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2549
2550} # ac_fn_c_check_header_compile
2551cat >config.log <<_ACEOF
2552This file contains any messages produced by compilers while
2553running configure, to aid debugging if configure makes a mistake.
2554
2555It was created by OpenJDK $as_me jdk8, which was
2556generated by GNU Autoconf 2.67.  Invocation command line was
2557
2558  $ $0 $@
2559
2560_ACEOF
2561exec 5>>config.log
2562{
2563cat <<_ASUNAME
2564## --------- ##
2565## Platform. ##
2566## --------- ##
2567
2568hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2569uname -m = `(uname -m) 2>/dev/null || echo unknown`
2570uname -r = `(uname -r) 2>/dev/null || echo unknown`
2571uname -s = `(uname -s) 2>/dev/null || echo unknown`
2572uname -v = `(uname -v) 2>/dev/null || echo unknown`
2573
2574/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2575/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2576
2577/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2578/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2579/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2580/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2581/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2582/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2583/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2584
2585_ASUNAME
2586
2587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2588for as_dir in $PATH
2589do
2590  IFS=$as_save_IFS
2591  test -z "$as_dir" && as_dir=.
2592    $as_echo "PATH: $as_dir"
2593  done
2594IFS=$as_save_IFS
2595
2596} >&5
2597
2598cat >&5 <<_ACEOF
2599
2600
2601## ----------- ##
2602## Core tests. ##
2603## ----------- ##
2604
2605_ACEOF
2606
2607
2608# Keep a trace of the command line.
2609# Strip out --no-create and --no-recursion so they do not pile up.
2610# Strip out --silent because we don't want to record it for future runs.
2611# Also quote any args containing shell meta-characters.
2612# Make two passes to allow for proper duplicate-argument suppression.
2613ac_configure_args=
2614ac_configure_args0=
2615ac_configure_args1=
2616ac_must_keep_next=false
2617for ac_pass in 1 2
2618do
2619  for ac_arg
2620  do
2621    case $ac_arg in
2622    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2623    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2624    | -silent | --silent | --silen | --sile | --sil)
2625      continue ;;
2626    *\'*)
2627      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2628    esac
2629    case $ac_pass in
2630    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2631    2)
2632      as_fn_append ac_configure_args1 " '$ac_arg'"
2633      if test $ac_must_keep_next = true; then
2634	ac_must_keep_next=false # Got value, back to normal.
2635      else
2636	case $ac_arg in
2637	  *=* | --config-cache | -C | -disable-* | --disable-* \
2638	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2639	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2640	  | -with-* | --with-* | -without-* | --without-* | --x)
2641	    case "$ac_configure_args0 " in
2642	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2643	    esac
2644	    ;;
2645	  -* ) ac_must_keep_next=true ;;
2646	esac
2647      fi
2648      as_fn_append ac_configure_args " '$ac_arg'"
2649      ;;
2650    esac
2651  done
2652done
2653{ ac_configure_args0=; unset ac_configure_args0;}
2654{ ac_configure_args1=; unset ac_configure_args1;}
2655
2656# When interrupted or exit'd, cleanup temporary files, and complete
2657# config.log.  We remove comments because anyway the quotes in there
2658# would cause problems or look ugly.
2659# WARNING: Use '\'' to represent an apostrophe within the trap.
2660# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2661trap 'exit_status=$?
2662  # Save into config.log some information that might help in debugging.
2663  {
2664    echo
2665
2666    $as_echo "## ---------------- ##
2667## Cache variables. ##
2668## ---------------- ##"
2669    echo
2670    # The following way of writing the cache mishandles newlines in values,
2671(
2672  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2673    eval ac_val=\$$ac_var
2674    case $ac_val in #(
2675    *${as_nl}*)
2676      case $ac_var in #(
2677      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2678$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2679      esac
2680      case $ac_var in #(
2681      _ | IFS | as_nl) ;; #(
2682      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2683      *) { eval $ac_var=; unset $ac_var;} ;;
2684      esac ;;
2685    esac
2686  done
2687  (set) 2>&1 |
2688    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2689    *${as_nl}ac_space=\ *)
2690      sed -n \
2691	"s/'\''/'\''\\\\'\'''\''/g;
2692	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2693      ;; #(
2694    *)
2695      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2696      ;;
2697    esac |
2698    sort
2699)
2700    echo
2701
2702    $as_echo "## ----------------- ##
2703## Output variables. ##
2704## ----------------- ##"
2705    echo
2706    for ac_var in $ac_subst_vars
2707    do
2708      eval ac_val=\$$ac_var
2709      case $ac_val in
2710      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2711      esac
2712      $as_echo "$ac_var='\''$ac_val'\''"
2713    done | sort
2714    echo
2715
2716    if test -n "$ac_subst_files"; then
2717      $as_echo "## ------------------- ##
2718## File substitutions. ##
2719## ------------------- ##"
2720      echo
2721      for ac_var in $ac_subst_files
2722      do
2723	eval ac_val=\$$ac_var
2724	case $ac_val in
2725	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2726	esac
2727	$as_echo "$ac_var='\''$ac_val'\''"
2728      done | sort
2729      echo
2730    fi
2731
2732    if test -s confdefs.h; then
2733      $as_echo "## ----------- ##
2734## confdefs.h. ##
2735## ----------- ##"
2736      echo
2737      cat confdefs.h
2738      echo
2739    fi
2740    test "$ac_signal" != 0 &&
2741      $as_echo "$as_me: caught signal $ac_signal"
2742    $as_echo "$as_me: exit $exit_status"
2743  } >&5
2744  rm -f core *.core core.conftest.* &&
2745    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2746    exit $exit_status
2747' 0
2748for ac_signal in 1 2 13 15; do
2749  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2750done
2751ac_signal=0
2752
2753# confdefs.h avoids OS command line length limits that DEFS can exceed.
2754rm -f -r conftest* confdefs.h
2755
2756$as_echo "/* confdefs.h */" > confdefs.h
2757
2758# Predefined preprocessor variables.
2759
2760cat >>confdefs.h <<_ACEOF
2761#define PACKAGE_NAME "$PACKAGE_NAME"
2762_ACEOF
2763
2764cat >>confdefs.h <<_ACEOF
2765#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2766_ACEOF
2767
2768cat >>confdefs.h <<_ACEOF
2769#define PACKAGE_VERSION "$PACKAGE_VERSION"
2770_ACEOF
2771
2772cat >>confdefs.h <<_ACEOF
2773#define PACKAGE_STRING "$PACKAGE_STRING"
2774_ACEOF
2775
2776cat >>confdefs.h <<_ACEOF
2777#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2778_ACEOF
2779
2780cat >>confdefs.h <<_ACEOF
2781#define PACKAGE_URL "$PACKAGE_URL"
2782_ACEOF
2783
2784
2785# Let the site file select an alternate cache file if it wants to.
2786# Prefer an explicitly selected file to automatically selected ones.
2787ac_site_file1=NONE
2788ac_site_file2=NONE
2789if test -n "$CONFIG_SITE"; then
2790  # We do not want a PATH search for config.site.
2791  case $CONFIG_SITE in #((
2792    -*)  ac_site_file1=./$CONFIG_SITE;;
2793    */*) ac_site_file1=$CONFIG_SITE;;
2794    *)   ac_site_file1=./$CONFIG_SITE;;
2795  esac
2796elif test "x$prefix" != xNONE; then
2797  ac_site_file1=$prefix/share/config.site
2798  ac_site_file2=$prefix/etc/config.site
2799else
2800  ac_site_file1=$ac_default_prefix/share/config.site
2801  ac_site_file2=$ac_default_prefix/etc/config.site
2802fi
2803for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2804do
2805  test "x$ac_site_file" = xNONE && continue
2806  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2807    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2808$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2809    sed 's/^/| /' "$ac_site_file" >&5
2810    . "$ac_site_file" \
2811      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2812$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2813as_fn_error $? "failed to load site script $ac_site_file
2814See \`config.log' for more details" "$LINENO" 5 ; }
2815  fi
2816done
2817
2818if test -r "$cache_file"; then
2819  # Some versions of bash will fail to source /dev/null (special files
2820  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2821  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2822    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2823$as_echo "$as_me: loading cache $cache_file" >&6;}
2824    case $cache_file in
2825      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2826      *)                      . "./$cache_file";;
2827    esac
2828  fi
2829else
2830  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2831$as_echo "$as_me: creating cache $cache_file" >&6;}
2832  >$cache_file
2833fi
2834
2835# Check that the precious variables saved in the cache have kept the same
2836# value.
2837ac_cache_corrupted=false
2838for ac_var in $ac_precious_vars; do
2839  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2840  eval ac_new_set=\$ac_env_${ac_var}_set
2841  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2842  eval ac_new_val=\$ac_env_${ac_var}_value
2843  case $ac_old_set,$ac_new_set in
2844    set,)
2845      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2846$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2847      ac_cache_corrupted=: ;;
2848    ,set)
2849      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2850$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2851      ac_cache_corrupted=: ;;
2852    ,);;
2853    *)
2854      if test "x$ac_old_val" != "x$ac_new_val"; then
2855	# differences in whitespace do not lead to failure.
2856	ac_old_val_w=`echo x $ac_old_val`
2857	ac_new_val_w=`echo x $ac_new_val`
2858	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2859	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2860$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2861	  ac_cache_corrupted=:
2862	else
2863	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2864$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2865	  eval $ac_var=\$ac_old_val
2866	fi
2867	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2868$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2869	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2870$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2871      fi;;
2872  esac
2873  # Pass precious variables to config.status.
2874  if test "$ac_new_set" = set; then
2875    case $ac_new_val in
2876    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2877    *) ac_arg=$ac_var=$ac_new_val ;;
2878    esac
2879    case " $ac_configure_args " in
2880      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2881      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2882    esac
2883  fi
2884done
2885if $ac_cache_corrupted; then
2886  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2887$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2888  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2889$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2890  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2891fi
2892## -------------------- ##
2893## Main body of script. ##
2894## -------------------- ##
2895
2896ac_ext=c
2897ac_cpp='$CPP $CPPFLAGS'
2898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2900ac_compiler_gnu=$ac_cv_c_compiler_gnu
2901
2902
2903
2904ac_aux_dir=
2905for ac_dir in build-aux "$srcdir"/build-aux; do
2906  if test -f "$ac_dir/install-sh"; then
2907    ac_aux_dir=$ac_dir
2908    ac_install_sh="$ac_aux_dir/install-sh -c"
2909    break
2910  elif test -f "$ac_dir/install.sh"; then
2911    ac_aux_dir=$ac_dir
2912    ac_install_sh="$ac_aux_dir/install.sh -c"
2913    break
2914  elif test -f "$ac_dir/shtool"; then
2915    ac_aux_dir=$ac_dir
2916    ac_install_sh="$ac_aux_dir/shtool install -c"
2917    break
2918  fi
2919done
2920if test -z "$ac_aux_dir"; then
2921  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2922fi
2923
2924# These three variables are undocumented and unsupported,
2925# and are intended to be withdrawn in a future Autoconf release.
2926# They can cause serious problems if a builder's source tree is in a directory
2927# whose full name contains unusual characters.
2928ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2929ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2930ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2931
2932
2933# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2934
2935#
2936# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2937# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2938#
2939# This code is free software; you can redistribute it and/or modify it
2940# under the terms of the GNU General Public License version 2 only, as
2941# published by the Free Software Foundation.  Oracle designates this
2942# particular file as subject to the "Classpath" exception as provided
2943# by Oracle in the LICENSE file that accompanied this code.
2944#
2945# This code is distributed in the hope that it will be useful, but WITHOUT
2946# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2947# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2948# version 2 for more details (a copy is included in the LICENSE file that
2949# accompanied this code).
2950#
2951# You should have received a copy of the GNU General Public License version
2952# 2 along with this work; if not, write to the Free Software Foundation,
2953# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2954#
2955# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2956# or visit www.oracle.com if you need additional information or have any
2957# questions.
2958#
2959
2960#
2961# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2962#
2963# This program is free software; you can redistribute it and/or modify
2964# it under the terms of the GNU General Public License as published by
2965# the Free Software Foundation; either version 2 of the License, or
2966# (at your option) any later version.
2967#
2968# This program is distributed in the hope that it will be useful, but
2969# WITHOUT ANY WARRANTY; without even the implied warranty of
2970# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2971# General Public License for more details.
2972#
2973# You should have received a copy of the GNU General Public License
2974# along with this program; if not, write to the Free Software
2975# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2976#
2977# As a special exception to the GNU General Public License, if you
2978# distribute this file as part of a program that contains a
2979# configuration script generated by Autoconf, you may include it under
2980# the same distribution terms that you use for the rest of that program.
2981
2982# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2983# ----------------------------------
2984# PKG_PROG_PKG_CONFIG
2985
2986# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2987#
2988# Check to see whether a particular set of modules exists.  Similar
2989# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2990#
2991#
2992# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2993# this or PKG_CHECK_MODULES is called, or make sure to call
2994# PKG_CHECK_EXISTS manually
2995# --------------------------------------------------------------
2996
2997
2998
2999# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3000# ---------------------------------------------
3001# _PKG_CONFIG
3002
3003# _PKG_SHORT_ERRORS_SUPPORTED
3004# -----------------------------
3005# _PKG_SHORT_ERRORS_SUPPORTED
3006
3007
3008# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3009# [ACTION-IF-NOT-FOUND])
3010#
3011#
3012# Note that if there is a possibility the first call to
3013# PKG_CHECK_MODULES might not happen, you should be sure to include an
3014# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3015#
3016#
3017# --------------------------------------------------------------
3018# PKG_CHECK_MODULES
3019
3020
3021# Include these first...
3022#
3023# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3024# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3025#
3026# This code is free software; you can redistribute it and/or modify it
3027# under the terms of the GNU General Public License version 2 only, as
3028# published by the Free Software Foundation.  Oracle designates this
3029# particular file as subject to the "Classpath" exception as provided
3030# by Oracle in the LICENSE file that accompanied this code.
3031#
3032# This code is distributed in the hope that it will be useful, but WITHOUT
3033# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3034# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3035# version 2 for more details (a copy is included in the LICENSE file that
3036# accompanied this code).
3037#
3038# You should have received a copy of the GNU General Public License version
3039# 2 along with this work; if not, write to the Free Software Foundation,
3040# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3041#
3042# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3043# or visit www.oracle.com if you need additional information or have any
3044# questions.
3045#
3046
3047
3048
3049# This will make sure the given variable points to a full and proper
3050# path. This means:
3051# 1) There will be no spaces in the path. On posix platforms,
3052#    spaces in the path will result in an error. On Windows,
3053#    the path will be rewritten using short-style to be space-free.
3054# 2) The path will be absolute, and it will be in unix-style (on
3055#     cygwin).
3056# $1: The name of the variable to fix
3057
3058
3059# This will make sure the given variable points to a executable
3060# with a full and proper path. This means:
3061# 1) There will be no spaces in the path. On posix platforms,
3062#    spaces in the path will result in an error. On Windows,
3063#    the path will be rewritten using short-style to be space-free.
3064# 2) The path will be absolute, and it will be in unix-style (on
3065#     cygwin).
3066# Any arguments given to the executable is preserved.
3067# If the input variable does not have a directory specification, then
3068# it need to be in the PATH.
3069# $1: The name of the variable to fix
3070
3071
3072
3073
3074
3075
3076# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3077# $1: variable to check
3078# $2: executable name to print in warning (optional)
3079
3080
3081# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3082# Arguments as AC_PATH_PROG:
3083# $1: variable to set
3084# $2: executable name to look for
3085
3086
3087# Setup the most fundamental tools that relies on not much else to set up,
3088# but is used by much of the early bootstrap code.
3089
3090
3091# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3092
3093
3094
3095
3096
3097
3098
3099#%%% Simple tools %%%
3100
3101# Check if we have found a usable version of make
3102# $1: the path to a potential make binary (or empty)
3103# $2: the description on how we found this
3104
3105
3106# Goes looking for a usable version of GNU make.
3107
3108
3109
3110
3111
3112
3113# Check if build directory is on local disk. If not possible to determine,
3114# we prefer to claim it's local.
3115# Argument 1: directory to test
3116# Argument 2: what to do if it is on local disk
3117# Argument 3: what to do otherwise (remote disk or failure)
3118
3119
3120# Check that source files have basic read permissions set. This might
3121# not be the case in cygwin in certain conditions.
3122
3123
3124
3125
3126#
3127# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3128# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3129#
3130# This code is free software; you can redistribute it and/or modify it
3131# under the terms of the GNU General Public License version 2 only, as
3132# published by the Free Software Foundation.  Oracle designates this
3133# particular file as subject to the "Classpath" exception as provided
3134# by Oracle in the LICENSE file that accompanied this code.
3135#
3136# This code is distributed in the hope that it will be useful, but WITHOUT
3137# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3138# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3139# version 2 for more details (a copy is included in the LICENSE file that
3140# accompanied this code).
3141#
3142# You should have received a copy of the GNU General Public License version
3143# 2 along with this work; if not, write to the Free Software Foundation,
3144# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3145#
3146# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3147# or visit www.oracle.com if you need additional information or have any
3148# questions.
3149#
3150
3151
3152
3153
3154
3155# Helper function which possibly converts a path using DOS-style short mode.
3156# If so, the updated path is stored in $new_path.
3157# $1: The path to check
3158
3159
3160# Helper function which possibly converts a path using DOS-style short mode.
3161# If so, the updated path is stored in $new_path.
3162# $1: The path to check
3163
3164
3165# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3166# and could probably be heavily simplified. However, all changes in this
3167# area tend to need lot of testing in different scenarios, and in lack of
3168# proper unit testing, cleaning this up has not been deemed worth the effort
3169# at the moment.
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3180
3181
3182
3183
3184#
3185# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3186# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3187#
3188# This code is free software; you can redistribute it and/or modify it
3189# under the terms of the GNU General Public License version 2 only, as
3190# published by the Free Software Foundation.  Oracle designates this
3191# particular file as subject to the "Classpath" exception as provided
3192# by Oracle in the LICENSE file that accompanied this code.
3193#
3194# This code is distributed in the hope that it will be useful, but WITHOUT
3195# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3196# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3197# version 2 for more details (a copy is included in the LICENSE file that
3198# accompanied this code).
3199#
3200# You should have received a copy of the GNU General Public License version
3201# 2 along with this work; if not, write to the Free Software Foundation,
3202# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3203#
3204# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3205# or visit www.oracle.com if you need additional information or have any
3206# questions.
3207#
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219# ... then the rest
3220#
3221# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3222# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3223#
3224# This code is free software; you can redistribute it and/or modify it
3225# under the terms of the GNU General Public License version 2 only, as
3226# published by the Free Software Foundation.  Oracle designates this
3227# particular file as subject to the "Classpath" exception as provided
3228# by Oracle in the LICENSE file that accompanied this code.
3229#
3230# This code is distributed in the hope that it will be useful, but WITHOUT
3231# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3232# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3233# version 2 for more details (a copy is included in the LICENSE file that
3234# accompanied this code).
3235#
3236# You should have received a copy of the GNU General Public License version
3237# 2 along with this work; if not, write to the Free Software Foundation,
3238# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3239#
3240# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3241# or visit www.oracle.com if you need additional information or have any
3242# questions.
3243#
3244
3245# Execute the check given as argument, and verify the result
3246# If the Boot JDK was previously found, do nothing
3247# $1 A command line (typically autoconf macro) to execute
3248
3249
3250# Test: Is bootjdk explicitely set by command line arguments?
3251
3252
3253# Test: Is bootjdk available from builddeps?
3254
3255
3256# Test: Is $JAVA_HOME set?
3257
3258
3259# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3260
3261
3262# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3263
3264
3265# Look for a jdk in the given path. If there are multiple, try to select the newest.
3266# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3267# $1 = Path to directory containing jdk installations.
3268# $2 = String to append to the found JDK directory to get the proper JDK home
3269
3270
3271# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3272# environmental variable as base for where to look.
3273# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3274
3275
3276# Test: Is there a JDK installed in default, well-known locations?
3277
3278
3279# Check that a command-line tool in the Boot JDK is correct
3280# $1 = name of variable to assign
3281# $2 = name of binary
3282
3283
3284###############################################################################
3285#
3286# We need a Boot JDK to bootstrap the build.
3287#
3288
3289
3290
3291
3292
3293#
3294# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3295# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3296#
3297# This code is free software; you can redistribute it and/or modify it
3298# under the terms of the GNU General Public License version 2 only, as
3299# published by the Free Software Foundation.  Oracle designates this
3300# particular file as subject to the "Classpath" exception as provided
3301# by Oracle in the LICENSE file that accompanied this code.
3302#
3303# This code is distributed in the hope that it will be useful, but WITHOUT
3304# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3305# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3306# version 2 for more details (a copy is included in the LICENSE file that
3307# accompanied this code).
3308#
3309# You should have received a copy of the GNU General Public License version
3310# 2 along with this work; if not, write to the Free Software Foundation,
3311# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3312#
3313# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3314# or visit www.oracle.com if you need additional information or have any
3315# questions.
3316#
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337#
3338# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3339# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3340#
3341# This code is free software; you can redistribute it and/or modify it
3342# under the terms of the GNU General Public License version 2 only, as
3343# published by the Free Software Foundation.  Oracle designates this
3344# particular file as subject to the "Classpath" exception as provided
3345# by Oracle in the LICENSE file that accompanied this code.
3346#
3347# This code is distributed in the hope that it will be useful, but WITHOUT
3348# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3349# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3350# version 2 for more details (a copy is included in the LICENSE file that
3351# accompanied this code).
3352#
3353# You should have received a copy of the GNU General Public License version
3354# 2 along with this work; if not, write to the Free Software Foundation,
3355# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3356#
3357# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3358# or visit www.oracle.com if you need additional information or have any
3359# questions.
3360#
3361
3362
3363
3364
3365
3366cygwin_help() {
3367    case $1 in
3368    unzip)
3369        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3370    zip)
3371        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3372    make)
3373        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3374    * )
3375       break ;;
3376    esac
3377}
3378
3379apt_help() {
3380    case $1 in
3381    devkit)
3382        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3383    openjdk)
3384        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3385    alsa)
3386        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3387    cups)
3388        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3389    freetype2)
3390        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3391    pulse)
3392        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3393    x11)
3394        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3395    ccache)
3396        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3397    * )
3398       break ;;
3399    esac
3400}
3401
3402yum_help() {
3403    case $1 in
3404    devkit)
3405        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3406    openjdk)
3407        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3408    alsa)
3409        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3410    cups)
3411        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3412    freetype2)
3413        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3414    pulse)
3415        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3416    x11)
3417        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3418    ccache)
3419        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3420    * )
3421       break ;;
3422    esac
3423}
3424
3425port_help() {
3426    PKGHANDLER_COMMAND=""
3427}
3428
3429pkgutil_help() {
3430    PKGHANDLER_COMMAND=""
3431}
3432
3433pkgadd_help() {
3434    PKGHANDLER_COMMAND=""
3435}
3436
3437
3438
3439#
3440# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3441# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3442#
3443# This code is free software; you can redistribute it and/or modify it
3444# under the terms of the GNU General Public License version 2 only, as
3445# published by the Free Software Foundation.  Oracle designates this
3446# particular file as subject to the "Classpath" exception as provided
3447# by Oracle in the LICENSE file that accompanied this code.
3448#
3449# This code is distributed in the hope that it will be useful, but WITHOUT
3450# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3451# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3452# version 2 for more details (a copy is included in the LICENSE file that
3453# accompanied this code).
3454#
3455# You should have received a copy of the GNU General Public License version
3456# 2 along with this work; if not, write to the Free Software Foundation,
3457# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3458#
3459# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3460# or visit www.oracle.com if you need additional information or have any
3461# questions.
3462#
3463
3464
3465
3466
3467
3468
3469
3470
3471###############################################################################
3472#
3473# Should we build only OpenJDK even if closed sources are present?
3474#
3475
3476
3477
3478
3479###############################################################################
3480#
3481# Setup version numbers
3482#
3483
3484
3485
3486
3487
3488
3489# Support for customization of the build process. Some build files
3490# will include counterparts from this location, if they exist. This allows
3491# for a degree of customization of the build targets and the rules/recipes
3492# to create them
3493
3494# Check whether --with-custom-make-dir was given.
3495if test "${with_custom_make_dir+set}" = set; then :
3496  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3497fi
3498
3499
3500
3501#
3502# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3503# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3504#
3505# This code is free software; you can redistribute it and/or modify it
3506# under the terms of the GNU General Public License version 2 only, as
3507# published by the Free Software Foundation.  Oracle designates this
3508# particular file as subject to the "Classpath" exception as provided
3509# by Oracle in the LICENSE file that accompanied this code.
3510#
3511# This code is distributed in the hope that it will be useful, but WITHOUT
3512# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3513# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3514# version 2 for more details (a copy is included in the LICENSE file that
3515# accompanied this code).
3516#
3517# You should have received a copy of the GNU General Public License version
3518# 2 along with this work; if not, write to the Free Software Foundation,
3519# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3520#
3521# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3522# or visit www.oracle.com if you need additional information or have any
3523# questions.
3524#
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540#
3541# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3542# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3543#
3544# This code is free software; you can redistribute it and/or modify it
3545# under the terms of the GNU General Public License version 2 only, as
3546# published by the Free Software Foundation.  Oracle designates this
3547# particular file as subject to the "Classpath" exception as provided
3548# by Oracle in the LICENSE file that accompanied this code.
3549#
3550# This code is distributed in the hope that it will be useful, but WITHOUT
3551# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3552# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3553# version 2 for more details (a copy is included in the LICENSE file that
3554# accompanied this code).
3555#
3556# You should have received a copy of the GNU General Public License version
3557# 2 along with this work; if not, write to the Free Software Foundation,
3558# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3559#
3560# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3561# or visit www.oracle.com if you need additional information or have any
3562# questions.
3563#
3564
3565# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3566# Converts autoconf style CPU name to OpenJDK style, into
3567# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3568
3569
3570# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3571# Converts autoconf style OS name to OpenJDK style, into
3572# VAR_OS and VAR_OS_API.
3573
3574
3575# Expects $host_os $host_cpu $build_os and $build_cpu
3576# and $with_target_bits to have been setup!
3577#
3578# Translate the standard triplet(quadruplet) definition
3579# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3580# OPENJDK_BUILD_OS, etc.
3581
3582
3583# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3584# accordingly. Must be done after setting up build and target system, but before
3585# doing anything else with these values.
3586
3587
3588    # Setup the legacy variables, for controlling the old makefiles.
3589    #
3590
3591
3592
3593
3594#%%% Build and target systems %%%
3595
3596
3597
3598
3599# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3600# Add -mX to various FLAGS variables.
3601
3602
3603
3604
3605
3606
3607#
3608# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3609# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3610#
3611# This code is free software; you can redistribute it and/or modify it
3612# under the terms of the GNU General Public License version 2 only, as
3613# published by the Free Software Foundation.  Oracle designates this
3614# particular file as subject to the "Classpath" exception as provided
3615# by Oracle in the LICENSE file that accompanied this code.
3616#
3617# This code is distributed in the hope that it will be useful, but WITHOUT
3618# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3619# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3620# version 2 for more details (a copy is included in the LICENSE file that
3621# accompanied this code).
3622#
3623# You should have received a copy of the GNU General Public License version
3624# 2 along with this work; if not, write to the Free Software Foundation,
3625# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3626#
3627# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3628# or visit www.oracle.com if you need additional information or have any
3629# questions.
3630#
3631
3632
3633
3634
3635
3636
3637
3638
3639#
3640# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3641# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3642#
3643# This code is free software; you can redistribute it and/or modify it
3644# under the terms of the GNU General Public License version 2 only, as
3645# published by the Free Software Foundation.  Oracle designates this
3646# particular file as subject to the "Classpath" exception as provided
3647# by Oracle in the LICENSE file that accompanied this code.
3648#
3649# This code is distributed in the hope that it will be useful, but WITHOUT
3650# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3651# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3652# version 2 for more details (a copy is included in the LICENSE file that
3653# accompanied this code).
3654#
3655# You should have received a copy of the GNU General Public License version
3656# 2 along with this work; if not, write to the Free Software Foundation,
3657# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3658#
3659# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3660# or visit www.oracle.com if you need additional information or have any
3661# questions.
3662#
3663
3664# $1 = compiler to test (CC or CXX)
3665# $2 = human readable name of compiler (C or C++)
3666
3667
3668
3669
3670
3671# $1 = compiler to test (CC or CXX)
3672# $2 = human readable name of compiler (C or C++)
3673# $3 = list of compiler names to search for
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686#
3687# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3688# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3689#
3690# This code is free software; you can redistribute it and/or modify it
3691# under the terms of the GNU General Public License version 2 only, as
3692# published by the Free Software Foundation.  Oracle designates this
3693# particular file as subject to the "Classpath" exception as provided
3694# by Oracle in the LICENSE file that accompanied this code.
3695#
3696# This code is distributed in the hope that it will be useful, but WITHOUT
3697# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3698# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3699# version 2 for more details (a copy is included in the LICENSE file that
3700# accompanied this code).
3701#
3702# You should have received a copy of the GNU General Public License version
3703# 2 along with this work; if not, write to the Free Software Foundation,
3704# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3705#
3706# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3707# or visit www.oracle.com if you need additional information or have any
3708# questions.
3709#
3710
3711
3712
3713
3714
3715
3716
3717# Check if the VS env variables were setup prior to running configure.
3718# If not, then find vcvarsall.bat and run it automatically, and integrate
3719# the set env variables into the spec file.
3720
3721
3722
3723
3724
3725
3726# This line needs to be here, verbatim, after all includes and the dummy hook
3727# definitions. It is replaced with custom functionality when building
3728# custom sources.
3729#CUSTOM_AUTOCONF_INCLUDE
3730
3731# Do not change or remove the following line, it is needed for consistency checks:
3732DATE_WHEN_GENERATED=1362411827
3733
3734###############################################################################
3735#
3736# Initialization / Boot-strapping
3737#
3738# The bootstrapping process needs to solve the "chicken or the egg" problem,
3739# thus it jumps back and forth, each time gaining something needed later on.
3740#
3741###############################################################################
3742
3743# Basic initialization that must happen first of all
3744
3745# Save the original command line. This is passed to us by the wrapper configure script.
3746
3747DATE_WHEN_CONFIGURED=`LANG=C date`
3748
3749{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3750$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3751{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3752$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3753
3754
3755
3756# Start with tools that do not need have cross compilation support
3757# and can be expected to be found in the default PATH. These tools are
3758# used by configure. Nor are these tools expected to be found in the
3759# devkit from the builddeps server either, since they are
3760# needed to download the devkit.
3761
3762# First are all the simple required tools.
3763
3764    for ac_prog in basename
3765do
3766  # Extract the first word of "$ac_prog", so it can be a program name with args.
3767set dummy $ac_prog; ac_word=$2
3768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3769$as_echo_n "checking for $ac_word... " >&6; }
3770if test "${ac_cv_path_BASENAME+set}" = set; then :
3771  $as_echo_n "(cached) " >&6
3772else
3773  case $BASENAME in
3774  [\\/]* | ?:[\\/]*)
3775  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3776  ;;
3777  *)
3778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779for as_dir in $PATH
3780do
3781  IFS=$as_save_IFS
3782  test -z "$as_dir" && as_dir=.
3783    for ac_exec_ext in '' $ac_executable_extensions; do
3784  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3785    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3787    break 2
3788  fi
3789done
3790  done
3791IFS=$as_save_IFS
3792
3793  ;;
3794esac
3795fi
3796BASENAME=$ac_cv_path_BASENAME
3797if test -n "$BASENAME"; then
3798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3799$as_echo "$BASENAME" >&6; }
3800else
3801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3802$as_echo "no" >&6; }
3803fi
3804
3805
3806  test -n "$BASENAME" && break
3807done
3808
3809
3810    if test "x$BASENAME" = x; then
3811        if test "xbasename" = x; then
3812          PROG_NAME=basename
3813        else
3814          PROG_NAME=basename
3815        fi
3816        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3817$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3818        as_fn_error $? "Cannot continue" "$LINENO" 5
3819    fi
3820
3821
3822
3823    for ac_prog in bash
3824do
3825  # Extract the first word of "$ac_prog", so it can be a program name with args.
3826set dummy $ac_prog; ac_word=$2
3827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828$as_echo_n "checking for $ac_word... " >&6; }
3829if test "${ac_cv_path_BASH+set}" = set; then :
3830  $as_echo_n "(cached) " >&6
3831else
3832  case $BASH in
3833  [\\/]* | ?:[\\/]*)
3834  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3835  ;;
3836  *)
3837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3838for as_dir in $PATH
3839do
3840  IFS=$as_save_IFS
3841  test -z "$as_dir" && as_dir=.
3842    for ac_exec_ext in '' $ac_executable_extensions; do
3843  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3844    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3846    break 2
3847  fi
3848done
3849  done
3850IFS=$as_save_IFS
3851
3852  ;;
3853esac
3854fi
3855BASH=$ac_cv_path_BASH
3856if test -n "$BASH"; then
3857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3858$as_echo "$BASH" >&6; }
3859else
3860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3861$as_echo "no" >&6; }
3862fi
3863
3864
3865  test -n "$BASH" && break
3866done
3867
3868
3869    if test "x$BASH" = x; then
3870        if test "xbash" = x; then
3871          PROG_NAME=bash
3872        else
3873          PROG_NAME=bash
3874        fi
3875        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3876$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3877        as_fn_error $? "Cannot continue" "$LINENO" 5
3878    fi
3879
3880
3881
3882    for ac_prog in cat
3883do
3884  # Extract the first word of "$ac_prog", so it can be a program name with args.
3885set dummy $ac_prog; ac_word=$2
3886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3887$as_echo_n "checking for $ac_word... " >&6; }
3888if test "${ac_cv_path_CAT+set}" = set; then :
3889  $as_echo_n "(cached) " >&6
3890else
3891  case $CAT in
3892  [\\/]* | ?:[\\/]*)
3893  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3894  ;;
3895  *)
3896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3897for as_dir in $PATH
3898do
3899  IFS=$as_save_IFS
3900  test -z "$as_dir" && as_dir=.
3901    for ac_exec_ext in '' $ac_executable_extensions; do
3902  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3903    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3905    break 2
3906  fi
3907done
3908  done
3909IFS=$as_save_IFS
3910
3911  ;;
3912esac
3913fi
3914CAT=$ac_cv_path_CAT
3915if test -n "$CAT"; then
3916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3917$as_echo "$CAT" >&6; }
3918else
3919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3920$as_echo "no" >&6; }
3921fi
3922
3923
3924  test -n "$CAT" && break
3925done
3926
3927
3928    if test "x$CAT" = x; then
3929        if test "xcat" = x; then
3930          PROG_NAME=cat
3931        else
3932          PROG_NAME=cat
3933        fi
3934        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3935$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3936        as_fn_error $? "Cannot continue" "$LINENO" 5
3937    fi
3938
3939
3940
3941    for ac_prog in chmod
3942do
3943  # Extract the first word of "$ac_prog", so it can be a program name with args.
3944set dummy $ac_prog; ac_word=$2
3945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3946$as_echo_n "checking for $ac_word... " >&6; }
3947if test "${ac_cv_path_CHMOD+set}" = set; then :
3948  $as_echo_n "(cached) " >&6
3949else
3950  case $CHMOD in
3951  [\\/]* | ?:[\\/]*)
3952  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3953  ;;
3954  *)
3955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3956for as_dir in $PATH
3957do
3958  IFS=$as_save_IFS
3959  test -z "$as_dir" && as_dir=.
3960    for ac_exec_ext in '' $ac_executable_extensions; do
3961  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3962    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3964    break 2
3965  fi
3966done
3967  done
3968IFS=$as_save_IFS
3969
3970  ;;
3971esac
3972fi
3973CHMOD=$ac_cv_path_CHMOD
3974if test -n "$CHMOD"; then
3975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3976$as_echo "$CHMOD" >&6; }
3977else
3978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979$as_echo "no" >&6; }
3980fi
3981
3982
3983  test -n "$CHMOD" && break
3984done
3985
3986
3987    if test "x$CHMOD" = x; then
3988        if test "xchmod" = x; then
3989          PROG_NAME=chmod
3990        else
3991          PROG_NAME=chmod
3992        fi
3993        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3994$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3995        as_fn_error $? "Cannot continue" "$LINENO" 5
3996    fi
3997
3998
3999
4000    for ac_prog in cmp
4001do
4002  # Extract the first word of "$ac_prog", so it can be a program name with args.
4003set dummy $ac_prog; ac_word=$2
4004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4005$as_echo_n "checking for $ac_word... " >&6; }
4006if test "${ac_cv_path_CMP+set}" = set; then :
4007  $as_echo_n "(cached) " >&6
4008else
4009  case $CMP in
4010  [\\/]* | ?:[\\/]*)
4011  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4012  ;;
4013  *)
4014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4015for as_dir in $PATH
4016do
4017  IFS=$as_save_IFS
4018  test -z "$as_dir" && as_dir=.
4019    for ac_exec_ext in '' $ac_executable_extensions; do
4020  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4021    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4023    break 2
4024  fi
4025done
4026  done
4027IFS=$as_save_IFS
4028
4029  ;;
4030esac
4031fi
4032CMP=$ac_cv_path_CMP
4033if test -n "$CMP"; then
4034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4035$as_echo "$CMP" >&6; }
4036else
4037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4038$as_echo "no" >&6; }
4039fi
4040
4041
4042  test -n "$CMP" && break
4043done
4044
4045
4046    if test "x$CMP" = x; then
4047        if test "xcmp" = x; then
4048          PROG_NAME=cmp
4049        else
4050          PROG_NAME=cmp
4051        fi
4052        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4053$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4054        as_fn_error $? "Cannot continue" "$LINENO" 5
4055    fi
4056
4057
4058
4059    for ac_prog in comm
4060do
4061  # Extract the first word of "$ac_prog", so it can be a program name with args.
4062set dummy $ac_prog; ac_word=$2
4063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4064$as_echo_n "checking for $ac_word... " >&6; }
4065if test "${ac_cv_path_COMM+set}" = set; then :
4066  $as_echo_n "(cached) " >&6
4067else
4068  case $COMM in
4069  [\\/]* | ?:[\\/]*)
4070  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4071  ;;
4072  *)
4073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4074for as_dir in $PATH
4075do
4076  IFS=$as_save_IFS
4077  test -z "$as_dir" && as_dir=.
4078    for ac_exec_ext in '' $ac_executable_extensions; do
4079  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4080    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4082    break 2
4083  fi
4084done
4085  done
4086IFS=$as_save_IFS
4087
4088  ;;
4089esac
4090fi
4091COMM=$ac_cv_path_COMM
4092if test -n "$COMM"; then
4093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4094$as_echo "$COMM" >&6; }
4095else
4096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4097$as_echo "no" >&6; }
4098fi
4099
4100
4101  test -n "$COMM" && break
4102done
4103
4104
4105    if test "x$COMM" = x; then
4106        if test "xcomm" = x; then
4107          PROG_NAME=comm
4108        else
4109          PROG_NAME=comm
4110        fi
4111        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4112$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4113        as_fn_error $? "Cannot continue" "$LINENO" 5
4114    fi
4115
4116
4117
4118    for ac_prog in cp
4119do
4120  # Extract the first word of "$ac_prog", so it can be a program name with args.
4121set dummy $ac_prog; ac_word=$2
4122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4123$as_echo_n "checking for $ac_word... " >&6; }
4124if test "${ac_cv_path_CP+set}" = set; then :
4125  $as_echo_n "(cached) " >&6
4126else
4127  case $CP in
4128  [\\/]* | ?:[\\/]*)
4129  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4130  ;;
4131  *)
4132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4133for as_dir in $PATH
4134do
4135  IFS=$as_save_IFS
4136  test -z "$as_dir" && as_dir=.
4137    for ac_exec_ext in '' $ac_executable_extensions; do
4138  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4139    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4141    break 2
4142  fi
4143done
4144  done
4145IFS=$as_save_IFS
4146
4147  ;;
4148esac
4149fi
4150CP=$ac_cv_path_CP
4151if test -n "$CP"; then
4152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4153$as_echo "$CP" >&6; }
4154else
4155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4156$as_echo "no" >&6; }
4157fi
4158
4159
4160  test -n "$CP" && break
4161done
4162
4163
4164    if test "x$CP" = x; then
4165        if test "xcp" = x; then
4166          PROG_NAME=cp
4167        else
4168          PROG_NAME=cp
4169        fi
4170        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4171$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4172        as_fn_error $? "Cannot continue" "$LINENO" 5
4173    fi
4174
4175
4176
4177    for ac_prog in cpio
4178do
4179  # Extract the first word of "$ac_prog", so it can be a program name with args.
4180set dummy $ac_prog; ac_word=$2
4181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4182$as_echo_n "checking for $ac_word... " >&6; }
4183if test "${ac_cv_path_CPIO+set}" = set; then :
4184  $as_echo_n "(cached) " >&6
4185else
4186  case $CPIO in
4187  [\\/]* | ?:[\\/]*)
4188  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4189  ;;
4190  *)
4191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4192for as_dir in $PATH
4193do
4194  IFS=$as_save_IFS
4195  test -z "$as_dir" && as_dir=.
4196    for ac_exec_ext in '' $ac_executable_extensions; do
4197  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4198    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4200    break 2
4201  fi
4202done
4203  done
4204IFS=$as_save_IFS
4205
4206  ;;
4207esac
4208fi
4209CPIO=$ac_cv_path_CPIO
4210if test -n "$CPIO"; then
4211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4212$as_echo "$CPIO" >&6; }
4213else
4214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4215$as_echo "no" >&6; }
4216fi
4217
4218
4219  test -n "$CPIO" && break
4220done
4221
4222
4223    if test "x$CPIO" = x; then
4224        if test "xcpio" = x; then
4225          PROG_NAME=cpio
4226        else
4227          PROG_NAME=cpio
4228        fi
4229        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4230$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4231        as_fn_error $? "Cannot continue" "$LINENO" 5
4232    fi
4233
4234
4235
4236    for ac_prog in cut
4237do
4238  # Extract the first word of "$ac_prog", so it can be a program name with args.
4239set dummy $ac_prog; ac_word=$2
4240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4241$as_echo_n "checking for $ac_word... " >&6; }
4242if test "${ac_cv_path_CUT+set}" = set; then :
4243  $as_echo_n "(cached) " >&6
4244else
4245  case $CUT in
4246  [\\/]* | ?:[\\/]*)
4247  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4248  ;;
4249  *)
4250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4251for as_dir in $PATH
4252do
4253  IFS=$as_save_IFS
4254  test -z "$as_dir" && as_dir=.
4255    for ac_exec_ext in '' $ac_executable_extensions; do
4256  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4257    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4259    break 2
4260  fi
4261done
4262  done
4263IFS=$as_save_IFS
4264
4265  ;;
4266esac
4267fi
4268CUT=$ac_cv_path_CUT
4269if test -n "$CUT"; then
4270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4271$as_echo "$CUT" >&6; }
4272else
4273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4274$as_echo "no" >&6; }
4275fi
4276
4277
4278  test -n "$CUT" && break
4279done
4280
4281
4282    if test "x$CUT" = x; then
4283        if test "xcut" = x; then
4284          PROG_NAME=cut
4285        else
4286          PROG_NAME=cut
4287        fi
4288        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4289$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4290        as_fn_error $? "Cannot continue" "$LINENO" 5
4291    fi
4292
4293
4294
4295    for ac_prog in date
4296do
4297  # Extract the first word of "$ac_prog", so it can be a program name with args.
4298set dummy $ac_prog; ac_word=$2
4299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4300$as_echo_n "checking for $ac_word... " >&6; }
4301if test "${ac_cv_path_DATE+set}" = set; then :
4302  $as_echo_n "(cached) " >&6
4303else
4304  case $DATE in
4305  [\\/]* | ?:[\\/]*)
4306  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4307  ;;
4308  *)
4309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4310for as_dir in $PATH
4311do
4312  IFS=$as_save_IFS
4313  test -z "$as_dir" && as_dir=.
4314    for ac_exec_ext in '' $ac_executable_extensions; do
4315  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4316    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4318    break 2
4319  fi
4320done
4321  done
4322IFS=$as_save_IFS
4323
4324  ;;
4325esac
4326fi
4327DATE=$ac_cv_path_DATE
4328if test -n "$DATE"; then
4329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4330$as_echo "$DATE" >&6; }
4331else
4332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4333$as_echo "no" >&6; }
4334fi
4335
4336
4337  test -n "$DATE" && break
4338done
4339
4340
4341    if test "x$DATE" = x; then
4342        if test "xdate" = x; then
4343          PROG_NAME=date
4344        else
4345          PROG_NAME=date
4346        fi
4347        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4348$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4349        as_fn_error $? "Cannot continue" "$LINENO" 5
4350    fi
4351
4352
4353
4354    for ac_prog in gdiff diff
4355do
4356  # Extract the first word of "$ac_prog", so it can be a program name with args.
4357set dummy $ac_prog; ac_word=$2
4358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4359$as_echo_n "checking for $ac_word... " >&6; }
4360if test "${ac_cv_path_DIFF+set}" = set; then :
4361  $as_echo_n "(cached) " >&6
4362else
4363  case $DIFF in
4364  [\\/]* | ?:[\\/]*)
4365  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4366  ;;
4367  *)
4368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4369for as_dir in $PATH
4370do
4371  IFS=$as_save_IFS
4372  test -z "$as_dir" && as_dir=.
4373    for ac_exec_ext in '' $ac_executable_extensions; do
4374  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4375    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4377    break 2
4378  fi
4379done
4380  done
4381IFS=$as_save_IFS
4382
4383  ;;
4384esac
4385fi
4386DIFF=$ac_cv_path_DIFF
4387if test -n "$DIFF"; then
4388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4389$as_echo "$DIFF" >&6; }
4390else
4391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4392$as_echo "no" >&6; }
4393fi
4394
4395
4396  test -n "$DIFF" && break
4397done
4398
4399
4400    if test "x$DIFF" = x; then
4401        if test "xgdiff diff" = x; then
4402          PROG_NAME=diff
4403        else
4404          PROG_NAME=gdiff diff
4405        fi
4406        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4407$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4408        as_fn_error $? "Cannot continue" "$LINENO" 5
4409    fi
4410
4411
4412
4413    for ac_prog in dirname
4414do
4415  # Extract the first word of "$ac_prog", so it can be a program name with args.
4416set dummy $ac_prog; ac_word=$2
4417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4418$as_echo_n "checking for $ac_word... " >&6; }
4419if test "${ac_cv_path_DIRNAME+set}" = set; then :
4420  $as_echo_n "(cached) " >&6
4421else
4422  case $DIRNAME in
4423  [\\/]* | ?:[\\/]*)
4424  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4425  ;;
4426  *)
4427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4428for as_dir in $PATH
4429do
4430  IFS=$as_save_IFS
4431  test -z "$as_dir" && as_dir=.
4432    for ac_exec_ext in '' $ac_executable_extensions; do
4433  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4434    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4436    break 2
4437  fi
4438done
4439  done
4440IFS=$as_save_IFS
4441
4442  ;;
4443esac
4444fi
4445DIRNAME=$ac_cv_path_DIRNAME
4446if test -n "$DIRNAME"; then
4447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4448$as_echo "$DIRNAME" >&6; }
4449else
4450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4451$as_echo "no" >&6; }
4452fi
4453
4454
4455  test -n "$DIRNAME" && break
4456done
4457
4458
4459    if test "x$DIRNAME" = x; then
4460        if test "xdirname" = x; then
4461          PROG_NAME=dirname
4462        else
4463          PROG_NAME=dirname
4464        fi
4465        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4466$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4467        as_fn_error $? "Cannot continue" "$LINENO" 5
4468    fi
4469
4470
4471
4472    for ac_prog in echo
4473do
4474  # Extract the first word of "$ac_prog", so it can be a program name with args.
4475set dummy $ac_prog; ac_word=$2
4476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4477$as_echo_n "checking for $ac_word... " >&6; }
4478if test "${ac_cv_path_ECHO+set}" = set; then :
4479  $as_echo_n "(cached) " >&6
4480else
4481  case $ECHO in
4482  [\\/]* | ?:[\\/]*)
4483  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4484  ;;
4485  *)
4486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4487for as_dir in $PATH
4488do
4489  IFS=$as_save_IFS
4490  test -z "$as_dir" && as_dir=.
4491    for ac_exec_ext in '' $ac_executable_extensions; do
4492  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4493    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4495    break 2
4496  fi
4497done
4498  done
4499IFS=$as_save_IFS
4500
4501  ;;
4502esac
4503fi
4504ECHO=$ac_cv_path_ECHO
4505if test -n "$ECHO"; then
4506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4507$as_echo "$ECHO" >&6; }
4508else
4509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4510$as_echo "no" >&6; }
4511fi
4512
4513
4514  test -n "$ECHO" && break
4515done
4516
4517
4518    if test "x$ECHO" = x; then
4519        if test "xecho" = x; then
4520          PROG_NAME=echo
4521        else
4522          PROG_NAME=echo
4523        fi
4524        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4525$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4526        as_fn_error $? "Cannot continue" "$LINENO" 5
4527    fi
4528
4529
4530
4531    for ac_prog in expr
4532do
4533  # Extract the first word of "$ac_prog", so it can be a program name with args.
4534set dummy $ac_prog; ac_word=$2
4535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4536$as_echo_n "checking for $ac_word... " >&6; }
4537if test "${ac_cv_path_EXPR+set}" = set; then :
4538  $as_echo_n "(cached) " >&6
4539else
4540  case $EXPR in
4541  [\\/]* | ?:[\\/]*)
4542  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4543  ;;
4544  *)
4545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4546for as_dir in $PATH
4547do
4548  IFS=$as_save_IFS
4549  test -z "$as_dir" && as_dir=.
4550    for ac_exec_ext in '' $ac_executable_extensions; do
4551  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4552    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4554    break 2
4555  fi
4556done
4557  done
4558IFS=$as_save_IFS
4559
4560  ;;
4561esac
4562fi
4563EXPR=$ac_cv_path_EXPR
4564if test -n "$EXPR"; then
4565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4566$as_echo "$EXPR" >&6; }
4567else
4568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4569$as_echo "no" >&6; }
4570fi
4571
4572
4573  test -n "$EXPR" && break
4574done
4575
4576
4577    if test "x$EXPR" = x; then
4578        if test "xexpr" = x; then
4579          PROG_NAME=expr
4580        else
4581          PROG_NAME=expr
4582        fi
4583        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4584$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4585        as_fn_error $? "Cannot continue" "$LINENO" 5
4586    fi
4587
4588
4589
4590    for ac_prog in file
4591do
4592  # Extract the first word of "$ac_prog", so it can be a program name with args.
4593set dummy $ac_prog; ac_word=$2
4594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4595$as_echo_n "checking for $ac_word... " >&6; }
4596if test "${ac_cv_path_FILE+set}" = set; then :
4597  $as_echo_n "(cached) " >&6
4598else
4599  case $FILE in
4600  [\\/]* | ?:[\\/]*)
4601  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4602  ;;
4603  *)
4604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4605for as_dir in $PATH
4606do
4607  IFS=$as_save_IFS
4608  test -z "$as_dir" && as_dir=.
4609    for ac_exec_ext in '' $ac_executable_extensions; do
4610  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4611    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4613    break 2
4614  fi
4615done
4616  done
4617IFS=$as_save_IFS
4618
4619  ;;
4620esac
4621fi
4622FILE=$ac_cv_path_FILE
4623if test -n "$FILE"; then
4624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4625$as_echo "$FILE" >&6; }
4626else
4627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4628$as_echo "no" >&6; }
4629fi
4630
4631
4632  test -n "$FILE" && break
4633done
4634
4635
4636    if test "x$FILE" = x; then
4637        if test "xfile" = x; then
4638          PROG_NAME=file
4639        else
4640          PROG_NAME=file
4641        fi
4642        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4643$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4644        as_fn_error $? "Cannot continue" "$LINENO" 5
4645    fi
4646
4647
4648
4649    for ac_prog in find
4650do
4651  # Extract the first word of "$ac_prog", so it can be a program name with args.
4652set dummy $ac_prog; ac_word=$2
4653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654$as_echo_n "checking for $ac_word... " >&6; }
4655if test "${ac_cv_path_FIND+set}" = set; then :
4656  $as_echo_n "(cached) " >&6
4657else
4658  case $FIND in
4659  [\\/]* | ?:[\\/]*)
4660  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4661  ;;
4662  *)
4663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664for as_dir in $PATH
4665do
4666  IFS=$as_save_IFS
4667  test -z "$as_dir" && as_dir=.
4668    for ac_exec_ext in '' $ac_executable_extensions; do
4669  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4670    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672    break 2
4673  fi
4674done
4675  done
4676IFS=$as_save_IFS
4677
4678  ;;
4679esac
4680fi
4681FIND=$ac_cv_path_FIND
4682if test -n "$FIND"; then
4683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4684$as_echo "$FIND" >&6; }
4685else
4686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4687$as_echo "no" >&6; }
4688fi
4689
4690
4691  test -n "$FIND" && break
4692done
4693
4694
4695    if test "x$FIND" = x; then
4696        if test "xfind" = x; then
4697          PROG_NAME=find
4698        else
4699          PROG_NAME=find
4700        fi
4701        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4702$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4703        as_fn_error $? "Cannot continue" "$LINENO" 5
4704    fi
4705
4706
4707
4708    for ac_prog in head
4709do
4710  # Extract the first word of "$ac_prog", so it can be a program name with args.
4711set dummy $ac_prog; ac_word=$2
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4713$as_echo_n "checking for $ac_word... " >&6; }
4714if test "${ac_cv_path_HEAD+set}" = set; then :
4715  $as_echo_n "(cached) " >&6
4716else
4717  case $HEAD in
4718  [\\/]* | ?:[\\/]*)
4719  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4720  ;;
4721  *)
4722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4723for as_dir in $PATH
4724do
4725  IFS=$as_save_IFS
4726  test -z "$as_dir" && as_dir=.
4727    for ac_exec_ext in '' $ac_executable_extensions; do
4728  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4729    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4731    break 2
4732  fi
4733done
4734  done
4735IFS=$as_save_IFS
4736
4737  ;;
4738esac
4739fi
4740HEAD=$ac_cv_path_HEAD
4741if test -n "$HEAD"; then
4742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4743$as_echo "$HEAD" >&6; }
4744else
4745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4746$as_echo "no" >&6; }
4747fi
4748
4749
4750  test -n "$HEAD" && break
4751done
4752
4753
4754    if test "x$HEAD" = x; then
4755        if test "xhead" = x; then
4756          PROG_NAME=head
4757        else
4758          PROG_NAME=head
4759        fi
4760        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4761$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4762        as_fn_error $? "Cannot continue" "$LINENO" 5
4763    fi
4764
4765
4766
4767    for ac_prog in ln
4768do
4769  # Extract the first word of "$ac_prog", so it can be a program name with args.
4770set dummy $ac_prog; ac_word=$2
4771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4772$as_echo_n "checking for $ac_word... " >&6; }
4773if test "${ac_cv_path_LN+set}" = set; then :
4774  $as_echo_n "(cached) " >&6
4775else
4776  case $LN in
4777  [\\/]* | ?:[\\/]*)
4778  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4779  ;;
4780  *)
4781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4782for as_dir in $PATH
4783do
4784  IFS=$as_save_IFS
4785  test -z "$as_dir" && as_dir=.
4786    for ac_exec_ext in '' $ac_executable_extensions; do
4787  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4788    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4790    break 2
4791  fi
4792done
4793  done
4794IFS=$as_save_IFS
4795
4796  ;;
4797esac
4798fi
4799LN=$ac_cv_path_LN
4800if test -n "$LN"; then
4801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4802$as_echo "$LN" >&6; }
4803else
4804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4805$as_echo "no" >&6; }
4806fi
4807
4808
4809  test -n "$LN" && break
4810done
4811
4812
4813    if test "x$LN" = x; then
4814        if test "xln" = x; then
4815          PROG_NAME=ln
4816        else
4817          PROG_NAME=ln
4818        fi
4819        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4820$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4821        as_fn_error $? "Cannot continue" "$LINENO" 5
4822    fi
4823
4824
4825
4826    for ac_prog in ls
4827do
4828  # Extract the first word of "$ac_prog", so it can be a program name with args.
4829set dummy $ac_prog; ac_word=$2
4830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4831$as_echo_n "checking for $ac_word... " >&6; }
4832if test "${ac_cv_path_LS+set}" = set; then :
4833  $as_echo_n "(cached) " >&6
4834else
4835  case $LS in
4836  [\\/]* | ?:[\\/]*)
4837  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4838  ;;
4839  *)
4840  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4841for as_dir in $PATH
4842do
4843  IFS=$as_save_IFS
4844  test -z "$as_dir" && as_dir=.
4845    for ac_exec_ext in '' $ac_executable_extensions; do
4846  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4847    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4848    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4849    break 2
4850  fi
4851done
4852  done
4853IFS=$as_save_IFS
4854
4855  ;;
4856esac
4857fi
4858LS=$ac_cv_path_LS
4859if test -n "$LS"; then
4860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4861$as_echo "$LS" >&6; }
4862else
4863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4864$as_echo "no" >&6; }
4865fi
4866
4867
4868  test -n "$LS" && break
4869done
4870
4871
4872    if test "x$LS" = x; then
4873        if test "xls" = x; then
4874          PROG_NAME=ls
4875        else
4876          PROG_NAME=ls
4877        fi
4878        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4879$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4880        as_fn_error $? "Cannot continue" "$LINENO" 5
4881    fi
4882
4883
4884
4885    for ac_prog in mkdir
4886do
4887  # Extract the first word of "$ac_prog", so it can be a program name with args.
4888set dummy $ac_prog; ac_word=$2
4889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890$as_echo_n "checking for $ac_word... " >&6; }
4891if test "${ac_cv_path_MKDIR+set}" = set; then :
4892  $as_echo_n "(cached) " >&6
4893else
4894  case $MKDIR in
4895  [\\/]* | ?:[\\/]*)
4896  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4897  ;;
4898  *)
4899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900for as_dir in $PATH
4901do
4902  IFS=$as_save_IFS
4903  test -z "$as_dir" && as_dir=.
4904    for ac_exec_ext in '' $ac_executable_extensions; do
4905  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4906    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4908    break 2
4909  fi
4910done
4911  done
4912IFS=$as_save_IFS
4913
4914  ;;
4915esac
4916fi
4917MKDIR=$ac_cv_path_MKDIR
4918if test -n "$MKDIR"; then
4919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4920$as_echo "$MKDIR" >&6; }
4921else
4922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923$as_echo "no" >&6; }
4924fi
4925
4926
4927  test -n "$MKDIR" && break
4928done
4929
4930
4931    if test "x$MKDIR" = x; then
4932        if test "xmkdir" = x; then
4933          PROG_NAME=mkdir
4934        else
4935          PROG_NAME=mkdir
4936        fi
4937        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4938$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4939        as_fn_error $? "Cannot continue" "$LINENO" 5
4940    fi
4941
4942
4943
4944    for ac_prog in mktemp
4945do
4946  # Extract the first word of "$ac_prog", so it can be a program name with args.
4947set dummy $ac_prog; ac_word=$2
4948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4949$as_echo_n "checking for $ac_word... " >&6; }
4950if test "${ac_cv_path_MKTEMP+set}" = set; then :
4951  $as_echo_n "(cached) " >&6
4952else
4953  case $MKTEMP in
4954  [\\/]* | ?:[\\/]*)
4955  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4956  ;;
4957  *)
4958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4959for as_dir in $PATH
4960do
4961  IFS=$as_save_IFS
4962  test -z "$as_dir" && as_dir=.
4963    for ac_exec_ext in '' $ac_executable_extensions; do
4964  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4965    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4967    break 2
4968  fi
4969done
4970  done
4971IFS=$as_save_IFS
4972
4973  ;;
4974esac
4975fi
4976MKTEMP=$ac_cv_path_MKTEMP
4977if test -n "$MKTEMP"; then
4978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4979$as_echo "$MKTEMP" >&6; }
4980else
4981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
4983fi
4984
4985
4986  test -n "$MKTEMP" && break
4987done
4988
4989
4990    if test "x$MKTEMP" = x; then
4991        if test "xmktemp" = x; then
4992          PROG_NAME=mktemp
4993        else
4994          PROG_NAME=mktemp
4995        fi
4996        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4997$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4998        as_fn_error $? "Cannot continue" "$LINENO" 5
4999    fi
5000
5001
5002
5003    for ac_prog in mv
5004do
5005  # Extract the first word of "$ac_prog", so it can be a program name with args.
5006set dummy $ac_prog; ac_word=$2
5007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008$as_echo_n "checking for $ac_word... " >&6; }
5009if test "${ac_cv_path_MV+set}" = set; then :
5010  $as_echo_n "(cached) " >&6
5011else
5012  case $MV in
5013  [\\/]* | ?:[\\/]*)
5014  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5015  ;;
5016  *)
5017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018for as_dir in $PATH
5019do
5020  IFS=$as_save_IFS
5021  test -z "$as_dir" && as_dir=.
5022    for ac_exec_ext in '' $ac_executable_extensions; do
5023  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5024    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5026    break 2
5027  fi
5028done
5029  done
5030IFS=$as_save_IFS
5031
5032  ;;
5033esac
5034fi
5035MV=$ac_cv_path_MV
5036if test -n "$MV"; then
5037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5038$as_echo "$MV" >&6; }
5039else
5040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5041$as_echo "no" >&6; }
5042fi
5043
5044
5045  test -n "$MV" && break
5046done
5047
5048
5049    if test "x$MV" = x; then
5050        if test "xmv" = x; then
5051          PROG_NAME=mv
5052        else
5053          PROG_NAME=mv
5054        fi
5055        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5056$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5057        as_fn_error $? "Cannot continue" "$LINENO" 5
5058    fi
5059
5060
5061
5062    for ac_prog in printf
5063do
5064  # Extract the first word of "$ac_prog", so it can be a program name with args.
5065set dummy $ac_prog; ac_word=$2
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
5068if test "${ac_cv_path_PRINTF+set}" = set; then :
5069  $as_echo_n "(cached) " >&6
5070else
5071  case $PRINTF in
5072  [\\/]* | ?:[\\/]*)
5073  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5074  ;;
5075  *)
5076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079  IFS=$as_save_IFS
5080  test -z "$as_dir" && as_dir=.
5081    for ac_exec_ext in '' $ac_executable_extensions; do
5082  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5083    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085    break 2
5086  fi
5087done
5088  done
5089IFS=$as_save_IFS
5090
5091  ;;
5092esac
5093fi
5094PRINTF=$ac_cv_path_PRINTF
5095if test -n "$PRINTF"; then
5096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5097$as_echo "$PRINTF" >&6; }
5098else
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104  test -n "$PRINTF" && break
5105done
5106
5107
5108    if test "x$PRINTF" = x; then
5109        if test "xprintf" = x; then
5110          PROG_NAME=printf
5111        else
5112          PROG_NAME=printf
5113        fi
5114        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5115$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5116        as_fn_error $? "Cannot continue" "$LINENO" 5
5117    fi
5118
5119
5120
5121    for ac_prog in pwd
5122do
5123  # Extract the first word of "$ac_prog", so it can be a program name with args.
5124set dummy $ac_prog; ac_word=$2
5125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5126$as_echo_n "checking for $ac_word... " >&6; }
5127if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5128  $as_echo_n "(cached) " >&6
5129else
5130  case $THEPWDCMD in
5131  [\\/]* | ?:[\\/]*)
5132  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5133  ;;
5134  *)
5135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136for as_dir in $PATH
5137do
5138  IFS=$as_save_IFS
5139  test -z "$as_dir" && as_dir=.
5140    for ac_exec_ext in '' $ac_executable_extensions; do
5141  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5142    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144    break 2
5145  fi
5146done
5147  done
5148IFS=$as_save_IFS
5149
5150  ;;
5151esac
5152fi
5153THEPWDCMD=$ac_cv_path_THEPWDCMD
5154if test -n "$THEPWDCMD"; then
5155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5156$as_echo "$THEPWDCMD" >&6; }
5157else
5158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159$as_echo "no" >&6; }
5160fi
5161
5162
5163  test -n "$THEPWDCMD" && break
5164done
5165
5166
5167    if test "x$THEPWDCMD" = x; then
5168        if test "xpwd" = x; then
5169          PROG_NAME=thepwdcmd
5170        else
5171          PROG_NAME=pwd
5172        fi
5173        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5174$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5175        as_fn_error $? "Cannot continue" "$LINENO" 5
5176    fi
5177
5178
5179
5180    for ac_prog in rm
5181do
5182  # Extract the first word of "$ac_prog", so it can be a program name with args.
5183set dummy $ac_prog; ac_word=$2
5184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5185$as_echo_n "checking for $ac_word... " >&6; }
5186if test "${ac_cv_path_RM+set}" = set; then :
5187  $as_echo_n "(cached) " >&6
5188else
5189  case $RM in
5190  [\\/]* | ?:[\\/]*)
5191  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5192  ;;
5193  *)
5194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5195for as_dir in $PATH
5196do
5197  IFS=$as_save_IFS
5198  test -z "$as_dir" && as_dir=.
5199    for ac_exec_ext in '' $ac_executable_extensions; do
5200  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5201    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5203    break 2
5204  fi
5205done
5206  done
5207IFS=$as_save_IFS
5208
5209  ;;
5210esac
5211fi
5212RM=$ac_cv_path_RM
5213if test -n "$RM"; then
5214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5215$as_echo "$RM" >&6; }
5216else
5217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5218$as_echo "no" >&6; }
5219fi
5220
5221
5222  test -n "$RM" && break
5223done
5224
5225
5226    if test "x$RM" = x; then
5227        if test "xrm" = x; then
5228          PROG_NAME=rm
5229        else
5230          PROG_NAME=rm
5231        fi
5232        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5233$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5234        as_fn_error $? "Cannot continue" "$LINENO" 5
5235    fi
5236
5237
5238
5239    for ac_prog in sh
5240do
5241  # Extract the first word of "$ac_prog", so it can be a program name with args.
5242set dummy $ac_prog; ac_word=$2
5243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5244$as_echo_n "checking for $ac_word... " >&6; }
5245if test "${ac_cv_path_SH+set}" = set; then :
5246  $as_echo_n "(cached) " >&6
5247else
5248  case $SH in
5249  [\\/]* | ?:[\\/]*)
5250  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5251  ;;
5252  *)
5253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5254for as_dir in $PATH
5255do
5256  IFS=$as_save_IFS
5257  test -z "$as_dir" && as_dir=.
5258    for ac_exec_ext in '' $ac_executable_extensions; do
5259  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5260    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5262    break 2
5263  fi
5264done
5265  done
5266IFS=$as_save_IFS
5267
5268  ;;
5269esac
5270fi
5271SH=$ac_cv_path_SH
5272if test -n "$SH"; then
5273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5274$as_echo "$SH" >&6; }
5275else
5276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5277$as_echo "no" >&6; }
5278fi
5279
5280
5281  test -n "$SH" && break
5282done
5283
5284
5285    if test "x$SH" = x; then
5286        if test "xsh" = x; then
5287          PROG_NAME=sh
5288        else
5289          PROG_NAME=sh
5290        fi
5291        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5292$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5293        as_fn_error $? "Cannot continue" "$LINENO" 5
5294    fi
5295
5296
5297
5298    for ac_prog in sort
5299do
5300  # Extract the first word of "$ac_prog", so it can be a program name with args.
5301set dummy $ac_prog; ac_word=$2
5302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5303$as_echo_n "checking for $ac_word... " >&6; }
5304if test "${ac_cv_path_SORT+set}" = set; then :
5305  $as_echo_n "(cached) " >&6
5306else
5307  case $SORT in
5308  [\\/]* | ?:[\\/]*)
5309  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5310  ;;
5311  *)
5312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5313for as_dir in $PATH
5314do
5315  IFS=$as_save_IFS
5316  test -z "$as_dir" && as_dir=.
5317    for ac_exec_ext in '' $ac_executable_extensions; do
5318  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5319    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5321    break 2
5322  fi
5323done
5324  done
5325IFS=$as_save_IFS
5326
5327  ;;
5328esac
5329fi
5330SORT=$ac_cv_path_SORT
5331if test -n "$SORT"; then
5332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5333$as_echo "$SORT" >&6; }
5334else
5335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5336$as_echo "no" >&6; }
5337fi
5338
5339
5340  test -n "$SORT" && break
5341done
5342
5343
5344    if test "x$SORT" = x; then
5345        if test "xsort" = x; then
5346          PROG_NAME=sort
5347        else
5348          PROG_NAME=sort
5349        fi
5350        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5351$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5352        as_fn_error $? "Cannot continue" "$LINENO" 5
5353    fi
5354
5355
5356
5357    for ac_prog in tail
5358do
5359  # Extract the first word of "$ac_prog", so it can be a program name with args.
5360set dummy $ac_prog; ac_word=$2
5361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5362$as_echo_n "checking for $ac_word... " >&6; }
5363if test "${ac_cv_path_TAIL+set}" = set; then :
5364  $as_echo_n "(cached) " >&6
5365else
5366  case $TAIL in
5367  [\\/]* | ?:[\\/]*)
5368  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5369  ;;
5370  *)
5371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5372for as_dir in $PATH
5373do
5374  IFS=$as_save_IFS
5375  test -z "$as_dir" && as_dir=.
5376    for ac_exec_ext in '' $ac_executable_extensions; do
5377  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5378    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5380    break 2
5381  fi
5382done
5383  done
5384IFS=$as_save_IFS
5385
5386  ;;
5387esac
5388fi
5389TAIL=$ac_cv_path_TAIL
5390if test -n "$TAIL"; then
5391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5392$as_echo "$TAIL" >&6; }
5393else
5394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5395$as_echo "no" >&6; }
5396fi
5397
5398
5399  test -n "$TAIL" && break
5400done
5401
5402
5403    if test "x$TAIL" = x; then
5404        if test "xtail" = x; then
5405          PROG_NAME=tail
5406        else
5407          PROG_NAME=tail
5408        fi
5409        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5410$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5411        as_fn_error $? "Cannot continue" "$LINENO" 5
5412    fi
5413
5414
5415
5416    for ac_prog in tar
5417do
5418  # Extract the first word of "$ac_prog", so it can be a program name with args.
5419set dummy $ac_prog; ac_word=$2
5420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5421$as_echo_n "checking for $ac_word... " >&6; }
5422if test "${ac_cv_path_TAR+set}" = set; then :
5423  $as_echo_n "(cached) " >&6
5424else
5425  case $TAR in
5426  [\\/]* | ?:[\\/]*)
5427  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5428  ;;
5429  *)
5430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5431for as_dir in $PATH
5432do
5433  IFS=$as_save_IFS
5434  test -z "$as_dir" && as_dir=.
5435    for ac_exec_ext in '' $ac_executable_extensions; do
5436  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5437    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5439    break 2
5440  fi
5441done
5442  done
5443IFS=$as_save_IFS
5444
5445  ;;
5446esac
5447fi
5448TAR=$ac_cv_path_TAR
5449if test -n "$TAR"; then
5450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5451$as_echo "$TAR" >&6; }
5452else
5453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5454$as_echo "no" >&6; }
5455fi
5456
5457
5458  test -n "$TAR" && break
5459done
5460
5461
5462    if test "x$TAR" = x; then
5463        if test "xtar" = x; then
5464          PROG_NAME=tar
5465        else
5466          PROG_NAME=tar
5467        fi
5468        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5469$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5470        as_fn_error $? "Cannot continue" "$LINENO" 5
5471    fi
5472
5473
5474
5475    for ac_prog in tee
5476do
5477  # Extract the first word of "$ac_prog", so it can be a program name with args.
5478set dummy $ac_prog; ac_word=$2
5479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5480$as_echo_n "checking for $ac_word... " >&6; }
5481if test "${ac_cv_path_TEE+set}" = set; then :
5482  $as_echo_n "(cached) " >&6
5483else
5484  case $TEE in
5485  [\\/]* | ?:[\\/]*)
5486  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5487  ;;
5488  *)
5489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5490for as_dir in $PATH
5491do
5492  IFS=$as_save_IFS
5493  test -z "$as_dir" && as_dir=.
5494    for ac_exec_ext in '' $ac_executable_extensions; do
5495  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5496    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5498    break 2
5499  fi
5500done
5501  done
5502IFS=$as_save_IFS
5503
5504  ;;
5505esac
5506fi
5507TEE=$ac_cv_path_TEE
5508if test -n "$TEE"; then
5509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5510$as_echo "$TEE" >&6; }
5511else
5512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5513$as_echo "no" >&6; }
5514fi
5515
5516
5517  test -n "$TEE" && break
5518done
5519
5520
5521    if test "x$TEE" = x; then
5522        if test "xtee" = x; then
5523          PROG_NAME=tee
5524        else
5525          PROG_NAME=tee
5526        fi
5527        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5528$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5529        as_fn_error $? "Cannot continue" "$LINENO" 5
5530    fi
5531
5532
5533
5534    for ac_prog in touch
5535do
5536  # Extract the first word of "$ac_prog", so it can be a program name with args.
5537set dummy $ac_prog; ac_word=$2
5538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5539$as_echo_n "checking for $ac_word... " >&6; }
5540if test "${ac_cv_path_TOUCH+set}" = set; then :
5541  $as_echo_n "(cached) " >&6
5542else
5543  case $TOUCH in
5544  [\\/]* | ?:[\\/]*)
5545  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5546  ;;
5547  *)
5548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5549for as_dir in $PATH
5550do
5551  IFS=$as_save_IFS
5552  test -z "$as_dir" && as_dir=.
5553    for ac_exec_ext in '' $ac_executable_extensions; do
5554  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5555    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5557    break 2
5558  fi
5559done
5560  done
5561IFS=$as_save_IFS
5562
5563  ;;
5564esac
5565fi
5566TOUCH=$ac_cv_path_TOUCH
5567if test -n "$TOUCH"; then
5568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5569$as_echo "$TOUCH" >&6; }
5570else
5571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5572$as_echo "no" >&6; }
5573fi
5574
5575
5576  test -n "$TOUCH" && break
5577done
5578
5579
5580    if test "x$TOUCH" = x; then
5581        if test "xtouch" = x; then
5582          PROG_NAME=touch
5583        else
5584          PROG_NAME=touch
5585        fi
5586        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5587$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5588        as_fn_error $? "Cannot continue" "$LINENO" 5
5589    fi
5590
5591
5592
5593    for ac_prog in tr
5594do
5595  # Extract the first word of "$ac_prog", so it can be a program name with args.
5596set dummy $ac_prog; ac_word=$2
5597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5598$as_echo_n "checking for $ac_word... " >&6; }
5599if test "${ac_cv_path_TR+set}" = set; then :
5600  $as_echo_n "(cached) " >&6
5601else
5602  case $TR in
5603  [\\/]* | ?:[\\/]*)
5604  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5605  ;;
5606  *)
5607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5608for as_dir in $PATH
5609do
5610  IFS=$as_save_IFS
5611  test -z "$as_dir" && as_dir=.
5612    for ac_exec_ext in '' $ac_executable_extensions; do
5613  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5614    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5616    break 2
5617  fi
5618done
5619  done
5620IFS=$as_save_IFS
5621
5622  ;;
5623esac
5624fi
5625TR=$ac_cv_path_TR
5626if test -n "$TR"; then
5627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5628$as_echo "$TR" >&6; }
5629else
5630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5631$as_echo "no" >&6; }
5632fi
5633
5634
5635  test -n "$TR" && break
5636done
5637
5638
5639    if test "x$TR" = x; then
5640        if test "xtr" = x; then
5641          PROG_NAME=tr
5642        else
5643          PROG_NAME=tr
5644        fi
5645        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5646$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5647        as_fn_error $? "Cannot continue" "$LINENO" 5
5648    fi
5649
5650
5651
5652    for ac_prog in uname
5653do
5654  # Extract the first word of "$ac_prog", so it can be a program name with args.
5655set dummy $ac_prog; ac_word=$2
5656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5657$as_echo_n "checking for $ac_word... " >&6; }
5658if test "${ac_cv_path_UNAME+set}" = set; then :
5659  $as_echo_n "(cached) " >&6
5660else
5661  case $UNAME in
5662  [\\/]* | ?:[\\/]*)
5663  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5664  ;;
5665  *)
5666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5667for as_dir in $PATH
5668do
5669  IFS=$as_save_IFS
5670  test -z "$as_dir" && as_dir=.
5671    for ac_exec_ext in '' $ac_executable_extensions; do
5672  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5673    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5675    break 2
5676  fi
5677done
5678  done
5679IFS=$as_save_IFS
5680
5681  ;;
5682esac
5683fi
5684UNAME=$ac_cv_path_UNAME
5685if test -n "$UNAME"; then
5686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5687$as_echo "$UNAME" >&6; }
5688else
5689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5690$as_echo "no" >&6; }
5691fi
5692
5693
5694  test -n "$UNAME" && break
5695done
5696
5697
5698    if test "x$UNAME" = x; then
5699        if test "xuname" = x; then
5700          PROG_NAME=uname
5701        else
5702          PROG_NAME=uname
5703        fi
5704        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5705$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5706        as_fn_error $? "Cannot continue" "$LINENO" 5
5707    fi
5708
5709
5710
5711    for ac_prog in uniq
5712do
5713  # Extract the first word of "$ac_prog", so it can be a program name with args.
5714set dummy $ac_prog; ac_word=$2
5715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5716$as_echo_n "checking for $ac_word... " >&6; }
5717if test "${ac_cv_path_UNIQ+set}" = set; then :
5718  $as_echo_n "(cached) " >&6
5719else
5720  case $UNIQ in
5721  [\\/]* | ?:[\\/]*)
5722  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5723  ;;
5724  *)
5725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5726for as_dir in $PATH
5727do
5728  IFS=$as_save_IFS
5729  test -z "$as_dir" && as_dir=.
5730    for ac_exec_ext in '' $ac_executable_extensions; do
5731  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5732    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5734    break 2
5735  fi
5736done
5737  done
5738IFS=$as_save_IFS
5739
5740  ;;
5741esac
5742fi
5743UNIQ=$ac_cv_path_UNIQ
5744if test -n "$UNIQ"; then
5745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5746$as_echo "$UNIQ" >&6; }
5747else
5748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5749$as_echo "no" >&6; }
5750fi
5751
5752
5753  test -n "$UNIQ" && break
5754done
5755
5756
5757    if test "x$UNIQ" = x; then
5758        if test "xuniq" = x; then
5759          PROG_NAME=uniq
5760        else
5761          PROG_NAME=uniq
5762        fi
5763        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5764$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5765        as_fn_error $? "Cannot continue" "$LINENO" 5
5766    fi
5767
5768
5769
5770    for ac_prog in wc
5771do
5772  # Extract the first word of "$ac_prog", so it can be a program name with args.
5773set dummy $ac_prog; ac_word=$2
5774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5775$as_echo_n "checking for $ac_word... " >&6; }
5776if test "${ac_cv_path_WC+set}" = set; then :
5777  $as_echo_n "(cached) " >&6
5778else
5779  case $WC in
5780  [\\/]* | ?:[\\/]*)
5781  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5782  ;;
5783  *)
5784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5785for as_dir in $PATH
5786do
5787  IFS=$as_save_IFS
5788  test -z "$as_dir" && as_dir=.
5789    for ac_exec_ext in '' $ac_executable_extensions; do
5790  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5791    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5793    break 2
5794  fi
5795done
5796  done
5797IFS=$as_save_IFS
5798
5799  ;;
5800esac
5801fi
5802WC=$ac_cv_path_WC
5803if test -n "$WC"; then
5804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5805$as_echo "$WC" >&6; }
5806else
5807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5808$as_echo "no" >&6; }
5809fi
5810
5811
5812  test -n "$WC" && break
5813done
5814
5815
5816    if test "x$WC" = x; then
5817        if test "xwc" = x; then
5818          PROG_NAME=wc
5819        else
5820          PROG_NAME=wc
5821        fi
5822        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5823$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5824        as_fn_error $? "Cannot continue" "$LINENO" 5
5825    fi
5826
5827
5828
5829    for ac_prog in which
5830do
5831  # Extract the first word of "$ac_prog", so it can be a program name with args.
5832set dummy $ac_prog; ac_word=$2
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5834$as_echo_n "checking for $ac_word... " >&6; }
5835if test "${ac_cv_path_WHICH+set}" = set; then :
5836  $as_echo_n "(cached) " >&6
5837else
5838  case $WHICH in
5839  [\\/]* | ?:[\\/]*)
5840  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5841  ;;
5842  *)
5843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5844for as_dir in $PATH
5845do
5846  IFS=$as_save_IFS
5847  test -z "$as_dir" && as_dir=.
5848    for ac_exec_ext in '' $ac_executable_extensions; do
5849  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5850    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5852    break 2
5853  fi
5854done
5855  done
5856IFS=$as_save_IFS
5857
5858  ;;
5859esac
5860fi
5861WHICH=$ac_cv_path_WHICH
5862if test -n "$WHICH"; then
5863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5864$as_echo "$WHICH" >&6; }
5865else
5866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867$as_echo "no" >&6; }
5868fi
5869
5870
5871  test -n "$WHICH" && break
5872done
5873
5874
5875    if test "x$WHICH" = x; then
5876        if test "xwhich" = x; then
5877          PROG_NAME=which
5878        else
5879          PROG_NAME=which
5880        fi
5881        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5882$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5883        as_fn_error $? "Cannot continue" "$LINENO" 5
5884    fi
5885
5886
5887
5888    for ac_prog in xargs
5889do
5890  # Extract the first word of "$ac_prog", so it can be a program name with args.
5891set dummy $ac_prog; ac_word=$2
5892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5893$as_echo_n "checking for $ac_word... " >&6; }
5894if test "${ac_cv_path_XARGS+set}" = set; then :
5895  $as_echo_n "(cached) " >&6
5896else
5897  case $XARGS in
5898  [\\/]* | ?:[\\/]*)
5899  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5900  ;;
5901  *)
5902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5903for as_dir in $PATH
5904do
5905  IFS=$as_save_IFS
5906  test -z "$as_dir" && as_dir=.
5907    for ac_exec_ext in '' $ac_executable_extensions; do
5908  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5909    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5911    break 2
5912  fi
5913done
5914  done
5915IFS=$as_save_IFS
5916
5917  ;;
5918esac
5919fi
5920XARGS=$ac_cv_path_XARGS
5921if test -n "$XARGS"; then
5922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5923$as_echo "$XARGS" >&6; }
5924else
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5926$as_echo "no" >&6; }
5927fi
5928
5929
5930  test -n "$XARGS" && break
5931done
5932
5933
5934    if test "x$XARGS" = x; then
5935        if test "xxargs" = x; then
5936          PROG_NAME=xargs
5937        else
5938          PROG_NAME=xargs
5939        fi
5940        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5941$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5942        as_fn_error $? "Cannot continue" "$LINENO" 5
5943    fi
5944
5945
5946
5947# Then required tools that require some special treatment.
5948for ac_prog in gawk mawk nawk awk
5949do
5950  # Extract the first word of "$ac_prog", so it can be a program name with args.
5951set dummy $ac_prog; ac_word=$2
5952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5953$as_echo_n "checking for $ac_word... " >&6; }
5954if test "${ac_cv_prog_AWK+set}" = set; then :
5955  $as_echo_n "(cached) " >&6
5956else
5957  if test -n "$AWK"; then
5958  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5959else
5960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5961for as_dir in $PATH
5962do
5963  IFS=$as_save_IFS
5964  test -z "$as_dir" && as_dir=.
5965    for ac_exec_ext in '' $ac_executable_extensions; do
5966  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5967    ac_cv_prog_AWK="$ac_prog"
5968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5969    break 2
5970  fi
5971done
5972  done
5973IFS=$as_save_IFS
5974
5975fi
5976fi
5977AWK=$ac_cv_prog_AWK
5978if test -n "$AWK"; then
5979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5980$as_echo "$AWK" >&6; }
5981else
5982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5983$as_echo "no" >&6; }
5984fi
5985
5986
5987  test -n "$AWK" && break
5988done
5989
5990
5991    if test "x$AWK" = x; then
5992        if test "x" = x; then
5993          PROG_NAME=awk
5994        else
5995          PROG_NAME=
5996        fi
5997        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5998$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5999        as_fn_error $? "Cannot continue" "$LINENO" 5
6000    fi
6001
6002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6003$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6004if test "${ac_cv_path_GREP+set}" = set; then :
6005  $as_echo_n "(cached) " >&6
6006else
6007  if test -z "$GREP"; then
6008  ac_path_GREP_found=false
6009  # Loop through the user's path and test for each of PROGNAME-LIST
6010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6011for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6012do
6013  IFS=$as_save_IFS
6014  test -z "$as_dir" && as_dir=.
6015    for ac_prog in grep ggrep; do
6016    for ac_exec_ext in '' $ac_executable_extensions; do
6017      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6018      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6019# Check for GNU ac_path_GREP and select it if it is found.
6020  # Check for GNU $ac_path_GREP
6021case `"$ac_path_GREP" --version 2>&1` in
6022*GNU*)
6023  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6024*)
6025  ac_count=0
6026  $as_echo_n 0123456789 >"conftest.in"
6027  while :
6028  do
6029    cat "conftest.in" "conftest.in" >"conftest.tmp"
6030    mv "conftest.tmp" "conftest.in"
6031    cp "conftest.in" "conftest.nl"
6032    $as_echo 'GREP' >> "conftest.nl"
6033    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6034    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6035    as_fn_arith $ac_count + 1 && ac_count=$as_val
6036    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6037      # Best one so far, save it but keep looking for a better one
6038      ac_cv_path_GREP="$ac_path_GREP"
6039      ac_path_GREP_max=$ac_count
6040    fi
6041    # 10*(2^10) chars as input seems more than enough
6042    test $ac_count -gt 10 && break
6043  done
6044  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6045esac
6046
6047      $ac_path_GREP_found && break 3
6048    done
6049  done
6050  done
6051IFS=$as_save_IFS
6052  if test -z "$ac_cv_path_GREP"; then
6053    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6054  fi
6055else
6056  ac_cv_path_GREP=$GREP
6057fi
6058
6059fi
6060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6061$as_echo "$ac_cv_path_GREP" >&6; }
6062 GREP="$ac_cv_path_GREP"
6063
6064
6065
6066    if test "x$GREP" = x; then
6067        if test "x" = x; then
6068          PROG_NAME=grep
6069        else
6070          PROG_NAME=
6071        fi
6072        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6073$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6074        as_fn_error $? "Cannot continue" "$LINENO" 5
6075    fi
6076
6077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6078$as_echo_n "checking for egrep... " >&6; }
6079if test "${ac_cv_path_EGREP+set}" = set; then :
6080  $as_echo_n "(cached) " >&6
6081else
6082  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6083   then ac_cv_path_EGREP="$GREP -E"
6084   else
6085     if test -z "$EGREP"; then
6086  ac_path_EGREP_found=false
6087  # Loop through the user's path and test for each of PROGNAME-LIST
6088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6089for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6090do
6091  IFS=$as_save_IFS
6092  test -z "$as_dir" && as_dir=.
6093    for ac_prog in egrep; do
6094    for ac_exec_ext in '' $ac_executable_extensions; do
6095      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6096      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6097# Check for GNU ac_path_EGREP and select it if it is found.
6098  # Check for GNU $ac_path_EGREP
6099case `"$ac_path_EGREP" --version 2>&1` in
6100*GNU*)
6101  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6102*)
6103  ac_count=0
6104  $as_echo_n 0123456789 >"conftest.in"
6105  while :
6106  do
6107    cat "conftest.in" "conftest.in" >"conftest.tmp"
6108    mv "conftest.tmp" "conftest.in"
6109    cp "conftest.in" "conftest.nl"
6110    $as_echo 'EGREP' >> "conftest.nl"
6111    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6112    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6113    as_fn_arith $ac_count + 1 && ac_count=$as_val
6114    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6115      # Best one so far, save it but keep looking for a better one
6116      ac_cv_path_EGREP="$ac_path_EGREP"
6117      ac_path_EGREP_max=$ac_count
6118    fi
6119    # 10*(2^10) chars as input seems more than enough
6120    test $ac_count -gt 10 && break
6121  done
6122  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6123esac
6124
6125      $ac_path_EGREP_found && break 3
6126    done
6127  done
6128  done
6129IFS=$as_save_IFS
6130  if test -z "$ac_cv_path_EGREP"; then
6131    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6132  fi
6133else
6134  ac_cv_path_EGREP=$EGREP
6135fi
6136
6137   fi
6138fi
6139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6140$as_echo "$ac_cv_path_EGREP" >&6; }
6141 EGREP="$ac_cv_path_EGREP"
6142
6143
6144
6145    if test "x$EGREP" = x; then
6146        if test "x" = x; then
6147          PROG_NAME=egrep
6148        else
6149          PROG_NAME=
6150        fi
6151        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6152$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6153        as_fn_error $? "Cannot continue" "$LINENO" 5
6154    fi
6155
6156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6157$as_echo_n "checking for fgrep... " >&6; }
6158if test "${ac_cv_path_FGREP+set}" = set; then :
6159  $as_echo_n "(cached) " >&6
6160else
6161  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6162   then ac_cv_path_FGREP="$GREP -F"
6163   else
6164     if test -z "$FGREP"; then
6165  ac_path_FGREP_found=false
6166  # Loop through the user's path and test for each of PROGNAME-LIST
6167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6168for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6169do
6170  IFS=$as_save_IFS
6171  test -z "$as_dir" && as_dir=.
6172    for ac_prog in fgrep; do
6173    for ac_exec_ext in '' $ac_executable_extensions; do
6174      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6175      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6176# Check for GNU ac_path_FGREP and select it if it is found.
6177  # Check for GNU $ac_path_FGREP
6178case `"$ac_path_FGREP" --version 2>&1` in
6179*GNU*)
6180  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6181*)
6182  ac_count=0
6183  $as_echo_n 0123456789 >"conftest.in"
6184  while :
6185  do
6186    cat "conftest.in" "conftest.in" >"conftest.tmp"
6187    mv "conftest.tmp" "conftest.in"
6188    cp "conftest.in" "conftest.nl"
6189    $as_echo 'FGREP' >> "conftest.nl"
6190    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6191    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6192    as_fn_arith $ac_count + 1 && ac_count=$as_val
6193    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6194      # Best one so far, save it but keep looking for a better one
6195      ac_cv_path_FGREP="$ac_path_FGREP"
6196      ac_path_FGREP_max=$ac_count
6197    fi
6198    # 10*(2^10) chars as input seems more than enough
6199    test $ac_count -gt 10 && break
6200  done
6201  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6202esac
6203
6204      $ac_path_FGREP_found && break 3
6205    done
6206  done
6207  done
6208IFS=$as_save_IFS
6209  if test -z "$ac_cv_path_FGREP"; then
6210    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6211  fi
6212else
6213  ac_cv_path_FGREP=$FGREP
6214fi
6215
6216   fi
6217fi
6218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6219$as_echo "$ac_cv_path_FGREP" >&6; }
6220 FGREP="$ac_cv_path_FGREP"
6221
6222
6223
6224    if test "x$FGREP" = x; then
6225        if test "x" = x; then
6226          PROG_NAME=fgrep
6227        else
6228          PROG_NAME=
6229        fi
6230        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6231$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6232        as_fn_error $? "Cannot continue" "$LINENO" 5
6233    fi
6234
6235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6236$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6237if test "${ac_cv_path_SED+set}" = set; then :
6238  $as_echo_n "(cached) " >&6
6239else
6240            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6241     for ac_i in 1 2 3 4 5 6 7; do
6242       ac_script="$ac_script$as_nl$ac_script"
6243     done
6244     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6245     { ac_script=; unset ac_script;}
6246     if test -z "$SED"; then
6247  ac_path_SED_found=false
6248  # Loop through the user's path and test for each of PROGNAME-LIST
6249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6250for as_dir in $PATH
6251do
6252  IFS=$as_save_IFS
6253  test -z "$as_dir" && as_dir=.
6254    for ac_prog in sed gsed; do
6255    for ac_exec_ext in '' $ac_executable_extensions; do
6256      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6257      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6258# Check for GNU ac_path_SED and select it if it is found.
6259  # Check for GNU $ac_path_SED
6260case `"$ac_path_SED" --version 2>&1` in
6261*GNU*)
6262  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6263*)
6264  ac_count=0
6265  $as_echo_n 0123456789 >"conftest.in"
6266  while :
6267  do
6268    cat "conftest.in" "conftest.in" >"conftest.tmp"
6269    mv "conftest.tmp" "conftest.in"
6270    cp "conftest.in" "conftest.nl"
6271    $as_echo '' >> "conftest.nl"
6272    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6273    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6274    as_fn_arith $ac_count + 1 && ac_count=$as_val
6275    if test $ac_count -gt ${ac_path_SED_max-0}; then
6276      # Best one so far, save it but keep looking for a better one
6277      ac_cv_path_SED="$ac_path_SED"
6278      ac_path_SED_max=$ac_count
6279    fi
6280    # 10*(2^10) chars as input seems more than enough
6281    test $ac_count -gt 10 && break
6282  done
6283  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6284esac
6285
6286      $ac_path_SED_found && break 3
6287    done
6288  done
6289  done
6290IFS=$as_save_IFS
6291  if test -z "$ac_cv_path_SED"; then
6292    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6293  fi
6294else
6295  ac_cv_path_SED=$SED
6296fi
6297
6298fi
6299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6300$as_echo "$ac_cv_path_SED" >&6; }
6301 SED="$ac_cv_path_SED"
6302  rm -f conftest.sed
6303
6304
6305    if test "x$SED" = x; then
6306        if test "x" = x; then
6307          PROG_NAME=sed
6308        else
6309          PROG_NAME=
6310        fi
6311        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6312$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6313        as_fn_error $? "Cannot continue" "$LINENO" 5
6314    fi
6315
6316
6317for ac_prog in nawk gawk awk
6318do
6319  # Extract the first word of "$ac_prog", so it can be a program name with args.
6320set dummy $ac_prog; ac_word=$2
6321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6322$as_echo_n "checking for $ac_word... " >&6; }
6323if test "${ac_cv_path_NAWK+set}" = set; then :
6324  $as_echo_n "(cached) " >&6
6325else
6326  case $NAWK in
6327  [\\/]* | ?:[\\/]*)
6328  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6329  ;;
6330  *)
6331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6332for as_dir in $PATH
6333do
6334  IFS=$as_save_IFS
6335  test -z "$as_dir" && as_dir=.
6336    for ac_exec_ext in '' $ac_executable_extensions; do
6337  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6338    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6340    break 2
6341  fi
6342done
6343  done
6344IFS=$as_save_IFS
6345
6346  ;;
6347esac
6348fi
6349NAWK=$ac_cv_path_NAWK
6350if test -n "$NAWK"; then
6351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6352$as_echo "$NAWK" >&6; }
6353else
6354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355$as_echo "no" >&6; }
6356fi
6357
6358
6359  test -n "$NAWK" && break
6360done
6361
6362
6363    if test "x$NAWK" = x; then
6364        if test "x" = x; then
6365          PROG_NAME=nawk
6366        else
6367          PROG_NAME=
6368        fi
6369        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6370$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6371        as_fn_error $? "Cannot continue" "$LINENO" 5
6372    fi
6373
6374
6375# Always force rm.
6376RM="$RM -f"
6377
6378# These are not required on all platforms
6379# Extract the first word of "cygpath", so it can be a program name with args.
6380set dummy cygpath; ac_word=$2
6381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6382$as_echo_n "checking for $ac_word... " >&6; }
6383if test "${ac_cv_path_CYGPATH+set}" = set; then :
6384  $as_echo_n "(cached) " >&6
6385else
6386  case $CYGPATH in
6387  [\\/]* | ?:[\\/]*)
6388  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6389  ;;
6390  *)
6391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6392for as_dir in $PATH
6393do
6394  IFS=$as_save_IFS
6395  test -z "$as_dir" && as_dir=.
6396    for ac_exec_ext in '' $ac_executable_extensions; do
6397  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6398    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6400    break 2
6401  fi
6402done
6403  done
6404IFS=$as_save_IFS
6405
6406  ;;
6407esac
6408fi
6409CYGPATH=$ac_cv_path_CYGPATH
6410if test -n "$CYGPATH"; then
6411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6412$as_echo "$CYGPATH" >&6; }
6413else
6414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6415$as_echo "no" >&6; }
6416fi
6417
6418
6419# Extract the first word of "readlink", so it can be a program name with args.
6420set dummy readlink; ac_word=$2
6421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6422$as_echo_n "checking for $ac_word... " >&6; }
6423if test "${ac_cv_path_READLINK+set}" = set; then :
6424  $as_echo_n "(cached) " >&6
6425else
6426  case $READLINK in
6427  [\\/]* | ?:[\\/]*)
6428  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6429  ;;
6430  *)
6431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6432for as_dir in $PATH
6433do
6434  IFS=$as_save_IFS
6435  test -z "$as_dir" && as_dir=.
6436    for ac_exec_ext in '' $ac_executable_extensions; do
6437  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6438    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6440    break 2
6441  fi
6442done
6443  done
6444IFS=$as_save_IFS
6445
6446  ;;
6447esac
6448fi
6449READLINK=$ac_cv_path_READLINK
6450if test -n "$READLINK"; then
6451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6452$as_echo "$READLINK" >&6; }
6453else
6454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6455$as_echo "no" >&6; }
6456fi
6457
6458
6459# Extract the first word of "df", so it can be a program name with args.
6460set dummy df; ac_word=$2
6461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6462$as_echo_n "checking for $ac_word... " >&6; }
6463if test "${ac_cv_path_DF+set}" = set; then :
6464  $as_echo_n "(cached) " >&6
6465else
6466  case $DF in
6467  [\\/]* | ?:[\\/]*)
6468  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6469  ;;
6470  *)
6471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6472for as_dir in $PATH
6473do
6474  IFS=$as_save_IFS
6475  test -z "$as_dir" && as_dir=.
6476    for ac_exec_ext in '' $ac_executable_extensions; do
6477  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6478    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6480    break 2
6481  fi
6482done
6483  done
6484IFS=$as_save_IFS
6485
6486  ;;
6487esac
6488fi
6489DF=$ac_cv_path_DF
6490if test -n "$DF"; then
6491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6492$as_echo "$DF" >&6; }
6493else
6494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6495$as_echo "no" >&6; }
6496fi
6497
6498
6499# Extract the first word of "SetFile", so it can be a program name with args.
6500set dummy SetFile; ac_word=$2
6501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6502$as_echo_n "checking for $ac_word... " >&6; }
6503if test "${ac_cv_path_SETFILE+set}" = set; then :
6504  $as_echo_n "(cached) " >&6
6505else
6506  case $SETFILE in
6507  [\\/]* | ?:[\\/]*)
6508  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6509  ;;
6510  *)
6511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6512for as_dir in $PATH
6513do
6514  IFS=$as_save_IFS
6515  test -z "$as_dir" && as_dir=.
6516    for ac_exec_ext in '' $ac_executable_extensions; do
6517  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6518    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6520    break 2
6521  fi
6522done
6523  done
6524IFS=$as_save_IFS
6525
6526  ;;
6527esac
6528fi
6529SETFILE=$ac_cv_path_SETFILE
6530if test -n "$SETFILE"; then
6531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6532$as_echo "$SETFILE" >&6; }
6533else
6534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6535$as_echo "no" >&6; }
6536fi
6537
6538
6539
6540
6541# Now we can determine OpenJDK build and target platforms. This is required to
6542# have early on.
6543# Make sure we can run config.sub.
6544$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6545  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6546
6547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6548$as_echo_n "checking build system type... " >&6; }
6549if test "${ac_cv_build+set}" = set; then :
6550  $as_echo_n "(cached) " >&6
6551else
6552  ac_build_alias=$build_alias
6553test "x$ac_build_alias" = x &&
6554  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6555test "x$ac_build_alias" = x &&
6556  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6557ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6558  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6559
6560fi
6561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6562$as_echo "$ac_cv_build" >&6; }
6563case $ac_cv_build in
6564*-*-*) ;;
6565*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6566esac
6567build=$ac_cv_build
6568ac_save_IFS=$IFS; IFS='-'
6569set x $ac_cv_build
6570shift
6571build_cpu=$1
6572build_vendor=$2
6573shift; shift
6574# Remember, the first character of IFS is used to create $*,
6575# except with old shells:
6576build_os=$*
6577IFS=$ac_save_IFS
6578case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6579
6580
6581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6582$as_echo_n "checking host system type... " >&6; }
6583if test "${ac_cv_host+set}" = set; then :
6584  $as_echo_n "(cached) " >&6
6585else
6586  if test "x$host_alias" = x; then
6587  ac_cv_host=$ac_cv_build
6588else
6589  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6590    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6591fi
6592
6593fi
6594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6595$as_echo "$ac_cv_host" >&6; }
6596case $ac_cv_host in
6597*-*-*) ;;
6598*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6599esac
6600host=$ac_cv_host
6601ac_save_IFS=$IFS; IFS='-'
6602set x $ac_cv_host
6603shift
6604host_cpu=$1
6605host_vendor=$2
6606shift; shift
6607# Remember, the first character of IFS is used to create $*,
6608# except with old shells:
6609host_os=$*
6610IFS=$ac_save_IFS
6611case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6612
6613
6614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6615$as_echo_n "checking target system type... " >&6; }
6616if test "${ac_cv_target+set}" = set; then :
6617  $as_echo_n "(cached) " >&6
6618else
6619  if test "x$target_alias" = x; then
6620  ac_cv_target=$ac_cv_host
6621else
6622  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6623    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6624fi
6625
6626fi
6627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6628$as_echo "$ac_cv_target" >&6; }
6629case $ac_cv_target in
6630*-*-*) ;;
6631*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6632esac
6633target=$ac_cv_target
6634ac_save_IFS=$IFS; IFS='-'
6635set x $ac_cv_target
6636shift
6637target_cpu=$1
6638target_vendor=$2
6639shift; shift
6640# Remember, the first character of IFS is used to create $*,
6641# except with old shells:
6642target_os=$*
6643IFS=$ac_save_IFS
6644case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6645
6646
6647# The aliases save the names the user supplied, while $host etc.
6648# will get canonicalized.
6649test -n "$target_alias" &&
6650  test "$program_prefix$program_suffix$program_transform_name" = \
6651    NONENONEs,x,x, &&
6652  program_prefix=${target_alias}-
6653
6654# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6655# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6656# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6657# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6658# to use the configure naming style.
6659
6660
6661
6662
6663
6664    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6665    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6666    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6667    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6668    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6669    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6670
6671
6672
6673    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6674
6675  case "$build_os" in
6676    *linux*)
6677      VAR_OS=linux
6678      VAR_OS_API=posix
6679      VAR_OS_ENV=linux
6680      ;;
6681    *solaris*)
6682      VAR_OS=solaris
6683      VAR_OS_API=posix
6684      VAR_OS_ENV=solaris
6685      ;;
6686    *darwin*)
6687      VAR_OS=macosx
6688      VAR_OS_API=posix
6689      VAR_OS_ENV=macosx
6690      ;;
6691    *bsd*)
6692      VAR_OS=bsd
6693      VAR_OS_API=posix
6694      VAR_OS_ENV=bsd
6695      ;;
6696    *cygwin*)
6697      VAR_OS=windows
6698      VAR_OS_API=winapi
6699      VAR_OS_ENV=windows.cygwin
6700      ;;
6701    *mingw*)
6702      VAR_OS=windows
6703      VAR_OS_API=winapi
6704      VAR_OS_ENV=windows.msys
6705      ;;
6706    *)
6707      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6708      ;;
6709  esac
6710
6711
6712  # First argument is the cpu name from the trip/quad
6713  case "$build_cpu" in
6714    x86_64)
6715      VAR_CPU=x86_64
6716      VAR_CPU_ARCH=x86
6717      VAR_CPU_BITS=64
6718      VAR_CPU_ENDIAN=little
6719      ;;
6720    i?86)
6721      VAR_CPU=x86
6722      VAR_CPU_ARCH=x86
6723      VAR_CPU_BITS=32
6724      VAR_CPU_ENDIAN=little
6725      ;;
6726    arm*)
6727      VAR_CPU=arm
6728      VAR_CPU_ARCH=arm
6729      VAR_CPU_BITS=32
6730      VAR_CPU_ENDIAN=little
6731      ;;
6732    powerpc)
6733      VAR_CPU=ppc
6734      VAR_CPU_ARCH=ppc
6735      VAR_CPU_BITS=32
6736      VAR_CPU_ENDIAN=big
6737       ;;
6738    powerpc64)
6739      VAR_CPU=ppc64
6740      VAR_CPU_ARCH=ppc
6741      VAR_CPU_BITS=64
6742      VAR_CPU_ENDIAN=big
6743       ;;
6744    sparc)
6745      VAR_CPU=sparc
6746      VAR_CPU_ARCH=sparc
6747      VAR_CPU_BITS=32
6748      VAR_CPU_ENDIAN=big
6749       ;;
6750    sparcv9)
6751      VAR_CPU=sparcv9
6752      VAR_CPU_ARCH=sparc
6753      VAR_CPU_BITS=64
6754      VAR_CPU_ENDIAN=big
6755       ;;
6756    *)
6757      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6758      ;;
6759  esac
6760
6761    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6762    OPENJDK_BUILD_OS="$VAR_OS"
6763    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6764    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6765    OPENJDK_BUILD_CPU="$VAR_CPU"
6766    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6767    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6768    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6769
6770
6771
6772
6773
6774
6775
6776    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6777$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6778    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6779$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6780
6781    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6782
6783  case "$host_os" in
6784    *linux*)
6785      VAR_OS=linux
6786      VAR_OS_API=posix
6787      VAR_OS_ENV=linux
6788      ;;
6789    *solaris*)
6790      VAR_OS=solaris
6791      VAR_OS_API=posix
6792      VAR_OS_ENV=solaris
6793      ;;
6794    *darwin*)
6795      VAR_OS=macosx
6796      VAR_OS_API=posix
6797      VAR_OS_ENV=macosx
6798      ;;
6799    *bsd*)
6800      VAR_OS=bsd
6801      VAR_OS_API=posix
6802      VAR_OS_ENV=bsd
6803      ;;
6804    *cygwin*)
6805      VAR_OS=windows
6806      VAR_OS_API=winapi
6807      VAR_OS_ENV=windows.cygwin
6808      ;;
6809    *mingw*)
6810      VAR_OS=windows
6811      VAR_OS_API=winapi
6812      VAR_OS_ENV=windows.msys
6813      ;;
6814    *)
6815      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6816      ;;
6817  esac
6818
6819
6820  # First argument is the cpu name from the trip/quad
6821  case "$host_cpu" in
6822    x86_64)
6823      VAR_CPU=x86_64
6824      VAR_CPU_ARCH=x86
6825      VAR_CPU_BITS=64
6826      VAR_CPU_ENDIAN=little
6827      ;;
6828    i?86)
6829      VAR_CPU=x86
6830      VAR_CPU_ARCH=x86
6831      VAR_CPU_BITS=32
6832      VAR_CPU_ENDIAN=little
6833      ;;
6834    arm*)
6835      VAR_CPU=arm
6836      VAR_CPU_ARCH=arm
6837      VAR_CPU_BITS=32
6838      VAR_CPU_ENDIAN=little
6839      ;;
6840    powerpc)
6841      VAR_CPU=ppc
6842      VAR_CPU_ARCH=ppc
6843      VAR_CPU_BITS=32
6844      VAR_CPU_ENDIAN=big
6845       ;;
6846    powerpc64)
6847      VAR_CPU=ppc64
6848      VAR_CPU_ARCH=ppc
6849      VAR_CPU_BITS=64
6850      VAR_CPU_ENDIAN=big
6851       ;;
6852    sparc)
6853      VAR_CPU=sparc
6854      VAR_CPU_ARCH=sparc
6855      VAR_CPU_BITS=32
6856      VAR_CPU_ENDIAN=big
6857       ;;
6858    sparcv9)
6859      VAR_CPU=sparcv9
6860      VAR_CPU_ARCH=sparc
6861      VAR_CPU_BITS=64
6862      VAR_CPU_ENDIAN=big
6863       ;;
6864    *)
6865      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6866      ;;
6867  esac
6868
6869    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6870    OPENJDK_TARGET_OS="$VAR_OS"
6871    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6872    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6873    OPENJDK_TARGET_CPU="$VAR_CPU"
6874    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6875    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6876    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6877
6878
6879
6880
6881
6882
6883
6884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6885$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6887$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6888
6889
6890
6891# Check whether --with-target-bits was given.
6892if test "${with_target_bits+set}" = set; then :
6893  withval=$with_target_bits;
6894fi
6895
6896
6897  # We have three types of compiles:
6898  # native  == normal compilation, target system == build system
6899  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6900  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6901  #
6902  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6903    # We're doing a proper cross-compilation
6904    COMPILE_TYPE="cross"
6905  else
6906    COMPILE_TYPE="native"
6907  fi
6908
6909  if test "x$with_target_bits" != x; then
6910    if test "x$COMPILE_TYPE" = "xcross"; then
6911      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6912    fi
6913
6914    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6915      # A reduced build is requested
6916      COMPILE_TYPE="reduced"
6917      OPENJDK_TARGET_CPU_BITS=32
6918      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6919        OPENJDK_TARGET_CPU=x86
6920      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6921        OPENJDK_TARGET_CPU=sparc
6922      else
6923        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6924      fi
6925    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6926      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
6927    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6928      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6929$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6930    else
6931      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6932    fi
6933  fi
6934
6935
6936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6937$as_echo_n "checking compilation type... " >&6; }
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6939$as_echo "$COMPILE_TYPE" >&6; }
6940
6941
6942    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6943       REQUIRED_OS_NAME=SunOS
6944       REQUIRED_OS_VERSION=5.10
6945    fi
6946    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6947       REQUIRED_OS_NAME=Linux
6948       REQUIRED_OS_VERSION=2.6
6949    fi
6950    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6951        REQUIRED_OS_NAME=Windows
6952        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6953            REQUIRED_OS_VERSION=5.2
6954        else
6955            REQUIRED_OS_VERSION=5.1
6956        fi
6957    fi
6958    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6959        REQUIRED_OS_NAME=Darwin
6960        REQUIRED_OS_VERSION=11.2
6961    fi
6962
6963
6964
6965
6966
6967    # Also store the legacy naming of the cpu.
6968    # Ie i586 and amd64 instead of x86 and x86_64
6969    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6970    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6971      OPENJDK_TARGET_CPU_LEGACY="i586"
6972    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6973      # On all platforms except MacOSX replace x86_64 with amd64.
6974      OPENJDK_TARGET_CPU_LEGACY="amd64"
6975    fi
6976
6977
6978    # And the second legacy naming of the cpu.
6979    # Ie i386 and amd64 instead of x86 and x86_64.
6980    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6981    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6982      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6983    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6984      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6985    fi
6986
6987
6988    # This is the name of the cpu (but using i386 and amd64 instead of
6989    # x86 and x86_64, respectively), preceeded by a /, to be used when
6990    # locating libraries. On macosx, it's empty, though.
6991    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6992    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6993        OPENJDK_TARGET_CPU_LIBDIR=""
6994    fi
6995
6996
6997    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6998    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6999    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7000    OPENJDK_TARGET_CPU_ISADIR=""
7001    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7002      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7003          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7004      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7005          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7006      fi
7007    fi
7008
7009
7010    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7011    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7012    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7013      # On linux only, we replace x86 with i386.
7014      OPENJDK_TARGET_CPU_OSARCH="i386"
7015    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7016      # On all platforms except macosx, we replace x86_64 with amd64.
7017      OPENJDK_TARGET_CPU_OSARCH="amd64"
7018    fi
7019
7020
7021    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7022    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7023      OPENJDK_TARGET_CPU_JLI="i386"
7024    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7025      # On all platforms except macosx, we replace x86_64 with amd64.
7026      OPENJDK_TARGET_CPU_JLI="amd64"
7027    fi
7028    # Now setup the -D flags for building libjli.
7029    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7030    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7031      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7032        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7033      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7034        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7035      fi
7036    fi
7037
7038
7039    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7040    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7041        OPENJDK_TARGET_OS_API_DIR="solaris"
7042    fi
7043    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7044        OPENJDK_TARGET_OS_API_DIR="windows"
7045    fi
7046
7047
7048    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7049        A_LP64="LP64:="
7050        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7051        # unpack200.exe
7052        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7053            ADD_LP64="-D_LP64=1"
7054        fi
7055    fi
7056    LP64=$A_LP64
7057
7058
7059    if test "x$COMPILE_TYPE" = "xcross"; then
7060      # FIXME: ... or should this include reduced builds..?
7061      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7062    else
7063      DEFINE_CROSS_COMPILE_ARCH=""
7064    fi
7065
7066
7067
7068
7069# Continue setting up basic stuff. Most remaining code require fundamental tools.
7070
7071# Locate the directory of this script.
7072SCRIPT="$0"
7073
7074    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7075        # Follow a chain of symbolic links. Use readlink
7076        # where it exists, else fall back to horribly
7077        # complicated shell code.
7078        if test "x$READLINK_TESTED" != yes; then
7079            # On MacOSX there is a readlink tool with a different
7080            # purpose than the GNU readlink tool. Check the found readlink.
7081            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7082            if test "x$ISGNU" = x; then
7083                 # A readlink that we do not know how to use.
7084                 # Are there other non-GNU readlinks out there?
7085                 READLINK_TESTED=yes
7086                 READLINK=
7087            fi
7088        fi
7089
7090        if test "x$READLINK" != x; then
7091            SCRIPT=`$READLINK -f $SCRIPT`
7092        else
7093            # Save the current directory for restoring afterwards
7094            STARTDIR=$PWD
7095            COUNTER=0
7096            sym_link_dir=`$DIRNAME $SCRIPT`
7097            sym_link_file=`$BASENAME $SCRIPT`
7098            # Use the system pwd and not the shell builtin to resolve directory symlinks
7099            cd $sym_link_dir
7100            cd `$THEPWDCMD`
7101            sym_link_dir=`$THEPWDCMD`
7102            # Resolve file symlinks
7103            while test $COUNTER -lt 20; do
7104                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7105                if test "x$ISLINK" == x; then
7106                    # This is not a symbolic link! We are done!
7107                    break
7108                fi
7109                # Again resolve directory symlinks since the target of the just found
7110                # link could be in a different directory
7111                cd `$DIRNAME $ISLINK`
7112                sym_link_dir=`$THEPWDCMD`
7113                sym_link_file=`$BASENAME $ISLINK`
7114                let COUNTER=COUNTER+1
7115            done
7116            cd $STARTDIR
7117            SCRIPT=$sym_link_dir/$sym_link_file
7118        fi
7119    fi
7120
7121AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7122
7123# Where is the source? It is located two levels above the configure script.
7124CURDIR="$PWD"
7125cd "$AUTOCONF_DIR/../.."
7126SRC_ROOT="`$THEPWDCMD`"
7127
7128if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7129  PATH_SEP=";"
7130
7131  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7132  if test $SRC_ROOT_LENGTH -gt 100; then
7133      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7134  fi
7135
7136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7138$as_echo_n "checking cygwin release... " >&6; }
7139    CYGWIN_VERSION=`$UNAME -r`
7140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7141$as_echo "$CYGWIN_VERSION" >&6; }
7142    WINDOWS_ENV_VENDOR='cygwin'
7143    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7144
7145    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7146    if test "x$CYGWIN_VERSION_OK" = x; then
7147      { $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
7148$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;}
7149      as_fn_error $? "Cannot continue" "$LINENO" 5
7150    fi
7151    if test "x$CYGPATH" = x; then
7152        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7153    fi
7154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7155$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7156    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7157    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7158    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7159    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7161$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7162    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7163    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7164    if test "x$test_cygdrive_prefix" = x; then
7165        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7166    fi
7167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7169$as_echo_n "checking msys release... " >&6; }
7170    MSYS_VERSION=`$UNAME -r`
7171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7172$as_echo "$MSYS_VERSION" >&6; }
7173
7174    WINDOWS_ENV_VENDOR='msys'
7175    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7176
7177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7178$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7179    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7180    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7181
7182  windows_path="$MSYS_ROOT_PATH"
7183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7184    unix_path=`$CYGPATH -u "$windows_path"`
7185    MSYS_ROOT_PATH="$unix_path"
7186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7188    MSYS_ROOT_PATH="$unix_path"
7189  fi
7190
7191    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7192$as_echo "$MSYS_ROOT_PATH" >&6; }
7193    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7194  else
7195    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7196  fi
7197
7198  # Test if windows or unix (cygwin/msys) find is first in path.
7199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7200$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7201  FIND_BINARY_OUTPUT=`find --version 2>&1`
7202  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7204$as_echo "unix style" >&6; }
7205  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7207$as_echo "Windows" >&6; }
7208    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7209$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7210    { $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
7211$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7212    as_fn_error $? "Cannot continue" "$LINENO" 5
7213  else
7214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7215$as_echo "unknown" >&6; }
7216    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7217$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7218  fi
7219
7220else
7221  PATH_SEP=":"
7222fi
7223
7224
7225
7226cd "$CURDIR"
7227
7228
7229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7230
7231  # Input might be given as Windows format, start by converting to
7232  # unix format.
7233  path="$SRC_ROOT"
7234  new_path=`$CYGPATH -u "$path"`
7235
7236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7239  # "foo.exe" is OK but "foo" is an error.
7240  #
7241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7242  # It is also a way to make sure we got the proper file name for the real test later on.
7243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7244  if test "x$test_shortpath" = x; then
7245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7246$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7247    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7248  fi
7249
7250  # Call helper function which possibly converts this using DOS-style short mode.
7251  # If so, the updated path is stored in $new_path.
7252
7253  input_path="$new_path"
7254  # Check if we need to convert this using DOS-style short mode. If the path
7255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7256  # take no chances and rewrite it.
7257  # Note: m4 eats our [], so we need to use [ and ] instead.
7258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7259  if test "x$has_forbidden_chars" != x; then
7260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7264      # Going to short mode and back again did indeed matter. Since short mode is
7265      # case insensitive, let's make it lowercase to improve readability.
7266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7267      # Now convert it back to Unix-stile (cygpath)
7268      input_path=`$CYGPATH -u "$shortmode_path"`
7269      new_path="$input_path"
7270    fi
7271  fi
7272
7273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7274  if test "x$test_cygdrive_prefix" = x; then
7275    # As a simple fix, exclude /usr/bin since it's not a real path.
7276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7278      # a path prefixed by /cygdrive for fixpath to work.
7279      new_path="$CYGWIN_ROOT_PATH$input_path"
7280    fi
7281  fi
7282
7283
7284  if test "x$path" != "x$new_path"; then
7285    SRC_ROOT="$new_path"
7286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7287$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7288  fi
7289
7290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7291
7292  path="$SRC_ROOT"
7293  has_colon=`$ECHO $path | $GREP ^.:`
7294  new_path="$path"
7295  if test "x$has_colon" = x; then
7296    # Not in mixed or Windows style, start by that.
7297    new_path=`cmd //c echo $path`
7298  fi
7299
7300
7301  input_path="$new_path"
7302  # Check if we need to convert this using DOS-style short mode. If the path
7303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7304  # take no chances and rewrite it.
7305  # Note: m4 eats our [], so we need to use [ and ] instead.
7306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7307  if test "x$has_forbidden_chars" != x; then
7308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7310  fi
7311
7312
7313  windows_path="$new_path"
7314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7315    unix_path=`$CYGPATH -u "$windows_path"`
7316    new_path="$unix_path"
7317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7319    new_path="$unix_path"
7320  fi
7321
7322  if test "x$path" != "x$new_path"; then
7323    SRC_ROOT="$new_path"
7324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7325$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7326  fi
7327
7328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7330
7331  else
7332    # We're on a posix platform. Hooray! :)
7333    path="$SRC_ROOT"
7334
7335    if test ! -f "$path" && test ! -d "$path"; then
7336      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7337    fi
7338
7339    has_space=`$ECHO "$path" | $GREP " "`
7340    if test "x$has_space" != x; then
7341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7342$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7343      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7344    fi
7345  fi
7346
7347
7348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7349
7350  # Input might be given as Windows format, start by converting to
7351  # unix format.
7352  path="$CURDIR"
7353  new_path=`$CYGPATH -u "$path"`
7354
7355  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7356  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7357  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7358  # "foo.exe" is OK but "foo" is an error.
7359  #
7360  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7361  # It is also a way to make sure we got the proper file name for the real test later on.
7362  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7363  if test "x$test_shortpath" = x; then
7364    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7365$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7366    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7367  fi
7368
7369  # Call helper function which possibly converts this using DOS-style short mode.
7370  # If so, the updated path is stored in $new_path.
7371
7372  input_path="$new_path"
7373  # Check if we need to convert this using DOS-style short mode. If the path
7374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7375  # take no chances and rewrite it.
7376  # Note: m4 eats our [], so we need to use [ and ] instead.
7377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7378  if test "x$has_forbidden_chars" != x; then
7379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7383      # Going to short mode and back again did indeed matter. Since short mode is
7384      # case insensitive, let's make it lowercase to improve readability.
7385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7386      # Now convert it back to Unix-stile (cygpath)
7387      input_path=`$CYGPATH -u "$shortmode_path"`
7388      new_path="$input_path"
7389    fi
7390  fi
7391
7392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7393  if test "x$test_cygdrive_prefix" = x; then
7394    # As a simple fix, exclude /usr/bin since it's not a real path.
7395    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7397      # a path prefixed by /cygdrive for fixpath to work.
7398      new_path="$CYGWIN_ROOT_PATH$input_path"
7399    fi
7400  fi
7401
7402
7403  if test "x$path" != "x$new_path"; then
7404    CURDIR="$new_path"
7405    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7406$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7407  fi
7408
7409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7410
7411  path="$CURDIR"
7412  has_colon=`$ECHO $path | $GREP ^.:`
7413  new_path="$path"
7414  if test "x$has_colon" = x; then
7415    # Not in mixed or Windows style, start by that.
7416    new_path=`cmd //c echo $path`
7417  fi
7418
7419
7420  input_path="$new_path"
7421  # Check if we need to convert this using DOS-style short mode. If the path
7422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7423  # take no chances and rewrite it.
7424  # Note: m4 eats our [], so we need to use [ and ] instead.
7425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7426  if test "x$has_forbidden_chars" != x; then
7427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7429  fi
7430
7431
7432  windows_path="$new_path"
7433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7434    unix_path=`$CYGPATH -u "$windows_path"`
7435    new_path="$unix_path"
7436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7438    new_path="$unix_path"
7439  fi
7440
7441  if test "x$path" != "x$new_path"; then
7442    CURDIR="$new_path"
7443    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7444$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7445  fi
7446
7447  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7448  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7449
7450  else
7451    # We're on a posix platform. Hooray! :)
7452    path="$CURDIR"
7453
7454    if test ! -f "$path" && test ! -d "$path"; then
7455      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7456    fi
7457
7458    has_space=`$ECHO "$path" | $GREP " "`
7459    if test "x$has_space" != x; then
7460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7461$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7462      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7463    fi
7464  fi
7465
7466
7467if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7468    # Add extra search paths on solaris for utilities like ar and as etc...
7469    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7470fi
7471
7472# You can force the sys-root if the sys-root encoded into the cross compiler tools
7473# is not correct.
7474
7475# Check whether --with-sys-root was given.
7476if test "${with_sys_root+set}" = set; then :
7477  withval=$with_sys_root;
7478fi
7479
7480
7481if test "x$with_sys_root" != x; then
7482  SYS_ROOT=$with_sys_root
7483else
7484  SYS_ROOT=/
7485fi
7486
7487
7488
7489# Check whether --with-tools-dir was given.
7490if test "${with_tools_dir+set}" = set; then :
7491  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7492fi
7493
7494
7495
7496# Check whether --with-devkit was given.
7497if test "${with_devkit+set}" = set; then :
7498  withval=$with_devkit;
7499    if test "x$with_sys_root" != x; then
7500      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7501    fi
7502    if test "x$with_tools_dir" != x; then
7503      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7504    fi
7505    TOOLS_DIR=$with_devkit/bin
7506    SYS_ROOT=$with_devkit/$host_alias/libc
7507
7508fi
7509
7510
7511
7512
7513# Setup default logging of stdout and stderr to build.log in the output root.
7514BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7515BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7516BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7517
7518
7519
7520
7521
7522# Check if it's a pure open build or if custom sources are to be used.
7523
7524  # Check whether --enable-openjdk-only was given.
7525if test "${enable_openjdk_only+set}" = set; then :
7526  enableval=$enable_openjdk_only;
7527else
7528  enable_openjdk_only="no"
7529fi
7530
7531
7532  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7533$as_echo_n "checking for presence of closed sources... " >&6; }
7534  if test -d "$SRC_ROOT/jdk/src/closed"; then
7535    CLOSED_SOURCE_PRESENT=yes
7536  else
7537    CLOSED_SOURCE_PRESENT=no
7538  fi
7539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7540$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7541
7542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7543$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7544  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7546$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7547
7548  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7549    OPENJDK=true
7550    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7551      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7552$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7553    fi
7554  else
7555    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7556      OPENJDK=true
7557    else
7558      OPENJDK=false
7559    fi
7560  fi
7561
7562  if test "x$OPENJDK" = "xtrue"; then
7563    SET_OPENJDK="OPENJDK=true"
7564  fi
7565
7566
7567
7568
7569# These are needed to be able to create a configuration name (and thus the output directory)
7570
7571###############################################################################
7572#
7573# Check which variant of the JDK that we want to build.
7574# Currently we have:
7575#    normal:   standard edition
7576# but the custom make system may add other variants
7577#
7578# Effectively the JDK variant gives a name to a specific set of
7579# modules to compile into the JDK. In the future, these modules
7580# might even be Jigsaw modules.
7581#
7582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7583$as_echo_n "checking which variant of the JDK to build... " >&6; }
7584
7585# Check whether --with-jdk-variant was given.
7586if test "${with_jdk_variant+set}" = set; then :
7587  withval=$with_jdk_variant;
7588fi
7589
7590
7591if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7592    JDK_VARIANT="normal"
7593else
7594    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7595fi
7596
7597
7598
7599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7600$as_echo "$JDK_VARIANT" >&6; }
7601
7602
7603
7604###############################################################################
7605#
7606# Check which variants of the JVM that we want to build.
7607# Currently we have:
7608#    server: normal interpreter and a tiered C1/C2 compiler
7609#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7610#    minimal1: reduced form of client with optional VM services and features stripped out
7611#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7612#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7613#    zero: no machine code interpreter, no compiler
7614#    zeroshark: zero interpreter and shark/llvm compiler backend
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7616$as_echo_n "checking which variants of the JVM to build... " >&6; }
7617
7618# Check whether --with-jvm-variants was given.
7619if test "${with_jvm_variants+set}" = set; then :
7620  withval=$with_jvm_variants;
7621fi
7622
7623
7624if test "x$with_jvm_variants" = x; then
7625     with_jvm_variants="server"
7626fi
7627
7628JVM_VARIANTS=",$with_jvm_variants,"
7629TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7630
7631if test "x$TEST_VARIANTS" != "x,"; then
7632   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7633fi
7634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7635$as_echo "$with_jvm_variants" >&6; }
7636
7637JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7638JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7639JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7640JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7641JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7642JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7643
7644if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7645    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7646        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7647    fi
7648fi
7649if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7650    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7651        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7652    fi
7653fi
7654if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7655    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7656        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7657    fi
7658fi
7659
7660# Replace the commas with AND for use in the build directory name.
7661ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7662COUNT_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/'`
7663if test "x$COUNT_VARIANTS" != "x,1"; then
7664    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7665else
7666    BUILDING_MULTIPLE_JVM_VARIANTS=no
7667fi
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7678   MACOSX_UNIVERSAL="true"
7679fi
7680
7681
7682
7683
7684
7685###############################################################################
7686#
7687# Set the debug level
7688#    release: no debug information, all optimizations, no asserts.
7689#    fastdebug: debug information (-g), all optimizations, all asserts
7690#    slowdebug: debug information (-g), no optimizations, all asserts
7691#
7692DEBUG_LEVEL="release"
7693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7694$as_echo_n "checking which debug level to use... " >&6; }
7695# Check whether --enable-debug was given.
7696if test "${enable_debug+set}" = set; then :
7697  enableval=$enable_debug;
7698        ENABLE_DEBUG="${enableval}"
7699        DEBUG_LEVEL="fastdebug"
7700
7701else
7702  ENABLE_DEBUG="no"
7703fi
7704
7705
7706
7707# Check whether --with-debug-level was given.
7708if test "${with_debug_level+set}" = set; then :
7709  withval=$with_debug_level;
7710        DEBUG_LEVEL="${withval}"
7711        if test "x$ENABLE_DEBUG" = xyes; then
7712			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7713        fi
7714
7715fi
7716
7717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7718$as_echo "$DEBUG_LEVEL" >&6; }
7719
7720if test "x$DEBUG_LEVEL" != xrelease && \
7721   test "x$DEBUG_LEVEL" != xfastdebug && \
7722   test "x$DEBUG_LEVEL" != xslowdebug; then
7723   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7724fi
7725
7726
7727###############################################################################
7728#
7729# Setup legacy vars/targets and new vars to deal with different debug levels.
7730#
7731
7732case $DEBUG_LEVEL in
7733      release )
7734          VARIANT="OPT"
7735          FASTDEBUG="false"
7736          DEBUG_CLASSFILES="false"
7737          BUILD_VARIANT_RELEASE=""
7738          HOTSPOT_DEBUG_LEVEL="product"
7739          HOTSPOT_EXPORT="product"
7740           ;;
7741      fastdebug )
7742          VARIANT="DBG"
7743          FASTDEBUG="true"
7744          DEBUG_CLASSFILES="true"
7745          BUILD_VARIANT_RELEASE="-fastdebug"
7746          HOTSPOT_DEBUG_LEVEL="fastdebug"
7747          HOTSPOT_EXPORT="fastdebug"
7748           ;;
7749      slowdebug )
7750          VARIANT="DBG"
7751          FASTDEBUG="false"
7752          DEBUG_CLASSFILES="true"
7753          BUILD_VARIANT_RELEASE="-debug"
7754          HOTSPOT_DEBUG_LEVEL="jvmg"
7755          HOTSPOT_EXPORT="debug"
7756           ;;
7757esac
7758
7759#####
7760# Generate the legacy makefile targets for hotspot.
7761# The hotspot api for selecting the build artifacts, really, needs to be improved.
7762# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7763# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7764# But until then ...
7765HOTSPOT_TARGET=""
7766
7767if test "x$JVM_VARIANT_SERVER" = xtrue; then
7768    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7769fi
7770
7771if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7772    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7773fi
7774
7775if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7776    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7777fi
7778
7779if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7780    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7781fi
7782
7783if test "x$JVM_VARIANT_ZERO" = xtrue; then
7784    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7785fi
7786
7787if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7788    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7789fi
7790
7791HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7792
7793# On Macosx universal binaries are produced, but they only contain
7794# 64 bit intel. This invalidates control of which jvms are built
7795# from configure, but only server is valid anyway. Fix this
7796# when hotspot makefiles are rewritten.
7797if test "x$MACOSX_UNIVERSAL" = xtrue; then
7798    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7799fi
7800
7801#####
7802
7803
7804
7805
7806
7807
7808
7809
7810# With basic setup done, call the custom early hook.
7811
7812
7813# To properly create a configuration name, we need to have the OpenJDK target
7814# and options (variants and debug level) parsed.
7815
7816
7817
7818# Check whether --with-conf-name was given.
7819if test "${with_conf_name+set}" = set; then :
7820  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7821fi
7822
7823
7824# Test from where we are running configure, in or outside of src root.
7825# To enable comparison of directories, CURDIR needs to be symlink free
7826# just like SRC_ROOT already is
7827NOSYM_CURDIR="$CURDIR"
7828
7829    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7830        # Follow a chain of symbolic links. Use readlink
7831        # where it exists, else fall back to horribly
7832        # complicated shell code.
7833        if test "x$READLINK_TESTED" != yes; then
7834            # On MacOSX there is a readlink tool with a different
7835            # purpose than the GNU readlink tool. Check the found readlink.
7836            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7837            if test "x$ISGNU" = x; then
7838                 # A readlink that we do not know how to use.
7839                 # Are there other non-GNU readlinks out there?
7840                 READLINK_TESTED=yes
7841                 READLINK=
7842            fi
7843        fi
7844
7845        if test "x$READLINK" != x; then
7846            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7847        else
7848            # Save the current directory for restoring afterwards
7849            STARTDIR=$PWD
7850            COUNTER=0
7851            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7852            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7853            # Use the system pwd and not the shell builtin to resolve directory symlinks
7854            cd $sym_link_dir
7855            cd `$THEPWDCMD`
7856            sym_link_dir=`$THEPWDCMD`
7857            # Resolve file symlinks
7858            while test $COUNTER -lt 20; do
7859                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7860                if test "x$ISLINK" == x; then
7861                    # This is not a symbolic link! We are done!
7862                    break
7863                fi
7864                # Again resolve directory symlinks since the target of the just found
7865                # link could be in a different directory
7866                cd `$DIRNAME $ISLINK`
7867                sym_link_dir=`$THEPWDCMD`
7868                sym_link_file=`$BASENAME $ISLINK`
7869                let COUNTER=COUNTER+1
7870            done
7871            cd $STARTDIR
7872            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7873        fi
7874    fi
7875
7876if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7877        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7878        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7879    # We are running configure from the src root.
7880    # Create a default ./build/target-variant-debuglevel output root.
7881    if test "x${CONF_NAME}" = x; then
7882        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7883    fi
7884    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7885    $MKDIR -p "$OUTPUT_ROOT"
7886    if test ! -d "$OUTPUT_ROOT"; then
7887        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7888    fi
7889else
7890    # We are running configure from outside of the src dir.
7891    # Then use the current directory as output dir!
7892    # If configuration is situated in normal build directory, just use the build
7893    # directory name as configuration name, otherwise use the complete path.
7894    if test "x${CONF_NAME}" = x; then
7895        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7896    fi
7897    OUTPUT_ROOT="$CURDIR"
7898
7899    # WARNING: This might be a bad thing to do. You need to be sure you want to
7900    # have a configuration in this directory. Do some sanity checks!
7901
7902    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7903      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7904      # other files
7905      files_present=`$LS $OUTPUT_ROOT`
7906      # Configure has already touched config.log and confdefs.h in the current dir when this check
7907      # is performed.
7908      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7909                                             | $TR -d '\n'`
7910      if test "x$filtered_files" != x; then
7911        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7912$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7913        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7914$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7915        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7916$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7917        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7918$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7919        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7920$as_echo "$as_me: seriously mess up just about everything." >&6;}
7921        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7922$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7923        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7924$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7925        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7926      fi
7927    fi
7928fi
7929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7930$as_echo_n "checking what configuration name to use... " >&6; }
7931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7932$as_echo "$CONF_NAME" >&6; }
7933
7934
7935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7936
7937  # Input might be given as Windows format, start by converting to
7938  # unix format.
7939  path="$OUTPUT_ROOT"
7940  new_path=`$CYGPATH -u "$path"`
7941
7942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7945  # "foo.exe" is OK but "foo" is an error.
7946  #
7947  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7948  # It is also a way to make sure we got the proper file name for the real test later on.
7949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7950  if test "x$test_shortpath" = x; then
7951    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7952$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7953    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7954  fi
7955
7956  # Call helper function which possibly converts this using DOS-style short mode.
7957  # If so, the updated path is stored in $new_path.
7958
7959  input_path="$new_path"
7960  # Check if we need to convert this using DOS-style short mode. If the path
7961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7962  # take no chances and rewrite it.
7963  # Note: m4 eats our [], so we need to use [ and ] instead.
7964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7965  if test "x$has_forbidden_chars" != x; then
7966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7970      # Going to short mode and back again did indeed matter. Since short mode is
7971      # case insensitive, let's make it lowercase to improve readability.
7972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7973      # Now convert it back to Unix-stile (cygpath)
7974      input_path=`$CYGPATH -u "$shortmode_path"`
7975      new_path="$input_path"
7976    fi
7977  fi
7978
7979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7980  if test "x$test_cygdrive_prefix" = x; then
7981    # As a simple fix, exclude /usr/bin since it's not a real path.
7982    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7984      # a path prefixed by /cygdrive for fixpath to work.
7985      new_path="$CYGWIN_ROOT_PATH$input_path"
7986    fi
7987  fi
7988
7989
7990  if test "x$path" != "x$new_path"; then
7991    OUTPUT_ROOT="$new_path"
7992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7993$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7994  fi
7995
7996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7997
7998  path="$OUTPUT_ROOT"
7999  has_colon=`$ECHO $path | $GREP ^.:`
8000  new_path="$path"
8001  if test "x$has_colon" = x; then
8002    # Not in mixed or Windows style, start by that.
8003    new_path=`cmd //c echo $path`
8004  fi
8005
8006
8007  input_path="$new_path"
8008  # Check if we need to convert this using DOS-style short mode. If the path
8009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8010  # take no chances and rewrite it.
8011  # Note: m4 eats our [], so we need to use [ and ] instead.
8012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8013  if test "x$has_forbidden_chars" != x; then
8014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8016  fi
8017
8018
8019  windows_path="$new_path"
8020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8021    unix_path=`$CYGPATH -u "$windows_path"`
8022    new_path="$unix_path"
8023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8025    new_path="$unix_path"
8026  fi
8027
8028  if test "x$path" != "x$new_path"; then
8029    OUTPUT_ROOT="$new_path"
8030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8031$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8032  fi
8033
8034  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8035  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8036
8037  else
8038    # We're on a posix platform. Hooray! :)
8039    path="$OUTPUT_ROOT"
8040
8041    if test ! -f "$path" && test ! -d "$path"; then
8042      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8043    fi
8044
8045    has_space=`$ECHO "$path" | $GREP " "`
8046    if test "x$has_space" != x; then
8047      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8048$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8049      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8050    fi
8051  fi
8052
8053
8054SPEC=$OUTPUT_ROOT/spec.gmk
8055
8056CONF_NAME=$CONF_NAME
8057
8058OUTPUT_ROOT=$OUTPUT_ROOT
8059
8060
8061# Most of the probed defines are put into config.h
8062ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8063
8064# The spec.gmk file contains all variables for the make system.
8065ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8066
8067# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8068ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8069
8070# The bootcycle-spec.gmk file contains support for boot cycle builds.
8071ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8072
8073# The compare.sh is used to compare the build output to other builds.
8074ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8075
8076# Spec.sh is currently used by compare-objects.sh
8077ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8078
8079# The generated Makefile knows where the spec.gmk is and where the source is.
8080# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8081# which will look for generated configurations
8082ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8083
8084
8085# Save the arguments given to us
8086echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8087
8088
8089# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8090
8091    for ac_prog in apt-get yum port pkgutil pkgadd
8092do
8093  # Extract the first word of "$ac_prog", so it can be a program name with args.
8094set dummy $ac_prog; ac_word=$2
8095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8096$as_echo_n "checking for $ac_word... " >&6; }
8097if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8098  $as_echo_n "(cached) " >&6
8099else
8100  if test -n "$PKGHANDLER"; then
8101  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8102else
8103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8104for as_dir in $PATH
8105do
8106  IFS=$as_save_IFS
8107  test -z "$as_dir" && as_dir=.
8108    for ac_exec_ext in '' $ac_executable_extensions; do
8109  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8110    ac_cv_prog_PKGHANDLER="$ac_prog"
8111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8112    break 2
8113  fi
8114done
8115  done
8116IFS=$as_save_IFS
8117
8118fi
8119fi
8120PKGHANDLER=$ac_cv_prog_PKGHANDLER
8121if test -n "$PKGHANDLER"; then
8122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8123$as_echo "$PKGHANDLER" >&6; }
8124else
8125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8126$as_echo "no" >&6; }
8127fi
8128
8129
8130  test -n "$PKGHANDLER" && break
8131done
8132
8133
8134
8135# Setup tools that requires more complex handling, or that is not needed by the configure script.
8136
8137
8138  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8139  if test "x$MAKE" != x; then
8140    # User has supplied a make, test it.
8141    if test ! -f "$MAKE"; then
8142      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8143    fi
8144
8145  MAKE_CANDIDATE=""$MAKE""
8146  DESCRIPTION="user supplied MAKE=$MAKE"
8147  if test "x$MAKE_CANDIDATE" != x; then
8148    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8149$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8150    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8151    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8152    if test "x$IS_GNU_MAKE" = x; then
8153      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8154$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8155    else
8156      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8157      if test "x$IS_MODERN_MAKE" = x; then
8158        { $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
8159$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;}
8160      else
8161        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8162          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8163            MAKE_EXPECTED_ENV='cygwin'
8164          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8165            MAKE_EXPECTED_ENV='msys'
8166          else
8167            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8168          fi
8169          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8170          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8171        else
8172          # Not relevant for non-Windows
8173          IS_MAKE_CORRECT_ENV=true
8174        fi
8175        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8176          { $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
8177$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;}
8178        else
8179          FOUND_MAKE=$MAKE_CANDIDATE
8180
8181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8182
8183  # First separate the path from the arguments. This will split at the first
8184  # space.
8185  complete="$FOUND_MAKE"
8186  path="${complete%% *}"
8187  tmp="$complete EOL"
8188  arguments="${tmp#* }"
8189
8190  # Input might be given as Windows format, start by converting to
8191  # unix format.
8192  new_path=`$CYGPATH -u "$path"`
8193
8194  # Now try to locate executable using which
8195  new_path=`$WHICH "$new_path" 2> /dev/null`
8196  # bat and cmd files are not always considered executable in cygwin causing which
8197  # to not find them
8198  if test "x$new_path" = x \
8199           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8200           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8201    new_path=`$CYGPATH -u "$path"`
8202  fi
8203  if test "x$new_path" = x; then
8204    # Oops. Which didn't find the executable.
8205    # The splitting of arguments from the executable at a space might have been incorrect,
8206    # since paths with space are more likely in Windows. Give it another try with the whole
8207    # argument.
8208    path="$complete"
8209    arguments="EOL"
8210    new_path=`$CYGPATH -u "$path"`
8211    new_path=`$WHICH "$new_path" 2> /dev/null`
8212    # bat and cmd files are not always considered executable in cygwin causing which
8213    # to not find them
8214    if test "x$new_path" = x \
8215             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8216             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8217      new_path=`$CYGPATH -u "$path"`
8218    fi
8219    if test "x$new_path" = x; then
8220      # It's still not found. Now this is an unrecoverable error.
8221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8222$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8223      has_space=`$ECHO "$complete" | $GREP " "`
8224      if test "x$has_space" != x; then
8225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8227      fi
8228      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8229    fi
8230  fi
8231
8232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8235  # "foo.exe" is OK but "foo" is an error.
8236  #
8237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8238  # It is also a way to make sure we got the proper file name for the real test later on.
8239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8240  if test "x$test_shortpath" = x; then
8241    # Short path failed, file does not exist as specified.
8242    # Try adding .exe or .cmd
8243    if test -f "${new_path}.exe"; then
8244       input_to_shortpath="${new_path}.exe"
8245    elif test -f "${new_path}.cmd"; then
8246       input_to_shortpath="${new_path}.cmd"
8247    else
8248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8249$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8250      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8251$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8252      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8253    fi
8254  else
8255    input_to_shortpath="$new_path"
8256  fi
8257
8258  # Call helper function which possibly converts this using DOS-style short mode.
8259  # If so, the updated path is stored in $new_path.
8260  new_path="$input_to_shortpath"
8261
8262  input_path="$input_to_shortpath"
8263  # Check if we need to convert this using DOS-style short mode. If the path
8264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8265  # take no chances and rewrite it.
8266  # Note: m4 eats our [], so we need to use [ and ] instead.
8267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8268  if test "x$has_forbidden_chars" != x; then
8269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8273      # Going to short mode and back again did indeed matter. Since short mode is
8274      # case insensitive, let's make it lowercase to improve readability.
8275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8276      # Now convert it back to Unix-stile (cygpath)
8277      input_path=`$CYGPATH -u "$shortmode_path"`
8278      new_path="$input_path"
8279    fi
8280  fi
8281
8282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8283  if test "x$test_cygdrive_prefix" = x; then
8284    # As a simple fix, exclude /usr/bin since it's not a real path.
8285    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8287      # a path prefixed by /cygdrive for fixpath to work.
8288      new_path="$CYGWIN_ROOT_PATH$input_path"
8289    fi
8290  fi
8291
8292  # remove trailing .exe if any
8293  new_path="${new_path/%.exe/}"
8294
8295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8296
8297  # First separate the path from the arguments. This will split at the first
8298  # space.
8299  complete="$FOUND_MAKE"
8300  path="${complete%% *}"
8301  tmp="$complete EOL"
8302  arguments="${tmp#* }"
8303
8304  # Input might be given as Windows format, start by converting to
8305  # unix format.
8306  new_path="$path"
8307
8308  windows_path="$new_path"
8309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8310    unix_path=`$CYGPATH -u "$windows_path"`
8311    new_path="$unix_path"
8312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8314    new_path="$unix_path"
8315  fi
8316
8317
8318  # Now try to locate executable using which
8319  new_path=`$WHICH "$new_path" 2> /dev/null`
8320
8321  if test "x$new_path" = x; then
8322    # Oops. Which didn't find the executable.
8323    # The splitting of arguments from the executable at a space might have been incorrect,
8324    # since paths with space are more likely in Windows. Give it another try with the whole
8325    # argument.
8326    path="$complete"
8327    arguments="EOL"
8328    new_path="$path"
8329
8330  windows_path="$new_path"
8331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8332    unix_path=`$CYGPATH -u "$windows_path"`
8333    new_path="$unix_path"
8334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8336    new_path="$unix_path"
8337  fi
8338
8339
8340    new_path=`$WHICH "$new_path" 2> /dev/null`
8341
8342    if test "x$new_path" = x; then
8343      # It's still not found. Now this is an unrecoverable error.
8344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8345$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8346      has_space=`$ECHO "$complete" | $GREP " "`
8347      if test "x$has_space" != x; then
8348        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8349$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8350      fi
8351      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8352    fi
8353  fi
8354
8355  # Now new_path has a complete unix path to the binary
8356  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8357    # Keep paths in /bin as-is, but remove trailing .exe if any
8358    new_path="${new_path/%.exe/}"
8359    # Do not save /bin paths to all_fixpath_prefixes!
8360  else
8361    # Not in mixed or Windows style, start by that.
8362    new_path=`cmd //c echo $new_path`
8363
8364  input_path="$new_path"
8365  # Check if we need to convert this using DOS-style short mode. If the path
8366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8367  # take no chances and rewrite it.
8368  # Note: m4 eats our [], so we need to use [ and ] instead.
8369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8370  if test "x$has_forbidden_chars" != x; then
8371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8373  fi
8374
8375    # Output is in $new_path
8376
8377  windows_path="$new_path"
8378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8379    unix_path=`$CYGPATH -u "$windows_path"`
8380    new_path="$unix_path"
8381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8383    new_path="$unix_path"
8384  fi
8385
8386    # remove trailing .exe if any
8387    new_path="${new_path/%.exe/}"
8388
8389    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8390    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8391  fi
8392
8393  else
8394    # We're on a posix platform. Hooray! :)
8395    # First separate the path from the arguments. This will split at the first
8396    # space.
8397    complete="$FOUND_MAKE"
8398    path="${complete%% *}"
8399    tmp="$complete EOL"
8400    arguments="${tmp#* }"
8401
8402    # Cannot rely on the command "which" here since it doesn't always work.
8403    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8404    if test -z "$is_absolute_path"; then
8405      # Path to executable is not absolute. Find it.
8406      IFS_save="$IFS"
8407      IFS=:
8408      for p in $PATH; do
8409        if test -f "$p/$path" && test -x "$p/$path"; then
8410          new_path="$p/$path"
8411          break
8412        fi
8413      done
8414      IFS="$IFS_save"
8415    else
8416      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8417$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8418      new_path="$path"
8419    fi
8420
8421    if test "x$new_path" = x; then
8422        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8423$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8424        has_space=`$ECHO "$complete" | $GREP " "`
8425        if test "x$has_space" != x; then
8426          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8427$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8428        fi
8429        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8430      fi
8431  fi
8432
8433      # Now join together the path and the arguments once again
8434      if test "x$arguments" != xEOL; then
8435        new_complete="$new_path ${arguments% *}"
8436      else
8437        new_complete="$new_path"
8438      fi
8439
8440  if test "x$complete" != "x$new_complete"; then
8441      FOUND_MAKE="$new_complete"
8442      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8443$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8444    fi
8445
8446        fi
8447      fi
8448    fi
8449  fi
8450
8451    if test "x$FOUND_MAKE" = x; then
8452      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8453    fi
8454  else
8455    # Try our hardest to locate a correct version of GNU make
8456    for ac_prog in gmake
8457do
8458  # Extract the first word of "$ac_prog", so it can be a program name with args.
8459set dummy $ac_prog; ac_word=$2
8460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8461$as_echo_n "checking for $ac_word... " >&6; }
8462if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8463  $as_echo_n "(cached) " >&6
8464else
8465  case $CHECK_GMAKE in
8466  [\\/]* | ?:[\\/]*)
8467  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8468  ;;
8469  *)
8470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8471for as_dir in $PATH
8472do
8473  IFS=$as_save_IFS
8474  test -z "$as_dir" && as_dir=.
8475    for ac_exec_ext in '' $ac_executable_extensions; do
8476  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8477    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8479    break 2
8480  fi
8481done
8482  done
8483IFS=$as_save_IFS
8484
8485  ;;
8486esac
8487fi
8488CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8489if test -n "$CHECK_GMAKE"; then
8490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8491$as_echo "$CHECK_GMAKE" >&6; }
8492else
8493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8494$as_echo "no" >&6; }
8495fi
8496
8497
8498  test -n "$CHECK_GMAKE" && break
8499done
8500
8501
8502  MAKE_CANDIDATE=""$CHECK_GMAKE""
8503  DESCRIPTION="gmake in PATH"
8504  if test "x$MAKE_CANDIDATE" != x; then
8505    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8506$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8507    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8508    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8509    if test "x$IS_GNU_MAKE" = x; then
8510      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8511$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8512    else
8513      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8514      if test "x$IS_MODERN_MAKE" = x; then
8515        { $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
8516$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;}
8517      else
8518        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8519          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8520            MAKE_EXPECTED_ENV='cygwin'
8521          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8522            MAKE_EXPECTED_ENV='msys'
8523          else
8524            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8525          fi
8526          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8527          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8528        else
8529          # Not relevant for non-Windows
8530          IS_MAKE_CORRECT_ENV=true
8531        fi
8532        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8533          { $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
8534$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;}
8535        else
8536          FOUND_MAKE=$MAKE_CANDIDATE
8537
8538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8539
8540  # First separate the path from the arguments. This will split at the first
8541  # space.
8542  complete="$FOUND_MAKE"
8543  path="${complete%% *}"
8544  tmp="$complete EOL"
8545  arguments="${tmp#* }"
8546
8547  # Input might be given as Windows format, start by converting to
8548  # unix format.
8549  new_path=`$CYGPATH -u "$path"`
8550
8551  # Now try to locate executable using which
8552  new_path=`$WHICH "$new_path" 2> /dev/null`
8553  # bat and cmd files are not always considered executable in cygwin causing which
8554  # to not find them
8555  if test "x$new_path" = x \
8556           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8557           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8558    new_path=`$CYGPATH -u "$path"`
8559  fi
8560  if test "x$new_path" = x; then
8561    # Oops. Which didn't find the executable.
8562    # The splitting of arguments from the executable at a space might have been incorrect,
8563    # since paths with space are more likely in Windows. Give it another try with the whole
8564    # argument.
8565    path="$complete"
8566    arguments="EOL"
8567    new_path=`$CYGPATH -u "$path"`
8568    new_path=`$WHICH "$new_path" 2> /dev/null`
8569    # bat and cmd files are not always considered executable in cygwin causing which
8570    # to not find them
8571    if test "x$new_path" = x \
8572             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8573             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8574      new_path=`$CYGPATH -u "$path"`
8575    fi
8576    if test "x$new_path" = x; then
8577      # It's still not found. Now this is an unrecoverable error.
8578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8579$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8580      has_space=`$ECHO "$complete" | $GREP " "`
8581      if test "x$has_space" != x; then
8582        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8583$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8584      fi
8585      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8586    fi
8587  fi
8588
8589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8592  # "foo.exe" is OK but "foo" is an error.
8593  #
8594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8595  # It is also a way to make sure we got the proper file name for the real test later on.
8596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8597  if test "x$test_shortpath" = x; then
8598    # Short path failed, file does not exist as specified.
8599    # Try adding .exe or .cmd
8600    if test -f "${new_path}.exe"; then
8601       input_to_shortpath="${new_path}.exe"
8602    elif test -f "${new_path}.cmd"; then
8603       input_to_shortpath="${new_path}.cmd"
8604    else
8605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8606$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8607      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8608$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8609      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8610    fi
8611  else
8612    input_to_shortpath="$new_path"
8613  fi
8614
8615  # Call helper function which possibly converts this using DOS-style short mode.
8616  # If so, the updated path is stored in $new_path.
8617  new_path="$input_to_shortpath"
8618
8619  input_path="$input_to_shortpath"
8620  # Check if we need to convert this using DOS-style short mode. If the path
8621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8622  # take no chances and rewrite it.
8623  # Note: m4 eats our [], so we need to use [ and ] instead.
8624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8625  if test "x$has_forbidden_chars" != x; then
8626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8627    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8628    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8629    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8630      # Going to short mode and back again did indeed matter. Since short mode is
8631      # case insensitive, let's make it lowercase to improve readability.
8632      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8633      # Now convert it back to Unix-stile (cygpath)
8634      input_path=`$CYGPATH -u "$shortmode_path"`
8635      new_path="$input_path"
8636    fi
8637  fi
8638
8639  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8640  if test "x$test_cygdrive_prefix" = x; then
8641    # As a simple fix, exclude /usr/bin since it's not a real path.
8642    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8643      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8644      # a path prefixed by /cygdrive for fixpath to work.
8645      new_path="$CYGWIN_ROOT_PATH$input_path"
8646    fi
8647  fi
8648
8649  # remove trailing .exe if any
8650  new_path="${new_path/%.exe/}"
8651
8652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8653
8654  # First separate the path from the arguments. This will split at the first
8655  # space.
8656  complete="$FOUND_MAKE"
8657  path="${complete%% *}"
8658  tmp="$complete EOL"
8659  arguments="${tmp#* }"
8660
8661  # Input might be given as Windows format, start by converting to
8662  # unix format.
8663  new_path="$path"
8664
8665  windows_path="$new_path"
8666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8667    unix_path=`$CYGPATH -u "$windows_path"`
8668    new_path="$unix_path"
8669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8671    new_path="$unix_path"
8672  fi
8673
8674
8675  # Now try to locate executable using which
8676  new_path=`$WHICH "$new_path" 2> /dev/null`
8677
8678  if test "x$new_path" = x; then
8679    # Oops. Which didn't find the executable.
8680    # The splitting of arguments from the executable at a space might have been incorrect,
8681    # since paths with space are more likely in Windows. Give it another try with the whole
8682    # argument.
8683    path="$complete"
8684    arguments="EOL"
8685    new_path="$path"
8686
8687  windows_path="$new_path"
8688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8689    unix_path=`$CYGPATH -u "$windows_path"`
8690    new_path="$unix_path"
8691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8693    new_path="$unix_path"
8694  fi
8695
8696
8697    new_path=`$WHICH "$new_path" 2> /dev/null`
8698
8699    if test "x$new_path" = x; then
8700      # It's still not found. Now this is an unrecoverable error.
8701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8702$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8703      has_space=`$ECHO "$complete" | $GREP " "`
8704      if test "x$has_space" != x; then
8705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8707      fi
8708      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8709    fi
8710  fi
8711
8712  # Now new_path has a complete unix path to the binary
8713  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8714    # Keep paths in /bin as-is, but remove trailing .exe if any
8715    new_path="${new_path/%.exe/}"
8716    # Do not save /bin paths to all_fixpath_prefixes!
8717  else
8718    # Not in mixed or Windows style, start by that.
8719    new_path=`cmd //c echo $new_path`
8720
8721  input_path="$new_path"
8722  # Check if we need to convert this using DOS-style short mode. If the path
8723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8724  # take no chances and rewrite it.
8725  # Note: m4 eats our [], so we need to use [ and ] instead.
8726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8727  if test "x$has_forbidden_chars" != x; then
8728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8730  fi
8731
8732    # Output is in $new_path
8733
8734  windows_path="$new_path"
8735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8736    unix_path=`$CYGPATH -u "$windows_path"`
8737    new_path="$unix_path"
8738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8740    new_path="$unix_path"
8741  fi
8742
8743    # remove trailing .exe if any
8744    new_path="${new_path/%.exe/}"
8745
8746    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8747    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8748  fi
8749
8750  else
8751    # We're on a posix platform. Hooray! :)
8752    # First separate the path from the arguments. This will split at the first
8753    # space.
8754    complete="$FOUND_MAKE"
8755    path="${complete%% *}"
8756    tmp="$complete EOL"
8757    arguments="${tmp#* }"
8758
8759    # Cannot rely on the command "which" here since it doesn't always work.
8760    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8761    if test -z "$is_absolute_path"; then
8762      # Path to executable is not absolute. Find it.
8763      IFS_save="$IFS"
8764      IFS=:
8765      for p in $PATH; do
8766        if test -f "$p/$path" && test -x "$p/$path"; then
8767          new_path="$p/$path"
8768          break
8769        fi
8770      done
8771      IFS="$IFS_save"
8772    else
8773      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8774$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8775      new_path="$path"
8776    fi
8777
8778    if test "x$new_path" = x; then
8779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8780$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8781        has_space=`$ECHO "$complete" | $GREP " "`
8782        if test "x$has_space" != x; then
8783          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8785        fi
8786        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8787      fi
8788  fi
8789
8790      # Now join together the path and the arguments once again
8791      if test "x$arguments" != xEOL; then
8792        new_complete="$new_path ${arguments% *}"
8793      else
8794        new_complete="$new_path"
8795      fi
8796
8797  if test "x$complete" != "x$new_complete"; then
8798      FOUND_MAKE="$new_complete"
8799      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8800$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8801    fi
8802
8803        fi
8804      fi
8805    fi
8806  fi
8807
8808
8809    if test "x$FOUND_MAKE" = x; then
8810      for ac_prog in make
8811do
8812  # Extract the first word of "$ac_prog", so it can be a program name with args.
8813set dummy $ac_prog; ac_word=$2
8814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8815$as_echo_n "checking for $ac_word... " >&6; }
8816if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8817  $as_echo_n "(cached) " >&6
8818else
8819  case $CHECK_MAKE in
8820  [\\/]* | ?:[\\/]*)
8821  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8822  ;;
8823  *)
8824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8825for as_dir in $PATH
8826do
8827  IFS=$as_save_IFS
8828  test -z "$as_dir" && as_dir=.
8829    for ac_exec_ext in '' $ac_executable_extensions; do
8830  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8831    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8833    break 2
8834  fi
8835done
8836  done
8837IFS=$as_save_IFS
8838
8839  ;;
8840esac
8841fi
8842CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8843if test -n "$CHECK_MAKE"; then
8844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8845$as_echo "$CHECK_MAKE" >&6; }
8846else
8847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8848$as_echo "no" >&6; }
8849fi
8850
8851
8852  test -n "$CHECK_MAKE" && break
8853done
8854
8855
8856  MAKE_CANDIDATE=""$CHECK_MAKE""
8857  DESCRIPTION="make in PATH"
8858  if test "x$MAKE_CANDIDATE" != x; then
8859    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8860$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8861    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8862    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8863    if test "x$IS_GNU_MAKE" = x; then
8864      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8865$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8866    else
8867      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8868      if test "x$IS_MODERN_MAKE" = x; then
8869        { $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
8870$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;}
8871      else
8872        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8873          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8874            MAKE_EXPECTED_ENV='cygwin'
8875          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8876            MAKE_EXPECTED_ENV='msys'
8877          else
8878            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8879          fi
8880          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8881          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8882        else
8883          # Not relevant for non-Windows
8884          IS_MAKE_CORRECT_ENV=true
8885        fi
8886        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8887          { $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
8888$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;}
8889        else
8890          FOUND_MAKE=$MAKE_CANDIDATE
8891
8892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8893
8894  # First separate the path from the arguments. This will split at the first
8895  # space.
8896  complete="$FOUND_MAKE"
8897  path="${complete%% *}"
8898  tmp="$complete EOL"
8899  arguments="${tmp#* }"
8900
8901  # Input might be given as Windows format, start by converting to
8902  # unix format.
8903  new_path=`$CYGPATH -u "$path"`
8904
8905  # Now try to locate executable using which
8906  new_path=`$WHICH "$new_path" 2> /dev/null`
8907  # bat and cmd files are not always considered executable in cygwin causing which
8908  # to not find them
8909  if test "x$new_path" = x \
8910           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8911           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8912    new_path=`$CYGPATH -u "$path"`
8913  fi
8914  if test "x$new_path" = x; then
8915    # Oops. Which didn't find the executable.
8916    # The splitting of arguments from the executable at a space might have been incorrect,
8917    # since paths with space are more likely in Windows. Give it another try with the whole
8918    # argument.
8919    path="$complete"
8920    arguments="EOL"
8921    new_path=`$CYGPATH -u "$path"`
8922    new_path=`$WHICH "$new_path" 2> /dev/null`
8923    # bat and cmd files are not always considered executable in cygwin causing which
8924    # to not find them
8925    if test "x$new_path" = x \
8926             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8927             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8928      new_path=`$CYGPATH -u "$path"`
8929    fi
8930    if test "x$new_path" = x; then
8931      # It's still not found. Now this is an unrecoverable error.
8932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8933$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8934      has_space=`$ECHO "$complete" | $GREP " "`
8935      if test "x$has_space" != x; then
8936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8938      fi
8939      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8940    fi
8941  fi
8942
8943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8946  # "foo.exe" is OK but "foo" is an error.
8947  #
8948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8949  # It is also a way to make sure we got the proper file name for the real test later on.
8950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8951  if test "x$test_shortpath" = x; then
8952    # Short path failed, file does not exist as specified.
8953    # Try adding .exe or .cmd
8954    if test -f "${new_path}.exe"; then
8955       input_to_shortpath="${new_path}.exe"
8956    elif test -f "${new_path}.cmd"; then
8957       input_to_shortpath="${new_path}.cmd"
8958    else
8959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8960$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8961      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8962$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8963      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8964    fi
8965  else
8966    input_to_shortpath="$new_path"
8967  fi
8968
8969  # Call helper function which possibly converts this using DOS-style short mode.
8970  # If so, the updated path is stored in $new_path.
8971  new_path="$input_to_shortpath"
8972
8973  input_path="$input_to_shortpath"
8974  # Check if we need to convert this using DOS-style short mode. If the path
8975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8976  # take no chances and rewrite it.
8977  # Note: m4 eats our [], so we need to use [ and ] instead.
8978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8979  if test "x$has_forbidden_chars" != x; then
8980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8984      # Going to short mode and back again did indeed matter. Since short mode is
8985      # case insensitive, let's make it lowercase to improve readability.
8986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8987      # Now convert it back to Unix-stile (cygpath)
8988      input_path=`$CYGPATH -u "$shortmode_path"`
8989      new_path="$input_path"
8990    fi
8991  fi
8992
8993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8994  if test "x$test_cygdrive_prefix" = x; then
8995    # As a simple fix, exclude /usr/bin since it's not a real path.
8996    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8998      # a path prefixed by /cygdrive for fixpath to work.
8999      new_path="$CYGWIN_ROOT_PATH$input_path"
9000    fi
9001  fi
9002
9003  # remove trailing .exe if any
9004  new_path="${new_path/%.exe/}"
9005
9006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9007
9008  # First separate the path from the arguments. This will split at the first
9009  # space.
9010  complete="$FOUND_MAKE"
9011  path="${complete%% *}"
9012  tmp="$complete EOL"
9013  arguments="${tmp#* }"
9014
9015  # Input might be given as Windows format, start by converting to
9016  # unix format.
9017  new_path="$path"
9018
9019  windows_path="$new_path"
9020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9021    unix_path=`$CYGPATH -u "$windows_path"`
9022    new_path="$unix_path"
9023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9025    new_path="$unix_path"
9026  fi
9027
9028
9029  # Now try to locate executable using which
9030  new_path=`$WHICH "$new_path" 2> /dev/null`
9031
9032  if test "x$new_path" = x; then
9033    # Oops. Which didn't find the executable.
9034    # The splitting of arguments from the executable at a space might have been incorrect,
9035    # since paths with space are more likely in Windows. Give it another try with the whole
9036    # argument.
9037    path="$complete"
9038    arguments="EOL"
9039    new_path="$path"
9040
9041  windows_path="$new_path"
9042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9043    unix_path=`$CYGPATH -u "$windows_path"`
9044    new_path="$unix_path"
9045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9047    new_path="$unix_path"
9048  fi
9049
9050
9051    new_path=`$WHICH "$new_path" 2> /dev/null`
9052
9053    if test "x$new_path" = x; then
9054      # It's still not found. Now this is an unrecoverable error.
9055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9056$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9057      has_space=`$ECHO "$complete" | $GREP " "`
9058      if test "x$has_space" != x; then
9059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9061      fi
9062      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9063    fi
9064  fi
9065
9066  # Now new_path has a complete unix path to the binary
9067  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9068    # Keep paths in /bin as-is, but remove trailing .exe if any
9069    new_path="${new_path/%.exe/}"
9070    # Do not save /bin paths to all_fixpath_prefixes!
9071  else
9072    # Not in mixed or Windows style, start by that.
9073    new_path=`cmd //c echo $new_path`
9074
9075  input_path="$new_path"
9076  # Check if we need to convert this using DOS-style short mode. If the path
9077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9078  # take no chances and rewrite it.
9079  # Note: m4 eats our [], so we need to use [ and ] instead.
9080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9081  if test "x$has_forbidden_chars" != x; then
9082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9084  fi
9085
9086    # Output is in $new_path
9087
9088  windows_path="$new_path"
9089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9090    unix_path=`$CYGPATH -u "$windows_path"`
9091    new_path="$unix_path"
9092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9094    new_path="$unix_path"
9095  fi
9096
9097    # remove trailing .exe if any
9098    new_path="${new_path/%.exe/}"
9099
9100    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9101    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9102  fi
9103
9104  else
9105    # We're on a posix platform. Hooray! :)
9106    # First separate the path from the arguments. This will split at the first
9107    # space.
9108    complete="$FOUND_MAKE"
9109    path="${complete%% *}"
9110    tmp="$complete EOL"
9111    arguments="${tmp#* }"
9112
9113    # Cannot rely on the command "which" here since it doesn't always work.
9114    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9115    if test -z "$is_absolute_path"; then
9116      # Path to executable is not absolute. Find it.
9117      IFS_save="$IFS"
9118      IFS=:
9119      for p in $PATH; do
9120        if test -f "$p/$path" && test -x "$p/$path"; then
9121          new_path="$p/$path"
9122          break
9123        fi
9124      done
9125      IFS="$IFS_save"
9126    else
9127      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9128$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9129      new_path="$path"
9130    fi
9131
9132    if test "x$new_path" = x; then
9133        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9134$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9135        has_space=`$ECHO "$complete" | $GREP " "`
9136        if test "x$has_space" != x; then
9137          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9138$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9139        fi
9140        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9141      fi
9142  fi
9143
9144      # Now join together the path and the arguments once again
9145      if test "x$arguments" != xEOL; then
9146        new_complete="$new_path ${arguments% *}"
9147      else
9148        new_complete="$new_path"
9149      fi
9150
9151  if test "x$complete" != "x$new_complete"; then
9152      FOUND_MAKE="$new_complete"
9153      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9154$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9155    fi
9156
9157        fi
9158      fi
9159    fi
9160  fi
9161
9162    fi
9163
9164    if test "x$FOUND_MAKE" = x; then
9165      if test "x$TOOLS_DIR" != x; then
9166        # We have a tools-dir, check that as well before giving up.
9167        OLD_PATH=$PATH
9168        PATH=$TOOLS_DIR:$PATH
9169        for ac_prog in gmake
9170do
9171  # Extract the first word of "$ac_prog", so it can be a program name with args.
9172set dummy $ac_prog; ac_word=$2
9173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9174$as_echo_n "checking for $ac_word... " >&6; }
9175if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9176  $as_echo_n "(cached) " >&6
9177else
9178  case $CHECK_TOOLSDIR_GMAKE in
9179  [\\/]* | ?:[\\/]*)
9180  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9181  ;;
9182  *)
9183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9184for as_dir in $PATH
9185do
9186  IFS=$as_save_IFS
9187  test -z "$as_dir" && as_dir=.
9188    for ac_exec_ext in '' $ac_executable_extensions; do
9189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9190    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9192    break 2
9193  fi
9194done
9195  done
9196IFS=$as_save_IFS
9197
9198  ;;
9199esac
9200fi
9201CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9202if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9204$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9205else
9206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9207$as_echo "no" >&6; }
9208fi
9209
9210
9211  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9212done
9213
9214
9215  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9216  DESCRIPTION="gmake in tools-dir"
9217  if test "x$MAKE_CANDIDATE" != x; then
9218    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9219$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9220    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9221    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9222    if test "x$IS_GNU_MAKE" = x; then
9223      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9224$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9225    else
9226      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9227      if test "x$IS_MODERN_MAKE" = x; then
9228        { $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
9229$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;}
9230      else
9231        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9232          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9233            MAKE_EXPECTED_ENV='cygwin'
9234          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9235            MAKE_EXPECTED_ENV='msys'
9236          else
9237            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9238          fi
9239          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9240          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9241        else
9242          # Not relevant for non-Windows
9243          IS_MAKE_CORRECT_ENV=true
9244        fi
9245        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9246          { $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
9247$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;}
9248        else
9249          FOUND_MAKE=$MAKE_CANDIDATE
9250
9251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9252
9253  # First separate the path from the arguments. This will split at the first
9254  # space.
9255  complete="$FOUND_MAKE"
9256  path="${complete%% *}"
9257  tmp="$complete EOL"
9258  arguments="${tmp#* }"
9259
9260  # Input might be given as Windows format, start by converting to
9261  # unix format.
9262  new_path=`$CYGPATH -u "$path"`
9263
9264  # Now try to locate executable using which
9265  new_path=`$WHICH "$new_path" 2> /dev/null`
9266  # bat and cmd files are not always considered executable in cygwin causing which
9267  # to not find them
9268  if test "x$new_path" = x \
9269           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9270           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9271    new_path=`$CYGPATH -u "$path"`
9272  fi
9273  if test "x$new_path" = x; then
9274    # Oops. Which didn't find the executable.
9275    # The splitting of arguments from the executable at a space might have been incorrect,
9276    # since paths with space are more likely in Windows. Give it another try with the whole
9277    # argument.
9278    path="$complete"
9279    arguments="EOL"
9280    new_path=`$CYGPATH -u "$path"`
9281    new_path=`$WHICH "$new_path" 2> /dev/null`
9282    # bat and cmd files are not always considered executable in cygwin causing which
9283    # to not find them
9284    if test "x$new_path" = x \
9285             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9286             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9287      new_path=`$CYGPATH -u "$path"`
9288    fi
9289    if test "x$new_path" = x; then
9290      # It's still not found. Now this is an unrecoverable error.
9291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9292$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9293      has_space=`$ECHO "$complete" | $GREP " "`
9294      if test "x$has_space" != x; then
9295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9297      fi
9298      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9299    fi
9300  fi
9301
9302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9305  # "foo.exe" is OK but "foo" is an error.
9306  #
9307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9308  # It is also a way to make sure we got the proper file name for the real test later on.
9309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9310  if test "x$test_shortpath" = x; then
9311    # Short path failed, file does not exist as specified.
9312    # Try adding .exe or .cmd
9313    if test -f "${new_path}.exe"; then
9314       input_to_shortpath="${new_path}.exe"
9315    elif test -f "${new_path}.cmd"; then
9316       input_to_shortpath="${new_path}.cmd"
9317    else
9318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9319$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9320      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9321$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9322      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9323    fi
9324  else
9325    input_to_shortpath="$new_path"
9326  fi
9327
9328  # Call helper function which possibly converts this using DOS-style short mode.
9329  # If so, the updated path is stored in $new_path.
9330  new_path="$input_to_shortpath"
9331
9332  input_path="$input_to_shortpath"
9333  # Check if we need to convert this using DOS-style short mode. If the path
9334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9335  # take no chances and rewrite it.
9336  # Note: m4 eats our [], so we need to use [ and ] instead.
9337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9338  if test "x$has_forbidden_chars" != x; then
9339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9343      # Going to short mode and back again did indeed matter. Since short mode is
9344      # case insensitive, let's make it lowercase to improve readability.
9345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9346      # Now convert it back to Unix-stile (cygpath)
9347      input_path=`$CYGPATH -u "$shortmode_path"`
9348      new_path="$input_path"
9349    fi
9350  fi
9351
9352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9353  if test "x$test_cygdrive_prefix" = x; then
9354    # As a simple fix, exclude /usr/bin since it's not a real path.
9355    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9357      # a path prefixed by /cygdrive for fixpath to work.
9358      new_path="$CYGWIN_ROOT_PATH$input_path"
9359    fi
9360  fi
9361
9362  # remove trailing .exe if any
9363  new_path="${new_path/%.exe/}"
9364
9365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9366
9367  # First separate the path from the arguments. This will split at the first
9368  # space.
9369  complete="$FOUND_MAKE"
9370  path="${complete%% *}"
9371  tmp="$complete EOL"
9372  arguments="${tmp#* }"
9373
9374  # Input might be given as Windows format, start by converting to
9375  # unix format.
9376  new_path="$path"
9377
9378  windows_path="$new_path"
9379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9380    unix_path=`$CYGPATH -u "$windows_path"`
9381    new_path="$unix_path"
9382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9384    new_path="$unix_path"
9385  fi
9386
9387
9388  # Now try to locate executable using which
9389  new_path=`$WHICH "$new_path" 2> /dev/null`
9390
9391  if test "x$new_path" = x; then
9392    # Oops. Which didn't find the executable.
9393    # The splitting of arguments from the executable at a space might have been incorrect,
9394    # since paths with space are more likely in Windows. Give it another try with the whole
9395    # argument.
9396    path="$complete"
9397    arguments="EOL"
9398    new_path="$path"
9399
9400  windows_path="$new_path"
9401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9402    unix_path=`$CYGPATH -u "$windows_path"`
9403    new_path="$unix_path"
9404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9406    new_path="$unix_path"
9407  fi
9408
9409
9410    new_path=`$WHICH "$new_path" 2> /dev/null`
9411
9412    if test "x$new_path" = x; then
9413      # It's still not found. Now this is an unrecoverable error.
9414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9415$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9416      has_space=`$ECHO "$complete" | $GREP " "`
9417      if test "x$has_space" != x; then
9418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9420      fi
9421      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9422    fi
9423  fi
9424
9425  # Now new_path has a complete unix path to the binary
9426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9427    # Keep paths in /bin as-is, but remove trailing .exe if any
9428    new_path="${new_path/%.exe/}"
9429    # Do not save /bin paths to all_fixpath_prefixes!
9430  else
9431    # Not in mixed or Windows style, start by that.
9432    new_path=`cmd //c echo $new_path`
9433
9434  input_path="$new_path"
9435  # Check if we need to convert this using DOS-style short mode. If the path
9436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9437  # take no chances and rewrite it.
9438  # Note: m4 eats our [], so we need to use [ and ] instead.
9439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9440  if test "x$has_forbidden_chars" != x; then
9441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9443  fi
9444
9445    # Output is in $new_path
9446
9447  windows_path="$new_path"
9448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9449    unix_path=`$CYGPATH -u "$windows_path"`
9450    new_path="$unix_path"
9451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9453    new_path="$unix_path"
9454  fi
9455
9456    # remove trailing .exe if any
9457    new_path="${new_path/%.exe/}"
9458
9459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9461  fi
9462
9463  else
9464    # We're on a posix platform. Hooray! :)
9465    # First separate the path from the arguments. This will split at the first
9466    # space.
9467    complete="$FOUND_MAKE"
9468    path="${complete%% *}"
9469    tmp="$complete EOL"
9470    arguments="${tmp#* }"
9471
9472    # Cannot rely on the command "which" here since it doesn't always work.
9473    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9474    if test -z "$is_absolute_path"; then
9475      # Path to executable is not absolute. Find it.
9476      IFS_save="$IFS"
9477      IFS=:
9478      for p in $PATH; do
9479        if test -f "$p/$path" && test -x "$p/$path"; then
9480          new_path="$p/$path"
9481          break
9482        fi
9483      done
9484      IFS="$IFS_save"
9485    else
9486      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9487$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9488      new_path="$path"
9489    fi
9490
9491    if test "x$new_path" = x; then
9492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9493$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9494        has_space=`$ECHO "$complete" | $GREP " "`
9495        if test "x$has_space" != x; then
9496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9498        fi
9499        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9500      fi
9501  fi
9502
9503      # Now join together the path and the arguments once again
9504      if test "x$arguments" != xEOL; then
9505        new_complete="$new_path ${arguments% *}"
9506      else
9507        new_complete="$new_path"
9508      fi
9509
9510  if test "x$complete" != "x$new_complete"; then
9511      FOUND_MAKE="$new_complete"
9512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9513$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9514    fi
9515
9516        fi
9517      fi
9518    fi
9519  fi
9520
9521        if test "x$FOUND_MAKE" = x; then
9522          for ac_prog in make
9523do
9524  # Extract the first word of "$ac_prog", so it can be a program name with args.
9525set dummy $ac_prog; ac_word=$2
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9527$as_echo_n "checking for $ac_word... " >&6; }
9528if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9529  $as_echo_n "(cached) " >&6
9530else
9531  case $CHECK_TOOLSDIR_MAKE in
9532  [\\/]* | ?:[\\/]*)
9533  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9534  ;;
9535  *)
9536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9537for as_dir in $PATH
9538do
9539  IFS=$as_save_IFS
9540  test -z "$as_dir" && as_dir=.
9541    for ac_exec_ext in '' $ac_executable_extensions; do
9542  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9543    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9545    break 2
9546  fi
9547done
9548  done
9549IFS=$as_save_IFS
9550
9551  ;;
9552esac
9553fi
9554CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9555if test -n "$CHECK_TOOLSDIR_MAKE"; then
9556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9557$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9558else
9559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
9561fi
9562
9563
9564  test -n "$CHECK_TOOLSDIR_MAKE" && break
9565done
9566
9567
9568  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9569  DESCRIPTION="make in tools-dir"
9570  if test "x$MAKE_CANDIDATE" != x; then
9571    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9572$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9573    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9574    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9575    if test "x$IS_GNU_MAKE" = x; then
9576      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9577$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9578    else
9579      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9580      if test "x$IS_MODERN_MAKE" = x; then
9581        { $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
9582$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;}
9583      else
9584        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9585          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9586            MAKE_EXPECTED_ENV='cygwin'
9587          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9588            MAKE_EXPECTED_ENV='msys'
9589          else
9590            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9591          fi
9592          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9593          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9594        else
9595          # Not relevant for non-Windows
9596          IS_MAKE_CORRECT_ENV=true
9597        fi
9598        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9599          { $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
9600$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;}
9601        else
9602          FOUND_MAKE=$MAKE_CANDIDATE
9603
9604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9605
9606  # First separate the path from the arguments. This will split at the first
9607  # space.
9608  complete="$FOUND_MAKE"
9609  path="${complete%% *}"
9610  tmp="$complete EOL"
9611  arguments="${tmp#* }"
9612
9613  # Input might be given as Windows format, start by converting to
9614  # unix format.
9615  new_path=`$CYGPATH -u "$path"`
9616
9617  # Now try to locate executable using which
9618  new_path=`$WHICH "$new_path" 2> /dev/null`
9619  # bat and cmd files are not always considered executable in cygwin causing which
9620  # to not find them
9621  if test "x$new_path" = x \
9622           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9623           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9624    new_path=`$CYGPATH -u "$path"`
9625  fi
9626  if test "x$new_path" = x; then
9627    # Oops. Which didn't find the executable.
9628    # The splitting of arguments from the executable at a space might have been incorrect,
9629    # since paths with space are more likely in Windows. Give it another try with the whole
9630    # argument.
9631    path="$complete"
9632    arguments="EOL"
9633    new_path=`$CYGPATH -u "$path"`
9634    new_path=`$WHICH "$new_path" 2> /dev/null`
9635    # bat and cmd files are not always considered executable in cygwin causing which
9636    # to not find them
9637    if test "x$new_path" = x \
9638             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9639             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9640      new_path=`$CYGPATH -u "$path"`
9641    fi
9642    if test "x$new_path" = x; then
9643      # It's still not found. Now this is an unrecoverable error.
9644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9645$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9646      has_space=`$ECHO "$complete" | $GREP " "`
9647      if test "x$has_space" != x; then
9648        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9649$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9650      fi
9651      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9652    fi
9653  fi
9654
9655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9658  # "foo.exe" is OK but "foo" is an error.
9659  #
9660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9661  # It is also a way to make sure we got the proper file name for the real test later on.
9662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9663  if test "x$test_shortpath" = x; then
9664    # Short path failed, file does not exist as specified.
9665    # Try adding .exe or .cmd
9666    if test -f "${new_path}.exe"; then
9667       input_to_shortpath="${new_path}.exe"
9668    elif test -f "${new_path}.cmd"; then
9669       input_to_shortpath="${new_path}.cmd"
9670    else
9671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9672$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9673      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9674$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9675      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9676    fi
9677  else
9678    input_to_shortpath="$new_path"
9679  fi
9680
9681  # Call helper function which possibly converts this using DOS-style short mode.
9682  # If so, the updated path is stored in $new_path.
9683  new_path="$input_to_shortpath"
9684
9685  input_path="$input_to_shortpath"
9686  # Check if we need to convert this using DOS-style short mode. If the path
9687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9688  # take no chances and rewrite it.
9689  # Note: m4 eats our [], so we need to use [ and ] instead.
9690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9691  if test "x$has_forbidden_chars" != x; then
9692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9696      # Going to short mode and back again did indeed matter. Since short mode is
9697      # case insensitive, let's make it lowercase to improve readability.
9698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9699      # Now convert it back to Unix-stile (cygpath)
9700      input_path=`$CYGPATH -u "$shortmode_path"`
9701      new_path="$input_path"
9702    fi
9703  fi
9704
9705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9706  if test "x$test_cygdrive_prefix" = x; then
9707    # As a simple fix, exclude /usr/bin since it's not a real path.
9708    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9710      # a path prefixed by /cygdrive for fixpath to work.
9711      new_path="$CYGWIN_ROOT_PATH$input_path"
9712    fi
9713  fi
9714
9715  # remove trailing .exe if any
9716  new_path="${new_path/%.exe/}"
9717
9718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9719
9720  # First separate the path from the arguments. This will split at the first
9721  # space.
9722  complete="$FOUND_MAKE"
9723  path="${complete%% *}"
9724  tmp="$complete EOL"
9725  arguments="${tmp#* }"
9726
9727  # Input might be given as Windows format, start by converting to
9728  # unix format.
9729  new_path="$path"
9730
9731  windows_path="$new_path"
9732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9733    unix_path=`$CYGPATH -u "$windows_path"`
9734    new_path="$unix_path"
9735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9737    new_path="$unix_path"
9738  fi
9739
9740
9741  # Now try to locate executable using which
9742  new_path=`$WHICH "$new_path" 2> /dev/null`
9743
9744  if test "x$new_path" = x; then
9745    # Oops. Which didn't find the executable.
9746    # The splitting of arguments from the executable at a space might have been incorrect,
9747    # since paths with space are more likely in Windows. Give it another try with the whole
9748    # argument.
9749    path="$complete"
9750    arguments="EOL"
9751    new_path="$path"
9752
9753  windows_path="$new_path"
9754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9755    unix_path=`$CYGPATH -u "$windows_path"`
9756    new_path="$unix_path"
9757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9759    new_path="$unix_path"
9760  fi
9761
9762
9763    new_path=`$WHICH "$new_path" 2> /dev/null`
9764
9765    if test "x$new_path" = x; then
9766      # It's still not found. Now this is an unrecoverable error.
9767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9768$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9769      has_space=`$ECHO "$complete" | $GREP " "`
9770      if test "x$has_space" != x; then
9771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9773      fi
9774      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9775    fi
9776  fi
9777
9778  # Now new_path has a complete unix path to the binary
9779  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9780    # Keep paths in /bin as-is, but remove trailing .exe if any
9781    new_path="${new_path/%.exe/}"
9782    # Do not save /bin paths to all_fixpath_prefixes!
9783  else
9784    # Not in mixed or Windows style, start by that.
9785    new_path=`cmd //c echo $new_path`
9786
9787  input_path="$new_path"
9788  # Check if we need to convert this using DOS-style short mode. If the path
9789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9790  # take no chances and rewrite it.
9791  # Note: m4 eats our [], so we need to use [ and ] instead.
9792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9793  if test "x$has_forbidden_chars" != x; then
9794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9796  fi
9797
9798    # Output is in $new_path
9799
9800  windows_path="$new_path"
9801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9802    unix_path=`$CYGPATH -u "$windows_path"`
9803    new_path="$unix_path"
9804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9806    new_path="$unix_path"
9807  fi
9808
9809    # remove trailing .exe if any
9810    new_path="${new_path/%.exe/}"
9811
9812    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9813    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9814  fi
9815
9816  else
9817    # We're on a posix platform. Hooray! :)
9818    # First separate the path from the arguments. This will split at the first
9819    # space.
9820    complete="$FOUND_MAKE"
9821    path="${complete%% *}"
9822    tmp="$complete EOL"
9823    arguments="${tmp#* }"
9824
9825    # Cannot rely on the command "which" here since it doesn't always work.
9826    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9827    if test -z "$is_absolute_path"; then
9828      # Path to executable is not absolute. Find it.
9829      IFS_save="$IFS"
9830      IFS=:
9831      for p in $PATH; do
9832        if test -f "$p/$path" && test -x "$p/$path"; then
9833          new_path="$p/$path"
9834          break
9835        fi
9836      done
9837      IFS="$IFS_save"
9838    else
9839      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9840$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9841      new_path="$path"
9842    fi
9843
9844    if test "x$new_path" = x; then
9845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9846$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9847        has_space=`$ECHO "$complete" | $GREP " "`
9848        if test "x$has_space" != x; then
9849          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9850$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9851        fi
9852        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9853      fi
9854  fi
9855
9856      # Now join together the path and the arguments once again
9857      if test "x$arguments" != xEOL; then
9858        new_complete="$new_path ${arguments% *}"
9859      else
9860        new_complete="$new_path"
9861      fi
9862
9863  if test "x$complete" != "x$new_complete"; then
9864      FOUND_MAKE="$new_complete"
9865      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9866$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9867    fi
9868
9869        fi
9870      fi
9871    fi
9872  fi
9873
9874        fi
9875        PATH=$OLD_PATH
9876      fi
9877    fi
9878
9879    if test "x$FOUND_MAKE" = x; then
9880      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
9881    fi
9882  fi
9883
9884  MAKE=$FOUND_MAKE
9885
9886  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9887$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9888
9889
9890
9891    # Test if find supports -delete
9892    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9893$as_echo_n "checking if find supports -delete... " >&6; }
9894    FIND_DELETE="-delete"
9895
9896    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9897
9898    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9899
9900    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9901    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9902        # No, it does not.
9903        rm $DELETEDIR/TestIfFindSupportsDelete
9904        FIND_DELETE="-exec rm \{\} \+"
9905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9906$as_echo "no" >&6; }
9907    else
9908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9909$as_echo "yes" >&6; }
9910    fi
9911    rmdir $DELETEDIR
9912
9913
9914
9915# These tools might not be installed by default,
9916# need hint on how to install them.
9917
9918    for ac_prog in unzip
9919do
9920  # Extract the first word of "$ac_prog", so it can be a program name with args.
9921set dummy $ac_prog; ac_word=$2
9922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9923$as_echo_n "checking for $ac_word... " >&6; }
9924if test "${ac_cv_path_UNZIP+set}" = set; then :
9925  $as_echo_n "(cached) " >&6
9926else
9927  case $UNZIP in
9928  [\\/]* | ?:[\\/]*)
9929  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9930  ;;
9931  *)
9932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9933for as_dir in $PATH
9934do
9935  IFS=$as_save_IFS
9936  test -z "$as_dir" && as_dir=.
9937    for ac_exec_ext in '' $ac_executable_extensions; do
9938  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9939    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9940    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9941    break 2
9942  fi
9943done
9944  done
9945IFS=$as_save_IFS
9946
9947  ;;
9948esac
9949fi
9950UNZIP=$ac_cv_path_UNZIP
9951if test -n "$UNZIP"; then
9952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9953$as_echo "$UNZIP" >&6; }
9954else
9955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9956$as_echo "no" >&6; }
9957fi
9958
9959
9960  test -n "$UNZIP" && break
9961done
9962
9963
9964    if test "x$UNZIP" = x; then
9965        if test "xunzip" = x; then
9966          PROG_NAME=unzip
9967        else
9968          PROG_NAME=unzip
9969        fi
9970        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9971$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9972        as_fn_error $? "Cannot continue" "$LINENO" 5
9973    fi
9974
9975
9976
9977    for ac_prog in zip
9978do
9979  # Extract the first word of "$ac_prog", so it can be a program name with args.
9980set dummy $ac_prog; ac_word=$2
9981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9982$as_echo_n "checking for $ac_word... " >&6; }
9983if test "${ac_cv_path_ZIP+set}" = set; then :
9984  $as_echo_n "(cached) " >&6
9985else
9986  case $ZIP in
9987  [\\/]* | ?:[\\/]*)
9988  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9989  ;;
9990  *)
9991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9992for as_dir in $PATH
9993do
9994  IFS=$as_save_IFS
9995  test -z "$as_dir" && as_dir=.
9996    for ac_exec_ext in '' $ac_executable_extensions; do
9997  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9998    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10000    break 2
10001  fi
10002done
10003  done
10004IFS=$as_save_IFS
10005
10006  ;;
10007esac
10008fi
10009ZIP=$ac_cv_path_ZIP
10010if test -n "$ZIP"; then
10011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10012$as_echo "$ZIP" >&6; }
10013else
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10015$as_echo "no" >&6; }
10016fi
10017
10018
10019  test -n "$ZIP" && break
10020done
10021
10022
10023    if test "x$ZIP" = x; then
10024        if test "xzip" = x; then
10025          PROG_NAME=zip
10026        else
10027          PROG_NAME=zip
10028        fi
10029        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10030$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10031        as_fn_error $? "Cannot continue" "$LINENO" 5
10032    fi
10033
10034
10035
10036# Non-required basic tools
10037
10038# Extract the first word of "ldd", so it can be a program name with args.
10039set dummy ldd; ac_word=$2
10040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10041$as_echo_n "checking for $ac_word... " >&6; }
10042if test "${ac_cv_path_LDD+set}" = set; then :
10043  $as_echo_n "(cached) " >&6
10044else
10045  case $LDD in
10046  [\\/]* | ?:[\\/]*)
10047  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10048  ;;
10049  *)
10050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10051for as_dir in $PATH
10052do
10053  IFS=$as_save_IFS
10054  test -z "$as_dir" && as_dir=.
10055    for ac_exec_ext in '' $ac_executable_extensions; do
10056  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10057    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10059    break 2
10060  fi
10061done
10062  done
10063IFS=$as_save_IFS
10064
10065  ;;
10066esac
10067fi
10068LDD=$ac_cv_path_LDD
10069if test -n "$LDD"; then
10070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10071$as_echo "$LDD" >&6; }
10072else
10073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10074$as_echo "no" >&6; }
10075fi
10076
10077
10078if test "x$LDD" = "x"; then
10079    # List shared lib dependencies is used for
10080    # debug output and checking for forbidden dependencies.
10081    # We can build without it.
10082    LDD="true"
10083fi
10084# Extract the first word of "otool", so it can be a program name with args.
10085set dummy otool; ac_word=$2
10086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087$as_echo_n "checking for $ac_word... " >&6; }
10088if test "${ac_cv_path_OTOOL+set}" = set; then :
10089  $as_echo_n "(cached) " >&6
10090else
10091  case $OTOOL in
10092  [\\/]* | ?:[\\/]*)
10093  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10094  ;;
10095  *)
10096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10097for as_dir in $PATH
10098do
10099  IFS=$as_save_IFS
10100  test -z "$as_dir" && as_dir=.
10101    for ac_exec_ext in '' $ac_executable_extensions; do
10102  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10103    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10105    break 2
10106  fi
10107done
10108  done
10109IFS=$as_save_IFS
10110
10111  ;;
10112esac
10113fi
10114OTOOL=$ac_cv_path_OTOOL
10115if test -n "$OTOOL"; then
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10117$as_echo "$OTOOL" >&6; }
10118else
10119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10120$as_echo "no" >&6; }
10121fi
10122
10123
10124if test "x$OTOOL" = "x"; then
10125   OTOOL="true"
10126fi
10127for ac_prog in readelf greadelf
10128do
10129  # Extract the first word of "$ac_prog", so it can be a program name with args.
10130set dummy $ac_prog; ac_word=$2
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10132$as_echo_n "checking for $ac_word... " >&6; }
10133if test "${ac_cv_path_READELF+set}" = set; then :
10134  $as_echo_n "(cached) " >&6
10135else
10136  case $READELF in
10137  [\\/]* | ?:[\\/]*)
10138  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10139  ;;
10140  *)
10141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10142for as_dir in $PATH
10143do
10144  IFS=$as_save_IFS
10145  test -z "$as_dir" && as_dir=.
10146    for ac_exec_ext in '' $ac_executable_extensions; do
10147  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10148    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10150    break 2
10151  fi
10152done
10153  done
10154IFS=$as_save_IFS
10155
10156  ;;
10157esac
10158fi
10159READELF=$ac_cv_path_READELF
10160if test -n "$READELF"; then
10161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10162$as_echo "$READELF" >&6; }
10163else
10164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10165$as_echo "no" >&6; }
10166fi
10167
10168
10169  test -n "$READELF" && break
10170done
10171
10172# Extract the first word of "hg", so it can be a program name with args.
10173set dummy hg; ac_word=$2
10174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10175$as_echo_n "checking for $ac_word... " >&6; }
10176if test "${ac_cv_path_HG+set}" = set; then :
10177  $as_echo_n "(cached) " >&6
10178else
10179  case $HG in
10180  [\\/]* | ?:[\\/]*)
10181  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10182  ;;
10183  *)
10184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10185for as_dir in $PATH
10186do
10187  IFS=$as_save_IFS
10188  test -z "$as_dir" && as_dir=.
10189    for ac_exec_ext in '' $ac_executable_extensions; do
10190  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10191    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10193    break 2
10194  fi
10195done
10196  done
10197IFS=$as_save_IFS
10198
10199  ;;
10200esac
10201fi
10202HG=$ac_cv_path_HG
10203if test -n "$HG"; then
10204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10205$as_echo "$HG" >&6; }
10206else
10207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10208$as_echo "no" >&6; }
10209fi
10210
10211
10212# Extract the first word of "stat", so it can be a program name with args.
10213set dummy stat; ac_word=$2
10214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10215$as_echo_n "checking for $ac_word... " >&6; }
10216if test "${ac_cv_path_STAT+set}" = set; then :
10217  $as_echo_n "(cached) " >&6
10218else
10219  case $STAT in
10220  [\\/]* | ?:[\\/]*)
10221  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10222  ;;
10223  *)
10224  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10225for as_dir in $PATH
10226do
10227  IFS=$as_save_IFS
10228  test -z "$as_dir" && as_dir=.
10229    for ac_exec_ext in '' $ac_executable_extensions; do
10230  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10231    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10232    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10233    break 2
10234  fi
10235done
10236  done
10237IFS=$as_save_IFS
10238
10239  ;;
10240esac
10241fi
10242STAT=$ac_cv_path_STAT
10243if test -n "$STAT"; then
10244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10245$as_echo "$STAT" >&6; }
10246else
10247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10248$as_echo "no" >&6; }
10249fi
10250
10251
10252# Extract the first word of "time", so it can be a program name with args.
10253set dummy time; ac_word=$2
10254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10255$as_echo_n "checking for $ac_word... " >&6; }
10256if test "${ac_cv_path_TIME+set}" = set; then :
10257  $as_echo_n "(cached) " >&6
10258else
10259  case $TIME in
10260  [\\/]* | ?:[\\/]*)
10261  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10262  ;;
10263  *)
10264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10265for as_dir in $PATH
10266do
10267  IFS=$as_save_IFS
10268  test -z "$as_dir" && as_dir=.
10269    for ac_exec_ext in '' $ac_executable_extensions; do
10270  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10271    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10273    break 2
10274  fi
10275done
10276  done
10277IFS=$as_save_IFS
10278
10279  ;;
10280esac
10281fi
10282TIME=$ac_cv_path_TIME
10283if test -n "$TIME"; then
10284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10285$as_echo "$TIME" >&6; }
10286else
10287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10288$as_echo "no" >&6; }
10289fi
10290
10291
10292
10293if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10294
10295    for ac_prog in comm
10296do
10297  # Extract the first word of "$ac_prog", so it can be a program name with args.
10298set dummy $ac_prog; ac_word=$2
10299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10300$as_echo_n "checking for $ac_word... " >&6; }
10301if test "${ac_cv_path_COMM+set}" = set; then :
10302  $as_echo_n "(cached) " >&6
10303else
10304  case $COMM in
10305  [\\/]* | ?:[\\/]*)
10306  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10307  ;;
10308  *)
10309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10310for as_dir in $PATH
10311do
10312  IFS=$as_save_IFS
10313  test -z "$as_dir" && as_dir=.
10314    for ac_exec_ext in '' $ac_executable_extensions; do
10315  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10316    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10318    break 2
10319  fi
10320done
10321  done
10322IFS=$as_save_IFS
10323
10324  ;;
10325esac
10326fi
10327COMM=$ac_cv_path_COMM
10328if test -n "$COMM"; then
10329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10330$as_echo "$COMM" >&6; }
10331else
10332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10333$as_echo "no" >&6; }
10334fi
10335
10336
10337  test -n "$COMM" && break
10338done
10339
10340
10341    if test "x$COMM" = x; then
10342        if test "xcomm" = x; then
10343          PROG_NAME=comm
10344        else
10345          PROG_NAME=comm
10346        fi
10347        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10348$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10349        as_fn_error $? "Cannot continue" "$LINENO" 5
10350    fi
10351
10352
10353fi
10354
10355
10356# Check if pkg-config is available.
10357
10358
10359if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10360	if test -n "$ac_tool_prefix"; then
10361  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10362set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10364$as_echo_n "checking for $ac_word... " >&6; }
10365if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10366  $as_echo_n "(cached) " >&6
10367else
10368  case $PKG_CONFIG in
10369  [\\/]* | ?:[\\/]*)
10370  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10371  ;;
10372  *)
10373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10374for as_dir in $PATH
10375do
10376  IFS=$as_save_IFS
10377  test -z "$as_dir" && as_dir=.
10378    for ac_exec_ext in '' $ac_executable_extensions; do
10379  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10380    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10381    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10382    break 2
10383  fi
10384done
10385  done
10386IFS=$as_save_IFS
10387
10388  ;;
10389esac
10390fi
10391PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10392if test -n "$PKG_CONFIG"; then
10393  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10394$as_echo "$PKG_CONFIG" >&6; }
10395else
10396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
10398fi
10399
10400
10401fi
10402if test -z "$ac_cv_path_PKG_CONFIG"; then
10403  ac_pt_PKG_CONFIG=$PKG_CONFIG
10404  # Extract the first word of "pkg-config", so it can be a program name with args.
10405set dummy pkg-config; ac_word=$2
10406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10407$as_echo_n "checking for $ac_word... " >&6; }
10408if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10409  $as_echo_n "(cached) " >&6
10410else
10411  case $ac_pt_PKG_CONFIG in
10412  [\\/]* | ?:[\\/]*)
10413  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10414  ;;
10415  *)
10416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10417for as_dir in $PATH
10418do
10419  IFS=$as_save_IFS
10420  test -z "$as_dir" && as_dir=.
10421    for ac_exec_ext in '' $ac_executable_extensions; do
10422  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10423    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10425    break 2
10426  fi
10427done
10428  done
10429IFS=$as_save_IFS
10430
10431  ;;
10432esac
10433fi
10434ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10435if test -n "$ac_pt_PKG_CONFIG"; then
10436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10437$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10438else
10439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10440$as_echo "no" >&6; }
10441fi
10442
10443  if test "x$ac_pt_PKG_CONFIG" = x; then
10444    PKG_CONFIG=""
10445  else
10446    case $cross_compiling:$ac_tool_warned in
10447yes:)
10448{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10449$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10450ac_tool_warned=yes ;;
10451esac
10452    PKG_CONFIG=$ac_pt_PKG_CONFIG
10453  fi
10454else
10455  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10456fi
10457
10458fi
10459if test -n "$PKG_CONFIG"; then
10460	_pkg_min_version=0.9.0
10461	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10462$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10463	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10464		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10465$as_echo "yes" >&6; }
10466	else
10467		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468$as_echo "no" >&6; }
10469		PKG_CONFIG=""
10470	fi
10471
10472fi
10473
10474# After basic tools have been setup, we can check build os specific details.
10475
10476###############################################################################
10477
10478# Note that this is the build platform OS version!
10479
10480OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10481OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10482OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10483OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10484
10485
10486
10487
10488
10489# Setup builddeps, for automatic downloading of tools we need.
10490# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10491# boot-jdk setup, but we need to have basic tools setup first.
10492
10493
10494# Check whether --with-builddeps-conf was given.
10495if test "${with_builddeps_conf+set}" = set; then :
10496  withval=$with_builddeps_conf;
10497fi
10498
10499
10500
10501# Check whether --with-builddeps-server was given.
10502if test "${with_builddeps_server+set}" = set; then :
10503  withval=$with_builddeps_server;
10504fi
10505
10506
10507
10508# Check whether --with-builddeps-dir was given.
10509if test "${with_builddeps_dir+set}" = set; then :
10510  withval=$with_builddeps_dir;
10511else
10512  with_builddeps_dir=/localhome/builddeps
10513fi
10514
10515
10516
10517# Check whether --with-builddeps-group was given.
10518if test "${with_builddeps_group+set}" = set; then :
10519  withval=$with_builddeps_group;
10520fi
10521
10522
10523
10524
10525    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10526        if test "x$with_builddeps_conf" != x; then
10527            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10528$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10529            builddepsfile=$with_builddeps_conf
10530            if test -s $builddepsfile; then
10531                . $builddepsfile
10532                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10533$as_echo "loaded!" >&6; }
10534            else
10535               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10536           fi
10537        else
10538            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10539$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10540            builddepsfile=`mktemp`
10541            touch $builddepsfile
10542            # Put all found confs into a single file.
10543            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10544            # Source the file to acquire the variables
10545            if test -s $builddepsfile; then
10546                . $builddepsfile
10547                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10548$as_echo "found at least one!" >&6; }
10549            else
10550               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10551           fi
10552        fi
10553        # Create build and target names that use _ instead of "-" and ".".
10554        # This is necessary to use them in variable names.
10555        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10556        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10557        # Extract rewrite information for build and target
10558        eval rewritten_build=\${REWRITE_${build_var}}
10559        if test "x$rewritten_build" = x; then
10560            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10561            echo Build stays the same $rewritten_build
10562        else
10563            echo Rewriting build for builddeps into $rewritten_build
10564        fi
10565        eval rewritten_target=\${REWRITE_${target_var}}
10566        if test "x$rewritten_target" = x; then
10567            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10568            echo Target stays the same $rewritten_target
10569        else
10570            echo Rewriting target for builddeps into $rewritten_target
10571        fi
10572        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10573        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10574    fi
10575    for ac_prog in 7z unzip
10576do
10577  # Extract the first word of "$ac_prog", so it can be a program name with args.
10578set dummy $ac_prog; ac_word=$2
10579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10580$as_echo_n "checking for $ac_word... " >&6; }
10581if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10582  $as_echo_n "(cached) " >&6
10583else
10584  if test -n "$BDEPS_UNZIP"; then
10585  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10586else
10587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10588for as_dir in $PATH
10589do
10590  IFS=$as_save_IFS
10591  test -z "$as_dir" && as_dir=.
10592    for ac_exec_ext in '' $ac_executable_extensions; do
10593  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10594    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10596    break 2
10597  fi
10598done
10599  done
10600IFS=$as_save_IFS
10601
10602fi
10603fi
10604BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10605if test -n "$BDEPS_UNZIP"; then
10606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10607$as_echo "$BDEPS_UNZIP" >&6; }
10608else
10609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10610$as_echo "no" >&6; }
10611fi
10612
10613
10614  test -n "$BDEPS_UNZIP" && break
10615done
10616
10617    if test "x$BDEPS_UNZIP" = x7z; then
10618        BDEPS_UNZIP="7z x"
10619    fi
10620
10621    for ac_prog in wget lftp ftp
10622do
10623  # Extract the first word of "$ac_prog", so it can be a program name with args.
10624set dummy $ac_prog; ac_word=$2
10625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10626$as_echo_n "checking for $ac_word... " >&6; }
10627if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10628  $as_echo_n "(cached) " >&6
10629else
10630  if test -n "$BDEPS_FTP"; then
10631  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10632else
10633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10634for as_dir in $PATH
10635do
10636  IFS=$as_save_IFS
10637  test -z "$as_dir" && as_dir=.
10638    for ac_exec_ext in '' $ac_executable_extensions; do
10639  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10640    ac_cv_prog_BDEPS_FTP="$ac_prog"
10641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10642    break 2
10643  fi
10644done
10645  done
10646IFS=$as_save_IFS
10647
10648fi
10649fi
10650BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10651if test -n "$BDEPS_FTP"; then
10652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10653$as_echo "$BDEPS_FTP" >&6; }
10654else
10655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10656$as_echo "no" >&6; }
10657fi
10658
10659
10660  test -n "$BDEPS_FTP" && break
10661done
10662
10663
10664
10665###############################################################################
10666#
10667# Determine OpenJDK variants, options and version numbers.
10668#
10669###############################################################################
10670
10671# We need build & target for this.
10672
10673
10674###############################################################################
10675#
10676# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10677# We always build headless support.
10678#
10679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10680$as_echo_n "checking headful support... " >&6; }
10681# Check whether --enable-headful was given.
10682if test "${enable_headful+set}" = set; then :
10683  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10684else
10685  SUPPORT_HEADFUL=yes
10686fi
10687
10688
10689SUPPORT_HEADLESS=yes
10690BUILD_HEADLESS="BUILD_HEADLESS:=true"
10691
10692if test "x$SUPPORT_HEADFUL" = xyes; then
10693    # We are building both headful and headless.
10694    headful_msg="inlude support for both headful and headless"
10695fi
10696
10697if test "x$SUPPORT_HEADFUL" = xno; then
10698    # Thus we are building headless only.
10699    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10700    headful_msg="headless only"
10701fi
10702
10703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10704$as_echo "$headful_msg" >&6; }
10705
10706
10707
10708
10709
10710# Control wether Hotspot runs Queens test after build.
10711# Check whether --enable-hotspot-test-in-build was given.
10712if test "${enable_hotspot_test_in_build+set}" = set; then :
10713  enableval=$enable_hotspot_test_in_build;
10714else
10715  enable_hotspot_test_in_build=no
10716fi
10717
10718if test "x$enable_hotspot_test_in_build" = "xyes"; then
10719    TEST_IN_BUILD=true
10720else
10721    TEST_IN_BUILD=false
10722fi
10723
10724
10725###############################################################################
10726#
10727# Choose cacerts source file
10728#
10729
10730# Check whether --with-cacerts-file was given.
10731if test "${with_cacerts_file+set}" = set; then :
10732  withval=$with_cacerts_file;
10733fi
10734
10735if test "x$with_cacerts_file" != x; then
10736    CACERTS_FILE=$with_cacerts_file
10737else
10738    if test "x$OPENJDK" = "xtrue"; then
10739        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10740    else
10741        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10742    fi
10743fi
10744
10745
10746###############################################################################
10747#
10748# Enable or disable unlimited crypto
10749#
10750# Check whether --enable-unlimited-crypto was given.
10751if test "${enable_unlimited_crypto+set}" = set; then :
10752  enableval=$enable_unlimited_crypto;
10753else
10754  enable_unlimited_crypto=no
10755fi
10756
10757if test "x$enable_unlimited_crypto" = "xyes"; then
10758    UNLIMITED_CRYPTO=true
10759else
10760    UNLIMITED_CRYPTO=false
10761fi
10762
10763
10764###############################################################################
10765#
10766# Compress jars
10767#
10768COMPRESS_JARS=false
10769
10770
10771
10772
10773# Source the version numbers
10774. $AUTOCONF_DIR/version-numbers
10775
10776# Get the settings from parameters
10777
10778# Check whether --with-milestone was given.
10779if test "${with_milestone+set}" = set; then :
10780  withval=$with_milestone;
10781fi
10782
10783if test "x$with_milestone" = xyes; then
10784  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10785elif test "x$with_milestone" != x; then
10786    MILESTONE="$with_milestone"
10787fi
10788if test "x$MILESTONE" = x; then
10789  MILESTONE=internal
10790fi
10791
10792
10793# Check whether --with-build-number was given.
10794if test "${with_build_number+set}" = set; then :
10795  withval=$with_build_number;
10796fi
10797
10798if test "x$with_build_number" = xyes; then
10799  as_fn_error $? "Build number must have a value" "$LINENO" 5
10800elif test "x$with_build_number" != x; then
10801  JDK_BUILD_NUMBER="$with_build_number"
10802fi
10803if test "x$JDK_BUILD_NUMBER" = x; then
10804  JDK_BUILD_NUMBER=b00
10805fi
10806
10807
10808# Check whether --with-user-release-suffix was given.
10809if test "${with_user_release_suffix+set}" = set; then :
10810  withval=$with_user_release_suffix;
10811fi
10812
10813if test "x$with_user_release_suffix" = xyes; then
10814  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10815elif test "x$with_user_release_suffix" != x; then
10816  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10817else
10818  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10819  # Avoid [:alnum:] since it depends on the locale.
10820  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10821  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10822fi
10823
10824
10825# Now set the JDK version, milestone, build number etc.
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840COPYRIGHT_YEAR=`date +'%Y'`
10841
10842
10843if test "x$JDK_UPDATE_VERSION" != x; then
10844  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10845else
10846  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10847fi
10848
10849
10850COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10851
10852
10853
10854###############################################################################
10855#
10856# Setup BootJDK, used to bootstrap the build.
10857#
10858###############################################################################
10859
10860
10861BOOT_JDK_FOUND=no
10862
10863# Check whether --with-boot-jdk was given.
10864if test "${with_boot_jdk+set}" = set; then :
10865  withval=$with_boot_jdk;
10866fi
10867
10868
10869# We look for the Boot JDK through various means, going from more certain to
10870# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10871# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10872# must check if this is indeed valid; otherwise we'll continue looking.
10873
10874# Test: Is bootjdk explicitely set by command line arguments?
10875
10876  if test "x$BOOT_JDK_FOUND" = xno; then
10877    # Now execute the test
10878
10879if test "x$with_boot_jdk" != x; then
10880    BOOT_JDK=$with_boot_jdk
10881    BOOT_JDK_FOUND=maybe
10882    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10883$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10884fi
10885
10886
10887    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10888    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10889      # Do we have a bin/java?
10890      if test ! -x "$BOOT_JDK/bin/java"; then
10891        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10893        BOOT_JDK_FOUND=no
10894      else
10895        # Do we have a bin/javac?
10896        if test ! -x "$BOOT_JDK/bin/javac"; then
10897          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10898$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10899          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10900$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10901          BOOT_JDK_FOUND=no
10902        else
10903          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10904          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10905            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10907            BOOT_JDK_FOUND=no
10908          else
10909            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10910            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10911
10912            # Extra M4 quote needed to protect [] in grep expression.
10913            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10914            if test "x$FOUND_VERSION_78" = x; then
10915              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10917              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10918$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10919              BOOT_JDK_FOUND=no
10920            else
10921              # We're done! :-)
10922              BOOT_JDK_FOUND=yes
10923
10924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10925
10926  # Input might be given as Windows format, start by converting to
10927  # unix format.
10928  path="$BOOT_JDK"
10929  new_path=`$CYGPATH -u "$path"`
10930
10931  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10932  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10933  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10934  # "foo.exe" is OK but "foo" is an error.
10935  #
10936  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10937  # It is also a way to make sure we got the proper file name for the real test later on.
10938  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10939  if test "x$test_shortpath" = x; then
10940    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10941$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10942    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10943  fi
10944
10945  # Call helper function which possibly converts this using DOS-style short mode.
10946  # If so, the updated path is stored in $new_path.
10947
10948  input_path="$new_path"
10949  # Check if we need to convert this using DOS-style short mode. If the path
10950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10951  # take no chances and rewrite it.
10952  # Note: m4 eats our [], so we need to use [ and ] instead.
10953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10954  if test "x$has_forbidden_chars" != x; then
10955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10956    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10957    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10958    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10959      # Going to short mode and back again did indeed matter. Since short mode is
10960      # case insensitive, let's make it lowercase to improve readability.
10961      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10962      # Now convert it back to Unix-stile (cygpath)
10963      input_path=`$CYGPATH -u "$shortmode_path"`
10964      new_path="$input_path"
10965    fi
10966  fi
10967
10968  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10969  if test "x$test_cygdrive_prefix" = x; then
10970    # As a simple fix, exclude /usr/bin since it's not a real path.
10971    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10972      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10973      # a path prefixed by /cygdrive for fixpath to work.
10974      new_path="$CYGWIN_ROOT_PATH$input_path"
10975    fi
10976  fi
10977
10978
10979  if test "x$path" != "x$new_path"; then
10980    BOOT_JDK="$new_path"
10981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10982$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10983  fi
10984
10985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10986
10987  path="$BOOT_JDK"
10988  has_colon=`$ECHO $path | $GREP ^.:`
10989  new_path="$path"
10990  if test "x$has_colon" = x; then
10991    # Not in mixed or Windows style, start by that.
10992    new_path=`cmd //c echo $path`
10993  fi
10994
10995
10996  input_path="$new_path"
10997  # Check if we need to convert this using DOS-style short mode. If the path
10998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10999  # take no chances and rewrite it.
11000  # Note: m4 eats our [], so we need to use [ and ] instead.
11001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11002  if test "x$has_forbidden_chars" != x; then
11003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11004    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11005  fi
11006
11007
11008  windows_path="$new_path"
11009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11010    unix_path=`$CYGPATH -u "$windows_path"`
11011    new_path="$unix_path"
11012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11014    new_path="$unix_path"
11015  fi
11016
11017  if test "x$path" != "x$new_path"; then
11018    BOOT_JDK="$new_path"
11019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11020$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11021  fi
11022
11023  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11024  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11025
11026  else
11027    # We're on a posix platform. Hooray! :)
11028    path="$BOOT_JDK"
11029
11030    if test ! -f "$path" && test ! -d "$path"; then
11031      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11032    fi
11033
11034    has_space=`$ECHO "$path" | $GREP " "`
11035    if test "x$has_space" != x; then
11036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11037$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11038      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11039    fi
11040  fi
11041
11042              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11043$as_echo_n "checking for Boot JDK... " >&6; }
11044              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11045$as_echo "$BOOT_JDK" >&6; }
11046              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11047$as_echo_n "checking Boot JDK version... " >&6; }
11048              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11049              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11050$as_echo "$BOOT_JDK_VERSION" >&6; }
11051            fi # end check jdk version
11052          fi # end check rt.jar
11053        fi # end check javac
11054      fi # end check java
11055    fi # end check boot jdk found
11056  fi
11057
11058if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11059  # Having specified an argument which is incorrect will produce an instant failure;
11060  # we should not go on looking
11061  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11062fi
11063
11064# Test: Is bootjdk available from builddeps?
11065
11066  if test "x$BOOT_JDK_FOUND" = xno; then
11067    # Now execute the test
11068
11069
11070
11071    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11072        # Source the builddeps file again, to make sure it uses the latest variables!
11073        . $builddepsfile
11074        # Look for a target and build machine specific resource!
11075        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11076        if test "x$resource" = x; then
11077            # Ok, lets instead look for a target specific resource
11078            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11079        fi
11080        if test "x$resource" = x; then
11081            # Ok, lets instead look for a build specific resource
11082            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11083        fi
11084        if test "x$resource" = x; then
11085            # Ok, lets instead look for a generic resource
11086            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11087            resource=${builddep_bootjdk}
11088        fi
11089        if test "x$resource" != x; then
11090            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11091$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11092	    # If the resource in the builddeps.conf file is an existing directory,
11093	    # for example /java/linux/cups
11094	    if test -d ${resource}; then
11095	       depdir=${resource}
11096	    else
11097
11098# bootjdk is for example mymodule
11099# $resource is for example libs/general/libmymod_1_2_3.zip
11100# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11101# $with_builddeps_dir is for example /localhome/builddeps
11102# depdir is the name of the variable into which we store the depdir, eg MYMOD
11103# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11104# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11105    filename=`basename $resource`
11106    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11107    filebase=${filename%%.*}
11108    extension=${filename#*.}
11109    installdir=$with_builddeps_dir/$filebase
11110    if test ! -f $installdir/$filename.unpacked; then
11111        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11112$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11113        if test ! -d $installdir; then
11114            mkdir -p $installdir
11115        fi
11116        if test ! -d $installdir; then
11117            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11118        fi
11119        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11120        touch $tmpfile
11121        if test ! -f $tmpfile; then
11122            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11123        fi
11124
11125    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11126    # $tmpfile is the local file name for the downloaded file.
11127    VALID_TOOL=no
11128    if test "x$BDEPS_FTP" = xwget; then
11129       VALID_TOOL=yes
11130       wget -O $tmpfile $with_builddeps_server/$resource
11131    fi
11132    if test "x$BDEPS_FTP" = xlftp; then
11133       VALID_TOOL=yes
11134       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11135    fi
11136    if test "x$BDEPS_FTP" = xftp; then
11137        VALID_TOOL=yes
11138        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11139        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11140        FTPUSERPWD=${FTPSERVER%%@*}
11141        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11142            FTPUSER=${userpwd%%:*}
11143            FTPPWD=${userpwd#*@}
11144            FTPSERVER=${FTPSERVER#*@}
11145        else
11146            FTPUSER=ftp
11147            FTPPWD=ftp
11148        fi
11149        # the "pass" command does not work on some
11150        # ftp clients (read ftp.exe) but if it works,
11151        # passive mode is better!
11152        (\
11153            echo "user $FTPUSER $FTPPWD"        ;\
11154            echo "pass"                         ;\
11155            echo "bin"                          ;\
11156            echo "get $FTPPATH $tmpfile"              ;\
11157        ) | ftp -in $FTPSERVER
11158    fi
11159    if test "x$VALID_TOOL" != xyes; then
11160       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11161    fi
11162
11163        mv $tmpfile $installdir/$filename
11164        if test ! -s $installdir/$filename; then
11165            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11166        fi
11167        case "$extension" in
11168            zip)  echo "Unzipping $installdir/$filename..."
11169               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11170            ;;
11171            tar.gz) echo "Untaring $installdir/$filename..."
11172               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11173            ;;
11174            tgz) echo "Untaring $installdir/$filename..."
11175               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11176            ;;
11177            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11178            ;;
11179        esac
11180    fi
11181    if test -f $installdir/$filename.unpacked; then
11182        depdir=$installdir
11183    fi
11184
11185	    fi
11186            # Source the builddeps file again, because in the previous command, the depdir
11187            # was updated to point at the current build dependency install directory.
11188            . $builddepsfile
11189            # Now extract variables from the builddeps.conf files.
11190            theroot=${builddep_bootjdk_ROOT}
11191            thecflags=${builddep_bootjdk_CFLAGS}
11192            thelibs=${builddep_bootjdk_LIBS}
11193            if test "x$depdir" = x; then
11194                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11195            fi
11196            BOOT_JDK=$depdir
11197            if test "x$theroot" != x; then
11198               BOOT_JDK="$theroot"
11199            fi
11200            if test "x$thecflags" != x; then
11201               BOOT_JDK_CFLAGS="$thecflags"
11202            fi
11203            if test "x$thelibs" != x; then
11204               BOOT_JDK_LIBS="$thelibs"
11205            fi
11206            BOOT_JDK_FOUND=maybe
11207            else BOOT_JDK_FOUND=no
11208
11209        fi
11210        else BOOT_JDK_FOUND=no
11211
11212    fi
11213
11214
11215
11216    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11217    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11218      # Do we have a bin/java?
11219      if test ! -x "$BOOT_JDK/bin/java"; then
11220        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11222        BOOT_JDK_FOUND=no
11223      else
11224        # Do we have a bin/javac?
11225        if test ! -x "$BOOT_JDK/bin/javac"; then
11226          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11227$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11228          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11229$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11230          BOOT_JDK_FOUND=no
11231        else
11232          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11233          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11234            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11236            BOOT_JDK_FOUND=no
11237          else
11238            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11239            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11240
11241            # Extra M4 quote needed to protect [] in grep expression.
11242            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11243            if test "x$FOUND_VERSION_78" = x; then
11244              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11245$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11246              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11247$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11248              BOOT_JDK_FOUND=no
11249            else
11250              # We're done! :-)
11251              BOOT_JDK_FOUND=yes
11252
11253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11254
11255  # Input might be given as Windows format, start by converting to
11256  # unix format.
11257  path="$BOOT_JDK"
11258  new_path=`$CYGPATH -u "$path"`
11259
11260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11263  # "foo.exe" is OK but "foo" is an error.
11264  #
11265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11266  # It is also a way to make sure we got the proper file name for the real test later on.
11267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11268  if test "x$test_shortpath" = x; then
11269    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11270$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11271    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11272  fi
11273
11274  # Call helper function which possibly converts this using DOS-style short mode.
11275  # If so, the updated path is stored in $new_path.
11276
11277  input_path="$new_path"
11278  # Check if we need to convert this using DOS-style short mode. If the path
11279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11280  # take no chances and rewrite it.
11281  # Note: m4 eats our [], so we need to use [ and ] instead.
11282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11283  if test "x$has_forbidden_chars" != x; then
11284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11288      # Going to short mode and back again did indeed matter. Since short mode is
11289      # case insensitive, let's make it lowercase to improve readability.
11290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11291      # Now convert it back to Unix-stile (cygpath)
11292      input_path=`$CYGPATH -u "$shortmode_path"`
11293      new_path="$input_path"
11294    fi
11295  fi
11296
11297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11298  if test "x$test_cygdrive_prefix" = x; then
11299    # As a simple fix, exclude /usr/bin since it's not a real path.
11300    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11302      # a path prefixed by /cygdrive for fixpath to work.
11303      new_path="$CYGWIN_ROOT_PATH$input_path"
11304    fi
11305  fi
11306
11307
11308  if test "x$path" != "x$new_path"; then
11309    BOOT_JDK="$new_path"
11310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11312  fi
11313
11314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11315
11316  path="$BOOT_JDK"
11317  has_colon=`$ECHO $path | $GREP ^.:`
11318  new_path="$path"
11319  if test "x$has_colon" = x; then
11320    # Not in mixed or Windows style, start by that.
11321    new_path=`cmd //c echo $path`
11322  fi
11323
11324
11325  input_path="$new_path"
11326  # Check if we need to convert this using DOS-style short mode. If the path
11327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11328  # take no chances and rewrite it.
11329  # Note: m4 eats our [], so we need to use [ and ] instead.
11330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11331  if test "x$has_forbidden_chars" != x; then
11332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11333    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11334  fi
11335
11336
11337  windows_path="$new_path"
11338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11339    unix_path=`$CYGPATH -u "$windows_path"`
11340    new_path="$unix_path"
11341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11343    new_path="$unix_path"
11344  fi
11345
11346  if test "x$path" != "x$new_path"; then
11347    BOOT_JDK="$new_path"
11348    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11349$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11350  fi
11351
11352  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11353  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11354
11355  else
11356    # We're on a posix platform. Hooray! :)
11357    path="$BOOT_JDK"
11358
11359    if test ! -f "$path" && test ! -d "$path"; then
11360      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11361    fi
11362
11363    has_space=`$ECHO "$path" | $GREP " "`
11364    if test "x$has_space" != x; then
11365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11366$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11367      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11368    fi
11369  fi
11370
11371              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11372$as_echo_n "checking for Boot JDK... " >&6; }
11373              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11374$as_echo "$BOOT_JDK" >&6; }
11375              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11376$as_echo_n "checking Boot JDK version... " >&6; }
11377              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11378              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11379$as_echo "$BOOT_JDK_VERSION" >&6; }
11380            fi # end check jdk version
11381          fi # end check rt.jar
11382        fi # end check javac
11383      fi # end check java
11384    fi # end check boot jdk found
11385  fi
11386
11387
11388# Test: Is $JAVA_HOME set?
11389
11390  if test "x$BOOT_JDK_FOUND" = xno; then
11391    # Now execute the test
11392
11393    if test "x$JAVA_HOME" != x; then
11394        JAVA_HOME_PROCESSED="$JAVA_HOME"
11395
11396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11397
11398  # Input might be given as Windows format, start by converting to
11399  # unix format.
11400  path="$JAVA_HOME_PROCESSED"
11401  new_path=`$CYGPATH -u "$path"`
11402
11403  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11404  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11405  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11406  # "foo.exe" is OK but "foo" is an error.
11407  #
11408  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11409  # It is also a way to make sure we got the proper file name for the real test later on.
11410  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11411  if test "x$test_shortpath" = x; then
11412    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11413$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11414    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11415  fi
11416
11417  # Call helper function which possibly converts this using DOS-style short mode.
11418  # If so, the updated path is stored in $new_path.
11419
11420  input_path="$new_path"
11421  # Check if we need to convert this using DOS-style short mode. If the path
11422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11423  # take no chances and rewrite it.
11424  # Note: m4 eats our [], so we need to use [ and ] instead.
11425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11426  if test "x$has_forbidden_chars" != x; then
11427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11431      # Going to short mode and back again did indeed matter. Since short mode is
11432      # case insensitive, let's make it lowercase to improve readability.
11433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11434      # Now convert it back to Unix-stile (cygpath)
11435      input_path=`$CYGPATH -u "$shortmode_path"`
11436      new_path="$input_path"
11437    fi
11438  fi
11439
11440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11441  if test "x$test_cygdrive_prefix" = x; then
11442    # As a simple fix, exclude /usr/bin since it's not a real path.
11443    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11445      # a path prefixed by /cygdrive for fixpath to work.
11446      new_path="$CYGWIN_ROOT_PATH$input_path"
11447    fi
11448  fi
11449
11450
11451  if test "x$path" != "x$new_path"; then
11452    JAVA_HOME_PROCESSED="$new_path"
11453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11454$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11455  fi
11456
11457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11458
11459  path="$JAVA_HOME_PROCESSED"
11460  has_colon=`$ECHO $path | $GREP ^.:`
11461  new_path="$path"
11462  if test "x$has_colon" = x; then
11463    # Not in mixed or Windows style, start by that.
11464    new_path=`cmd //c echo $path`
11465  fi
11466
11467
11468  input_path="$new_path"
11469  # Check if we need to convert this using DOS-style short mode. If the path
11470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11471  # take no chances and rewrite it.
11472  # Note: m4 eats our [], so we need to use [ and ] instead.
11473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11474  if test "x$has_forbidden_chars" != x; then
11475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11476    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11477  fi
11478
11479
11480  windows_path="$new_path"
11481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11482    unix_path=`$CYGPATH -u "$windows_path"`
11483    new_path="$unix_path"
11484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11486    new_path="$unix_path"
11487  fi
11488
11489  if test "x$path" != "x$new_path"; then
11490    JAVA_HOME_PROCESSED="$new_path"
11491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11492$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11493  fi
11494
11495  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11496  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11497
11498  else
11499    # We're on a posix platform. Hooray! :)
11500    path="$JAVA_HOME_PROCESSED"
11501
11502    if test ! -f "$path" && test ! -d "$path"; then
11503      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11504    fi
11505
11506    has_space=`$ECHO "$path" | $GREP " "`
11507    if test "x$has_space" != x; then
11508      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11509$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11510      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11511    fi
11512  fi
11513
11514        if test ! -d "$JAVA_HOME_PROCESSED"; then
11515            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11516$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11517        else
11518          # Aha, the user has set a JAVA_HOME
11519          # let us use that as the Boot JDK.
11520          BOOT_JDK="$JAVA_HOME_PROCESSED"
11521          BOOT_JDK_FOUND=maybe
11522          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11523$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11524        fi
11525    fi
11526
11527
11528    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11529    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11530      # Do we have a bin/java?
11531      if test ! -x "$BOOT_JDK/bin/java"; then
11532        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11534        BOOT_JDK_FOUND=no
11535      else
11536        # Do we have a bin/javac?
11537        if test ! -x "$BOOT_JDK/bin/javac"; then
11538          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11539$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11540          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11541$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11542          BOOT_JDK_FOUND=no
11543        else
11544          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11545          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11548            BOOT_JDK_FOUND=no
11549          else
11550            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11551            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11552
11553            # Extra M4 quote needed to protect [] in grep expression.
11554            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11555            if test "x$FOUND_VERSION_78" = x; then
11556              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11557$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11558              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11559$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11560              BOOT_JDK_FOUND=no
11561            else
11562              # We're done! :-)
11563              BOOT_JDK_FOUND=yes
11564
11565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11566
11567  # Input might be given as Windows format, start by converting to
11568  # unix format.
11569  path="$BOOT_JDK"
11570  new_path=`$CYGPATH -u "$path"`
11571
11572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11575  # "foo.exe" is OK but "foo" is an error.
11576  #
11577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11578  # It is also a way to make sure we got the proper file name for the real test later on.
11579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11580  if test "x$test_shortpath" = x; then
11581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11583    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11584  fi
11585
11586  # Call helper function which possibly converts this using DOS-style short mode.
11587  # If so, the updated path is stored in $new_path.
11588
11589  input_path="$new_path"
11590  # Check if we need to convert this using DOS-style short mode. If the path
11591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11592  # take no chances and rewrite it.
11593  # Note: m4 eats our [], so we need to use [ and ] instead.
11594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11595  if test "x$has_forbidden_chars" != x; then
11596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11600      # Going to short mode and back again did indeed matter. Since short mode is
11601      # case insensitive, let's make it lowercase to improve readability.
11602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11603      # Now convert it back to Unix-stile (cygpath)
11604      input_path=`$CYGPATH -u "$shortmode_path"`
11605      new_path="$input_path"
11606    fi
11607  fi
11608
11609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11610  if test "x$test_cygdrive_prefix" = x; then
11611    # As a simple fix, exclude /usr/bin since it's not a real path.
11612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11614      # a path prefixed by /cygdrive for fixpath to work.
11615      new_path="$CYGWIN_ROOT_PATH$input_path"
11616    fi
11617  fi
11618
11619
11620  if test "x$path" != "x$new_path"; then
11621    BOOT_JDK="$new_path"
11622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11623$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11624  fi
11625
11626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11627
11628  path="$BOOT_JDK"
11629  has_colon=`$ECHO $path | $GREP ^.:`
11630  new_path="$path"
11631  if test "x$has_colon" = x; then
11632    # Not in mixed or Windows style, start by that.
11633    new_path=`cmd //c echo $path`
11634  fi
11635
11636
11637  input_path="$new_path"
11638  # Check if we need to convert this using DOS-style short mode. If the path
11639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11640  # take no chances and rewrite it.
11641  # Note: m4 eats our [], so we need to use [ and ] instead.
11642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11643  if test "x$has_forbidden_chars" != x; then
11644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11646  fi
11647
11648
11649  windows_path="$new_path"
11650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11651    unix_path=`$CYGPATH -u "$windows_path"`
11652    new_path="$unix_path"
11653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11655    new_path="$unix_path"
11656  fi
11657
11658  if test "x$path" != "x$new_path"; then
11659    BOOT_JDK="$new_path"
11660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11661$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11662  fi
11663
11664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11666
11667  else
11668    # We're on a posix platform. Hooray! :)
11669    path="$BOOT_JDK"
11670
11671    if test ! -f "$path" && test ! -d "$path"; then
11672      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11673    fi
11674
11675    has_space=`$ECHO "$path" | $GREP " "`
11676    if test "x$has_space" != x; then
11677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11678$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11679      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11680    fi
11681  fi
11682
11683              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11684$as_echo_n "checking for Boot JDK... " >&6; }
11685              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11686$as_echo "$BOOT_JDK" >&6; }
11687              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11688$as_echo_n "checking Boot JDK version... " >&6; }
11689              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11690              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11691$as_echo "$BOOT_JDK_VERSION" >&6; }
11692            fi # end check jdk version
11693          fi # end check rt.jar
11694        fi # end check javac
11695      fi # end check java
11696    fi # end check boot jdk found
11697  fi
11698
11699
11700# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11701
11702  if test "x$BOOT_JDK_FOUND" = xno; then
11703    # Now execute the test
11704
11705    if test -x /usr/libexec/java_home; then
11706        BOOT_JDK=`/usr/libexec/java_home`
11707        BOOT_JDK_FOUND=maybe
11708        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11709$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11710    fi
11711
11712
11713    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11714    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11715      # Do we have a bin/java?
11716      if test ! -x "$BOOT_JDK/bin/java"; then
11717        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11719        BOOT_JDK_FOUND=no
11720      else
11721        # Do we have a bin/javac?
11722        if test ! -x "$BOOT_JDK/bin/javac"; then
11723          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11725          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11726$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11727          BOOT_JDK_FOUND=no
11728        else
11729          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11730          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11731            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11733            BOOT_JDK_FOUND=no
11734          else
11735            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11736            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11737
11738            # Extra M4 quote needed to protect [] in grep expression.
11739            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11740            if test "x$FOUND_VERSION_78" = x; then
11741              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11743              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11744$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11745              BOOT_JDK_FOUND=no
11746            else
11747              # We're done! :-)
11748              BOOT_JDK_FOUND=yes
11749
11750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11751
11752  # Input might be given as Windows format, start by converting to
11753  # unix format.
11754  path="$BOOT_JDK"
11755  new_path=`$CYGPATH -u "$path"`
11756
11757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11760  # "foo.exe" is OK but "foo" is an error.
11761  #
11762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11763  # It is also a way to make sure we got the proper file name for the real test later on.
11764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11765  if test "x$test_shortpath" = x; then
11766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11768    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11769  fi
11770
11771  # Call helper function which possibly converts this using DOS-style short mode.
11772  # If so, the updated path is stored in $new_path.
11773
11774  input_path="$new_path"
11775  # Check if we need to convert this using DOS-style short mode. If the path
11776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11777  # take no chances and rewrite it.
11778  # Note: m4 eats our [], so we need to use [ and ] instead.
11779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11780  if test "x$has_forbidden_chars" != x; then
11781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11785      # Going to short mode and back again did indeed matter. Since short mode is
11786      # case insensitive, let's make it lowercase to improve readability.
11787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11788      # Now convert it back to Unix-stile (cygpath)
11789      input_path=`$CYGPATH -u "$shortmode_path"`
11790      new_path="$input_path"
11791    fi
11792  fi
11793
11794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11795  if test "x$test_cygdrive_prefix" = x; then
11796    # As a simple fix, exclude /usr/bin since it's not a real path.
11797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11799      # a path prefixed by /cygdrive for fixpath to work.
11800      new_path="$CYGWIN_ROOT_PATH$input_path"
11801    fi
11802  fi
11803
11804
11805  if test "x$path" != "x$new_path"; then
11806    BOOT_JDK="$new_path"
11807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11809  fi
11810
11811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11812
11813  path="$BOOT_JDK"
11814  has_colon=`$ECHO $path | $GREP ^.:`
11815  new_path="$path"
11816  if test "x$has_colon" = x; then
11817    # Not in mixed or Windows style, start by that.
11818    new_path=`cmd //c echo $path`
11819  fi
11820
11821
11822  input_path="$new_path"
11823  # Check if we need to convert this using DOS-style short mode. If the path
11824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11825  # take no chances and rewrite it.
11826  # Note: m4 eats our [], so we need to use [ and ] instead.
11827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11828  if test "x$has_forbidden_chars" != x; then
11829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11831  fi
11832
11833
11834  windows_path="$new_path"
11835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11836    unix_path=`$CYGPATH -u "$windows_path"`
11837    new_path="$unix_path"
11838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11840    new_path="$unix_path"
11841  fi
11842
11843  if test "x$path" != "x$new_path"; then
11844    BOOT_JDK="$new_path"
11845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11847  fi
11848
11849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11851
11852  else
11853    # We're on a posix platform. Hooray! :)
11854    path="$BOOT_JDK"
11855
11856    if test ! -f "$path" && test ! -d "$path"; then
11857      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11858    fi
11859
11860    has_space=`$ECHO "$path" | $GREP " "`
11861    if test "x$has_space" != x; then
11862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11864      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11865    fi
11866  fi
11867
11868              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11869$as_echo_n "checking for Boot JDK... " >&6; }
11870              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11871$as_echo "$BOOT_JDK" >&6; }
11872              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11873$as_echo_n "checking Boot JDK version... " >&6; }
11874              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11875              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11876$as_echo "$BOOT_JDK_VERSION" >&6; }
11877            fi # end check jdk version
11878          fi # end check rt.jar
11879        fi # end check javac
11880      fi # end check java
11881    fi # end check boot jdk found
11882  fi
11883
11884
11885# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11886
11887  if test "x$BOOT_JDK_FOUND" = xno; then
11888    # Now execute the test
11889
11890    # Extract the first word of "javac", so it can be a program name with args.
11891set dummy javac; ac_word=$2
11892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11893$as_echo_n "checking for $ac_word... " >&6; }
11894if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11895  $as_echo_n "(cached) " >&6
11896else
11897  case $JAVAC_CHECK in
11898  [\\/]* | ?:[\\/]*)
11899  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11900  ;;
11901  *)
11902  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11903for as_dir in $PATH
11904do
11905  IFS=$as_save_IFS
11906  test -z "$as_dir" && as_dir=.
11907    for ac_exec_ext in '' $ac_executable_extensions; do
11908  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11909    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11910    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11911    break 2
11912  fi
11913done
11914  done
11915IFS=$as_save_IFS
11916
11917  ;;
11918esac
11919fi
11920JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11921if test -n "$JAVAC_CHECK"; then
11922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11923$as_echo "$JAVAC_CHECK" >&6; }
11924else
11925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11926$as_echo "no" >&6; }
11927fi
11928
11929
11930    # Extract the first word of "java", so it can be a program name with args.
11931set dummy java; ac_word=$2
11932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11933$as_echo_n "checking for $ac_word... " >&6; }
11934if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11935  $as_echo_n "(cached) " >&6
11936else
11937  case $JAVA_CHECK in
11938  [\\/]* | ?:[\\/]*)
11939  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11940  ;;
11941  *)
11942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11943for as_dir in $PATH
11944do
11945  IFS=$as_save_IFS
11946  test -z "$as_dir" && as_dir=.
11947    for ac_exec_ext in '' $ac_executable_extensions; do
11948  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11949    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11951    break 2
11952  fi
11953done
11954  done
11955IFS=$as_save_IFS
11956
11957  ;;
11958esac
11959fi
11960JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11961if test -n "$JAVA_CHECK"; then
11962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11963$as_echo "$JAVA_CHECK" >&6; }
11964else
11965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11966$as_echo "no" >&6; }
11967fi
11968
11969
11970    BINARY="$JAVAC_CHECK"
11971    if test "x$JAVAC_CHECK" = x; then
11972        BINARY="$JAVA_CHECK"
11973    fi
11974    if test "x$BINARY" != x; then
11975        # So there is a java(c) binary, it might be part of a JDK.
11976        # Lets find the JDK/JRE directory by following symbolic links.
11977        # Linux/GNU systems often have links from /usr/bin/java to
11978        # /etc/alternatives/java to the real JDK binary.
11979
11980    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11981        # Follow a chain of symbolic links. Use readlink
11982        # where it exists, else fall back to horribly
11983        # complicated shell code.
11984        if test "x$READLINK_TESTED" != yes; then
11985            # On MacOSX there is a readlink tool with a different
11986            # purpose than the GNU readlink tool. Check the found readlink.
11987            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11988            if test "x$ISGNU" = x; then
11989                 # A readlink that we do not know how to use.
11990                 # Are there other non-GNU readlinks out there?
11991                 READLINK_TESTED=yes
11992                 READLINK=
11993            fi
11994        fi
11995
11996        if test "x$READLINK" != x; then
11997            BINARY=`$READLINK -f $BINARY`
11998        else
11999            # Save the current directory for restoring afterwards
12000            STARTDIR=$PWD
12001            COUNTER=0
12002            sym_link_dir=`$DIRNAME $BINARY`
12003            sym_link_file=`$BASENAME $BINARY`
12004            # Use the system pwd and not the shell builtin to resolve directory symlinks
12005            cd $sym_link_dir
12006            cd `$THEPWDCMD`
12007            sym_link_dir=`$THEPWDCMD`
12008            # Resolve file symlinks
12009            while test $COUNTER -lt 20; do
12010                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12011                if test "x$ISLINK" == x; then
12012                    # This is not a symbolic link! We are done!
12013                    break
12014                fi
12015                # Again resolve directory symlinks since the target of the just found
12016                # link could be in a different directory
12017                cd `$DIRNAME $ISLINK`
12018                sym_link_dir=`$THEPWDCMD`
12019                sym_link_file=`$BASENAME $ISLINK`
12020                let COUNTER=COUNTER+1
12021            done
12022            cd $STARTDIR
12023            BINARY=$sym_link_dir/$sym_link_file
12024        fi
12025    fi
12026
12027        BOOT_JDK=`dirname "$BINARY"`
12028        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12029        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12030            # Looks like we found ourselves an JDK
12031            BOOT_JDK_FOUND=maybe
12032            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12033$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12034        fi
12035    fi
12036
12037
12038    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12039    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12040      # Do we have a bin/java?
12041      if test ! -x "$BOOT_JDK/bin/java"; then
12042        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12044        BOOT_JDK_FOUND=no
12045      else
12046        # Do we have a bin/javac?
12047        if test ! -x "$BOOT_JDK/bin/javac"; then
12048          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12049$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12050          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12051$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12052          BOOT_JDK_FOUND=no
12053        else
12054          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12055          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12056            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12058            BOOT_JDK_FOUND=no
12059          else
12060            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12061            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12062
12063            # Extra M4 quote needed to protect [] in grep expression.
12064            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12065            if test "x$FOUND_VERSION_78" = x; then
12066              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12068              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12069$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12070              BOOT_JDK_FOUND=no
12071            else
12072              # We're done! :-)
12073              BOOT_JDK_FOUND=yes
12074
12075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12076
12077  # Input might be given as Windows format, start by converting to
12078  # unix format.
12079  path="$BOOT_JDK"
12080  new_path=`$CYGPATH -u "$path"`
12081
12082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12085  # "foo.exe" is OK but "foo" is an error.
12086  #
12087  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12088  # It is also a way to make sure we got the proper file name for the real test later on.
12089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12090  if test "x$test_shortpath" = x; then
12091    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12092$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12093    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12094  fi
12095
12096  # Call helper function which possibly converts this using DOS-style short mode.
12097  # If so, the updated path is stored in $new_path.
12098
12099  input_path="$new_path"
12100  # Check if we need to convert this using DOS-style short mode. If the path
12101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12102  # take no chances and rewrite it.
12103  # Note: m4 eats our [], so we need to use [ and ] instead.
12104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12105  if test "x$has_forbidden_chars" != x; then
12106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12107    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12108    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12109    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12110      # Going to short mode and back again did indeed matter. Since short mode is
12111      # case insensitive, let's make it lowercase to improve readability.
12112      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12113      # Now convert it back to Unix-stile (cygpath)
12114      input_path=`$CYGPATH -u "$shortmode_path"`
12115      new_path="$input_path"
12116    fi
12117  fi
12118
12119  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12120  if test "x$test_cygdrive_prefix" = x; then
12121    # As a simple fix, exclude /usr/bin since it's not a real path.
12122    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12123      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12124      # a path prefixed by /cygdrive for fixpath to work.
12125      new_path="$CYGWIN_ROOT_PATH$input_path"
12126    fi
12127  fi
12128
12129
12130  if test "x$path" != "x$new_path"; then
12131    BOOT_JDK="$new_path"
12132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12134  fi
12135
12136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12137
12138  path="$BOOT_JDK"
12139  has_colon=`$ECHO $path | $GREP ^.:`
12140  new_path="$path"
12141  if test "x$has_colon" = x; then
12142    # Not in mixed or Windows style, start by that.
12143    new_path=`cmd //c echo $path`
12144  fi
12145
12146
12147  input_path="$new_path"
12148  # Check if we need to convert this using DOS-style short mode. If the path
12149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12150  # take no chances and rewrite it.
12151  # Note: m4 eats our [], so we need to use [ and ] instead.
12152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12153  if test "x$has_forbidden_chars" != x; then
12154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12156  fi
12157
12158
12159  windows_path="$new_path"
12160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12161    unix_path=`$CYGPATH -u "$windows_path"`
12162    new_path="$unix_path"
12163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12165    new_path="$unix_path"
12166  fi
12167
12168  if test "x$path" != "x$new_path"; then
12169    BOOT_JDK="$new_path"
12170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12171$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12172  fi
12173
12174  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12175  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12176
12177  else
12178    # We're on a posix platform. Hooray! :)
12179    path="$BOOT_JDK"
12180
12181    if test ! -f "$path" && test ! -d "$path"; then
12182      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12183    fi
12184
12185    has_space=`$ECHO "$path" | $GREP " "`
12186    if test "x$has_space" != x; then
12187      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12189      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12190    fi
12191  fi
12192
12193              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12194$as_echo_n "checking for Boot JDK... " >&6; }
12195              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12196$as_echo "$BOOT_JDK" >&6; }
12197              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12198$as_echo_n "checking Boot JDK version... " >&6; }
12199              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12200              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12201$as_echo "$BOOT_JDK_VERSION" >&6; }
12202            fi # end check jdk version
12203          fi # end check rt.jar
12204        fi # end check javac
12205      fi # end check java
12206    fi # end check boot jdk found
12207  fi
12208
12209
12210# Test: Is there a JDK installed in default, well-known locations?
12211
12212  if test "x$BOOT_JDK_FOUND" = xno; then
12213    # Now execute the test
12214
12215  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12216
12217  if test "x$BOOT_JDK_FOUND" = xno; then
12218    # Now execute the test
12219
12220  if test "x$ProgramW6432" != x; then
12221    VIRTUAL_DIR="$ProgramW6432/Java"
12222
12223  windows_path="$VIRTUAL_DIR"
12224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12225    unix_path=`$CYGPATH -u "$windows_path"`
12226    VIRTUAL_DIR="$unix_path"
12227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12229    VIRTUAL_DIR="$unix_path"
12230  fi
12231
12232
12233  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12234  BOOT_JDK_SUFFIX=""
12235  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12236  if test "x$ALL_JDKS_FOUND" != x; then
12237    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12238
12239  if test "x$BOOT_JDK_FOUND" = xno; then
12240    # Now execute the test
12241
12242        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12243        if test -d "$BOOT_JDK"; then
12244          BOOT_JDK_FOUND=maybe
12245          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12246$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12247        fi
12248
12249
12250    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12251    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12252      # Do we have a bin/java?
12253      if test ! -x "$BOOT_JDK/bin/java"; then
12254        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12255$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12256        BOOT_JDK_FOUND=no
12257      else
12258        # Do we have a bin/javac?
12259        if test ! -x "$BOOT_JDK/bin/javac"; then
12260          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12262          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12263$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12264          BOOT_JDK_FOUND=no
12265        else
12266          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12267          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12268            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12270            BOOT_JDK_FOUND=no
12271          else
12272            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12273            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12274
12275            # Extra M4 quote needed to protect [] in grep expression.
12276            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12277            if test "x$FOUND_VERSION_78" = x; then
12278              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12280              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12281$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12282              BOOT_JDK_FOUND=no
12283            else
12284              # We're done! :-)
12285              BOOT_JDK_FOUND=yes
12286
12287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12288
12289  # Input might be given as Windows format, start by converting to
12290  # unix format.
12291  path="$BOOT_JDK"
12292  new_path=`$CYGPATH -u "$path"`
12293
12294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12297  # "foo.exe" is OK but "foo" is an error.
12298  #
12299  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12300  # It is also a way to make sure we got the proper file name for the real test later on.
12301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12302  if test "x$test_shortpath" = x; then
12303    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12304$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12305    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12306  fi
12307
12308  # Call helper function which possibly converts this using DOS-style short mode.
12309  # If so, the updated path is stored in $new_path.
12310
12311  input_path="$new_path"
12312  # Check if we need to convert this using DOS-style short mode. If the path
12313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12314  # take no chances and rewrite it.
12315  # Note: m4 eats our [], so we need to use [ and ] instead.
12316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12317  if test "x$has_forbidden_chars" != x; then
12318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12322      # Going to short mode and back again did indeed matter. Since short mode is
12323      # case insensitive, let's make it lowercase to improve readability.
12324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12325      # Now convert it back to Unix-stile (cygpath)
12326      input_path=`$CYGPATH -u "$shortmode_path"`
12327      new_path="$input_path"
12328    fi
12329  fi
12330
12331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12332  if test "x$test_cygdrive_prefix" = x; then
12333    # As a simple fix, exclude /usr/bin since it's not a real path.
12334    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12336      # a path prefixed by /cygdrive for fixpath to work.
12337      new_path="$CYGWIN_ROOT_PATH$input_path"
12338    fi
12339  fi
12340
12341
12342  if test "x$path" != "x$new_path"; then
12343    BOOT_JDK="$new_path"
12344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12346  fi
12347
12348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12349
12350  path="$BOOT_JDK"
12351  has_colon=`$ECHO $path | $GREP ^.:`
12352  new_path="$path"
12353  if test "x$has_colon" = x; then
12354    # Not in mixed or Windows style, start by that.
12355    new_path=`cmd //c echo $path`
12356  fi
12357
12358
12359  input_path="$new_path"
12360  # Check if we need to convert this using DOS-style short mode. If the path
12361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12362  # take no chances and rewrite it.
12363  # Note: m4 eats our [], so we need to use [ and ] instead.
12364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12365  if test "x$has_forbidden_chars" != x; then
12366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12368  fi
12369
12370
12371  windows_path="$new_path"
12372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12373    unix_path=`$CYGPATH -u "$windows_path"`
12374    new_path="$unix_path"
12375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12377    new_path="$unix_path"
12378  fi
12379
12380  if test "x$path" != "x$new_path"; then
12381    BOOT_JDK="$new_path"
12382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12383$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12384  fi
12385
12386  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12387  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12388
12389  else
12390    # We're on a posix platform. Hooray! :)
12391    path="$BOOT_JDK"
12392
12393    if test ! -f "$path" && test ! -d "$path"; then
12394      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12395    fi
12396
12397    has_space=`$ECHO "$path" | $GREP " "`
12398    if test "x$has_space" != x; then
12399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12400$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12401      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12402    fi
12403  fi
12404
12405              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12406$as_echo_n "checking for Boot JDK... " >&6; }
12407              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12408$as_echo "$BOOT_JDK" >&6; }
12409              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12410$as_echo_n "checking Boot JDK version... " >&6; }
12411              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12412              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12413$as_echo "$BOOT_JDK_VERSION" >&6; }
12414            fi # end check jdk version
12415          fi # end check rt.jar
12416        fi # end check javac
12417      fi # end check java
12418    fi # end check boot jdk found
12419  fi
12420
12421    done
12422  fi
12423
12424  fi
12425
12426
12427    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12428    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12429      # Do we have a bin/java?
12430      if test ! -x "$BOOT_JDK/bin/java"; then
12431        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12433        BOOT_JDK_FOUND=no
12434      else
12435        # Do we have a bin/javac?
12436        if test ! -x "$BOOT_JDK/bin/javac"; then
12437          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12438$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12439          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12440$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12441          BOOT_JDK_FOUND=no
12442        else
12443          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12444          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12445            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12447            BOOT_JDK_FOUND=no
12448          else
12449            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12450            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12451
12452            # Extra M4 quote needed to protect [] in grep expression.
12453            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12454            if test "x$FOUND_VERSION_78" = x; then
12455              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12456$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12457              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12458$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12459              BOOT_JDK_FOUND=no
12460            else
12461              # We're done! :-)
12462              BOOT_JDK_FOUND=yes
12463
12464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12465
12466  # Input might be given as Windows format, start by converting to
12467  # unix format.
12468  path="$BOOT_JDK"
12469  new_path=`$CYGPATH -u "$path"`
12470
12471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12474  # "foo.exe" is OK but "foo" is an error.
12475  #
12476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12477  # It is also a way to make sure we got the proper file name for the real test later on.
12478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12479  if test "x$test_shortpath" = x; then
12480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12481$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12482    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12483  fi
12484
12485  # Call helper function which possibly converts this using DOS-style short mode.
12486  # If so, the updated path is stored in $new_path.
12487
12488  input_path="$new_path"
12489  # Check if we need to convert this using DOS-style short mode. If the path
12490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12491  # take no chances and rewrite it.
12492  # Note: m4 eats our [], so we need to use [ and ] instead.
12493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12494  if test "x$has_forbidden_chars" != x; then
12495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12499      # Going to short mode and back again did indeed matter. Since short mode is
12500      # case insensitive, let's make it lowercase to improve readability.
12501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12502      # Now convert it back to Unix-stile (cygpath)
12503      input_path=`$CYGPATH -u "$shortmode_path"`
12504      new_path="$input_path"
12505    fi
12506  fi
12507
12508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12509  if test "x$test_cygdrive_prefix" = x; then
12510    # As a simple fix, exclude /usr/bin since it's not a real path.
12511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12513      # a path prefixed by /cygdrive for fixpath to work.
12514      new_path="$CYGWIN_ROOT_PATH$input_path"
12515    fi
12516  fi
12517
12518
12519  if test "x$path" != "x$new_path"; then
12520    BOOT_JDK="$new_path"
12521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12523  fi
12524
12525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12526
12527  path="$BOOT_JDK"
12528  has_colon=`$ECHO $path | $GREP ^.:`
12529  new_path="$path"
12530  if test "x$has_colon" = x; then
12531    # Not in mixed or Windows style, start by that.
12532    new_path=`cmd //c echo $path`
12533  fi
12534
12535
12536  input_path="$new_path"
12537  # Check if we need to convert this using DOS-style short mode. If the path
12538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12539  # take no chances and rewrite it.
12540  # Note: m4 eats our [], so we need to use [ and ] instead.
12541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12542  if test "x$has_forbidden_chars" != x; then
12543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12545  fi
12546
12547
12548  windows_path="$new_path"
12549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12550    unix_path=`$CYGPATH -u "$windows_path"`
12551    new_path="$unix_path"
12552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12554    new_path="$unix_path"
12555  fi
12556
12557  if test "x$path" != "x$new_path"; then
12558    BOOT_JDK="$new_path"
12559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12560$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12561  fi
12562
12563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12565
12566  else
12567    # We're on a posix platform. Hooray! :)
12568    path="$BOOT_JDK"
12569
12570    if test ! -f "$path" && test ! -d "$path"; then
12571      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12572    fi
12573
12574    has_space=`$ECHO "$path" | $GREP " "`
12575    if test "x$has_space" != x; then
12576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12578      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12579    fi
12580  fi
12581
12582              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12583$as_echo_n "checking for Boot JDK... " >&6; }
12584              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12585$as_echo "$BOOT_JDK" >&6; }
12586              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12587$as_echo_n "checking Boot JDK version... " >&6; }
12588              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12589              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12590$as_echo "$BOOT_JDK_VERSION" >&6; }
12591            fi # end check jdk version
12592          fi # end check rt.jar
12593        fi # end check javac
12594      fi # end check java
12595    fi # end check boot jdk found
12596  fi
12597
12598
12599  if test "x$BOOT_JDK_FOUND" = xno; then
12600    # Now execute the test
12601
12602  if test "x$PROGRAMW6432" != x; then
12603    VIRTUAL_DIR="$PROGRAMW6432/Java"
12604
12605  windows_path="$VIRTUAL_DIR"
12606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12607    unix_path=`$CYGPATH -u "$windows_path"`
12608    VIRTUAL_DIR="$unix_path"
12609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12611    VIRTUAL_DIR="$unix_path"
12612  fi
12613
12614
12615  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12616  BOOT_JDK_SUFFIX=""
12617  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12618  if test "x$ALL_JDKS_FOUND" != x; then
12619    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12620
12621  if test "x$BOOT_JDK_FOUND" = xno; then
12622    # Now execute the test
12623
12624        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12625        if test -d "$BOOT_JDK"; then
12626          BOOT_JDK_FOUND=maybe
12627          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12628$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12629        fi
12630
12631
12632    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12633    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12634      # Do we have a bin/java?
12635      if test ! -x "$BOOT_JDK/bin/java"; then
12636        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12637$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12638        BOOT_JDK_FOUND=no
12639      else
12640        # Do we have a bin/javac?
12641        if test ! -x "$BOOT_JDK/bin/javac"; then
12642          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12643$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12644          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12645$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12646          BOOT_JDK_FOUND=no
12647        else
12648          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12649          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12650            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12652            BOOT_JDK_FOUND=no
12653          else
12654            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12655            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12656
12657            # Extra M4 quote needed to protect [] in grep expression.
12658            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12659            if test "x$FOUND_VERSION_78" = x; then
12660              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12662              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12663$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12664              BOOT_JDK_FOUND=no
12665            else
12666              # We're done! :-)
12667              BOOT_JDK_FOUND=yes
12668
12669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12670
12671  # Input might be given as Windows format, start by converting to
12672  # unix format.
12673  path="$BOOT_JDK"
12674  new_path=`$CYGPATH -u "$path"`
12675
12676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12679  # "foo.exe" is OK but "foo" is an error.
12680  #
12681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12682  # It is also a way to make sure we got the proper file name for the real test later on.
12683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12684  if test "x$test_shortpath" = x; then
12685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12687    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12688  fi
12689
12690  # Call helper function which possibly converts this using DOS-style short mode.
12691  # If so, the updated path is stored in $new_path.
12692
12693  input_path="$new_path"
12694  # Check if we need to convert this using DOS-style short mode. If the path
12695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12696  # take no chances and rewrite it.
12697  # Note: m4 eats our [], so we need to use [ and ] instead.
12698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12699  if test "x$has_forbidden_chars" != x; then
12700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12704      # Going to short mode and back again did indeed matter. Since short mode is
12705      # case insensitive, let's make it lowercase to improve readability.
12706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12707      # Now convert it back to Unix-stile (cygpath)
12708      input_path=`$CYGPATH -u "$shortmode_path"`
12709      new_path="$input_path"
12710    fi
12711  fi
12712
12713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12714  if test "x$test_cygdrive_prefix" = x; then
12715    # As a simple fix, exclude /usr/bin since it's not a real path.
12716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12718      # a path prefixed by /cygdrive for fixpath to work.
12719      new_path="$CYGWIN_ROOT_PATH$input_path"
12720    fi
12721  fi
12722
12723
12724  if test "x$path" != "x$new_path"; then
12725    BOOT_JDK="$new_path"
12726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12727$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12728  fi
12729
12730  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12731
12732  path="$BOOT_JDK"
12733  has_colon=`$ECHO $path | $GREP ^.:`
12734  new_path="$path"
12735  if test "x$has_colon" = x; then
12736    # Not in mixed or Windows style, start by that.
12737    new_path=`cmd //c echo $path`
12738  fi
12739
12740
12741  input_path="$new_path"
12742  # Check if we need to convert this using DOS-style short mode. If the path
12743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12744  # take no chances and rewrite it.
12745  # Note: m4 eats our [], so we need to use [ and ] instead.
12746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12747  if test "x$has_forbidden_chars" != x; then
12748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12750  fi
12751
12752
12753  windows_path="$new_path"
12754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12755    unix_path=`$CYGPATH -u "$windows_path"`
12756    new_path="$unix_path"
12757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12759    new_path="$unix_path"
12760  fi
12761
12762  if test "x$path" != "x$new_path"; then
12763    BOOT_JDK="$new_path"
12764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12765$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12766  fi
12767
12768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12770
12771  else
12772    # We're on a posix platform. Hooray! :)
12773    path="$BOOT_JDK"
12774
12775    if test ! -f "$path" && test ! -d "$path"; then
12776      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12777    fi
12778
12779    has_space=`$ECHO "$path" | $GREP " "`
12780    if test "x$has_space" != x; then
12781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12782$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12783      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12784    fi
12785  fi
12786
12787              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12788$as_echo_n "checking for Boot JDK... " >&6; }
12789              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12790$as_echo "$BOOT_JDK" >&6; }
12791              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12792$as_echo_n "checking Boot JDK version... " >&6; }
12793              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12794              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12795$as_echo "$BOOT_JDK_VERSION" >&6; }
12796            fi # end check jdk version
12797          fi # end check rt.jar
12798        fi # end check javac
12799      fi # end check java
12800    fi # end check boot jdk found
12801  fi
12802
12803    done
12804  fi
12805
12806  fi
12807
12808
12809    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12810    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12811      # Do we have a bin/java?
12812      if test ! -x "$BOOT_JDK/bin/java"; then
12813        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12814$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12815        BOOT_JDK_FOUND=no
12816      else
12817        # Do we have a bin/javac?
12818        if test ! -x "$BOOT_JDK/bin/javac"; then
12819          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12820$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12821          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12822$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12823          BOOT_JDK_FOUND=no
12824        else
12825          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12826          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12827            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12829            BOOT_JDK_FOUND=no
12830          else
12831            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12832            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12833
12834            # Extra M4 quote needed to protect [] in grep expression.
12835            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12836            if test "x$FOUND_VERSION_78" = x; then
12837              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12839              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12840$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12841              BOOT_JDK_FOUND=no
12842            else
12843              # We're done! :-)
12844              BOOT_JDK_FOUND=yes
12845
12846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12847
12848  # Input might be given as Windows format, start by converting to
12849  # unix format.
12850  path="$BOOT_JDK"
12851  new_path=`$CYGPATH -u "$path"`
12852
12853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12856  # "foo.exe" is OK but "foo" is an error.
12857  #
12858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12859  # It is also a way to make sure we got the proper file name for the real test later on.
12860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12861  if test "x$test_shortpath" = x; then
12862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12863$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12864    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12865  fi
12866
12867  # Call helper function which possibly converts this using DOS-style short mode.
12868  # If so, the updated path is stored in $new_path.
12869
12870  input_path="$new_path"
12871  # Check if we need to convert this using DOS-style short mode. If the path
12872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12873  # take no chances and rewrite it.
12874  # Note: m4 eats our [], so we need to use [ and ] instead.
12875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12876  if test "x$has_forbidden_chars" != x; then
12877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12881      # Going to short mode and back again did indeed matter. Since short mode is
12882      # case insensitive, let's make it lowercase to improve readability.
12883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12884      # Now convert it back to Unix-stile (cygpath)
12885      input_path=`$CYGPATH -u "$shortmode_path"`
12886      new_path="$input_path"
12887    fi
12888  fi
12889
12890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12891  if test "x$test_cygdrive_prefix" = x; then
12892    # As a simple fix, exclude /usr/bin since it's not a real path.
12893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12895      # a path prefixed by /cygdrive for fixpath to work.
12896      new_path="$CYGWIN_ROOT_PATH$input_path"
12897    fi
12898  fi
12899
12900
12901  if test "x$path" != "x$new_path"; then
12902    BOOT_JDK="$new_path"
12903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12905  fi
12906
12907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12908
12909  path="$BOOT_JDK"
12910  has_colon=`$ECHO $path | $GREP ^.:`
12911  new_path="$path"
12912  if test "x$has_colon" = x; then
12913    # Not in mixed or Windows style, start by that.
12914    new_path=`cmd //c echo $path`
12915  fi
12916
12917
12918  input_path="$new_path"
12919  # Check if we need to convert this using DOS-style short mode. If the path
12920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12921  # take no chances and rewrite it.
12922  # Note: m4 eats our [], so we need to use [ and ] instead.
12923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12924  if test "x$has_forbidden_chars" != x; then
12925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12927  fi
12928
12929
12930  windows_path="$new_path"
12931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12932    unix_path=`$CYGPATH -u "$windows_path"`
12933    new_path="$unix_path"
12934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12936    new_path="$unix_path"
12937  fi
12938
12939  if test "x$path" != "x$new_path"; then
12940    BOOT_JDK="$new_path"
12941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12942$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12943  fi
12944
12945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12947
12948  else
12949    # We're on a posix platform. Hooray! :)
12950    path="$BOOT_JDK"
12951
12952    if test ! -f "$path" && test ! -d "$path"; then
12953      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12954    fi
12955
12956    has_space=`$ECHO "$path" | $GREP " "`
12957    if test "x$has_space" != x; then
12958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12959$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12960      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12961    fi
12962  fi
12963
12964              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12965$as_echo_n "checking for Boot JDK... " >&6; }
12966              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12967$as_echo "$BOOT_JDK" >&6; }
12968              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12969$as_echo_n "checking Boot JDK version... " >&6; }
12970              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12971              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12972$as_echo "$BOOT_JDK_VERSION" >&6; }
12973            fi # end check jdk version
12974          fi # end check rt.jar
12975        fi # end check javac
12976      fi # end check java
12977    fi # end check boot jdk found
12978  fi
12979
12980
12981  if test "x$BOOT_JDK_FOUND" = xno; then
12982    # Now execute the test
12983
12984  if test "x$PROGRAMFILES" != x; then
12985    VIRTUAL_DIR="$PROGRAMFILES/Java"
12986
12987  windows_path="$VIRTUAL_DIR"
12988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12989    unix_path=`$CYGPATH -u "$windows_path"`
12990    VIRTUAL_DIR="$unix_path"
12991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12993    VIRTUAL_DIR="$unix_path"
12994  fi
12995
12996
12997  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12998  BOOT_JDK_SUFFIX=""
12999  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13000  if test "x$ALL_JDKS_FOUND" != x; then
13001    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13002
13003  if test "x$BOOT_JDK_FOUND" = xno; then
13004    # Now execute the test
13005
13006        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13007        if test -d "$BOOT_JDK"; then
13008          BOOT_JDK_FOUND=maybe
13009          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13010$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13011        fi
13012
13013
13014    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13015    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13016      # Do we have a bin/java?
13017      if test ! -x "$BOOT_JDK/bin/java"; then
13018        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13020        BOOT_JDK_FOUND=no
13021      else
13022        # Do we have a bin/javac?
13023        if test ! -x "$BOOT_JDK/bin/javac"; then
13024          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13026          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13027$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13028          BOOT_JDK_FOUND=no
13029        else
13030          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13031          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13032            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13033$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13034            BOOT_JDK_FOUND=no
13035          else
13036            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13037            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13038
13039            # Extra M4 quote needed to protect [] in grep expression.
13040            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13041            if test "x$FOUND_VERSION_78" = x; then
13042              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13043$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13044              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13045$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13046              BOOT_JDK_FOUND=no
13047            else
13048              # We're done! :-)
13049              BOOT_JDK_FOUND=yes
13050
13051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13052
13053  # Input might be given as Windows format, start by converting to
13054  # unix format.
13055  path="$BOOT_JDK"
13056  new_path=`$CYGPATH -u "$path"`
13057
13058  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13059  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13060  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13061  # "foo.exe" is OK but "foo" is an error.
13062  #
13063  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13064  # It is also a way to make sure we got the proper file name for the real test later on.
13065  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13066  if test "x$test_shortpath" = x; then
13067    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13068$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13069    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13070  fi
13071
13072  # Call helper function which possibly converts this using DOS-style short mode.
13073  # If so, the updated path is stored in $new_path.
13074
13075  input_path="$new_path"
13076  # Check if we need to convert this using DOS-style short mode. If the path
13077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13078  # take no chances and rewrite it.
13079  # Note: m4 eats our [], so we need to use [ and ] instead.
13080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13081  if test "x$has_forbidden_chars" != x; then
13082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13083    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13084    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13085    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13086      # Going to short mode and back again did indeed matter. Since short mode is
13087      # case insensitive, let's make it lowercase to improve readability.
13088      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13089      # Now convert it back to Unix-stile (cygpath)
13090      input_path=`$CYGPATH -u "$shortmode_path"`
13091      new_path="$input_path"
13092    fi
13093  fi
13094
13095  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13096  if test "x$test_cygdrive_prefix" = x; then
13097    # As a simple fix, exclude /usr/bin since it's not a real path.
13098    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13099      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13100      # a path prefixed by /cygdrive for fixpath to work.
13101      new_path="$CYGWIN_ROOT_PATH$input_path"
13102    fi
13103  fi
13104
13105
13106  if test "x$path" != "x$new_path"; then
13107    BOOT_JDK="$new_path"
13108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13110  fi
13111
13112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13113
13114  path="$BOOT_JDK"
13115  has_colon=`$ECHO $path | $GREP ^.:`
13116  new_path="$path"
13117  if test "x$has_colon" = x; then
13118    # Not in mixed or Windows style, start by that.
13119    new_path=`cmd //c echo $path`
13120  fi
13121
13122
13123  input_path="$new_path"
13124  # Check if we need to convert this using DOS-style short mode. If the path
13125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13126  # take no chances and rewrite it.
13127  # Note: m4 eats our [], so we need to use [ and ] instead.
13128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13129  if test "x$has_forbidden_chars" != x; then
13130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13131    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13132  fi
13133
13134
13135  windows_path="$new_path"
13136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13137    unix_path=`$CYGPATH -u "$windows_path"`
13138    new_path="$unix_path"
13139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13141    new_path="$unix_path"
13142  fi
13143
13144  if test "x$path" != "x$new_path"; then
13145    BOOT_JDK="$new_path"
13146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13148  fi
13149
13150  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13151  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13152
13153  else
13154    # We're on a posix platform. Hooray! :)
13155    path="$BOOT_JDK"
13156
13157    if test ! -f "$path" && test ! -d "$path"; then
13158      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13159    fi
13160
13161    has_space=`$ECHO "$path" | $GREP " "`
13162    if test "x$has_space" != x; then
13163      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13164$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13165      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13166    fi
13167  fi
13168
13169              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13170$as_echo_n "checking for Boot JDK... " >&6; }
13171              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13172$as_echo "$BOOT_JDK" >&6; }
13173              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13174$as_echo_n "checking Boot JDK version... " >&6; }
13175              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13176              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13177$as_echo "$BOOT_JDK_VERSION" >&6; }
13178            fi # end check jdk version
13179          fi # end check rt.jar
13180        fi # end check javac
13181      fi # end check java
13182    fi # end check boot jdk found
13183  fi
13184
13185    done
13186  fi
13187
13188  fi
13189
13190
13191    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13192    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13193      # Do we have a bin/java?
13194      if test ! -x "$BOOT_JDK/bin/java"; then
13195        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13197        BOOT_JDK_FOUND=no
13198      else
13199        # Do we have a bin/javac?
13200        if test ! -x "$BOOT_JDK/bin/javac"; then
13201          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13203          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13204$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13205          BOOT_JDK_FOUND=no
13206        else
13207          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13208          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13209            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13210$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13211            BOOT_JDK_FOUND=no
13212          else
13213            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13214            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13215
13216            # Extra M4 quote needed to protect [] in grep expression.
13217            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13218            if test "x$FOUND_VERSION_78" = x; then
13219              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13221              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13222$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13223              BOOT_JDK_FOUND=no
13224            else
13225              # We're done! :-)
13226              BOOT_JDK_FOUND=yes
13227
13228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13229
13230  # Input might be given as Windows format, start by converting to
13231  # unix format.
13232  path="$BOOT_JDK"
13233  new_path=`$CYGPATH -u "$path"`
13234
13235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13238  # "foo.exe" is OK but "foo" is an error.
13239  #
13240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13241  # It is also a way to make sure we got the proper file name for the real test later on.
13242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13243  if test "x$test_shortpath" = x; then
13244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13246    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13247  fi
13248
13249  # Call helper function which possibly converts this using DOS-style short mode.
13250  # If so, the updated path is stored in $new_path.
13251
13252  input_path="$new_path"
13253  # Check if we need to convert this using DOS-style short mode. If the path
13254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13255  # take no chances and rewrite it.
13256  # Note: m4 eats our [], so we need to use [ and ] instead.
13257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13258  if test "x$has_forbidden_chars" != x; then
13259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13263      # Going to short mode and back again did indeed matter. Since short mode is
13264      # case insensitive, let's make it lowercase to improve readability.
13265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13266      # Now convert it back to Unix-stile (cygpath)
13267      input_path=`$CYGPATH -u "$shortmode_path"`
13268      new_path="$input_path"
13269    fi
13270  fi
13271
13272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13273  if test "x$test_cygdrive_prefix" = x; then
13274    # As a simple fix, exclude /usr/bin since it's not a real path.
13275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13277      # a path prefixed by /cygdrive for fixpath to work.
13278      new_path="$CYGWIN_ROOT_PATH$input_path"
13279    fi
13280  fi
13281
13282
13283  if test "x$path" != "x$new_path"; then
13284    BOOT_JDK="$new_path"
13285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13287  fi
13288
13289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13290
13291  path="$BOOT_JDK"
13292  has_colon=`$ECHO $path | $GREP ^.:`
13293  new_path="$path"
13294  if test "x$has_colon" = x; then
13295    # Not in mixed or Windows style, start by that.
13296    new_path=`cmd //c echo $path`
13297  fi
13298
13299
13300  input_path="$new_path"
13301  # Check if we need to convert this using DOS-style short mode. If the path
13302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13303  # take no chances and rewrite it.
13304  # Note: m4 eats our [], so we need to use [ and ] instead.
13305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13306  if test "x$has_forbidden_chars" != x; then
13307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13309  fi
13310
13311
13312  windows_path="$new_path"
13313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13314    unix_path=`$CYGPATH -u "$windows_path"`
13315    new_path="$unix_path"
13316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13318    new_path="$unix_path"
13319  fi
13320
13321  if test "x$path" != "x$new_path"; then
13322    BOOT_JDK="$new_path"
13323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13325  fi
13326
13327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13329
13330  else
13331    # We're on a posix platform. Hooray! :)
13332    path="$BOOT_JDK"
13333
13334    if test ! -f "$path" && test ! -d "$path"; then
13335      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13336    fi
13337
13338    has_space=`$ECHO "$path" | $GREP " "`
13339    if test "x$has_space" != x; then
13340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13341$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13342      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13343    fi
13344  fi
13345
13346              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13347$as_echo_n "checking for Boot JDK... " >&6; }
13348              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13349$as_echo "$BOOT_JDK" >&6; }
13350              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13351$as_echo_n "checking Boot JDK version... " >&6; }
13352              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13353              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13354$as_echo "$BOOT_JDK_VERSION" >&6; }
13355            fi # end check jdk version
13356          fi # end check rt.jar
13357        fi # end check javac
13358      fi # end check java
13359    fi # end check boot jdk found
13360  fi
13361
13362
13363  if test "x$BOOT_JDK_FOUND" = xno; then
13364    # Now execute the test
13365
13366  if test "x$ProgramFiles" != x; then
13367    VIRTUAL_DIR="$ProgramFiles/Java"
13368
13369  windows_path="$VIRTUAL_DIR"
13370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13371    unix_path=`$CYGPATH -u "$windows_path"`
13372    VIRTUAL_DIR="$unix_path"
13373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13375    VIRTUAL_DIR="$unix_path"
13376  fi
13377
13378
13379  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13380  BOOT_JDK_SUFFIX=""
13381  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13382  if test "x$ALL_JDKS_FOUND" != x; then
13383    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13384
13385  if test "x$BOOT_JDK_FOUND" = xno; then
13386    # Now execute the test
13387
13388        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13389        if test -d "$BOOT_JDK"; then
13390          BOOT_JDK_FOUND=maybe
13391          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13392$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13393        fi
13394
13395
13396    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13397    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13398      # Do we have a bin/java?
13399      if test ! -x "$BOOT_JDK/bin/java"; then
13400        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13402        BOOT_JDK_FOUND=no
13403      else
13404        # Do we have a bin/javac?
13405        if test ! -x "$BOOT_JDK/bin/javac"; then
13406          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13407$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13408          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13409$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13410          BOOT_JDK_FOUND=no
13411        else
13412          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13413          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13416            BOOT_JDK_FOUND=no
13417          else
13418            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13419            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13420
13421            # Extra M4 quote needed to protect [] in grep expression.
13422            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13423            if test "x$FOUND_VERSION_78" = x; then
13424              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13425$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13426              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13427$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13428              BOOT_JDK_FOUND=no
13429            else
13430              # We're done! :-)
13431              BOOT_JDK_FOUND=yes
13432
13433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13434
13435  # Input might be given as Windows format, start by converting to
13436  # unix format.
13437  path="$BOOT_JDK"
13438  new_path=`$CYGPATH -u "$path"`
13439
13440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13443  # "foo.exe" is OK but "foo" is an error.
13444  #
13445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13446  # It is also a way to make sure we got the proper file name for the real test later on.
13447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13448  if test "x$test_shortpath" = x; then
13449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13451    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13452  fi
13453
13454  # Call helper function which possibly converts this using DOS-style short mode.
13455  # If so, the updated path is stored in $new_path.
13456
13457  input_path="$new_path"
13458  # Check if we need to convert this using DOS-style short mode. If the path
13459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13460  # take no chances and rewrite it.
13461  # Note: m4 eats our [], so we need to use [ and ] instead.
13462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13463  if test "x$has_forbidden_chars" != x; then
13464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13468      # Going to short mode and back again did indeed matter. Since short mode is
13469      # case insensitive, let's make it lowercase to improve readability.
13470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13471      # Now convert it back to Unix-stile (cygpath)
13472      input_path=`$CYGPATH -u "$shortmode_path"`
13473      new_path="$input_path"
13474    fi
13475  fi
13476
13477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13478  if test "x$test_cygdrive_prefix" = x; then
13479    # As a simple fix, exclude /usr/bin since it's not a real path.
13480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13482      # a path prefixed by /cygdrive for fixpath to work.
13483      new_path="$CYGWIN_ROOT_PATH$input_path"
13484    fi
13485  fi
13486
13487
13488  if test "x$path" != "x$new_path"; then
13489    BOOT_JDK="$new_path"
13490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13492  fi
13493
13494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13495
13496  path="$BOOT_JDK"
13497  has_colon=`$ECHO $path | $GREP ^.:`
13498  new_path="$path"
13499  if test "x$has_colon" = x; then
13500    # Not in mixed or Windows style, start by that.
13501    new_path=`cmd //c echo $path`
13502  fi
13503
13504
13505  input_path="$new_path"
13506  # Check if we need to convert this using DOS-style short mode. If the path
13507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13508  # take no chances and rewrite it.
13509  # Note: m4 eats our [], so we need to use [ and ] instead.
13510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13511  if test "x$has_forbidden_chars" != x; then
13512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13514  fi
13515
13516
13517  windows_path="$new_path"
13518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13519    unix_path=`$CYGPATH -u "$windows_path"`
13520    new_path="$unix_path"
13521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13523    new_path="$unix_path"
13524  fi
13525
13526  if test "x$path" != "x$new_path"; then
13527    BOOT_JDK="$new_path"
13528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13530  fi
13531
13532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13534
13535  else
13536    # We're on a posix platform. Hooray! :)
13537    path="$BOOT_JDK"
13538
13539    if test ! -f "$path" && test ! -d "$path"; then
13540      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13541    fi
13542
13543    has_space=`$ECHO "$path" | $GREP " "`
13544    if test "x$has_space" != x; then
13545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13546$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13547      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13548    fi
13549  fi
13550
13551              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13552$as_echo_n "checking for Boot JDK... " >&6; }
13553              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13554$as_echo "$BOOT_JDK" >&6; }
13555              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13556$as_echo_n "checking Boot JDK version... " >&6; }
13557              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13558              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13559$as_echo "$BOOT_JDK_VERSION" >&6; }
13560            fi # end check jdk version
13561          fi # end check rt.jar
13562        fi # end check javac
13563      fi # end check java
13564    fi # end check boot jdk found
13565  fi
13566
13567    done
13568  fi
13569
13570  fi
13571
13572
13573    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13574    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13575      # Do we have a bin/java?
13576      if test ! -x "$BOOT_JDK/bin/java"; then
13577        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13578$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13579        BOOT_JDK_FOUND=no
13580      else
13581        # Do we have a bin/javac?
13582        if test ! -x "$BOOT_JDK/bin/javac"; then
13583          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13584$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13585          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13586$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13587          BOOT_JDK_FOUND=no
13588        else
13589          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13590          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13591            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13593            BOOT_JDK_FOUND=no
13594          else
13595            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13596            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13597
13598            # Extra M4 quote needed to protect [] in grep expression.
13599            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13600            if test "x$FOUND_VERSION_78" = x; then
13601              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13603              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13604$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13605              BOOT_JDK_FOUND=no
13606            else
13607              # We're done! :-)
13608              BOOT_JDK_FOUND=yes
13609
13610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13611
13612  # Input might be given as Windows format, start by converting to
13613  # unix format.
13614  path="$BOOT_JDK"
13615  new_path=`$CYGPATH -u "$path"`
13616
13617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13620  # "foo.exe" is OK but "foo" is an error.
13621  #
13622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13623  # It is also a way to make sure we got the proper file name for the real test later on.
13624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13625  if test "x$test_shortpath" = x; then
13626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13627$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13628    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13629  fi
13630
13631  # Call helper function which possibly converts this using DOS-style short mode.
13632  # If so, the updated path is stored in $new_path.
13633
13634  input_path="$new_path"
13635  # Check if we need to convert this using DOS-style short mode. If the path
13636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13637  # take no chances and rewrite it.
13638  # Note: m4 eats our [], so we need to use [ and ] instead.
13639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13640  if test "x$has_forbidden_chars" != x; then
13641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13645      # Going to short mode and back again did indeed matter. Since short mode is
13646      # case insensitive, let's make it lowercase to improve readability.
13647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13648      # Now convert it back to Unix-stile (cygpath)
13649      input_path=`$CYGPATH -u "$shortmode_path"`
13650      new_path="$input_path"
13651    fi
13652  fi
13653
13654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13655  if test "x$test_cygdrive_prefix" = x; then
13656    # As a simple fix, exclude /usr/bin since it's not a real path.
13657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13659      # a path prefixed by /cygdrive for fixpath to work.
13660      new_path="$CYGWIN_ROOT_PATH$input_path"
13661    fi
13662  fi
13663
13664
13665  if test "x$path" != "x$new_path"; then
13666    BOOT_JDK="$new_path"
13667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13668$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13669  fi
13670
13671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13672
13673  path="$BOOT_JDK"
13674  has_colon=`$ECHO $path | $GREP ^.:`
13675  new_path="$path"
13676  if test "x$has_colon" = x; then
13677    # Not in mixed or Windows style, start by that.
13678    new_path=`cmd //c echo $path`
13679  fi
13680
13681
13682  input_path="$new_path"
13683  # Check if we need to convert this using DOS-style short mode. If the path
13684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13685  # take no chances and rewrite it.
13686  # Note: m4 eats our [], so we need to use [ and ] instead.
13687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13688  if test "x$has_forbidden_chars" != x; then
13689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13691  fi
13692
13693
13694  windows_path="$new_path"
13695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13696    unix_path=`$CYGPATH -u "$windows_path"`
13697    new_path="$unix_path"
13698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13700    new_path="$unix_path"
13701  fi
13702
13703  if test "x$path" != "x$new_path"; then
13704    BOOT_JDK="$new_path"
13705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13706$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13707  fi
13708
13709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13711
13712  else
13713    # We're on a posix platform. Hooray! :)
13714    path="$BOOT_JDK"
13715
13716    if test ! -f "$path" && test ! -d "$path"; then
13717      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13718    fi
13719
13720    has_space=`$ECHO "$path" | $GREP " "`
13721    if test "x$has_space" != x; then
13722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13724      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13725    fi
13726  fi
13727
13728              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13729$as_echo_n "checking for Boot JDK... " >&6; }
13730              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13731$as_echo "$BOOT_JDK" >&6; }
13732              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13733$as_echo_n "checking Boot JDK version... " >&6; }
13734              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13735              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13736$as_echo "$BOOT_JDK_VERSION" >&6; }
13737            fi # end check jdk version
13738          fi # end check rt.jar
13739        fi # end check javac
13740      fi # end check java
13741    fi # end check boot jdk found
13742  fi
13743
13744
13745  if test "x$BOOT_JDK_FOUND" = xno; then
13746    # Now execute the test
13747
13748  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13749  BOOT_JDK_SUFFIX=""
13750  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13751  if test "x$ALL_JDKS_FOUND" != x; then
13752    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13753
13754  if test "x$BOOT_JDK_FOUND" = xno; then
13755    # Now execute the test
13756
13757        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13758        if test -d "$BOOT_JDK"; then
13759          BOOT_JDK_FOUND=maybe
13760          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13761$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13762        fi
13763
13764
13765    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13766    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13767      # Do we have a bin/java?
13768      if test ! -x "$BOOT_JDK/bin/java"; then
13769        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13771        BOOT_JDK_FOUND=no
13772      else
13773        # Do we have a bin/javac?
13774        if test ! -x "$BOOT_JDK/bin/javac"; then
13775          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13777          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13778$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13779          BOOT_JDK_FOUND=no
13780        else
13781          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13782          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13783            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13785            BOOT_JDK_FOUND=no
13786          else
13787            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13788            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13789
13790            # Extra M4 quote needed to protect [] in grep expression.
13791            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13792            if test "x$FOUND_VERSION_78" = x; then
13793              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13795              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13796$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13797              BOOT_JDK_FOUND=no
13798            else
13799              # We're done! :-)
13800              BOOT_JDK_FOUND=yes
13801
13802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13803
13804  # Input might be given as Windows format, start by converting to
13805  # unix format.
13806  path="$BOOT_JDK"
13807  new_path=`$CYGPATH -u "$path"`
13808
13809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13812  # "foo.exe" is OK but "foo" is an error.
13813  #
13814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13815  # It is also a way to make sure we got the proper file name for the real test later on.
13816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13817  if test "x$test_shortpath" = x; then
13818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13820    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13821  fi
13822
13823  # Call helper function which possibly converts this using DOS-style short mode.
13824  # If so, the updated path is stored in $new_path.
13825
13826  input_path="$new_path"
13827  # Check if we need to convert this using DOS-style short mode. If the path
13828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13829  # take no chances and rewrite it.
13830  # Note: m4 eats our [], so we need to use [ and ] instead.
13831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13832  if test "x$has_forbidden_chars" != x; then
13833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13837      # Going to short mode and back again did indeed matter. Since short mode is
13838      # case insensitive, let's make it lowercase to improve readability.
13839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13840      # Now convert it back to Unix-stile (cygpath)
13841      input_path=`$CYGPATH -u "$shortmode_path"`
13842      new_path="$input_path"
13843    fi
13844  fi
13845
13846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13847  if test "x$test_cygdrive_prefix" = x; then
13848    # As a simple fix, exclude /usr/bin since it's not a real path.
13849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13851      # a path prefixed by /cygdrive for fixpath to work.
13852      new_path="$CYGWIN_ROOT_PATH$input_path"
13853    fi
13854  fi
13855
13856
13857  if test "x$path" != "x$new_path"; then
13858    BOOT_JDK="$new_path"
13859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13861  fi
13862
13863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13864
13865  path="$BOOT_JDK"
13866  has_colon=`$ECHO $path | $GREP ^.:`
13867  new_path="$path"
13868  if test "x$has_colon" = x; then
13869    # Not in mixed or Windows style, start by that.
13870    new_path=`cmd //c echo $path`
13871  fi
13872
13873
13874  input_path="$new_path"
13875  # Check if we need to convert this using DOS-style short mode. If the path
13876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13877  # take no chances and rewrite it.
13878  # Note: m4 eats our [], so we need to use [ and ] instead.
13879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13880  if test "x$has_forbidden_chars" != x; then
13881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13883  fi
13884
13885
13886  windows_path="$new_path"
13887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13888    unix_path=`$CYGPATH -u "$windows_path"`
13889    new_path="$unix_path"
13890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13892    new_path="$unix_path"
13893  fi
13894
13895  if test "x$path" != "x$new_path"; then
13896    BOOT_JDK="$new_path"
13897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13898$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13899  fi
13900
13901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13903
13904  else
13905    # We're on a posix platform. Hooray! :)
13906    path="$BOOT_JDK"
13907
13908    if test ! -f "$path" && test ! -d "$path"; then
13909      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13910    fi
13911
13912    has_space=`$ECHO "$path" | $GREP " "`
13913    if test "x$has_space" != x; then
13914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13916      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13917    fi
13918  fi
13919
13920              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13921$as_echo_n "checking for Boot JDK... " >&6; }
13922              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13923$as_echo "$BOOT_JDK" >&6; }
13924              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13925$as_echo_n "checking Boot JDK version... " >&6; }
13926              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13927              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13928$as_echo "$BOOT_JDK_VERSION" >&6; }
13929            fi # end check jdk version
13930          fi # end check rt.jar
13931        fi # end check javac
13932      fi # end check java
13933    fi # end check boot jdk found
13934  fi
13935
13936    done
13937  fi
13938
13939
13940    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13941    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13942      # Do we have a bin/java?
13943      if test ! -x "$BOOT_JDK/bin/java"; then
13944        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13946        BOOT_JDK_FOUND=no
13947      else
13948        # Do we have a bin/javac?
13949        if test ! -x "$BOOT_JDK/bin/javac"; then
13950          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13951$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13952          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13953$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13954          BOOT_JDK_FOUND=no
13955        else
13956          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13957          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13958            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13960            BOOT_JDK_FOUND=no
13961          else
13962            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13963            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13964
13965            # Extra M4 quote needed to protect [] in grep expression.
13966            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13967            if test "x$FOUND_VERSION_78" = x; then
13968              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13969$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13970              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13971$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13972              BOOT_JDK_FOUND=no
13973            else
13974              # We're done! :-)
13975              BOOT_JDK_FOUND=yes
13976
13977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13978
13979  # Input might be given as Windows format, start by converting to
13980  # unix format.
13981  path="$BOOT_JDK"
13982  new_path=`$CYGPATH -u "$path"`
13983
13984  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13985  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13986  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13987  # "foo.exe" is OK but "foo" is an error.
13988  #
13989  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13990  # It is also a way to make sure we got the proper file name for the real test later on.
13991  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13992  if test "x$test_shortpath" = x; then
13993    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13994$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13995    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13996  fi
13997
13998  # Call helper function which possibly converts this using DOS-style short mode.
13999  # If so, the updated path is stored in $new_path.
14000
14001  input_path="$new_path"
14002  # Check if we need to convert this using DOS-style short mode. If the path
14003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14004  # take no chances and rewrite it.
14005  # Note: m4 eats our [], so we need to use [ and ] instead.
14006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14007  if test "x$has_forbidden_chars" != x; then
14008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14009    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14010    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14011    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14012      # Going to short mode and back again did indeed matter. Since short mode is
14013      # case insensitive, let's make it lowercase to improve readability.
14014      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14015      # Now convert it back to Unix-stile (cygpath)
14016      input_path=`$CYGPATH -u "$shortmode_path"`
14017      new_path="$input_path"
14018    fi
14019  fi
14020
14021  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14022  if test "x$test_cygdrive_prefix" = x; then
14023    # As a simple fix, exclude /usr/bin since it's not a real path.
14024    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14025      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14026      # a path prefixed by /cygdrive for fixpath to work.
14027      new_path="$CYGWIN_ROOT_PATH$input_path"
14028    fi
14029  fi
14030
14031
14032  if test "x$path" != "x$new_path"; then
14033    BOOT_JDK="$new_path"
14034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14036  fi
14037
14038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14039
14040  path="$BOOT_JDK"
14041  has_colon=`$ECHO $path | $GREP ^.:`
14042  new_path="$path"
14043  if test "x$has_colon" = x; then
14044    # Not in mixed or Windows style, start by that.
14045    new_path=`cmd //c echo $path`
14046  fi
14047
14048
14049  input_path="$new_path"
14050  # Check if we need to convert this using DOS-style short mode. If the path
14051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14052  # take no chances and rewrite it.
14053  # Note: m4 eats our [], so we need to use [ and ] instead.
14054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14055  if test "x$has_forbidden_chars" != x; then
14056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14057    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14058  fi
14059
14060
14061  windows_path="$new_path"
14062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14063    unix_path=`$CYGPATH -u "$windows_path"`
14064    new_path="$unix_path"
14065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14067    new_path="$unix_path"
14068  fi
14069
14070  if test "x$path" != "x$new_path"; then
14071    BOOT_JDK="$new_path"
14072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14074  fi
14075
14076  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14077  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14078
14079  else
14080    # We're on a posix platform. Hooray! :)
14081    path="$BOOT_JDK"
14082
14083    if test ! -f "$path" && test ! -d "$path"; then
14084      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14085    fi
14086
14087    has_space=`$ECHO "$path" | $GREP " "`
14088    if test "x$has_space" != x; then
14089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14091      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14092    fi
14093  fi
14094
14095              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14096$as_echo_n "checking for Boot JDK... " >&6; }
14097              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14098$as_echo "$BOOT_JDK" >&6; }
14099              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14100$as_echo_n "checking Boot JDK version... " >&6; }
14101              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14102              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14103$as_echo "$BOOT_JDK_VERSION" >&6; }
14104            fi # end check jdk version
14105          fi # end check rt.jar
14106        fi # end check javac
14107      fi # end check java
14108    fi # end check boot jdk found
14109  fi
14110
14111  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14112
14113  if test "x$BOOT_JDK_FOUND" = xno; then
14114    # Now execute the test
14115
14116  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14117  BOOT_JDK_SUFFIX="/Contents/Home"
14118  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14119  if test "x$ALL_JDKS_FOUND" != x; then
14120    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14121
14122  if test "x$BOOT_JDK_FOUND" = xno; then
14123    # Now execute the test
14124
14125        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14126        if test -d "$BOOT_JDK"; then
14127          BOOT_JDK_FOUND=maybe
14128          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14129$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14130        fi
14131
14132
14133    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14134    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14135      # Do we have a bin/java?
14136      if test ! -x "$BOOT_JDK/bin/java"; then
14137        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14139        BOOT_JDK_FOUND=no
14140      else
14141        # Do we have a bin/javac?
14142        if test ! -x "$BOOT_JDK/bin/javac"; then
14143          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14145          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14146$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14147          BOOT_JDK_FOUND=no
14148        else
14149          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14150          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14151            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14152$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14153            BOOT_JDK_FOUND=no
14154          else
14155            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14156            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14157
14158            # Extra M4 quote needed to protect [] in grep expression.
14159            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14160            if test "x$FOUND_VERSION_78" = x; then
14161              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14163              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14164$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14165              BOOT_JDK_FOUND=no
14166            else
14167              # We're done! :-)
14168              BOOT_JDK_FOUND=yes
14169
14170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14171
14172  # Input might be given as Windows format, start by converting to
14173  # unix format.
14174  path="$BOOT_JDK"
14175  new_path=`$CYGPATH -u "$path"`
14176
14177  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14178  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14179  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14180  # "foo.exe" is OK but "foo" is an error.
14181  #
14182  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14183  # It is also a way to make sure we got the proper file name for the real test later on.
14184  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14185  if test "x$test_shortpath" = x; then
14186    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14187$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14188    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14189  fi
14190
14191  # Call helper function which possibly converts this using DOS-style short mode.
14192  # If so, the updated path is stored in $new_path.
14193
14194  input_path="$new_path"
14195  # Check if we need to convert this using DOS-style short mode. If the path
14196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14197  # take no chances and rewrite it.
14198  # Note: m4 eats our [], so we need to use [ and ] instead.
14199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14200  if test "x$has_forbidden_chars" != x; then
14201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14202    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14203    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14204    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14205      # Going to short mode and back again did indeed matter. Since short mode is
14206      # case insensitive, let's make it lowercase to improve readability.
14207      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14208      # Now convert it back to Unix-stile (cygpath)
14209      input_path=`$CYGPATH -u "$shortmode_path"`
14210      new_path="$input_path"
14211    fi
14212  fi
14213
14214  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14215  if test "x$test_cygdrive_prefix" = x; then
14216    # As a simple fix, exclude /usr/bin since it's not a real path.
14217    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14218      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14219      # a path prefixed by /cygdrive for fixpath to work.
14220      new_path="$CYGWIN_ROOT_PATH$input_path"
14221    fi
14222  fi
14223
14224
14225  if test "x$path" != "x$new_path"; then
14226    BOOT_JDK="$new_path"
14227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14229  fi
14230
14231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14232
14233  path="$BOOT_JDK"
14234  has_colon=`$ECHO $path | $GREP ^.:`
14235  new_path="$path"
14236  if test "x$has_colon" = x; then
14237    # Not in mixed or Windows style, start by that.
14238    new_path=`cmd //c echo $path`
14239  fi
14240
14241
14242  input_path="$new_path"
14243  # Check if we need to convert this using DOS-style short mode. If the path
14244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14245  # take no chances and rewrite it.
14246  # Note: m4 eats our [], so we need to use [ and ] instead.
14247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14248  if test "x$has_forbidden_chars" != x; then
14249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14250    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14251  fi
14252
14253
14254  windows_path="$new_path"
14255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14256    unix_path=`$CYGPATH -u "$windows_path"`
14257    new_path="$unix_path"
14258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14260    new_path="$unix_path"
14261  fi
14262
14263  if test "x$path" != "x$new_path"; then
14264    BOOT_JDK="$new_path"
14265    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14266$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14267  fi
14268
14269  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14270  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14271
14272  else
14273    # We're on a posix platform. Hooray! :)
14274    path="$BOOT_JDK"
14275
14276    if test ! -f "$path" && test ! -d "$path"; then
14277      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14278    fi
14279
14280    has_space=`$ECHO "$path" | $GREP " "`
14281    if test "x$has_space" != x; then
14282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14284      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14285    fi
14286  fi
14287
14288              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14289$as_echo_n "checking for Boot JDK... " >&6; }
14290              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14291$as_echo "$BOOT_JDK" >&6; }
14292              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14293$as_echo_n "checking Boot JDK version... " >&6; }
14294              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14295              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14296$as_echo "$BOOT_JDK_VERSION" >&6; }
14297            fi # end check jdk version
14298          fi # end check rt.jar
14299        fi # end check javac
14300      fi # end check java
14301    fi # end check boot jdk found
14302  fi
14303
14304    done
14305  fi
14306
14307
14308    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14309    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14310      # Do we have a bin/java?
14311      if test ! -x "$BOOT_JDK/bin/java"; then
14312        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14313$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14314        BOOT_JDK_FOUND=no
14315      else
14316        # Do we have a bin/javac?
14317        if test ! -x "$BOOT_JDK/bin/javac"; then
14318          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14320          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14321$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14322          BOOT_JDK_FOUND=no
14323        else
14324          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14325          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14326            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14328            BOOT_JDK_FOUND=no
14329          else
14330            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14331            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14332
14333            # Extra M4 quote needed to protect [] in grep expression.
14334            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14335            if test "x$FOUND_VERSION_78" = x; then
14336              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14338              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14339$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14340              BOOT_JDK_FOUND=no
14341            else
14342              # We're done! :-)
14343              BOOT_JDK_FOUND=yes
14344
14345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14346
14347  # Input might be given as Windows format, start by converting to
14348  # unix format.
14349  path="$BOOT_JDK"
14350  new_path=`$CYGPATH -u "$path"`
14351
14352  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14353  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14354  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14355  # "foo.exe" is OK but "foo" is an error.
14356  #
14357  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14358  # It is also a way to make sure we got the proper file name for the real test later on.
14359  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14360  if test "x$test_shortpath" = x; then
14361    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14362$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14363    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14364  fi
14365
14366  # Call helper function which possibly converts this using DOS-style short mode.
14367  # If so, the updated path is stored in $new_path.
14368
14369  input_path="$new_path"
14370  # Check if we need to convert this using DOS-style short mode. If the path
14371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14372  # take no chances and rewrite it.
14373  # Note: m4 eats our [], so we need to use [ and ] instead.
14374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14375  if test "x$has_forbidden_chars" != x; then
14376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14377    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14378    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14379    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14380      # Going to short mode and back again did indeed matter. Since short mode is
14381      # case insensitive, let's make it lowercase to improve readability.
14382      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14383      # Now convert it back to Unix-stile (cygpath)
14384      input_path=`$CYGPATH -u "$shortmode_path"`
14385      new_path="$input_path"
14386    fi
14387  fi
14388
14389  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14390  if test "x$test_cygdrive_prefix" = x; then
14391    # As a simple fix, exclude /usr/bin since it's not a real path.
14392    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14393      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14394      # a path prefixed by /cygdrive for fixpath to work.
14395      new_path="$CYGWIN_ROOT_PATH$input_path"
14396    fi
14397  fi
14398
14399
14400  if test "x$path" != "x$new_path"; then
14401    BOOT_JDK="$new_path"
14402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14404  fi
14405
14406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14407
14408  path="$BOOT_JDK"
14409  has_colon=`$ECHO $path | $GREP ^.:`
14410  new_path="$path"
14411  if test "x$has_colon" = x; then
14412    # Not in mixed or Windows style, start by that.
14413    new_path=`cmd //c echo $path`
14414  fi
14415
14416
14417  input_path="$new_path"
14418  # Check if we need to convert this using DOS-style short mode. If the path
14419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14420  # take no chances and rewrite it.
14421  # Note: m4 eats our [], so we need to use [ and ] instead.
14422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14423  if test "x$has_forbidden_chars" != x; then
14424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14426  fi
14427
14428
14429  windows_path="$new_path"
14430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14431    unix_path=`$CYGPATH -u "$windows_path"`
14432    new_path="$unix_path"
14433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14435    new_path="$unix_path"
14436  fi
14437
14438  if test "x$path" != "x$new_path"; then
14439    BOOT_JDK="$new_path"
14440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14441$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14442  fi
14443
14444  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14445  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14446
14447  else
14448    # We're on a posix platform. Hooray! :)
14449    path="$BOOT_JDK"
14450
14451    if test ! -f "$path" && test ! -d "$path"; then
14452      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14453    fi
14454
14455    has_space=`$ECHO "$path" | $GREP " "`
14456    if test "x$has_space" != x; then
14457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14459      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14460    fi
14461  fi
14462
14463              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14464$as_echo_n "checking for Boot JDK... " >&6; }
14465              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14466$as_echo "$BOOT_JDK" >&6; }
14467              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14468$as_echo_n "checking Boot JDK version... " >&6; }
14469              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14470              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14471$as_echo "$BOOT_JDK_VERSION" >&6; }
14472            fi # end check jdk version
14473          fi # end check rt.jar
14474        fi # end check javac
14475      fi # end check java
14476    fi # end check boot jdk found
14477  fi
14478
14479
14480  if test "x$BOOT_JDK_FOUND" = xno; then
14481    # Now execute the test
14482
14483  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14484  BOOT_JDK_SUFFIX="/Contents/Home"
14485  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14486  if test "x$ALL_JDKS_FOUND" != x; then
14487    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14488
14489  if test "x$BOOT_JDK_FOUND" = xno; then
14490    # Now execute the test
14491
14492        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14493        if test -d "$BOOT_JDK"; then
14494          BOOT_JDK_FOUND=maybe
14495          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14496$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14497        fi
14498
14499
14500    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14501    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14502      # Do we have a bin/java?
14503      if test ! -x "$BOOT_JDK/bin/java"; then
14504        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14506        BOOT_JDK_FOUND=no
14507      else
14508        # Do we have a bin/javac?
14509        if test ! -x "$BOOT_JDK/bin/javac"; then
14510          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14512          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14513$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14514          BOOT_JDK_FOUND=no
14515        else
14516          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14517          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14518            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14520            BOOT_JDK_FOUND=no
14521          else
14522            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14523            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14524
14525            # Extra M4 quote needed to protect [] in grep expression.
14526            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14527            if test "x$FOUND_VERSION_78" = x; then
14528              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14530              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14531$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14532              BOOT_JDK_FOUND=no
14533            else
14534              # We're done! :-)
14535              BOOT_JDK_FOUND=yes
14536
14537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14538
14539  # Input might be given as Windows format, start by converting to
14540  # unix format.
14541  path="$BOOT_JDK"
14542  new_path=`$CYGPATH -u "$path"`
14543
14544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14547  # "foo.exe" is OK but "foo" is an error.
14548  #
14549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14550  # It is also a way to make sure we got the proper file name for the real test later on.
14551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14552  if test "x$test_shortpath" = x; then
14553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14554$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14555    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14556  fi
14557
14558  # Call helper function which possibly converts this using DOS-style short mode.
14559  # If so, the updated path is stored in $new_path.
14560
14561  input_path="$new_path"
14562  # Check if we need to convert this using DOS-style short mode. If the path
14563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14564  # take no chances and rewrite it.
14565  # Note: m4 eats our [], so we need to use [ and ] instead.
14566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14567  if test "x$has_forbidden_chars" != x; then
14568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14572      # Going to short mode and back again did indeed matter. Since short mode is
14573      # case insensitive, let's make it lowercase to improve readability.
14574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14575      # Now convert it back to Unix-stile (cygpath)
14576      input_path=`$CYGPATH -u "$shortmode_path"`
14577      new_path="$input_path"
14578    fi
14579  fi
14580
14581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14582  if test "x$test_cygdrive_prefix" = x; then
14583    # As a simple fix, exclude /usr/bin since it's not a real path.
14584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14586      # a path prefixed by /cygdrive for fixpath to work.
14587      new_path="$CYGWIN_ROOT_PATH$input_path"
14588    fi
14589  fi
14590
14591
14592  if test "x$path" != "x$new_path"; then
14593    BOOT_JDK="$new_path"
14594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14595$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14596  fi
14597
14598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14599
14600  path="$BOOT_JDK"
14601  has_colon=`$ECHO $path | $GREP ^.:`
14602  new_path="$path"
14603  if test "x$has_colon" = x; then
14604    # Not in mixed or Windows style, start by that.
14605    new_path=`cmd //c echo $path`
14606  fi
14607
14608
14609  input_path="$new_path"
14610  # Check if we need to convert this using DOS-style short mode. If the path
14611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14612  # take no chances and rewrite it.
14613  # Note: m4 eats our [], so we need to use [ and ] instead.
14614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14615  if test "x$has_forbidden_chars" != x; then
14616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14618  fi
14619
14620
14621  windows_path="$new_path"
14622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14623    unix_path=`$CYGPATH -u "$windows_path"`
14624    new_path="$unix_path"
14625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14627    new_path="$unix_path"
14628  fi
14629
14630  if test "x$path" != "x$new_path"; then
14631    BOOT_JDK="$new_path"
14632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14633$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14634  fi
14635
14636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14638
14639  else
14640    # We're on a posix platform. Hooray! :)
14641    path="$BOOT_JDK"
14642
14643    if test ! -f "$path" && test ! -d "$path"; then
14644      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14645    fi
14646
14647    has_space=`$ECHO "$path" | $GREP " "`
14648    if test "x$has_space" != x; then
14649      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14650$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14651      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14652    fi
14653  fi
14654
14655              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14656$as_echo_n "checking for Boot JDK... " >&6; }
14657              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14658$as_echo "$BOOT_JDK" >&6; }
14659              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14660$as_echo_n "checking Boot JDK version... " >&6; }
14661              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14662              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14663$as_echo "$BOOT_JDK_VERSION" >&6; }
14664            fi # end check jdk version
14665          fi # end check rt.jar
14666        fi # end check javac
14667      fi # end check java
14668    fi # end check boot jdk found
14669  fi
14670
14671    done
14672  fi
14673
14674
14675    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14676    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14677      # Do we have a bin/java?
14678      if test ! -x "$BOOT_JDK/bin/java"; then
14679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14681        BOOT_JDK_FOUND=no
14682      else
14683        # Do we have a bin/javac?
14684        if test ! -x "$BOOT_JDK/bin/javac"; then
14685          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14687          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14688$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14689          BOOT_JDK_FOUND=no
14690        else
14691          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14692          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14693            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14694$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14695            BOOT_JDK_FOUND=no
14696          else
14697            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14698            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14699
14700            # Extra M4 quote needed to protect [] in grep expression.
14701            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14702            if test "x$FOUND_VERSION_78" = x; then
14703              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14704$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14705              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14706$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14707              BOOT_JDK_FOUND=no
14708            else
14709              # We're done! :-)
14710              BOOT_JDK_FOUND=yes
14711
14712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14713
14714  # Input might be given as Windows format, start by converting to
14715  # unix format.
14716  path="$BOOT_JDK"
14717  new_path=`$CYGPATH -u "$path"`
14718
14719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14722  # "foo.exe" is OK but "foo" is an error.
14723  #
14724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14725  # It is also a way to make sure we got the proper file name for the real test later on.
14726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14727  if test "x$test_shortpath" = x; then
14728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14729$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14730    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14731  fi
14732
14733  # Call helper function which possibly converts this using DOS-style short mode.
14734  # If so, the updated path is stored in $new_path.
14735
14736  input_path="$new_path"
14737  # Check if we need to convert this using DOS-style short mode. If the path
14738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14739  # take no chances and rewrite it.
14740  # Note: m4 eats our [], so we need to use [ and ] instead.
14741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14742  if test "x$has_forbidden_chars" != x; then
14743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14747      # Going to short mode and back again did indeed matter. Since short mode is
14748      # case insensitive, let's make it lowercase to improve readability.
14749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14750      # Now convert it back to Unix-stile (cygpath)
14751      input_path=`$CYGPATH -u "$shortmode_path"`
14752      new_path="$input_path"
14753    fi
14754  fi
14755
14756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14757  if test "x$test_cygdrive_prefix" = x; then
14758    # As a simple fix, exclude /usr/bin since it's not a real path.
14759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14761      # a path prefixed by /cygdrive for fixpath to work.
14762      new_path="$CYGWIN_ROOT_PATH$input_path"
14763    fi
14764  fi
14765
14766
14767  if test "x$path" != "x$new_path"; then
14768    BOOT_JDK="$new_path"
14769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14771  fi
14772
14773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14774
14775  path="$BOOT_JDK"
14776  has_colon=`$ECHO $path | $GREP ^.:`
14777  new_path="$path"
14778  if test "x$has_colon" = x; then
14779    # Not in mixed or Windows style, start by that.
14780    new_path=`cmd //c echo $path`
14781  fi
14782
14783
14784  input_path="$new_path"
14785  # Check if we need to convert this using DOS-style short mode. If the path
14786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14787  # take no chances and rewrite it.
14788  # Note: m4 eats our [], so we need to use [ and ] instead.
14789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14790  if test "x$has_forbidden_chars" != x; then
14791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14793  fi
14794
14795
14796  windows_path="$new_path"
14797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14798    unix_path=`$CYGPATH -u "$windows_path"`
14799    new_path="$unix_path"
14800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14802    new_path="$unix_path"
14803  fi
14804
14805  if test "x$path" != "x$new_path"; then
14806    BOOT_JDK="$new_path"
14807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14809  fi
14810
14811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14813
14814  else
14815    # We're on a posix platform. Hooray! :)
14816    path="$BOOT_JDK"
14817
14818    if test ! -f "$path" && test ! -d "$path"; then
14819      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14820    fi
14821
14822    has_space=`$ECHO "$path" | $GREP " "`
14823    if test "x$has_space" != x; then
14824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14826      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14827    fi
14828  fi
14829
14830              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14831$as_echo_n "checking for Boot JDK... " >&6; }
14832              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14833$as_echo "$BOOT_JDK" >&6; }
14834              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14835$as_echo_n "checking Boot JDK version... " >&6; }
14836              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14837              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14838$as_echo "$BOOT_JDK_VERSION" >&6; }
14839            fi # end check jdk version
14840          fi # end check rt.jar
14841        fi # end check javac
14842      fi # end check java
14843    fi # end check boot jdk found
14844  fi
14845
14846  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14847
14848  if test "x$BOOT_JDK_FOUND" = xno; then
14849    # Now execute the test
14850
14851  BOOT_JDK_PREFIX="/usr/lib/jvm"
14852  BOOT_JDK_SUFFIX=""
14853  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14854  if test "x$ALL_JDKS_FOUND" != x; then
14855    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14856
14857  if test "x$BOOT_JDK_FOUND" = xno; then
14858    # Now execute the test
14859
14860        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14861        if test -d "$BOOT_JDK"; then
14862          BOOT_JDK_FOUND=maybe
14863          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14864$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14865        fi
14866
14867
14868    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14869    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14870      # Do we have a bin/java?
14871      if test ! -x "$BOOT_JDK/bin/java"; then
14872        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14874        BOOT_JDK_FOUND=no
14875      else
14876        # Do we have a bin/javac?
14877        if test ! -x "$BOOT_JDK/bin/javac"; then
14878          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14880          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14881$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14882          BOOT_JDK_FOUND=no
14883        else
14884          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14885          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14886            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14887$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14888            BOOT_JDK_FOUND=no
14889          else
14890            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14891            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14892
14893            # Extra M4 quote needed to protect [] in grep expression.
14894            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14895            if test "x$FOUND_VERSION_78" = x; then
14896              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14897$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14898              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14899$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14900              BOOT_JDK_FOUND=no
14901            else
14902              # We're done! :-)
14903              BOOT_JDK_FOUND=yes
14904
14905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14906
14907  # Input might be given as Windows format, start by converting to
14908  # unix format.
14909  path="$BOOT_JDK"
14910  new_path=`$CYGPATH -u "$path"`
14911
14912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14915  # "foo.exe" is OK but "foo" is an error.
14916  #
14917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14918  # It is also a way to make sure we got the proper file name for the real test later on.
14919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14920  if test "x$test_shortpath" = x; then
14921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14922$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14923    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14924  fi
14925
14926  # Call helper function which possibly converts this using DOS-style short mode.
14927  # If so, the updated path is stored in $new_path.
14928
14929  input_path="$new_path"
14930  # Check if we need to convert this using DOS-style short mode. If the path
14931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14932  # take no chances and rewrite it.
14933  # Note: m4 eats our [], so we need to use [ and ] instead.
14934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14935  if test "x$has_forbidden_chars" != x; then
14936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14940      # Going to short mode and back again did indeed matter. Since short mode is
14941      # case insensitive, let's make it lowercase to improve readability.
14942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14943      # Now convert it back to Unix-stile (cygpath)
14944      input_path=`$CYGPATH -u "$shortmode_path"`
14945      new_path="$input_path"
14946    fi
14947  fi
14948
14949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14950  if test "x$test_cygdrive_prefix" = x; then
14951    # As a simple fix, exclude /usr/bin since it's not a real path.
14952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14954      # a path prefixed by /cygdrive for fixpath to work.
14955      new_path="$CYGWIN_ROOT_PATH$input_path"
14956    fi
14957  fi
14958
14959
14960  if test "x$path" != "x$new_path"; then
14961    BOOT_JDK="$new_path"
14962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14963$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14964  fi
14965
14966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14967
14968  path="$BOOT_JDK"
14969  has_colon=`$ECHO $path | $GREP ^.:`
14970  new_path="$path"
14971  if test "x$has_colon" = x; then
14972    # Not in mixed or Windows style, start by that.
14973    new_path=`cmd //c echo $path`
14974  fi
14975
14976
14977  input_path="$new_path"
14978  # Check if we need to convert this using DOS-style short mode. If the path
14979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14980  # take no chances and rewrite it.
14981  # Note: m4 eats our [], so we need to use [ and ] instead.
14982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14983  if test "x$has_forbidden_chars" != x; then
14984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14986  fi
14987
14988
14989  windows_path="$new_path"
14990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14991    unix_path=`$CYGPATH -u "$windows_path"`
14992    new_path="$unix_path"
14993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14995    new_path="$unix_path"
14996  fi
14997
14998  if test "x$path" != "x$new_path"; then
14999    BOOT_JDK="$new_path"
15000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15001$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15002  fi
15003
15004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15006
15007  else
15008    # We're on a posix platform. Hooray! :)
15009    path="$BOOT_JDK"
15010
15011    if test ! -f "$path" && test ! -d "$path"; then
15012      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15013    fi
15014
15015    has_space=`$ECHO "$path" | $GREP " "`
15016    if test "x$has_space" != x; then
15017      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15019      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15020    fi
15021  fi
15022
15023              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15024$as_echo_n "checking for Boot JDK... " >&6; }
15025              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15026$as_echo "$BOOT_JDK" >&6; }
15027              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15028$as_echo_n "checking Boot JDK version... " >&6; }
15029              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15030              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15031$as_echo "$BOOT_JDK_VERSION" >&6; }
15032            fi # end check jdk version
15033          fi # end check rt.jar
15034        fi # end check javac
15035      fi # end check java
15036    fi # end check boot jdk found
15037  fi
15038
15039    done
15040  fi
15041
15042
15043    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15044    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15045      # Do we have a bin/java?
15046      if test ! -x "$BOOT_JDK/bin/java"; then
15047        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15049        BOOT_JDK_FOUND=no
15050      else
15051        # Do we have a bin/javac?
15052        if test ! -x "$BOOT_JDK/bin/javac"; then
15053          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15055          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15056$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15057          BOOT_JDK_FOUND=no
15058        else
15059          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15060          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15061            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15063            BOOT_JDK_FOUND=no
15064          else
15065            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15066            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15067
15068            # Extra M4 quote needed to protect [] in grep expression.
15069            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15070            if test "x$FOUND_VERSION_78" = x; then
15071              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15073              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15074$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15075              BOOT_JDK_FOUND=no
15076            else
15077              # We're done! :-)
15078              BOOT_JDK_FOUND=yes
15079
15080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15081
15082  # Input might be given as Windows format, start by converting to
15083  # unix format.
15084  path="$BOOT_JDK"
15085  new_path=`$CYGPATH -u "$path"`
15086
15087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15090  # "foo.exe" is OK but "foo" is an error.
15091  #
15092  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15093  # It is also a way to make sure we got the proper file name for the real test later on.
15094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15095  if test "x$test_shortpath" = x; then
15096    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15097$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15098    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15099  fi
15100
15101  # Call helper function which possibly converts this using DOS-style short mode.
15102  # If so, the updated path is stored in $new_path.
15103
15104  input_path="$new_path"
15105  # Check if we need to convert this using DOS-style short mode. If the path
15106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15107  # take no chances and rewrite it.
15108  # Note: m4 eats our [], so we need to use [ and ] instead.
15109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15110  if test "x$has_forbidden_chars" != x; then
15111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15115      # Going to short mode and back again did indeed matter. Since short mode is
15116      # case insensitive, let's make it lowercase to improve readability.
15117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15118      # Now convert it back to Unix-stile (cygpath)
15119      input_path=`$CYGPATH -u "$shortmode_path"`
15120      new_path="$input_path"
15121    fi
15122  fi
15123
15124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15125  if test "x$test_cygdrive_prefix" = x; then
15126    # As a simple fix, exclude /usr/bin since it's not a real path.
15127    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15129      # a path prefixed by /cygdrive for fixpath to work.
15130      new_path="$CYGWIN_ROOT_PATH$input_path"
15131    fi
15132  fi
15133
15134
15135  if test "x$path" != "x$new_path"; then
15136    BOOT_JDK="$new_path"
15137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15138$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15139  fi
15140
15141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15142
15143  path="$BOOT_JDK"
15144  has_colon=`$ECHO $path | $GREP ^.:`
15145  new_path="$path"
15146  if test "x$has_colon" = x; then
15147    # Not in mixed or Windows style, start by that.
15148    new_path=`cmd //c echo $path`
15149  fi
15150
15151
15152  input_path="$new_path"
15153  # Check if we need to convert this using DOS-style short mode. If the path
15154  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15155  # take no chances and rewrite it.
15156  # Note: m4 eats our [], so we need to use [ and ] instead.
15157  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15158  if test "x$has_forbidden_chars" != x; then
15159    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15160    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15161  fi
15162
15163
15164  windows_path="$new_path"
15165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15166    unix_path=`$CYGPATH -u "$windows_path"`
15167    new_path="$unix_path"
15168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15170    new_path="$unix_path"
15171  fi
15172
15173  if test "x$path" != "x$new_path"; then
15174    BOOT_JDK="$new_path"
15175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15176$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15177  fi
15178
15179  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15180  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15181
15182  else
15183    # We're on a posix platform. Hooray! :)
15184    path="$BOOT_JDK"
15185
15186    if test ! -f "$path" && test ! -d "$path"; then
15187      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15188    fi
15189
15190    has_space=`$ECHO "$path" | $GREP " "`
15191    if test "x$has_space" != x; then
15192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15193$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15194      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15195    fi
15196  fi
15197
15198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15199$as_echo_n "checking for Boot JDK... " >&6; }
15200              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15201$as_echo "$BOOT_JDK" >&6; }
15202              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15203$as_echo_n "checking Boot JDK version... " >&6; }
15204              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15205              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15206$as_echo "$BOOT_JDK_VERSION" >&6; }
15207            fi # end check jdk version
15208          fi # end check rt.jar
15209        fi # end check javac
15210      fi # end check java
15211    fi # end check boot jdk found
15212  fi
15213
15214  fi
15215
15216
15217    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15218    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15219      # Do we have a bin/java?
15220      if test ! -x "$BOOT_JDK/bin/java"; then
15221        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15223        BOOT_JDK_FOUND=no
15224      else
15225        # Do we have a bin/javac?
15226        if test ! -x "$BOOT_JDK/bin/javac"; then
15227          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15229          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15230$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15231          BOOT_JDK_FOUND=no
15232        else
15233          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15234          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15235            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15237            BOOT_JDK_FOUND=no
15238          else
15239            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15240            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15241
15242            # Extra M4 quote needed to protect [] in grep expression.
15243            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15244            if test "x$FOUND_VERSION_78" = x; then
15245              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15247              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15248$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15249              BOOT_JDK_FOUND=no
15250            else
15251              # We're done! :-)
15252              BOOT_JDK_FOUND=yes
15253
15254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15255
15256  # Input might be given as Windows format, start by converting to
15257  # unix format.
15258  path="$BOOT_JDK"
15259  new_path=`$CYGPATH -u "$path"`
15260
15261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15264  # "foo.exe" is OK but "foo" is an error.
15265  #
15266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15267  # It is also a way to make sure we got the proper file name for the real test later on.
15268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15269  if test "x$test_shortpath" = x; then
15270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15271$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15272    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15273  fi
15274
15275  # Call helper function which possibly converts this using DOS-style short mode.
15276  # If so, the updated path is stored in $new_path.
15277
15278  input_path="$new_path"
15279  # Check if we need to convert this using DOS-style short mode. If the path
15280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15281  # take no chances and rewrite it.
15282  # Note: m4 eats our [], so we need to use [ and ] instead.
15283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15284  if test "x$has_forbidden_chars" != x; then
15285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15289      # Going to short mode and back again did indeed matter. Since short mode is
15290      # case insensitive, let's make it lowercase to improve readability.
15291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15292      # Now convert it back to Unix-stile (cygpath)
15293      input_path=`$CYGPATH -u "$shortmode_path"`
15294      new_path="$input_path"
15295    fi
15296  fi
15297
15298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15299  if test "x$test_cygdrive_prefix" = x; then
15300    # As a simple fix, exclude /usr/bin since it's not a real path.
15301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15303      # a path prefixed by /cygdrive for fixpath to work.
15304      new_path="$CYGWIN_ROOT_PATH$input_path"
15305    fi
15306  fi
15307
15308
15309  if test "x$path" != "x$new_path"; then
15310    BOOT_JDK="$new_path"
15311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15312$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15313  fi
15314
15315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15316
15317  path="$BOOT_JDK"
15318  has_colon=`$ECHO $path | $GREP ^.:`
15319  new_path="$path"
15320  if test "x$has_colon" = x; then
15321    # Not in mixed or Windows style, start by that.
15322    new_path=`cmd //c echo $path`
15323  fi
15324
15325
15326  input_path="$new_path"
15327  # Check if we need to convert this using DOS-style short mode. If the path
15328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15329  # take no chances and rewrite it.
15330  # Note: m4 eats our [], so we need to use [ and ] instead.
15331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15332  if test "x$has_forbidden_chars" != x; then
15333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15335  fi
15336
15337
15338  windows_path="$new_path"
15339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15340    unix_path=`$CYGPATH -u "$windows_path"`
15341    new_path="$unix_path"
15342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15344    new_path="$unix_path"
15345  fi
15346
15347  if test "x$path" != "x$new_path"; then
15348    BOOT_JDK="$new_path"
15349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15350$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15351  fi
15352
15353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15355
15356  else
15357    # We're on a posix platform. Hooray! :)
15358    path="$BOOT_JDK"
15359
15360    if test ! -f "$path" && test ! -d "$path"; then
15361      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15362    fi
15363
15364    has_space=`$ECHO "$path" | $GREP " "`
15365    if test "x$has_space" != x; then
15366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15368      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15369    fi
15370  fi
15371
15372              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15373$as_echo_n "checking for Boot JDK... " >&6; }
15374              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15375$as_echo "$BOOT_JDK" >&6; }
15376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15377$as_echo_n "checking Boot JDK version... " >&6; }
15378              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15379              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15380$as_echo "$BOOT_JDK_VERSION" >&6; }
15381            fi # end check jdk version
15382          fi # end check rt.jar
15383        fi # end check javac
15384      fi # end check java
15385    fi # end check boot jdk found
15386  fi
15387
15388
15389# If we haven't found anything yet, we've truly lost. Give up.
15390if test "x$BOOT_JDK_FOUND" = xno; then
15391
15392    # Print a helpful message on how to acquire the necessary build dependency.
15393    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15394    MISSING_DEPENDENCY=openjdk
15395    PKGHANDLER_COMMAND=
15396
15397    case $PKGHANDLER in
15398	apt-get)
15399                apt_help     $MISSING_DEPENDENCY ;;
15400    yum)
15401                yum_help     $MISSING_DEPENDENCY ;;
15402	port)
15403                port_help    $MISSING_DEPENDENCY ;;
15404	pkgutil)
15405                pkgutil_help $MISSING_DEPENDENCY ;;
15406	pkgadd)
15407                pkgadd_help  $MISSING_DEPENDENCY ;;
15408    * )
15409      break ;;
15410    esac
15411
15412    if test "x$PKGHANDLER_COMMAND" != x; then
15413        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15414    fi
15415
15416  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15417$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15418  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15419$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15420  as_fn_error $? "Cannot continue" "$LINENO" 5
15421fi
15422
15423# Setup proper paths for what we found
15424BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15425if test ! -f "$BOOT_RTJAR"; then
15426    # On MacOSX it is called classes.jar
15427    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15428    if test -f "$BOOT_RTJAR"; then
15429      # Remove the ..
15430      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15431    fi
15432fi
15433BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15434BOOT_JDK="$BOOT_JDK"
15435
15436
15437
15438
15439# Setup tools from the Boot JDK.
15440
15441  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15442$as_echo_n "checking for java in Boot JDK... " >&6; }
15443  JAVA=$BOOT_JDK/bin/java
15444  if test ! -x $JAVA; then
15445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15446$as_echo "not found" >&6; }
15447      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15448$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15449      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15450  fi
15451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15452$as_echo "ok" >&6; }
15453
15454
15455  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15456$as_echo_n "checking for javac in Boot JDK... " >&6; }
15457  JAVAC=$BOOT_JDK/bin/javac
15458  if test ! -x $JAVAC; then
15459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15460$as_echo "not found" >&6; }
15461      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15462$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15463      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15464  fi
15465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15466$as_echo "ok" >&6; }
15467
15468
15469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15470$as_echo_n "checking for javah in Boot JDK... " >&6; }
15471  JAVAH=$BOOT_JDK/bin/javah
15472  if test ! -x $JAVAH; then
15473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15474$as_echo "not found" >&6; }
15475      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15476$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15477      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15478  fi
15479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15480$as_echo "ok" >&6; }
15481
15482
15483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15484$as_echo_n "checking for javap in Boot JDK... " >&6; }
15485  JAVAP=$BOOT_JDK/bin/javap
15486  if test ! -x $JAVAP; then
15487      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15488$as_echo "not found" >&6; }
15489      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15490$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15491      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15492  fi
15493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15494$as_echo "ok" >&6; }
15495
15496
15497  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15498$as_echo_n "checking for jar in Boot JDK... " >&6; }
15499  JAR=$BOOT_JDK/bin/jar
15500  if test ! -x $JAR; then
15501      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15502$as_echo "not found" >&6; }
15503      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15504$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15505      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15506  fi
15507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15508$as_echo "ok" >&6; }
15509
15510
15511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15512$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15513  RMIC=$BOOT_JDK/bin/rmic
15514  if test ! -x $RMIC; then
15515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15516$as_echo "not found" >&6; }
15517      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15518$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15519      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15520  fi
15521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15522$as_echo "ok" >&6; }
15523
15524
15525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15526$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15527  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15528  if test ! -x $NATIVE2ASCII; then
15529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15530$as_echo "not found" >&6; }
15531      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15532$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15533      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15534  fi
15535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15536$as_echo "ok" >&6; }
15537
15538
15539# Finally, set some other options...
15540
15541# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15542BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15543
15544
15545
15546
15547##############################################################################
15548#
15549# Specify options for anything that is run with the Boot JDK.
15550#
15551
15552# Check whether --with-boot-jdk-jvmargs was given.
15553if test "${with_boot_jdk_jvmargs+set}" = set; then :
15554  withval=$with_boot_jdk_jvmargs;
15555fi
15556
15557
15558if test "x$with_boot_jdk_jvmargs" = x; then
15559    # Not all JVM:s accept the same arguments on the command line.
15560    # OpenJDK specific increase in thread stack for JDK build,
15561    # well more specifically, when running javac.
15562    if test "x$BUILD_NUM_BITS" = x32; then
15563       STACK_SIZE=768
15564    else
15565       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15566       # since 64-bit pointers are pushed on the stach. Apparently, we need
15567       # to increase the stack space when javacing the JDK....
15568       STACK_SIZE=1536
15569    fi
15570
15571    # Minimum amount of heap memory.
15572
15573    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15574    # If so, then append -Xms64M to boot_jdk_jvmargs
15575    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15576    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15577    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15578        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15579    fi
15580
15581    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15582        # Why does macosx need more heap? Its the huge JDK batch.
15583
15584    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15585    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15586    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15587    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15588    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15589        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15590    fi
15591
15592    else
15593
15594    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15595    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15596    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15597    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15598    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15599        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15600    fi
15601
15602    fi
15603    # When is adding -client something that speeds up the JVM?
15604    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15605
15606    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15607    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15608    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15609    FOUND_VERSION=`$JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
15610    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15611        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15612    fi
15613
15614
15615    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15616    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15617    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15618    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15619    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15620        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15621    fi
15622
15623
15624    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15625    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15626    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15627    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15628    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15629        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15630    fi
15631
15632    # Disable special log output when a debug build is used as Boot JDK...
15633
15634    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15635    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15636    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15637    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15638    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15639        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15640    fi
15641
15642fi
15643
15644BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15645
15646
15647
15648###############################################################################
15649#
15650# Configure the sources to use. We can add or override individual directories.
15651#
15652###############################################################################
15653
15654
15655
15656# Where are the sources. Any of these can be overridden
15657# using --with-override-corba and the likes.
15658LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15659CORBA_TOPDIR="$SRC_ROOT/corba"
15660JAXP_TOPDIR="$SRC_ROOT/jaxp"
15661JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15662HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15663JDK_TOPDIR="$SRC_ROOT/jdk"
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673###############################################################################
15674#
15675# Pickup additional source for a component from outside of the source root
15676# or override source for a component.
15677#
15678
15679# Check whether --with-add-source-root was given.
15680if test "${with_add_source_root+set}" = set; then :
15681  withval=$with_add_source_root;
15682fi
15683
15684
15685
15686# Check whether --with-override-source-root was given.
15687if test "${with_override_source_root+set}" = set; then :
15688  withval=$with_override_source_root;
15689fi
15690
15691
15692
15693# Check whether --with-adds-and-overrides was given.
15694if test "${with_adds_and_overrides+set}" = set; then :
15695  withval=$with_adds_and_overrides;
15696fi
15697
15698
15699if test "x$with_adds_and_overrides" != x; then
15700    with_add_source_root="$with_adds_and_overrides/adds"
15701    with_override_source_root="$with_adds_and_overrides/overrides"
15702fi
15703
15704if test "x$with_add_source_root" != x; then
15705    if ! test -d $with_add_source_root; then
15706       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15707    fi
15708    CURDIR="$PWD"
15709    cd "$with_add_source_root"
15710    ADD_SRC_ROOT="`pwd`"
15711    cd "$CURDIR"
15712    # Verify that the addon source root does not have any root makefiles.
15713    # If it does, then it is usually an error, prevent this.
15714    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15715       test -f $with_add_source_root/langtools/make/Makefile; then
15716        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
15717    fi
15718    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15719       test -f $with_add_source_root/corba/make/Makefile; then
15720        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
15721    fi
15722    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15723       test -f $with_add_source_root/jaxp/make/Makefile; then
15724        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
15725    fi
15726    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15727       test -f $with_add_source_root/jaxws/make/Makefile; then
15728        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
15729    fi
15730    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15731       test -f $with_add_source_root/hotspot/make/Makefile; then
15732        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
15733    fi
15734    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15735       test -f $with_add_source_root/jdk/make/Makefile; then
15736        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
15737    fi
15738fi
15739
15740
15741if test "x$with_override_source_root" != x; then
15742    if ! test -d $with_override_source_root; then
15743       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15744    fi
15745    CURDIR="$PWD"
15746    cd "$with_override_source_root"
15747    OVERRIDE_SRC_ROOT="`pwd`"
15748    cd "$CURDIR"
15749    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15750       test -f $with_override_source_root/langtools/make/Makefile; then
15751        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
15752    fi
15753    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15754       test -f $with_override_source_root/corba/make/Makefile; then
15755        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
15756    fi
15757    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15758       test -f $with_override_source_root/jaxp/make/Makefile; then
15759        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
15760    fi
15761    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15762       test -f $with_override_source_root/jaxws/make/Makefile; then
15763        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
15764    fi
15765    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15766       test -f $with_override_source_root/hotspot/make/Makefile; then
15767        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
15768    fi
15769    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15770       test -f $with_override_source_root/jdk/make/Makefile; then
15771        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
15772    fi
15773fi
15774
15775
15776###############################################################################
15777#
15778# Override a repo completely, this is used for example when you have 3 small
15779# development sandboxes of the langtools sources and want to avoid having 3 full
15780# OpenJDK sources checked out on disk.
15781#
15782# Assuming that the 3 langtools sandboxes are located here:
15783# /home/fredrik/sandbox1/langtools
15784# /home/fredrik/sandbox2/langtools
15785# /home/fredrik/sandbox3/langtools
15786#
15787# From the source root you create build subdirs manually:
15788#     mkdir -p build1 build2 build3
15789# in each build directory run:
15790#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15791#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15792#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15793#
15794
15795
15796# Check whether --with-override-langtools was given.
15797if test "${with_override_langtools+set}" = set; then :
15798  withval=$with_override_langtools;
15799fi
15800
15801
15802
15803# Check whether --with-override-corba was given.
15804if test "${with_override_corba+set}" = set; then :
15805  withval=$with_override_corba;
15806fi
15807
15808
15809
15810# Check whether --with-override-jaxp was given.
15811if test "${with_override_jaxp+set}" = set; then :
15812  withval=$with_override_jaxp;
15813fi
15814
15815
15816
15817# Check whether --with-override-jaxws was given.
15818if test "${with_override_jaxws+set}" = set; then :
15819  withval=$with_override_jaxws;
15820fi
15821
15822
15823
15824# Check whether --with-override-hotspot was given.
15825if test "${with_override_hotspot+set}" = set; then :
15826  withval=$with_override_hotspot;
15827fi
15828
15829
15830
15831# Check whether --with-override-jdk was given.
15832if test "${with_override_jdk+set}" = set; then :
15833  withval=$with_override_jdk;
15834fi
15835
15836
15837if test "x$with_override_langtools" != x; then
15838    CURDIR="$PWD"
15839    cd "$with_override_langtools"
15840    LANGTOOLS_TOPDIR="`pwd`"
15841    cd "$CURDIR"
15842    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15843        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15844    fi
15845    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15846$as_echo_n "checking if langtools should be overridden... " >&6; }
15847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15848$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15849fi
15850if test "x$with_override_corba" != x; then
15851    CURDIR="$PWD"
15852    cd "$with_override_corba"
15853    CORBA_TOPDIR="`pwd`"
15854    cd "$CURDIR"
15855    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15856        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15857    fi
15858    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15859$as_echo_n "checking if corba should be overridden... " >&6; }
15860    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15861$as_echo "yes with $CORBA_TOPDIR" >&6; }
15862fi
15863if test "x$with_override_jaxp" != x; then
15864    CURDIR="$PWD"
15865    cd "$with_override_jaxp"
15866    JAXP_TOPDIR="`pwd`"
15867    cd "$CURDIR"
15868    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15869        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15870    fi
15871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15872$as_echo_n "checking if jaxp should be overridden... " >&6; }
15873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15874$as_echo "yes with $JAXP_TOPDIR" >&6; }
15875fi
15876if test "x$with_override_jaxws" != x; then
15877    CURDIR="$PWD"
15878    cd "$with_override_jaxws"
15879    JAXWS_TOPDIR="`pwd`"
15880    cd "$CURDIR"
15881    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15882        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15883    fi
15884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15885$as_echo_n "checking if jaxws should be overridden... " >&6; }
15886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15887$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15888fi
15889if test "x$with_override_hotspot" != x; then
15890    CURDIR="$PWD"
15891    cd "$with_override_hotspot"
15892    HOTSPOT_TOPDIR="`pwd`"
15893    cd "$CURDIR"
15894    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15895       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15896        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15897    fi
15898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15899$as_echo_n "checking if hotspot should be overridden... " >&6; }
15900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15901$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15902fi
15903if test "x$with_override_jdk" != x; then
15904    CURDIR="$PWD"
15905    cd "$with_override_jdk"
15906    JDK_TOPDIR="`pwd`"
15907    cd "$CURDIR"
15908    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15909        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15910    fi
15911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15912$as_echo_n "checking if JDK should be overridden... " >&6; }
15913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15914$as_echo "yes with $JDK_TOPDIR" >&6; }
15915fi
15916
15917
15918
15919BUILD_OUTPUT="$OUTPUT_ROOT"
15920
15921
15922HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15923BUILD_HOTSPOT=true
15924
15925
15926
15927# Check whether --with-import-hotspot was given.
15928if test "${with_import_hotspot+set}" = set; then :
15929  withval=$with_import_hotspot;
15930fi
15931
15932if test "x$with_import_hotspot" != x; then
15933    CURDIR="$PWD"
15934    cd "$with_import_hotspot"
15935    HOTSPOT_DIST="`pwd`"
15936    cd "$CURDIR"
15937    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15938        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15939    fi
15940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15941$as_echo_n "checking if hotspot should be imported... " >&6; }
15942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15943$as_echo "yes from $HOTSPOT_DIST" >&6; }
15944    BUILD_HOTSPOT=false
15945fi
15946
15947JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15948
15949
15950###############################################################################
15951#
15952# Setup the toolchain (compilers etc), i.e. the tools that need to be
15953# cross-compilation aware.
15954#
15955###############################################################################
15956
15957
15958###############################################################################
15959#
15960# Configure the development tool paths and potential sysroot.
15961#
15962ac_ext=cpp
15963ac_cpp='$CXXCPP $CPPFLAGS'
15964ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15965ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15966ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15967
15968
15969# The option used to specify the target .o,.a or .so file.
15970# When compiling, how to specify the to be created object file.
15971CC_OUT_OPTION='-o$(SPACE)'
15972# When linking, how to specify the to be created executable.
15973EXE_OUT_OPTION='-o$(SPACE)'
15974# When linking, how to specify the to be created dynamically linkable library.
15975LD_OUT_OPTION='-o$(SPACE)'
15976# When archiving, how to specify the to be create static archive for object files.
15977AR_OUT_OPTION='rcs$(SPACE)'
15978
15979
15980
15981
15982
15983# Locate the actual tools
15984
15985if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15986
15987  # Store path to cygwin link.exe to help excluding it when searching for
15988  # VS linker. This must be done before changing the PATH when looking for VS.
15989  # Extract the first word of "link", so it can be a program name with args.
15990set dummy link; ac_word=$2
15991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15992$as_echo_n "checking for $ac_word... " >&6; }
15993if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15994  $as_echo_n "(cached) " >&6
15995else
15996  case $CYGWIN_LINK in
15997  [\\/]* | ?:[\\/]*)
15998  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15999  ;;
16000  *)
16001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16002for as_dir in $PATH
16003do
16004  IFS=$as_save_IFS
16005  test -z "$as_dir" && as_dir=.
16006    for ac_exec_ext in '' $ac_executable_extensions; do
16007  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16008    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16010    break 2
16011  fi
16012done
16013  done
16014IFS=$as_save_IFS
16015
16016  ;;
16017esac
16018fi
16019CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16020if test -n "$CYGWIN_LINK"; then
16021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16022$as_echo "$CYGWIN_LINK" >&6; }
16023else
16024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16025$as_echo "no" >&6; }
16026fi
16027
16028
16029  if test "x$CYGWIN_LINK" != x; then
16030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16031$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16032    "$CYGWIN_LINK" --version > /dev/null
16033    if test $? -eq 0 ; then
16034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16035$as_echo "yes" >&6; }
16036    else
16037      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16038$as_echo "no" >&6; }
16039      # This might be the VS linker. Don't exclude it later on.
16040      CYGWIN_LINK=""
16041    fi
16042  fi
16043
16044  # First-hand choice is to locate and run the vsvars bat file.
16045
16046  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16047    VCVARSFILE="vc/bin/vcvars32.bat"
16048  else
16049    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16050  fi
16051
16052  VS_ENV_CMD=""
16053  VS_ENV_ARGS=""
16054  if test "x$with_toolsdir" != x; then
16055
16056  if test "x$VS_ENV_CMD" = x; then
16057    VS100BASE="$with_toolsdir/../.."
16058    METHOD="--with-tools-dir"
16059
16060  windows_path="$VS100BASE"
16061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16062    unix_path=`$CYGPATH -u "$windows_path"`
16063    VS100BASE="$unix_path"
16064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16066    VS100BASE="$unix_path"
16067  fi
16068
16069    if test -d "$VS100BASE"; then
16070      if test -f "$VS100BASE/$VCVARSFILE"; then
16071        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16072$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16073        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16074      else
16075        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16076$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16077        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16078$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16079      fi
16080    fi
16081  fi
16082
16083  fi
16084
16085  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16086    # Having specified an argument which is incorrect will produce an instant failure;
16087    # we should not go on looking
16088    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16089$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16090    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16091$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16092    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16093  fi
16094
16095  if test "x$ProgramW6432" != x; then
16096
16097  if test "x$VS_ENV_CMD" = x; then
16098    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16099    METHOD="well-known name"
16100
16101  windows_path="$WIN_SDK_BASE"
16102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16103    unix_path=`$CYGPATH -u "$windows_path"`
16104    WIN_SDK_BASE="$unix_path"
16105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16107    WIN_SDK_BASE="$unix_path"
16108  fi
16109
16110    if test -d "$WIN_SDK_BASE"; then
16111      # There have been cases of partial or broken SDK installations. A missing
16112      # lib dir is not going to work.
16113      if test ! -d "$WIN_SDK_BASE/../lib"; then
16114        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16115$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16116        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16117$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16118      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16119        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16120$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16121        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16122        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16123          VS_ENV_ARGS="/x86"
16124        else
16125          VS_ENV_ARGS="/x64"
16126        fi
16127      else
16128        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16129$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16130        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16131$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16132      fi
16133    fi
16134  fi
16135
16136  fi
16137  if test "x$PROGRAMW6432" != x; then
16138
16139  if test "x$VS_ENV_CMD" = x; then
16140    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16141    METHOD="well-known name"
16142
16143  windows_path="$WIN_SDK_BASE"
16144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16145    unix_path=`$CYGPATH -u "$windows_path"`
16146    WIN_SDK_BASE="$unix_path"
16147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16149    WIN_SDK_BASE="$unix_path"
16150  fi
16151
16152    if test -d "$WIN_SDK_BASE"; then
16153      # There have been cases of partial or broken SDK installations. A missing
16154      # lib dir is not going to work.
16155      if test ! -d "$WIN_SDK_BASE/../lib"; then
16156        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16157$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16158        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16159$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16160      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16161        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16162$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16163        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16164        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16165          VS_ENV_ARGS="/x86"
16166        else
16167          VS_ENV_ARGS="/x64"
16168        fi
16169      else
16170        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16171$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16172        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16173$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16174      fi
16175    fi
16176  fi
16177
16178  fi
16179  if test "x$PROGRAMFILES" != x; then
16180
16181  if test "x$VS_ENV_CMD" = x; then
16182    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16183    METHOD="well-known name"
16184
16185  windows_path="$WIN_SDK_BASE"
16186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16187    unix_path=`$CYGPATH -u "$windows_path"`
16188    WIN_SDK_BASE="$unix_path"
16189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16191    WIN_SDK_BASE="$unix_path"
16192  fi
16193
16194    if test -d "$WIN_SDK_BASE"; then
16195      # There have been cases of partial or broken SDK installations. A missing
16196      # lib dir is not going to work.
16197      if test ! -d "$WIN_SDK_BASE/../lib"; then
16198        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16199$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16200        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16201$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16202      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16203        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16204$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16205        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16206        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16207          VS_ENV_ARGS="/x86"
16208        else
16209          VS_ENV_ARGS="/x64"
16210        fi
16211      else
16212        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16213$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16214        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16215$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16216      fi
16217    fi
16218  fi
16219
16220  fi
16221
16222  if test "x$VS_ENV_CMD" = x; then
16223    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16224    METHOD="well-known name"
16225
16226  windows_path="$WIN_SDK_BASE"
16227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16228    unix_path=`$CYGPATH -u "$windows_path"`
16229    WIN_SDK_BASE="$unix_path"
16230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16232    WIN_SDK_BASE="$unix_path"
16233  fi
16234
16235    if test -d "$WIN_SDK_BASE"; then
16236      # There have been cases of partial or broken SDK installations. A missing
16237      # lib dir is not going to work.
16238      if test ! -d "$WIN_SDK_BASE/../lib"; then
16239        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16240$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16241        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16242$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16243      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16245$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16246        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16247        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16248          VS_ENV_ARGS="/x86"
16249        else
16250          VS_ENV_ARGS="/x64"
16251        fi
16252      else
16253        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16254$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16255        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16256$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16257      fi
16258    fi
16259  fi
16260
16261
16262  if test "x$VS_ENV_CMD" = x; then
16263    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16264    METHOD="well-known name"
16265
16266  windows_path="$WIN_SDK_BASE"
16267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16268    unix_path=`$CYGPATH -u "$windows_path"`
16269    WIN_SDK_BASE="$unix_path"
16270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16272    WIN_SDK_BASE="$unix_path"
16273  fi
16274
16275    if test -d "$WIN_SDK_BASE"; then
16276      # There have been cases of partial or broken SDK installations. A missing
16277      # lib dir is not going to work.
16278      if test ! -d "$WIN_SDK_BASE/../lib"; then
16279        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16280$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16281        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16282$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16283      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16284        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16285$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16286        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16287        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16288          VS_ENV_ARGS="/x86"
16289        else
16290          VS_ENV_ARGS="/x64"
16291        fi
16292      else
16293        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16294$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16295        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16296$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16297      fi
16298    fi
16299  fi
16300
16301
16302  if test "x$VS100COMNTOOLS" != x; then
16303
16304  if test "x$VS_ENV_CMD" = x; then
16305    VS100BASE="$VS100COMNTOOLS/../.."
16306    METHOD="VS100COMNTOOLS variable"
16307
16308  windows_path="$VS100BASE"
16309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16310    unix_path=`$CYGPATH -u "$windows_path"`
16311    VS100BASE="$unix_path"
16312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16314    VS100BASE="$unix_path"
16315  fi
16316
16317    if test -d "$VS100BASE"; then
16318      if test -f "$VS100BASE/$VCVARSFILE"; then
16319        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16320$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16321        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16322      else
16323        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16324$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16325        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16326$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16327      fi
16328    fi
16329  fi
16330
16331  fi
16332  if test "x$PROGRAMFILES" != x; then
16333
16334  if test "x$VS_ENV_CMD" = x; then
16335    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16336    METHOD="well-known name"
16337
16338  windows_path="$VS100BASE"
16339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16340    unix_path=`$CYGPATH -u "$windows_path"`
16341    VS100BASE="$unix_path"
16342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16344    VS100BASE="$unix_path"
16345  fi
16346
16347    if test -d "$VS100BASE"; then
16348      if test -f "$VS100BASE/$VCVARSFILE"; then
16349        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16350$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16351        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16352      else
16353        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16354$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16355        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16356$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16357      fi
16358    fi
16359  fi
16360
16361  fi
16362
16363  if test "x$VS_ENV_CMD" = x; then
16364    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16365    METHOD="well-known name"
16366
16367  windows_path="$VS100BASE"
16368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16369    unix_path=`$CYGPATH -u "$windows_path"`
16370    VS100BASE="$unix_path"
16371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16373    VS100BASE="$unix_path"
16374  fi
16375
16376    if test -d "$VS100BASE"; then
16377      if test -f "$VS100BASE/$VCVARSFILE"; then
16378        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16379$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16380        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16381      else
16382        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16383$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16384        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16385$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16386      fi
16387    fi
16388  fi
16389
16390
16391  if test "x$VS_ENV_CMD" = x; then
16392    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16393    METHOD="well-known name"
16394
16395  windows_path="$VS100BASE"
16396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16397    unix_path=`$CYGPATH -u "$windows_path"`
16398    VS100BASE="$unix_path"
16399  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16400    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16401    VS100BASE="$unix_path"
16402  fi
16403
16404    if test -d "$VS100BASE"; then
16405      if test -f "$VS100BASE/$VCVARSFILE"; then
16406        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16407$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16408        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16409      else
16410        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16411$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16412        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16413$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16414      fi
16415    fi
16416  fi
16417
16418
16419  if test "x$VS_ENV_CMD" != x; then
16420    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16421
16422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16423
16424  # First separate the path from the arguments. This will split at the first
16425  # space.
16426  complete="$VS_ENV_CMD"
16427  path="${complete%% *}"
16428  tmp="$complete EOL"
16429  arguments="${tmp#* }"
16430
16431  # Input might be given as Windows format, start by converting to
16432  # unix format.
16433  new_path=`$CYGPATH -u "$path"`
16434
16435  # Now try to locate executable using which
16436  new_path=`$WHICH "$new_path" 2> /dev/null`
16437  # bat and cmd files are not always considered executable in cygwin causing which
16438  # to not find them
16439  if test "x$new_path" = x \
16440           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16441           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16442    new_path=`$CYGPATH -u "$path"`
16443  fi
16444  if test "x$new_path" = x; then
16445    # Oops. Which didn't find the executable.
16446    # The splitting of arguments from the executable at a space might have been incorrect,
16447    # since paths with space are more likely in Windows. Give it another try with the whole
16448    # argument.
16449    path="$complete"
16450    arguments="EOL"
16451    new_path=`$CYGPATH -u "$path"`
16452    new_path=`$WHICH "$new_path" 2> /dev/null`
16453    # bat and cmd files are not always considered executable in cygwin causing which
16454    # to not find them
16455    if test "x$new_path" = x \
16456             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16457             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16458      new_path=`$CYGPATH -u "$path"`
16459    fi
16460    if test "x$new_path" = x; then
16461      # It's still not found. Now this is an unrecoverable error.
16462      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16463$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16464      has_space=`$ECHO "$complete" | $GREP " "`
16465      if test "x$has_space" != x; then
16466        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16467$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16468      fi
16469      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16470    fi
16471  fi
16472
16473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16476  # "foo.exe" is OK but "foo" is an error.
16477  #
16478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16479  # It is also a way to make sure we got the proper file name for the real test later on.
16480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16481  if test "x$test_shortpath" = x; then
16482    # Short path failed, file does not exist as specified.
16483    # Try adding .exe or .cmd
16484    if test -f "${new_path}.exe"; then
16485       input_to_shortpath="${new_path}.exe"
16486    elif test -f "${new_path}.cmd"; then
16487       input_to_shortpath="${new_path}.cmd"
16488    else
16489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16490$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16491      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16492$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16493      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16494    fi
16495  else
16496    input_to_shortpath="$new_path"
16497  fi
16498
16499  # Call helper function which possibly converts this using DOS-style short mode.
16500  # If so, the updated path is stored in $new_path.
16501  new_path="$input_to_shortpath"
16502
16503  input_path="$input_to_shortpath"
16504  # Check if we need to convert this using DOS-style short mode. If the path
16505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16506  # take no chances and rewrite it.
16507  # Note: m4 eats our [], so we need to use [ and ] instead.
16508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16509  if test "x$has_forbidden_chars" != x; then
16510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16514      # Going to short mode and back again did indeed matter. Since short mode is
16515      # case insensitive, let's make it lowercase to improve readability.
16516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16517      # Now convert it back to Unix-stile (cygpath)
16518      input_path=`$CYGPATH -u "$shortmode_path"`
16519      new_path="$input_path"
16520    fi
16521  fi
16522
16523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16524  if test "x$test_cygdrive_prefix" = x; then
16525    # As a simple fix, exclude /usr/bin since it's not a real path.
16526    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16528      # a path prefixed by /cygdrive for fixpath to work.
16529      new_path="$CYGWIN_ROOT_PATH$input_path"
16530    fi
16531  fi
16532
16533  # remove trailing .exe if any
16534  new_path="${new_path/%.exe/}"
16535
16536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16537
16538  # First separate the path from the arguments. This will split at the first
16539  # space.
16540  complete="$VS_ENV_CMD"
16541  path="${complete%% *}"
16542  tmp="$complete EOL"
16543  arguments="${tmp#* }"
16544
16545  # Input might be given as Windows format, start by converting to
16546  # unix format.
16547  new_path="$path"
16548
16549  windows_path="$new_path"
16550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16551    unix_path=`$CYGPATH -u "$windows_path"`
16552    new_path="$unix_path"
16553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16555    new_path="$unix_path"
16556  fi
16557
16558
16559  # Now try to locate executable using which
16560  new_path=`$WHICH "$new_path" 2> /dev/null`
16561
16562  if test "x$new_path" = x; then
16563    # Oops. Which didn't find the executable.
16564    # The splitting of arguments from the executable at a space might have been incorrect,
16565    # since paths with space are more likely in Windows. Give it another try with the whole
16566    # argument.
16567    path="$complete"
16568    arguments="EOL"
16569    new_path="$path"
16570
16571  windows_path="$new_path"
16572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16573    unix_path=`$CYGPATH -u "$windows_path"`
16574    new_path="$unix_path"
16575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16576    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16577    new_path="$unix_path"
16578  fi
16579
16580
16581    new_path=`$WHICH "$new_path" 2> /dev/null`
16582
16583    if test "x$new_path" = x; then
16584      # It's still not found. Now this is an unrecoverable error.
16585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16586$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16587      has_space=`$ECHO "$complete" | $GREP " "`
16588      if test "x$has_space" != x; then
16589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16591      fi
16592      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16593    fi
16594  fi
16595
16596  # Now new_path has a complete unix path to the binary
16597  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16598    # Keep paths in /bin as-is, but remove trailing .exe if any
16599    new_path="${new_path/%.exe/}"
16600    # Do not save /bin paths to all_fixpath_prefixes!
16601  else
16602    # Not in mixed or Windows style, start by that.
16603    new_path=`cmd //c echo $new_path`
16604
16605  input_path="$new_path"
16606  # Check if we need to convert this using DOS-style short mode. If the path
16607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16608  # take no chances and rewrite it.
16609  # Note: m4 eats our [], so we need to use [ and ] instead.
16610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16611  if test "x$has_forbidden_chars" != x; then
16612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16614  fi
16615
16616    # Output is in $new_path
16617
16618  windows_path="$new_path"
16619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16620    unix_path=`$CYGPATH -u "$windows_path"`
16621    new_path="$unix_path"
16622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16624    new_path="$unix_path"
16625  fi
16626
16627    # remove trailing .exe if any
16628    new_path="${new_path/%.exe/}"
16629
16630    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16631    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16632  fi
16633
16634  else
16635    # We're on a posix platform. Hooray! :)
16636    # First separate the path from the arguments. This will split at the first
16637    # space.
16638    complete="$VS_ENV_CMD"
16639    path="${complete%% *}"
16640    tmp="$complete EOL"
16641    arguments="${tmp#* }"
16642
16643    # Cannot rely on the command "which" here since it doesn't always work.
16644    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16645    if test -z "$is_absolute_path"; then
16646      # Path to executable is not absolute. Find it.
16647      IFS_save="$IFS"
16648      IFS=:
16649      for p in $PATH; do
16650        if test -f "$p/$path" && test -x "$p/$path"; then
16651          new_path="$p/$path"
16652          break
16653        fi
16654      done
16655      IFS="$IFS_save"
16656    else
16657      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16658$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16659      new_path="$path"
16660    fi
16661
16662    if test "x$new_path" = x; then
16663        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16664$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16665        has_space=`$ECHO "$complete" | $GREP " "`
16666        if test "x$has_space" != x; then
16667          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16668$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16669        fi
16670        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16671      fi
16672  fi
16673
16674      # Now join together the path and the arguments once again
16675      if test "x$arguments" != xEOL; then
16676        new_complete="$new_path ${arguments% *}"
16677      else
16678        new_complete="$new_path"
16679      fi
16680
16681  if test "x$complete" != "x$new_complete"; then
16682      VS_ENV_CMD="$new_complete"
16683      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16684$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16685    fi
16686
16687
16688    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16689    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16690$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16691    cd $OUTPUT_ROOT
16692    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16693    # to autoconf standards.
16694
16695    #----
16696
16697    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16698    # but calculate the difference in Cygwin environment before/after running it and then
16699    # apply the diff.
16700
16701    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16702      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16703      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16704      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16705    else
16706      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16707      _dosbash=`cmd //c echo \`which bash\``
16708    fi
16709
16710    # generate the set of exported vars before/after the vs10 setup
16711    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16712    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16713    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16714    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16715
16716    # Now execute the newly created bat file.
16717    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16718    cmd /c localdevenvtmp.bat | cat
16719
16720    # apply the diff (less some non-vs10 vars named by "!")
16721    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16722    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16723    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16724
16725    # cleanup
16726    $RM localdevenvtmp*
16727    #----
16728    cd $CURDIR
16729    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16730      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16731$as_echo "no" >&6; }
16732      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16733$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16734      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16735$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16736      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16737$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16738      as_fn_error $? "Cannot continue" "$LINENO" 5
16739    fi
16740
16741    # Now set all paths and other env variables. This will allow the rest of
16742    # the configure script to find and run the compiler in the proper way.
16743    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16744$as_echo "$as_me: Setting extracted environment variables" >&6;}
16745    . $OUTPUT_ROOT/localdevenv.sh
16746  else
16747    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16748    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16749$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16750  fi
16751
16752  # At this point, we should have corrent variables in the environment, or we can't continue.
16753  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16754$as_echo_n "checking for Visual Studio variables... " >&6; }
16755
16756  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16757    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16759$as_echo "present but broken" >&6; }
16760      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16761    else
16762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16763$as_echo "ok" >&6; }
16764      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16765      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16766      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16767      VS_PATH="$PATH"
16768
16769
16770
16771    fi
16772  else
16773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16774$as_echo "not found" >&6; }
16775
16776    if test "x$VS_ENV_CMD" = x; then
16777      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16778$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16779      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16780$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16781    else
16782      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16783$as_echo "$as_me: Running the extraction script failed." >&6;}
16784    fi
16785    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16786$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16787    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16788$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16789    as_fn_error $? "Cannot continue" "$LINENO" 5
16790  fi
16791
16792  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16793$as_echo_n "checking for msvcr100.dll... " >&6; }
16794
16795# Check whether --with-msvcr-dll was given.
16796if test "${with_msvcr_dll+set}" = set; then :
16797  withval=$with_msvcr_dll;
16798fi
16799
16800  if test "x$with_msvcr_dll" != x; then
16801    MSVCR_DLL="$with_msvcr_dll"
16802  else
16803    if test "x$VCINSTALLDIR" != x; then
16804      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16805        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16806      else
16807        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16808        if test "x$MSVCR_DLL" = x; then
16809          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16810        fi
16811      fi
16812      if test "x$MSVCR_DLL" != x; then
16813        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16814$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16815      else
16816        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16817$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16818      fi
16819    fi
16820    if test "x$MSVCR_DLL" = x; then
16821      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16822        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16823$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16824        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16825      fi
16826    fi
16827  fi
16828  if test "x$MSVCR_DLL" = x; then
16829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16830$as_echo "no" >&6; }
16831    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16832  fi
16833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16834$as_echo "$MSVCR_DLL" >&6; }
16835
16836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16837
16838  # Input might be given as Windows format, start by converting to
16839  # unix format.
16840  path="$MSVCR_DLL"
16841  new_path=`$CYGPATH -u "$path"`
16842
16843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16846  # "foo.exe" is OK but "foo" is an error.
16847  #
16848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16849  # It is also a way to make sure we got the proper file name for the real test later on.
16850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16851  if test "x$test_shortpath" = x; then
16852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16853$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16854    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16855  fi
16856
16857  # Call helper function which possibly converts this using DOS-style short mode.
16858  # If so, the updated path is stored in $new_path.
16859
16860  input_path="$new_path"
16861  # Check if we need to convert this using DOS-style short mode. If the path
16862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16863  # take no chances and rewrite it.
16864  # Note: m4 eats our [], so we need to use [ and ] instead.
16865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16866  if test "x$has_forbidden_chars" != x; then
16867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16871      # Going to short mode and back again did indeed matter. Since short mode is
16872      # case insensitive, let's make it lowercase to improve readability.
16873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16874      # Now convert it back to Unix-stile (cygpath)
16875      input_path=`$CYGPATH -u "$shortmode_path"`
16876      new_path="$input_path"
16877    fi
16878  fi
16879
16880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16881  if test "x$test_cygdrive_prefix" = x; then
16882    # As a simple fix, exclude /usr/bin since it's not a real path.
16883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16885      # a path prefixed by /cygdrive for fixpath to work.
16886      new_path="$CYGWIN_ROOT_PATH$input_path"
16887    fi
16888  fi
16889
16890
16891  if test "x$path" != "x$new_path"; then
16892    MSVCR_DLL="$new_path"
16893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16894$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16895  fi
16896
16897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16898
16899  path="$MSVCR_DLL"
16900  has_colon=`$ECHO $path | $GREP ^.:`
16901  new_path="$path"
16902  if test "x$has_colon" = x; then
16903    # Not in mixed or Windows style, start by that.
16904    new_path=`cmd //c echo $path`
16905  fi
16906
16907
16908  input_path="$new_path"
16909  # Check if we need to convert this using DOS-style short mode. If the path
16910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16911  # take no chances and rewrite it.
16912  # Note: m4 eats our [], so we need to use [ and ] instead.
16913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16914  if test "x$has_forbidden_chars" != x; then
16915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16917  fi
16918
16919
16920  windows_path="$new_path"
16921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16922    unix_path=`$CYGPATH -u "$windows_path"`
16923    new_path="$unix_path"
16924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16926    new_path="$unix_path"
16927  fi
16928
16929  if test "x$path" != "x$new_path"; then
16930    MSVCR_DLL="$new_path"
16931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16932$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16933  fi
16934
16935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16937
16938  else
16939    # We're on a posix platform. Hooray! :)
16940    path="$MSVCR_DLL"
16941
16942    if test ! -f "$path" && test ! -d "$path"; then
16943      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16944    fi
16945
16946    has_space=`$ECHO "$path" | $GREP " "`
16947    if test "x$has_space" != x; then
16948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16949$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16950      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16951    fi
16952  fi
16953
16954
16955fi
16956
16957
16958
16959# If --build AND --host is set, then the configure script will find any
16960# cross compilation tools in the PATH. Cross compilation tools
16961# follows the cross compilation standard where they are prefixed with ${host}.
16962# For example the binary i686-sun-solaris2.10-gcc
16963# will cross compile for i686-sun-solaris2.10
16964# If neither of build and host is not set, then build=host and the
16965# default compiler found in the path will be used.
16966# Setting only --host, does not seem to be really supported.
16967# Please set both --build and --host if you want to cross compile.
16968
16969if test "x$COMPILE_TYPE" = "xcross"; then
16970    # Now we to find a C/C++ compiler that can build executables for the build
16971    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16972    # once. Also, we need to do this before adding a tools dir to the path,
16973    # otherwise we might pick up cross-compilers which don't use standard naming.
16974    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16975    # to wait until they are properly discovered.
16976    for ac_prog in cl cc gcc
16977do
16978  # Extract the first word of "$ac_prog", so it can be a program name with args.
16979set dummy $ac_prog; ac_word=$2
16980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16981$as_echo_n "checking for $ac_word... " >&6; }
16982if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16983  $as_echo_n "(cached) " >&6
16984else
16985  case $BUILD_CC in
16986  [\\/]* | ?:[\\/]*)
16987  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16988  ;;
16989  *)
16990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16991for as_dir in $PATH
16992do
16993  IFS=$as_save_IFS
16994  test -z "$as_dir" && as_dir=.
16995    for ac_exec_ext in '' $ac_executable_extensions; do
16996  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16997    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16999    break 2
17000  fi
17001done
17002  done
17003IFS=$as_save_IFS
17004
17005  ;;
17006esac
17007fi
17008BUILD_CC=$ac_cv_path_BUILD_CC
17009if test -n "$BUILD_CC"; then
17010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17011$as_echo "$BUILD_CC" >&6; }
17012else
17013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17014$as_echo "no" >&6; }
17015fi
17016
17017
17018  test -n "$BUILD_CC" && break
17019done
17020
17021
17022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17023
17024  # First separate the path from the arguments. This will split at the first
17025  # space.
17026  complete="$BUILD_CC"
17027  path="${complete%% *}"
17028  tmp="$complete EOL"
17029  arguments="${tmp#* }"
17030
17031  # Input might be given as Windows format, start by converting to
17032  # unix format.
17033  new_path=`$CYGPATH -u "$path"`
17034
17035  # Now try to locate executable using which
17036  new_path=`$WHICH "$new_path" 2> /dev/null`
17037  # bat and cmd files are not always considered executable in cygwin causing which
17038  # to not find them
17039  if test "x$new_path" = x \
17040           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17041           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17042    new_path=`$CYGPATH -u "$path"`
17043  fi
17044  if test "x$new_path" = x; then
17045    # Oops. Which didn't find the executable.
17046    # The splitting of arguments from the executable at a space might have been incorrect,
17047    # since paths with space are more likely in Windows. Give it another try with the whole
17048    # argument.
17049    path="$complete"
17050    arguments="EOL"
17051    new_path=`$CYGPATH -u "$path"`
17052    new_path=`$WHICH "$new_path" 2> /dev/null`
17053    # bat and cmd files are not always considered executable in cygwin causing which
17054    # to not find them
17055    if test "x$new_path" = x \
17056             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17057             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17058      new_path=`$CYGPATH -u "$path"`
17059    fi
17060    if test "x$new_path" = x; then
17061      # It's still not found. Now this is an unrecoverable error.
17062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17063$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17064      has_space=`$ECHO "$complete" | $GREP " "`
17065      if test "x$has_space" != x; then
17066        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17067$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17068      fi
17069      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17070    fi
17071  fi
17072
17073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17076  # "foo.exe" is OK but "foo" is an error.
17077  #
17078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17079  # It is also a way to make sure we got the proper file name for the real test later on.
17080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17081  if test "x$test_shortpath" = x; then
17082    # Short path failed, file does not exist as specified.
17083    # Try adding .exe or .cmd
17084    if test -f "${new_path}.exe"; then
17085       input_to_shortpath="${new_path}.exe"
17086    elif test -f "${new_path}.cmd"; then
17087       input_to_shortpath="${new_path}.cmd"
17088    else
17089      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17090$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17091      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17092$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17093      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17094    fi
17095  else
17096    input_to_shortpath="$new_path"
17097  fi
17098
17099  # Call helper function which possibly converts this using DOS-style short mode.
17100  # If so, the updated path is stored in $new_path.
17101  new_path="$input_to_shortpath"
17102
17103  input_path="$input_to_shortpath"
17104  # Check if we need to convert this using DOS-style short mode. If the path
17105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17106  # take no chances and rewrite it.
17107  # Note: m4 eats our [], so we need to use [ and ] instead.
17108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17109  if test "x$has_forbidden_chars" != x; then
17110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17111    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17112    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17113    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17114      # Going to short mode and back again did indeed matter. Since short mode is
17115      # case insensitive, let's make it lowercase to improve readability.
17116      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17117      # Now convert it back to Unix-stile (cygpath)
17118      input_path=`$CYGPATH -u "$shortmode_path"`
17119      new_path="$input_path"
17120    fi
17121  fi
17122
17123  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17124  if test "x$test_cygdrive_prefix" = x; then
17125    # As a simple fix, exclude /usr/bin since it's not a real path.
17126    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17127      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17128      # a path prefixed by /cygdrive for fixpath to work.
17129      new_path="$CYGWIN_ROOT_PATH$input_path"
17130    fi
17131  fi
17132
17133  # remove trailing .exe if any
17134  new_path="${new_path/%.exe/}"
17135
17136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17137
17138  # First separate the path from the arguments. This will split at the first
17139  # space.
17140  complete="$BUILD_CC"
17141  path="${complete%% *}"
17142  tmp="$complete EOL"
17143  arguments="${tmp#* }"
17144
17145  # Input might be given as Windows format, start by converting to
17146  # unix format.
17147  new_path="$path"
17148
17149  windows_path="$new_path"
17150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17151    unix_path=`$CYGPATH -u "$windows_path"`
17152    new_path="$unix_path"
17153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17155    new_path="$unix_path"
17156  fi
17157
17158
17159  # Now try to locate executable using which
17160  new_path=`$WHICH "$new_path" 2> /dev/null`
17161
17162  if test "x$new_path" = x; then
17163    # Oops. Which didn't find the executable.
17164    # The splitting of arguments from the executable at a space might have been incorrect,
17165    # since paths with space are more likely in Windows. Give it another try with the whole
17166    # argument.
17167    path="$complete"
17168    arguments="EOL"
17169    new_path="$path"
17170
17171  windows_path="$new_path"
17172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17173    unix_path=`$CYGPATH -u "$windows_path"`
17174    new_path="$unix_path"
17175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17177    new_path="$unix_path"
17178  fi
17179
17180
17181    new_path=`$WHICH "$new_path" 2> /dev/null`
17182
17183    if test "x$new_path" = x; then
17184      # It's still not found. Now this is an unrecoverable error.
17185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17186$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17187      has_space=`$ECHO "$complete" | $GREP " "`
17188      if test "x$has_space" != x; then
17189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17191      fi
17192      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17193    fi
17194  fi
17195
17196  # Now new_path has a complete unix path to the binary
17197  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17198    # Keep paths in /bin as-is, but remove trailing .exe if any
17199    new_path="${new_path/%.exe/}"
17200    # Do not save /bin paths to all_fixpath_prefixes!
17201  else
17202    # Not in mixed or Windows style, start by that.
17203    new_path=`cmd //c echo $new_path`
17204
17205  input_path="$new_path"
17206  # Check if we need to convert this using DOS-style short mode. If the path
17207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17208  # take no chances and rewrite it.
17209  # Note: m4 eats our [], so we need to use [ and ] instead.
17210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17211  if test "x$has_forbidden_chars" != x; then
17212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17214  fi
17215
17216    # Output is in $new_path
17217
17218  windows_path="$new_path"
17219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17220    unix_path=`$CYGPATH -u "$windows_path"`
17221    new_path="$unix_path"
17222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17224    new_path="$unix_path"
17225  fi
17226
17227    # remove trailing .exe if any
17228    new_path="${new_path/%.exe/}"
17229
17230    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17231    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17232  fi
17233
17234  else
17235    # We're on a posix platform. Hooray! :)
17236    # First separate the path from the arguments. This will split at the first
17237    # space.
17238    complete="$BUILD_CC"
17239    path="${complete%% *}"
17240    tmp="$complete EOL"
17241    arguments="${tmp#* }"
17242
17243    # Cannot rely on the command "which" here since it doesn't always work.
17244    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17245    if test -z "$is_absolute_path"; then
17246      # Path to executable is not absolute. Find it.
17247      IFS_save="$IFS"
17248      IFS=:
17249      for p in $PATH; do
17250        if test -f "$p/$path" && test -x "$p/$path"; then
17251          new_path="$p/$path"
17252          break
17253        fi
17254      done
17255      IFS="$IFS_save"
17256    else
17257      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17258$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17259      new_path="$path"
17260    fi
17261
17262    if test "x$new_path" = x; then
17263        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17264$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17265        has_space=`$ECHO "$complete" | $GREP " "`
17266        if test "x$has_space" != x; then
17267          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17268$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17269        fi
17270        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17271      fi
17272  fi
17273
17274      # Now join together the path and the arguments once again
17275      if test "x$arguments" != xEOL; then
17276        new_complete="$new_path ${arguments% *}"
17277      else
17278        new_complete="$new_path"
17279      fi
17280
17281  if test "x$complete" != "x$new_complete"; then
17282      BUILD_CC="$new_complete"
17283      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17284$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17285    fi
17286
17287    for ac_prog in cl CC g++
17288do
17289  # Extract the first word of "$ac_prog", so it can be a program name with args.
17290set dummy $ac_prog; ac_word=$2
17291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17292$as_echo_n "checking for $ac_word... " >&6; }
17293if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17294  $as_echo_n "(cached) " >&6
17295else
17296  case $BUILD_CXX in
17297  [\\/]* | ?:[\\/]*)
17298  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17299  ;;
17300  *)
17301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17302for as_dir in $PATH
17303do
17304  IFS=$as_save_IFS
17305  test -z "$as_dir" && as_dir=.
17306    for ac_exec_ext in '' $ac_executable_extensions; do
17307  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17308    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17310    break 2
17311  fi
17312done
17313  done
17314IFS=$as_save_IFS
17315
17316  ;;
17317esac
17318fi
17319BUILD_CXX=$ac_cv_path_BUILD_CXX
17320if test -n "$BUILD_CXX"; then
17321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17322$as_echo "$BUILD_CXX" >&6; }
17323else
17324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17325$as_echo "no" >&6; }
17326fi
17327
17328
17329  test -n "$BUILD_CXX" && break
17330done
17331
17332
17333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17334
17335  # First separate the path from the arguments. This will split at the first
17336  # space.
17337  complete="$BUILD_CXX"
17338  path="${complete%% *}"
17339  tmp="$complete EOL"
17340  arguments="${tmp#* }"
17341
17342  # Input might be given as Windows format, start by converting to
17343  # unix format.
17344  new_path=`$CYGPATH -u "$path"`
17345
17346  # Now try to locate executable using which
17347  new_path=`$WHICH "$new_path" 2> /dev/null`
17348  # bat and cmd files are not always considered executable in cygwin causing which
17349  # to not find them
17350  if test "x$new_path" = x \
17351           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17352           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17353    new_path=`$CYGPATH -u "$path"`
17354  fi
17355  if test "x$new_path" = x; then
17356    # Oops. Which didn't find the executable.
17357    # The splitting of arguments from the executable at a space might have been incorrect,
17358    # since paths with space are more likely in Windows. Give it another try with the whole
17359    # argument.
17360    path="$complete"
17361    arguments="EOL"
17362    new_path=`$CYGPATH -u "$path"`
17363    new_path=`$WHICH "$new_path" 2> /dev/null`
17364    # bat and cmd files are not always considered executable in cygwin causing which
17365    # to not find them
17366    if test "x$new_path" = x \
17367             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17368             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17369      new_path=`$CYGPATH -u "$path"`
17370    fi
17371    if test "x$new_path" = x; then
17372      # It's still not found. Now this is an unrecoverable error.
17373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17374$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17375      has_space=`$ECHO "$complete" | $GREP " "`
17376      if test "x$has_space" != x; then
17377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17379      fi
17380      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17381    fi
17382  fi
17383
17384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17387  # "foo.exe" is OK but "foo" is an error.
17388  #
17389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17390  # It is also a way to make sure we got the proper file name for the real test later on.
17391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17392  if test "x$test_shortpath" = x; then
17393    # Short path failed, file does not exist as specified.
17394    # Try adding .exe or .cmd
17395    if test -f "${new_path}.exe"; then
17396       input_to_shortpath="${new_path}.exe"
17397    elif test -f "${new_path}.cmd"; then
17398       input_to_shortpath="${new_path}.cmd"
17399    else
17400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17401$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17402      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17403$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17404      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17405    fi
17406  else
17407    input_to_shortpath="$new_path"
17408  fi
17409
17410  # Call helper function which possibly converts this using DOS-style short mode.
17411  # If so, the updated path is stored in $new_path.
17412  new_path="$input_to_shortpath"
17413
17414  input_path="$input_to_shortpath"
17415  # Check if we need to convert this using DOS-style short mode. If the path
17416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17417  # take no chances and rewrite it.
17418  # Note: m4 eats our [], so we need to use [ and ] instead.
17419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17420  if test "x$has_forbidden_chars" != x; then
17421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17425      # Going to short mode and back again did indeed matter. Since short mode is
17426      # case insensitive, let's make it lowercase to improve readability.
17427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17428      # Now convert it back to Unix-stile (cygpath)
17429      input_path=`$CYGPATH -u "$shortmode_path"`
17430      new_path="$input_path"
17431    fi
17432  fi
17433
17434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17435  if test "x$test_cygdrive_prefix" = x; then
17436    # As a simple fix, exclude /usr/bin since it's not a real path.
17437    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17439      # a path prefixed by /cygdrive for fixpath to work.
17440      new_path="$CYGWIN_ROOT_PATH$input_path"
17441    fi
17442  fi
17443
17444  # remove trailing .exe if any
17445  new_path="${new_path/%.exe/}"
17446
17447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17448
17449  # First separate the path from the arguments. This will split at the first
17450  # space.
17451  complete="$BUILD_CXX"
17452  path="${complete%% *}"
17453  tmp="$complete EOL"
17454  arguments="${tmp#* }"
17455
17456  # Input might be given as Windows format, start by converting to
17457  # unix format.
17458  new_path="$path"
17459
17460  windows_path="$new_path"
17461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17462    unix_path=`$CYGPATH -u "$windows_path"`
17463    new_path="$unix_path"
17464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17466    new_path="$unix_path"
17467  fi
17468
17469
17470  # Now try to locate executable using which
17471  new_path=`$WHICH "$new_path" 2> /dev/null`
17472
17473  if test "x$new_path" = x; then
17474    # Oops. Which didn't find the executable.
17475    # The splitting of arguments from the executable at a space might have been incorrect,
17476    # since paths with space are more likely in Windows. Give it another try with the whole
17477    # argument.
17478    path="$complete"
17479    arguments="EOL"
17480    new_path="$path"
17481
17482  windows_path="$new_path"
17483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17484    unix_path=`$CYGPATH -u "$windows_path"`
17485    new_path="$unix_path"
17486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17488    new_path="$unix_path"
17489  fi
17490
17491
17492    new_path=`$WHICH "$new_path" 2> /dev/null`
17493
17494    if test "x$new_path" = x; then
17495      # It's still not found. Now this is an unrecoverable error.
17496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17497$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17498      has_space=`$ECHO "$complete" | $GREP " "`
17499      if test "x$has_space" != x; then
17500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17502      fi
17503      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17504    fi
17505  fi
17506
17507  # Now new_path has a complete unix path to the binary
17508  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17509    # Keep paths in /bin as-is, but remove trailing .exe if any
17510    new_path="${new_path/%.exe/}"
17511    # Do not save /bin paths to all_fixpath_prefixes!
17512  else
17513    # Not in mixed or Windows style, start by that.
17514    new_path=`cmd //c echo $new_path`
17515
17516  input_path="$new_path"
17517  # Check if we need to convert this using DOS-style short mode. If the path
17518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17519  # take no chances and rewrite it.
17520  # Note: m4 eats our [], so we need to use [ and ] instead.
17521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17522  if test "x$has_forbidden_chars" != x; then
17523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17525  fi
17526
17527    # Output is in $new_path
17528
17529  windows_path="$new_path"
17530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17531    unix_path=`$CYGPATH -u "$windows_path"`
17532    new_path="$unix_path"
17533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17535    new_path="$unix_path"
17536  fi
17537
17538    # remove trailing .exe if any
17539    new_path="${new_path/%.exe/}"
17540
17541    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17542    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17543  fi
17544
17545  else
17546    # We're on a posix platform. Hooray! :)
17547    # First separate the path from the arguments. This will split at the first
17548    # space.
17549    complete="$BUILD_CXX"
17550    path="${complete%% *}"
17551    tmp="$complete EOL"
17552    arguments="${tmp#* }"
17553
17554    # Cannot rely on the command "which" here since it doesn't always work.
17555    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17556    if test -z "$is_absolute_path"; then
17557      # Path to executable is not absolute. Find it.
17558      IFS_save="$IFS"
17559      IFS=:
17560      for p in $PATH; do
17561        if test -f "$p/$path" && test -x "$p/$path"; then
17562          new_path="$p/$path"
17563          break
17564        fi
17565      done
17566      IFS="$IFS_save"
17567    else
17568      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17569$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17570      new_path="$path"
17571    fi
17572
17573    if test "x$new_path" = x; then
17574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17575$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17576        has_space=`$ECHO "$complete" | $GREP " "`
17577        if test "x$has_space" != x; then
17578          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17580        fi
17581        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17582      fi
17583  fi
17584
17585      # Now join together the path and the arguments once again
17586      if test "x$arguments" != xEOL; then
17587        new_complete="$new_path ${arguments% *}"
17588      else
17589        new_complete="$new_path"
17590      fi
17591
17592  if test "x$complete" != "x$new_complete"; then
17593      BUILD_CXX="$new_complete"
17594      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17595$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17596    fi
17597
17598    # Extract the first word of "ld", so it can be a program name with args.
17599set dummy ld; ac_word=$2
17600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17601$as_echo_n "checking for $ac_word... " >&6; }
17602if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17603  $as_echo_n "(cached) " >&6
17604else
17605  case $BUILD_LD in
17606  [\\/]* | ?:[\\/]*)
17607  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17608  ;;
17609  *)
17610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17611for as_dir in $PATH
17612do
17613  IFS=$as_save_IFS
17614  test -z "$as_dir" && as_dir=.
17615    for ac_exec_ext in '' $ac_executable_extensions; do
17616  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17617    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17619    break 2
17620  fi
17621done
17622  done
17623IFS=$as_save_IFS
17624
17625  ;;
17626esac
17627fi
17628BUILD_LD=$ac_cv_path_BUILD_LD
17629if test -n "$BUILD_LD"; then
17630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17631$as_echo "$BUILD_LD" >&6; }
17632else
17633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17634$as_echo "no" >&6; }
17635fi
17636
17637
17638
17639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17640
17641  # First separate the path from the arguments. This will split at the first
17642  # space.
17643  complete="$BUILD_LD"
17644  path="${complete%% *}"
17645  tmp="$complete EOL"
17646  arguments="${tmp#* }"
17647
17648  # Input might be given as Windows format, start by converting to
17649  # unix format.
17650  new_path=`$CYGPATH -u "$path"`
17651
17652  # Now try to locate executable using which
17653  new_path=`$WHICH "$new_path" 2> /dev/null`
17654  # bat and cmd files are not always considered executable in cygwin causing which
17655  # to not find them
17656  if test "x$new_path" = x \
17657           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17658           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17659    new_path=`$CYGPATH -u "$path"`
17660  fi
17661  if test "x$new_path" = x; then
17662    # Oops. Which didn't find the executable.
17663    # The splitting of arguments from the executable at a space might have been incorrect,
17664    # since paths with space are more likely in Windows. Give it another try with the whole
17665    # argument.
17666    path="$complete"
17667    arguments="EOL"
17668    new_path=`$CYGPATH -u "$path"`
17669    new_path=`$WHICH "$new_path" 2> /dev/null`
17670    # bat and cmd files are not always considered executable in cygwin causing which
17671    # to not find them
17672    if test "x$new_path" = x \
17673             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17674             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17675      new_path=`$CYGPATH -u "$path"`
17676    fi
17677    if test "x$new_path" = x; then
17678      # It's still not found. Now this is an unrecoverable error.
17679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17680$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17681      has_space=`$ECHO "$complete" | $GREP " "`
17682      if test "x$has_space" != x; then
17683        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17684$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17685      fi
17686      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17687    fi
17688  fi
17689
17690  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17691  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17692  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17693  # "foo.exe" is OK but "foo" is an error.
17694  #
17695  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17696  # It is also a way to make sure we got the proper file name for the real test later on.
17697  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17698  if test "x$test_shortpath" = x; then
17699    # Short path failed, file does not exist as specified.
17700    # Try adding .exe or .cmd
17701    if test -f "${new_path}.exe"; then
17702       input_to_shortpath="${new_path}.exe"
17703    elif test -f "${new_path}.cmd"; then
17704       input_to_shortpath="${new_path}.cmd"
17705    else
17706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17707$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17708      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17709$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17710      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17711    fi
17712  else
17713    input_to_shortpath="$new_path"
17714  fi
17715
17716  # Call helper function which possibly converts this using DOS-style short mode.
17717  # If so, the updated path is stored in $new_path.
17718  new_path="$input_to_shortpath"
17719
17720  input_path="$input_to_shortpath"
17721  # Check if we need to convert this using DOS-style short mode. If the path
17722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17723  # take no chances and rewrite it.
17724  # Note: m4 eats our [], so we need to use [ and ] instead.
17725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17726  if test "x$has_forbidden_chars" != x; then
17727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17731      # Going to short mode and back again did indeed matter. Since short mode is
17732      # case insensitive, let's make it lowercase to improve readability.
17733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17734      # Now convert it back to Unix-stile (cygpath)
17735      input_path=`$CYGPATH -u "$shortmode_path"`
17736      new_path="$input_path"
17737    fi
17738  fi
17739
17740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17741  if test "x$test_cygdrive_prefix" = x; then
17742    # As a simple fix, exclude /usr/bin since it's not a real path.
17743    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17745      # a path prefixed by /cygdrive for fixpath to work.
17746      new_path="$CYGWIN_ROOT_PATH$input_path"
17747    fi
17748  fi
17749
17750  # remove trailing .exe if any
17751  new_path="${new_path/%.exe/}"
17752
17753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17754
17755  # First separate the path from the arguments. This will split at the first
17756  # space.
17757  complete="$BUILD_LD"
17758  path="${complete%% *}"
17759  tmp="$complete EOL"
17760  arguments="${tmp#* }"
17761
17762  # Input might be given as Windows format, start by converting to
17763  # unix format.
17764  new_path="$path"
17765
17766  windows_path="$new_path"
17767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17768    unix_path=`$CYGPATH -u "$windows_path"`
17769    new_path="$unix_path"
17770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17772    new_path="$unix_path"
17773  fi
17774
17775
17776  # Now try to locate executable using which
17777  new_path=`$WHICH "$new_path" 2> /dev/null`
17778
17779  if test "x$new_path" = x; then
17780    # Oops. Which didn't find the executable.
17781    # The splitting of arguments from the executable at a space might have been incorrect,
17782    # since paths with space are more likely in Windows. Give it another try with the whole
17783    # argument.
17784    path="$complete"
17785    arguments="EOL"
17786    new_path="$path"
17787
17788  windows_path="$new_path"
17789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17790    unix_path=`$CYGPATH -u "$windows_path"`
17791    new_path="$unix_path"
17792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17794    new_path="$unix_path"
17795  fi
17796
17797
17798    new_path=`$WHICH "$new_path" 2> /dev/null`
17799
17800    if test "x$new_path" = x; then
17801      # It's still not found. Now this is an unrecoverable error.
17802      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17803$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17804      has_space=`$ECHO "$complete" | $GREP " "`
17805      if test "x$has_space" != x; then
17806        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17807$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17808      fi
17809      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17810    fi
17811  fi
17812
17813  # Now new_path has a complete unix path to the binary
17814  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17815    # Keep paths in /bin as-is, but remove trailing .exe if any
17816    new_path="${new_path/%.exe/}"
17817    # Do not save /bin paths to all_fixpath_prefixes!
17818  else
17819    # Not in mixed or Windows style, start by that.
17820    new_path=`cmd //c echo $new_path`
17821
17822  input_path="$new_path"
17823  # Check if we need to convert this using DOS-style short mode. If the path
17824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17825  # take no chances and rewrite it.
17826  # Note: m4 eats our [], so we need to use [ and ] instead.
17827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17828  if test "x$has_forbidden_chars" != x; then
17829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17831  fi
17832
17833    # Output is in $new_path
17834
17835  windows_path="$new_path"
17836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17837    unix_path=`$CYGPATH -u "$windows_path"`
17838    new_path="$unix_path"
17839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17841    new_path="$unix_path"
17842  fi
17843
17844    # remove trailing .exe if any
17845    new_path="${new_path/%.exe/}"
17846
17847    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17848    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17849  fi
17850
17851  else
17852    # We're on a posix platform. Hooray! :)
17853    # First separate the path from the arguments. This will split at the first
17854    # space.
17855    complete="$BUILD_LD"
17856    path="${complete%% *}"
17857    tmp="$complete EOL"
17858    arguments="${tmp#* }"
17859
17860    # Cannot rely on the command "which" here since it doesn't always work.
17861    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17862    if test -z "$is_absolute_path"; then
17863      # Path to executable is not absolute. Find it.
17864      IFS_save="$IFS"
17865      IFS=:
17866      for p in $PATH; do
17867        if test -f "$p/$path" && test -x "$p/$path"; then
17868          new_path="$p/$path"
17869          break
17870        fi
17871      done
17872      IFS="$IFS_save"
17873    else
17874      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17875$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17876      new_path="$path"
17877    fi
17878
17879    if test "x$new_path" = x; then
17880        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17881$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17882        has_space=`$ECHO "$complete" | $GREP " "`
17883        if test "x$has_space" != x; then
17884          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17885$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17886        fi
17887        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17888      fi
17889  fi
17890
17891      # Now join together the path and the arguments once again
17892      if test "x$arguments" != xEOL; then
17893        new_complete="$new_path ${arguments% *}"
17894      else
17895        new_complete="$new_path"
17896      fi
17897
17898  if test "x$complete" != "x$new_complete"; then
17899      BUILD_LD="$new_complete"
17900      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17901$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17902    fi
17903
17904fi
17905
17906
17907
17908
17909# If a devkit is found on the builddeps server, then prepend its path to the
17910# PATH variable. If there are cross compilers available in the devkit, these
17911# will be found by AC_PROG_CC et al.
17912DEVKIT=
17913
17914
17915    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17916        # Source the builddeps file again, to make sure it uses the latest variables!
17917        . $builddepsfile
17918        # Look for a target and build machine specific resource!
17919        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17920        if test "x$resource" = x; then
17921            # Ok, lets instead look for a target specific resource
17922            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17923        fi
17924        if test "x$resource" = x; then
17925            # Ok, lets instead look for a build specific resource
17926            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17927        fi
17928        if test "x$resource" = x; then
17929            # Ok, lets instead look for a generic resource
17930            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17931            resource=${builddep_devkit}
17932        fi
17933        if test "x$resource" != x; then
17934            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17935$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17936	    # If the resource in the builddeps.conf file is an existing directory,
17937	    # for example /java/linux/cups
17938	    if test -d ${resource}; then
17939	       depdir=${resource}
17940	    else
17941
17942# devkit is for example mymodule
17943# $resource is for example libs/general/libmymod_1_2_3.zip
17944# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17945# $with_builddeps_dir is for example /localhome/builddeps
17946# depdir is the name of the variable into which we store the depdir, eg MYMOD
17947# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17948# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17949    filename=`basename $resource`
17950    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17951    filebase=${filename%%.*}
17952    extension=${filename#*.}
17953    installdir=$with_builddeps_dir/$filebase
17954    if test ! -f $installdir/$filename.unpacked; then
17955        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17956$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17957        if test ! -d $installdir; then
17958            mkdir -p $installdir
17959        fi
17960        if test ! -d $installdir; then
17961            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17962        fi
17963        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17964        touch $tmpfile
17965        if test ! -f $tmpfile; then
17966            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17967        fi
17968
17969    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17970    # $tmpfile is the local file name for the downloaded file.
17971    VALID_TOOL=no
17972    if test "x$BDEPS_FTP" = xwget; then
17973       VALID_TOOL=yes
17974       wget -O $tmpfile $with_builddeps_server/$resource
17975    fi
17976    if test "x$BDEPS_FTP" = xlftp; then
17977       VALID_TOOL=yes
17978       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17979    fi
17980    if test "x$BDEPS_FTP" = xftp; then
17981        VALID_TOOL=yes
17982        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17983        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17984        FTPUSERPWD=${FTPSERVER%%@*}
17985        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17986            FTPUSER=${userpwd%%:*}
17987            FTPPWD=${userpwd#*@}
17988            FTPSERVER=${FTPSERVER#*@}
17989        else
17990            FTPUSER=ftp
17991            FTPPWD=ftp
17992        fi
17993        # the "pass" command does not work on some
17994        # ftp clients (read ftp.exe) but if it works,
17995        # passive mode is better!
17996        (\
17997            echo "user $FTPUSER $FTPPWD"        ;\
17998            echo "pass"                         ;\
17999            echo "bin"                          ;\
18000            echo "get $FTPPATH $tmpfile"              ;\
18001        ) | ftp -in $FTPSERVER
18002    fi
18003    if test "x$VALID_TOOL" != xyes; then
18004       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18005    fi
18006
18007        mv $tmpfile $installdir/$filename
18008        if test ! -s $installdir/$filename; then
18009            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18010        fi
18011        case "$extension" in
18012            zip)  echo "Unzipping $installdir/$filename..."
18013               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18014            ;;
18015            tar.gz) echo "Untaring $installdir/$filename..."
18016               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18017            ;;
18018            tgz) echo "Untaring $installdir/$filename..."
18019               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18020            ;;
18021            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18022            ;;
18023        esac
18024    fi
18025    if test -f $installdir/$filename.unpacked; then
18026        depdir=$installdir
18027    fi
18028
18029	    fi
18030            # Source the builddeps file again, because in the previous command, the depdir
18031            # was updated to point at the current build dependency install directory.
18032            . $builddepsfile
18033            # Now extract variables from the builddeps.conf files.
18034            theroot=${builddep_devkit_ROOT}
18035            thecflags=${builddep_devkit_CFLAGS}
18036            thelibs=${builddep_devkit_LIBS}
18037            if test "x$depdir" = x; then
18038                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18039            fi
18040            DEVKIT=$depdir
18041            if test "x$theroot" != x; then
18042               DEVKIT="$theroot"
18043            fi
18044            if test "x$thecflags" != x; then
18045               DEVKIT_CFLAGS="$thecflags"
18046            fi
18047            if test "x$thelibs" != x; then
18048               DEVKIT_LIBS="$thelibs"
18049            fi
18050            # Found devkit
18051                     PATH="$DEVKIT/bin:$PATH"
18052                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18053                     if test "x$x_includes" = "xNONE"; then
18054                         x_includes="$SYS_ROOT/usr/include/X11"
18055                     fi
18056                     if test "x$x_libraries" = "xNONE"; then
18057                         x_libraries="$SYS_ROOT/usr/lib"
18058                     fi
18059
18060
18061        fi
18062
18063    fi
18064
18065
18066if test "x$SYS_ROOT" != "x/" ; then
18067    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18068    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18069    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18070    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18071    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18072    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18073fi
18074
18075# Store the CFLAGS etal passed to the configure script.
18076ORG_CFLAGS="$CFLAGS"
18077ORG_CXXFLAGS="$CXXFLAGS"
18078ORG_OBJCFLAGS="$OBJCFLAGS"
18079
18080# autoconf magic only relies on PATH, so update it if tools dir is specified
18081OLD_PATH="$PATH"
18082if test "x$TOOLS_DIR" != x; then
18083  PATH=$TOOLS_DIR:$PATH
18084fi
18085
18086
18087### Locate C compiler (CC)
18088
18089# gcc is almost always present, but on Windows we
18090# prefer cl.exe and on Solaris we prefer CC.
18091# Thus test for them in this order.
18092if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18093  # Do not probe for cc on MacOSX.
18094  COMPILER_CHECK_LIST="cl gcc"
18095else
18096  COMPILER_CHECK_LIST="cl cc gcc"
18097fi
18098
18099
18100  COMPILER_NAME=C
18101
18102  CC=
18103  # If TOOLS_DIR is set, check for all compiler names in there first
18104  # before checking the rest of the PATH.
18105  if test -n "$TOOLS_DIR"; then
18106    PATH_save="$PATH"
18107    PATH="$TOOLS_DIR"
18108    for ac_prog in $COMPILER_CHECK_LIST
18109do
18110  # Extract the first word of "$ac_prog", so it can be a program name with args.
18111set dummy $ac_prog; ac_word=$2
18112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18113$as_echo_n "checking for $ac_word... " >&6; }
18114if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18115  $as_echo_n "(cached) " >&6
18116else
18117  case $TOOLS_DIR_CC in
18118  [\\/]* | ?:[\\/]*)
18119  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18120  ;;
18121  *)
18122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18123for as_dir in $PATH
18124do
18125  IFS=$as_save_IFS
18126  test -z "$as_dir" && as_dir=.
18127    for ac_exec_ext in '' $ac_executable_extensions; do
18128  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18129    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18131    break 2
18132  fi
18133done
18134  done
18135IFS=$as_save_IFS
18136
18137  ;;
18138esac
18139fi
18140TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18141if test -n "$TOOLS_DIR_CC"; then
18142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18143$as_echo "$TOOLS_DIR_CC" >&6; }
18144else
18145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18146$as_echo "no" >&6; }
18147fi
18148
18149
18150  test -n "$TOOLS_DIR_CC" && break
18151done
18152
18153    CC=$TOOLS_DIR_CC
18154    PATH="$PATH_save"
18155  fi
18156
18157  # AC_PATH_PROGS can't be run multiple times with the same variable,
18158  # so create a new name for this run.
18159  if test "x$CC" = x; then
18160    for ac_prog in $COMPILER_CHECK_LIST
18161do
18162  # Extract the first word of "$ac_prog", so it can be a program name with args.
18163set dummy $ac_prog; ac_word=$2
18164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18165$as_echo_n "checking for $ac_word... " >&6; }
18166if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18167  $as_echo_n "(cached) " >&6
18168else
18169  case $POTENTIAL_CC in
18170  [\\/]* | ?:[\\/]*)
18171  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18172  ;;
18173  *)
18174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18175for as_dir in $PATH
18176do
18177  IFS=$as_save_IFS
18178  test -z "$as_dir" && as_dir=.
18179    for ac_exec_ext in '' $ac_executable_extensions; do
18180  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18181    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18183    break 2
18184  fi
18185done
18186  done
18187IFS=$as_save_IFS
18188
18189  ;;
18190esac
18191fi
18192POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18193if test -n "$POTENTIAL_CC"; then
18194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18195$as_echo "$POTENTIAL_CC" >&6; }
18196else
18197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18198$as_echo "no" >&6; }
18199fi
18200
18201
18202  test -n "$POTENTIAL_CC" && break
18203done
18204
18205    CC=$POTENTIAL_CC
18206  fi
18207
18208  if test "x$CC" = x; then
18209
18210    # Print a helpful message on how to acquire the necessary build dependency.
18211    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18212    MISSING_DEPENDENCY=devkit
18213    PKGHANDLER_COMMAND=
18214
18215    case $PKGHANDLER in
18216	apt-get)
18217                apt_help     $MISSING_DEPENDENCY ;;
18218    yum)
18219                yum_help     $MISSING_DEPENDENCY ;;
18220	port)
18221                port_help    $MISSING_DEPENDENCY ;;
18222	pkgutil)
18223                pkgutil_help $MISSING_DEPENDENCY ;;
18224	pkgadd)
18225                pkgadd_help  $MISSING_DEPENDENCY ;;
18226    * )
18227      break ;;
18228    esac
18229
18230    if test "x$PKGHANDLER_COMMAND" != x; then
18231        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18232    fi
18233
18234      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18235  fi
18236
18237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18238
18239  # First separate the path from the arguments. This will split at the first
18240  # space.
18241  complete="$CC"
18242  path="${complete%% *}"
18243  tmp="$complete EOL"
18244  arguments="${tmp#* }"
18245
18246  # Input might be given as Windows format, start by converting to
18247  # unix format.
18248  new_path=`$CYGPATH -u "$path"`
18249
18250  # Now try to locate executable using which
18251  new_path=`$WHICH "$new_path" 2> /dev/null`
18252  # bat and cmd files are not always considered executable in cygwin causing which
18253  # to not find them
18254  if test "x$new_path" = x \
18255           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18256           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18257    new_path=`$CYGPATH -u "$path"`
18258  fi
18259  if test "x$new_path" = x; then
18260    # Oops. Which didn't find the executable.
18261    # The splitting of arguments from the executable at a space might have been incorrect,
18262    # since paths with space are more likely in Windows. Give it another try with the whole
18263    # argument.
18264    path="$complete"
18265    arguments="EOL"
18266    new_path=`$CYGPATH -u "$path"`
18267    new_path=`$WHICH "$new_path" 2> /dev/null`
18268    # bat and cmd files are not always considered executable in cygwin causing which
18269    # to not find them
18270    if test "x$new_path" = x \
18271             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18272             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18273      new_path=`$CYGPATH -u "$path"`
18274    fi
18275    if test "x$new_path" = x; then
18276      # It's still not found. Now this is an unrecoverable error.
18277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18278$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18279      has_space=`$ECHO "$complete" | $GREP " "`
18280      if test "x$has_space" != x; then
18281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18283      fi
18284      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18285    fi
18286  fi
18287
18288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18291  # "foo.exe" is OK but "foo" is an error.
18292  #
18293  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18294  # It is also a way to make sure we got the proper file name for the real test later on.
18295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18296  if test "x$test_shortpath" = x; then
18297    # Short path failed, file does not exist as specified.
18298    # Try adding .exe or .cmd
18299    if test -f "${new_path}.exe"; then
18300       input_to_shortpath="${new_path}.exe"
18301    elif test -f "${new_path}.cmd"; then
18302       input_to_shortpath="${new_path}.cmd"
18303    else
18304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18305$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18308      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18309    fi
18310  else
18311    input_to_shortpath="$new_path"
18312  fi
18313
18314  # Call helper function which possibly converts this using DOS-style short mode.
18315  # If so, the updated path is stored in $new_path.
18316  new_path="$input_to_shortpath"
18317
18318  input_path="$input_to_shortpath"
18319  # Check if we need to convert this using DOS-style short mode. If the path
18320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18321  # take no chances and rewrite it.
18322  # Note: m4 eats our [], so we need to use [ and ] instead.
18323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18324  if test "x$has_forbidden_chars" != x; then
18325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18329      # Going to short mode and back again did indeed matter. Since short mode is
18330      # case insensitive, let's make it lowercase to improve readability.
18331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18332      # Now convert it back to Unix-stile (cygpath)
18333      input_path=`$CYGPATH -u "$shortmode_path"`
18334      new_path="$input_path"
18335    fi
18336  fi
18337
18338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18339  if test "x$test_cygdrive_prefix" = x; then
18340    # As a simple fix, exclude /usr/bin since it's not a real path.
18341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18343      # a path prefixed by /cygdrive for fixpath to work.
18344      new_path="$CYGWIN_ROOT_PATH$input_path"
18345    fi
18346  fi
18347
18348  # remove trailing .exe if any
18349  new_path="${new_path/%.exe/}"
18350
18351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18352
18353  # First separate the path from the arguments. This will split at the first
18354  # space.
18355  complete="$CC"
18356  path="${complete%% *}"
18357  tmp="$complete EOL"
18358  arguments="${tmp#* }"
18359
18360  # Input might be given as Windows format, start by converting to
18361  # unix format.
18362  new_path="$path"
18363
18364  windows_path="$new_path"
18365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18366    unix_path=`$CYGPATH -u "$windows_path"`
18367    new_path="$unix_path"
18368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18370    new_path="$unix_path"
18371  fi
18372
18373
18374  # Now try to locate executable using which
18375  new_path=`$WHICH "$new_path" 2> /dev/null`
18376
18377  if test "x$new_path" = x; then
18378    # Oops. Which didn't find the executable.
18379    # The splitting of arguments from the executable at a space might have been incorrect,
18380    # since paths with space are more likely in Windows. Give it another try with the whole
18381    # argument.
18382    path="$complete"
18383    arguments="EOL"
18384    new_path="$path"
18385
18386  windows_path="$new_path"
18387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18388    unix_path=`$CYGPATH -u "$windows_path"`
18389    new_path="$unix_path"
18390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18392    new_path="$unix_path"
18393  fi
18394
18395
18396    new_path=`$WHICH "$new_path" 2> /dev/null`
18397
18398    if test "x$new_path" = x; then
18399      # It's still not found. Now this is an unrecoverable error.
18400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18401$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18402      has_space=`$ECHO "$complete" | $GREP " "`
18403      if test "x$has_space" != x; then
18404        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18405$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18406      fi
18407      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18408    fi
18409  fi
18410
18411  # Now new_path has a complete unix path to the binary
18412  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18413    # Keep paths in /bin as-is, but remove trailing .exe if any
18414    new_path="${new_path/%.exe/}"
18415    # Do not save /bin paths to all_fixpath_prefixes!
18416  else
18417    # Not in mixed or Windows style, start by that.
18418    new_path=`cmd //c echo $new_path`
18419
18420  input_path="$new_path"
18421  # Check if we need to convert this using DOS-style short mode. If the path
18422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18423  # take no chances and rewrite it.
18424  # Note: m4 eats our [], so we need to use [ and ] instead.
18425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18426  if test "x$has_forbidden_chars" != x; then
18427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18428    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18429  fi
18430
18431    # Output is in $new_path
18432
18433  windows_path="$new_path"
18434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18435    unix_path=`$CYGPATH -u "$windows_path"`
18436    new_path="$unix_path"
18437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18439    new_path="$unix_path"
18440  fi
18441
18442    # remove trailing .exe if any
18443    new_path="${new_path/%.exe/}"
18444
18445    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18446    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18447  fi
18448
18449  else
18450    # We're on a posix platform. Hooray! :)
18451    # First separate the path from the arguments. This will split at the first
18452    # space.
18453    complete="$CC"
18454    path="${complete%% *}"
18455    tmp="$complete EOL"
18456    arguments="${tmp#* }"
18457
18458    # Cannot rely on the command "which" here since it doesn't always work.
18459    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18460    if test -z "$is_absolute_path"; then
18461      # Path to executable is not absolute. Find it.
18462      IFS_save="$IFS"
18463      IFS=:
18464      for p in $PATH; do
18465        if test -f "$p/$path" && test -x "$p/$path"; then
18466          new_path="$p/$path"
18467          break
18468        fi
18469      done
18470      IFS="$IFS_save"
18471    else
18472      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18473$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18474      new_path="$path"
18475    fi
18476
18477    if test "x$new_path" = x; then
18478        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18479$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18480        has_space=`$ECHO "$complete" | $GREP " "`
18481        if test "x$has_space" != x; then
18482          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18483$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18484        fi
18485        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18486      fi
18487  fi
18488
18489      # Now join together the path and the arguments once again
18490      if test "x$arguments" != xEOL; then
18491        new_complete="$new_path ${arguments% *}"
18492      else
18493        new_complete="$new_path"
18494      fi
18495
18496  if test "x$complete" != "x$new_complete"; then
18497      CC="$new_complete"
18498      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18499$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18500    fi
18501
18502  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18503$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18504  TEST_COMPILER="$CC"
18505
18506    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18507        # Follow a chain of symbolic links. Use readlink
18508        # where it exists, else fall back to horribly
18509        # complicated shell code.
18510        if test "x$READLINK_TESTED" != yes; then
18511            # On MacOSX there is a readlink tool with a different
18512            # purpose than the GNU readlink tool. Check the found readlink.
18513            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18514            if test "x$ISGNU" = x; then
18515                 # A readlink that we do not know how to use.
18516                 # Are there other non-GNU readlinks out there?
18517                 READLINK_TESTED=yes
18518                 READLINK=
18519            fi
18520        fi
18521
18522        if test "x$READLINK" != x; then
18523            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18524        else
18525            # Save the current directory for restoring afterwards
18526            STARTDIR=$PWD
18527            COUNTER=0
18528            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18529            sym_link_file=`$BASENAME $TEST_COMPILER`
18530            # Use the system pwd and not the shell builtin to resolve directory symlinks
18531            cd $sym_link_dir
18532            cd `$THEPWDCMD`
18533            sym_link_dir=`$THEPWDCMD`
18534            # Resolve file symlinks
18535            while test $COUNTER -lt 20; do
18536                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18537                if test "x$ISLINK" == x; then
18538                    # This is not a symbolic link! We are done!
18539                    break
18540                fi
18541                # Again resolve directory symlinks since the target of the just found
18542                # link could be in a different directory
18543                cd `$DIRNAME $ISLINK`
18544                sym_link_dir=`$THEPWDCMD`
18545                sym_link_file=`$BASENAME $ISLINK`
18546                let COUNTER=COUNTER+1
18547            done
18548            cd $STARTDIR
18549            TEST_COMPILER=$sym_link_dir/$sym_link_file
18550        fi
18551    fi
18552
18553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18554$as_echo "$TEST_COMPILER" >&6; }
18555  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18556$as_echo_n "checking if CC is disguised ccache... " >&6; }
18557
18558  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18559  if test "x$COMPILER_BASENAME" = "xccache"; then
18560    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18561$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18562    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18563    # We want to control ccache invocation ourselves, so ignore this cc and try
18564    # searching again.
18565
18566    # Remove the path to the fake ccache cc from the PATH
18567    RETRY_COMPILER_SAVED_PATH="$PATH"
18568    COMPILER_DIRNAME=`$DIRNAME $CC`
18569    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18570
18571    # Try again looking for our compiler
18572    if test -n "$ac_tool_prefix"; then
18573  for ac_prog in $COMPILER_CHECK_LIST
18574  do
18575    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18576set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18578$as_echo_n "checking for $ac_word... " >&6; }
18579if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18580  $as_echo_n "(cached) " >&6
18581else
18582  if test -n "$PROPER_COMPILER_CC"; then
18583  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18584else
18585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18586for as_dir in $PATH
18587do
18588  IFS=$as_save_IFS
18589  test -z "$as_dir" && as_dir=.
18590    for ac_exec_ext in '' $ac_executable_extensions; do
18591  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18592    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18594    break 2
18595  fi
18596done
18597  done
18598IFS=$as_save_IFS
18599
18600fi
18601fi
18602PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18603if test -n "$PROPER_COMPILER_CC"; then
18604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18605$as_echo "$PROPER_COMPILER_CC" >&6; }
18606else
18607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18608$as_echo "no" >&6; }
18609fi
18610
18611
18612    test -n "$PROPER_COMPILER_CC" && break
18613  done
18614fi
18615if test -z "$PROPER_COMPILER_CC"; then
18616  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18617  for ac_prog in $COMPILER_CHECK_LIST
18618do
18619  # Extract the first word of "$ac_prog", so it can be a program name with args.
18620set dummy $ac_prog; ac_word=$2
18621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18622$as_echo_n "checking for $ac_word... " >&6; }
18623if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18624  $as_echo_n "(cached) " >&6
18625else
18626  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18627  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18628else
18629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18630for as_dir in $PATH
18631do
18632  IFS=$as_save_IFS
18633  test -z "$as_dir" && as_dir=.
18634    for ac_exec_ext in '' $ac_executable_extensions; do
18635  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18636    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18638    break 2
18639  fi
18640done
18641  done
18642IFS=$as_save_IFS
18643
18644fi
18645fi
18646ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18647if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18649$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18650else
18651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18652$as_echo "no" >&6; }
18653fi
18654
18655
18656  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18657done
18658
18659  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18660    PROPER_COMPILER_CC=""
18661  else
18662    case $cross_compiling:$ac_tool_warned in
18663yes:)
18664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18666ac_tool_warned=yes ;;
18667esac
18668    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18669  fi
18670fi
18671
18672
18673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18674
18675  # First separate the path from the arguments. This will split at the first
18676  # space.
18677  complete="$PROPER_COMPILER_CC"
18678  path="${complete%% *}"
18679  tmp="$complete EOL"
18680  arguments="${tmp#* }"
18681
18682  # Input might be given as Windows format, start by converting to
18683  # unix format.
18684  new_path=`$CYGPATH -u "$path"`
18685
18686  # Now try to locate executable using which
18687  new_path=`$WHICH "$new_path" 2> /dev/null`
18688  # bat and cmd files are not always considered executable in cygwin causing which
18689  # to not find them
18690  if test "x$new_path" = x \
18691           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18692           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18693    new_path=`$CYGPATH -u "$path"`
18694  fi
18695  if test "x$new_path" = x; then
18696    # Oops. Which didn't find the executable.
18697    # The splitting of arguments from the executable at a space might have been incorrect,
18698    # since paths with space are more likely in Windows. Give it another try with the whole
18699    # argument.
18700    path="$complete"
18701    arguments="EOL"
18702    new_path=`$CYGPATH -u "$path"`
18703    new_path=`$WHICH "$new_path" 2> /dev/null`
18704    # bat and cmd files are not always considered executable in cygwin causing which
18705    # to not find them
18706    if test "x$new_path" = x \
18707             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18708             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18709      new_path=`$CYGPATH -u "$path"`
18710    fi
18711    if test "x$new_path" = x; then
18712      # It's still not found. Now this is an unrecoverable error.
18713      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18714$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18715      has_space=`$ECHO "$complete" | $GREP " "`
18716      if test "x$has_space" != x; then
18717        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18718$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18719      fi
18720      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18721    fi
18722  fi
18723
18724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18727  # "foo.exe" is OK but "foo" is an error.
18728  #
18729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18730  # It is also a way to make sure we got the proper file name for the real test later on.
18731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18732  if test "x$test_shortpath" = x; then
18733    # Short path failed, file does not exist as specified.
18734    # Try adding .exe or .cmd
18735    if test -f "${new_path}.exe"; then
18736       input_to_shortpath="${new_path}.exe"
18737    elif test -f "${new_path}.cmd"; then
18738       input_to_shortpath="${new_path}.cmd"
18739    else
18740      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18741$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18742      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18743$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18744      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18745    fi
18746  else
18747    input_to_shortpath="$new_path"
18748  fi
18749
18750  # Call helper function which possibly converts this using DOS-style short mode.
18751  # If so, the updated path is stored in $new_path.
18752  new_path="$input_to_shortpath"
18753
18754  input_path="$input_to_shortpath"
18755  # Check if we need to convert this using DOS-style short mode. If the path
18756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18757  # take no chances and rewrite it.
18758  # Note: m4 eats our [], so we need to use [ and ] instead.
18759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18760  if test "x$has_forbidden_chars" != x; then
18761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18765      # Going to short mode and back again did indeed matter. Since short mode is
18766      # case insensitive, let's make it lowercase to improve readability.
18767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18768      # Now convert it back to Unix-stile (cygpath)
18769      input_path=`$CYGPATH -u "$shortmode_path"`
18770      new_path="$input_path"
18771    fi
18772  fi
18773
18774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18775  if test "x$test_cygdrive_prefix" = x; then
18776    # As a simple fix, exclude /usr/bin since it's not a real path.
18777    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18779      # a path prefixed by /cygdrive for fixpath to work.
18780      new_path="$CYGWIN_ROOT_PATH$input_path"
18781    fi
18782  fi
18783
18784  # remove trailing .exe if any
18785  new_path="${new_path/%.exe/}"
18786
18787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18788
18789  # First separate the path from the arguments. This will split at the first
18790  # space.
18791  complete="$PROPER_COMPILER_CC"
18792  path="${complete%% *}"
18793  tmp="$complete EOL"
18794  arguments="${tmp#* }"
18795
18796  # Input might be given as Windows format, start by converting to
18797  # unix format.
18798  new_path="$path"
18799
18800  windows_path="$new_path"
18801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18802    unix_path=`$CYGPATH -u "$windows_path"`
18803    new_path="$unix_path"
18804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18806    new_path="$unix_path"
18807  fi
18808
18809
18810  # Now try to locate executable using which
18811  new_path=`$WHICH "$new_path" 2> /dev/null`
18812
18813  if test "x$new_path" = x; then
18814    # Oops. Which didn't find the executable.
18815    # The splitting of arguments from the executable at a space might have been incorrect,
18816    # since paths with space are more likely in Windows. Give it another try with the whole
18817    # argument.
18818    path="$complete"
18819    arguments="EOL"
18820    new_path="$path"
18821
18822  windows_path="$new_path"
18823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18824    unix_path=`$CYGPATH -u "$windows_path"`
18825    new_path="$unix_path"
18826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18828    new_path="$unix_path"
18829  fi
18830
18831
18832    new_path=`$WHICH "$new_path" 2> /dev/null`
18833
18834    if test "x$new_path" = x; then
18835      # It's still not found. Now this is an unrecoverable error.
18836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18837$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18838      has_space=`$ECHO "$complete" | $GREP " "`
18839      if test "x$has_space" != x; then
18840        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18841$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18842      fi
18843      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18844    fi
18845  fi
18846
18847  # Now new_path has a complete unix path to the binary
18848  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18849    # Keep paths in /bin as-is, but remove trailing .exe if any
18850    new_path="${new_path/%.exe/}"
18851    # Do not save /bin paths to all_fixpath_prefixes!
18852  else
18853    # Not in mixed or Windows style, start by that.
18854    new_path=`cmd //c echo $new_path`
18855
18856  input_path="$new_path"
18857  # Check if we need to convert this using DOS-style short mode. If the path
18858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18859  # take no chances and rewrite it.
18860  # Note: m4 eats our [], so we need to use [ and ] instead.
18861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18862  if test "x$has_forbidden_chars" != x; then
18863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18865  fi
18866
18867    # Output is in $new_path
18868
18869  windows_path="$new_path"
18870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18871    unix_path=`$CYGPATH -u "$windows_path"`
18872    new_path="$unix_path"
18873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18875    new_path="$unix_path"
18876  fi
18877
18878    # remove trailing .exe if any
18879    new_path="${new_path/%.exe/}"
18880
18881    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18882    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18883  fi
18884
18885  else
18886    # We're on a posix platform. Hooray! :)
18887    # First separate the path from the arguments. This will split at the first
18888    # space.
18889    complete="$PROPER_COMPILER_CC"
18890    path="${complete%% *}"
18891    tmp="$complete EOL"
18892    arguments="${tmp#* }"
18893
18894    # Cannot rely on the command "which" here since it doesn't always work.
18895    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18896    if test -z "$is_absolute_path"; then
18897      # Path to executable is not absolute. Find it.
18898      IFS_save="$IFS"
18899      IFS=:
18900      for p in $PATH; do
18901        if test -f "$p/$path" && test -x "$p/$path"; then
18902          new_path="$p/$path"
18903          break
18904        fi
18905      done
18906      IFS="$IFS_save"
18907    else
18908      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18909$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18910      new_path="$path"
18911    fi
18912
18913    if test "x$new_path" = x; then
18914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18915$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18916        has_space=`$ECHO "$complete" | $GREP " "`
18917        if test "x$has_space" != x; then
18918          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18919$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18920        fi
18921        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18922      fi
18923  fi
18924
18925      # Now join together the path and the arguments once again
18926      if test "x$arguments" != xEOL; then
18927        new_complete="$new_path ${arguments% *}"
18928      else
18929        new_complete="$new_path"
18930      fi
18931
18932  if test "x$complete" != "x$new_complete"; then
18933      PROPER_COMPILER_CC="$new_complete"
18934      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18935$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18936    fi
18937
18938    PATH="$RETRY_COMPILER_SAVED_PATH"
18939
18940    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18941$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18942
18943    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18944        # Follow a chain of symbolic links. Use readlink
18945        # where it exists, else fall back to horribly
18946        # complicated shell code.
18947        if test "x$READLINK_TESTED" != yes; then
18948            # On MacOSX there is a readlink tool with a different
18949            # purpose than the GNU readlink tool. Check the found readlink.
18950            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18951            if test "x$ISGNU" = x; then
18952                 # A readlink that we do not know how to use.
18953                 # Are there other non-GNU readlinks out there?
18954                 READLINK_TESTED=yes
18955                 READLINK=
18956            fi
18957        fi
18958
18959        if test "x$READLINK" != x; then
18960            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18961        else
18962            # Save the current directory for restoring afterwards
18963            STARTDIR=$PWD
18964            COUNTER=0
18965            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18966            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18967            # Use the system pwd and not the shell builtin to resolve directory symlinks
18968            cd $sym_link_dir
18969            cd `$THEPWDCMD`
18970            sym_link_dir=`$THEPWDCMD`
18971            # Resolve file symlinks
18972            while test $COUNTER -lt 20; do
18973                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18974                if test "x$ISLINK" == x; then
18975                    # This is not a symbolic link! We are done!
18976                    break
18977                fi
18978                # Again resolve directory symlinks since the target of the just found
18979                # link could be in a different directory
18980                cd `$DIRNAME $ISLINK`
18981                sym_link_dir=`$THEPWDCMD`
18982                sym_link_file=`$BASENAME $ISLINK`
18983                let COUNTER=COUNTER+1
18984            done
18985            cd $STARTDIR
18986            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18987        fi
18988    fi
18989
18990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18991$as_echo "$PROPER_COMPILER_CC" >&6; }
18992    CC="$PROPER_COMPILER_CC"
18993  else
18994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18995$as_echo "no, keeping CC" >&6; }
18996    CC="$TEST_COMPILER"
18997  fi
18998
18999  COMPILER=$CC
19000  COMPILER_NAME=$COMPILER_NAME
19001
19002  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19003    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19004    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19005    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19006    if test $? -ne 0; then
19007      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19008
19009      { $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
19010$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19011      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19012$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19013      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19014    else
19015      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19016      COMPILER_VENDOR="Sun Studio"
19017    fi
19018  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19019    # First line typically looks something like:
19020    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19021    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19022    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19023    COMPILER_VENDOR="Microsoft CL.EXE"
19024    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19025    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19026      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19027        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19028      fi
19029    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19030      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19031        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19032      fi
19033    fi
19034  else
19035    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19036    # Check that this is likely to be GCC.
19037    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19038    if test $? -ne 0; then
19039      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19040$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19041      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19042$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19043      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19044    fi
19045
19046    # First line typically looks something like:
19047    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19048    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19049    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19050  fi
19051  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19052  CC_VERSION="$COMPILER_VERSION"
19053  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19054  CC_VENDOR="$COMPILER_VENDOR"
19055
19056  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19057$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19058
19059
19060# Now that we have resolved CC ourself, let autoconf have it's go at it
19061ac_ext=c
19062ac_cpp='$CPP $CPPFLAGS'
19063ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19064ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19065ac_compiler_gnu=$ac_cv_c_compiler_gnu
19066if test -n "$ac_tool_prefix"; then
19067  for ac_prog in $CC
19068  do
19069    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19070set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19072$as_echo_n "checking for $ac_word... " >&6; }
19073if test "${ac_cv_prog_CC+set}" = set; then :
19074  $as_echo_n "(cached) " >&6
19075else
19076  if test -n "$CC"; then
19077  ac_cv_prog_CC="$CC" # Let the user override the test.
19078else
19079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19080for as_dir in $PATH
19081do
19082  IFS=$as_save_IFS
19083  test -z "$as_dir" && as_dir=.
19084    for ac_exec_ext in '' $ac_executable_extensions; do
19085  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19086    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19088    break 2
19089  fi
19090done
19091  done
19092IFS=$as_save_IFS
19093
19094fi
19095fi
19096CC=$ac_cv_prog_CC
19097if test -n "$CC"; then
19098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19099$as_echo "$CC" >&6; }
19100else
19101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19102$as_echo "no" >&6; }
19103fi
19104
19105
19106    test -n "$CC" && break
19107  done
19108fi
19109if test -z "$CC"; then
19110  ac_ct_CC=$CC
19111  for ac_prog in $CC
19112do
19113  # Extract the first word of "$ac_prog", so it can be a program name with args.
19114set dummy $ac_prog; ac_word=$2
19115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19116$as_echo_n "checking for $ac_word... " >&6; }
19117if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19118  $as_echo_n "(cached) " >&6
19119else
19120  if test -n "$ac_ct_CC"; then
19121  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19122else
19123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19124for as_dir in $PATH
19125do
19126  IFS=$as_save_IFS
19127  test -z "$as_dir" && as_dir=.
19128    for ac_exec_ext in '' $ac_executable_extensions; do
19129  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19130    ac_cv_prog_ac_ct_CC="$ac_prog"
19131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19132    break 2
19133  fi
19134done
19135  done
19136IFS=$as_save_IFS
19137
19138fi
19139fi
19140ac_ct_CC=$ac_cv_prog_ac_ct_CC
19141if test -n "$ac_ct_CC"; then
19142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19143$as_echo "$ac_ct_CC" >&6; }
19144else
19145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19146$as_echo "no" >&6; }
19147fi
19148
19149
19150  test -n "$ac_ct_CC" && break
19151done
19152
19153  if test "x$ac_ct_CC" = x; then
19154    CC=""
19155  else
19156    case $cross_compiling:$ac_tool_warned in
19157yes:)
19158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19160ac_tool_warned=yes ;;
19161esac
19162    CC=$ac_ct_CC
19163  fi
19164fi
19165
19166
19167test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19168$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19169as_fn_error $? "no acceptable C compiler found in \$PATH
19170See \`config.log' for more details" "$LINENO" 5 ; }
19171
19172# Provide some information about the compiler.
19173$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19174set X $ac_compile
19175ac_compiler=$2
19176for ac_option in --version -v -V -qversion; do
19177  { { ac_try="$ac_compiler $ac_option >&5"
19178case "(($ac_try" in
19179  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19180  *) ac_try_echo=$ac_try;;
19181esac
19182eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19183$as_echo "$ac_try_echo"; } >&5
19184  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19185  ac_status=$?
19186  if test -s conftest.err; then
19187    sed '10a\
19188... rest of stderr output deleted ...
19189         10q' conftest.err >conftest.er1
19190    cat conftest.er1 >&5
19191  fi
19192  rm -f conftest.er1 conftest.err
19193  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19194  test $ac_status = 0; }
19195done
19196
19197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19198/* end confdefs.h.  */
19199
19200int
19201main ()
19202{
19203
19204  ;
19205  return 0;
19206}
19207_ACEOF
19208ac_clean_files_save=$ac_clean_files
19209ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19210# Try to create an executable without -o first, disregard a.out.
19211# It will help us diagnose broken compilers, and finding out an intuition
19212# of exeext.
19213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19214$as_echo_n "checking whether the C compiler works... " >&6; }
19215ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19216
19217# The possible output files:
19218ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19219
19220ac_rmfiles=
19221for ac_file in $ac_files
19222do
19223  case $ac_file in
19224    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19225    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19226  esac
19227done
19228rm -f $ac_rmfiles
19229
19230if { { ac_try="$ac_link_default"
19231case "(($ac_try" in
19232  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19233  *) ac_try_echo=$ac_try;;
19234esac
19235eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19236$as_echo "$ac_try_echo"; } >&5
19237  (eval "$ac_link_default") 2>&5
19238  ac_status=$?
19239  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19240  test $ac_status = 0; }; then :
19241  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19242# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19243# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19244# so that the user can short-circuit this test for compilers unknown to
19245# Autoconf.
19246for ac_file in $ac_files ''
19247do
19248  test -f "$ac_file" || continue
19249  case $ac_file in
19250    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19251	;;
19252    [ab].out )
19253	# We found the default executable, but exeext='' is most
19254	# certainly right.
19255	break;;
19256    *.* )
19257	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19258	then :; else
19259	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19260	fi
19261	# We set ac_cv_exeext here because the later test for it is not
19262	# safe: cross compilers may not add the suffix if given an `-o'
19263	# argument, so we may need to know it at that point already.
19264	# Even if this section looks crufty: it has the advantage of
19265	# actually working.
19266	break;;
19267    * )
19268	break;;
19269  esac
19270done
19271test "$ac_cv_exeext" = no && ac_cv_exeext=
19272
19273else
19274  ac_file=''
19275fi
19276if test -z "$ac_file"; then :
19277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19278$as_echo "no" >&6; }
19279$as_echo "$as_me: failed program was:" >&5
19280sed 's/^/| /' conftest.$ac_ext >&5
19281
19282{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19283$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19284as_fn_error 77 "C compiler cannot create executables
19285See \`config.log' for more details" "$LINENO" 5 ; }
19286else
19287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19288$as_echo "yes" >&6; }
19289fi
19290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19291$as_echo_n "checking for C compiler default output file name... " >&6; }
19292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19293$as_echo "$ac_file" >&6; }
19294ac_exeext=$ac_cv_exeext
19295
19296rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19297ac_clean_files=$ac_clean_files_save
19298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19299$as_echo_n "checking for suffix of executables... " >&6; }
19300if { { ac_try="$ac_link"
19301case "(($ac_try" in
19302  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19303  *) ac_try_echo=$ac_try;;
19304esac
19305eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19306$as_echo "$ac_try_echo"; } >&5
19307  (eval "$ac_link") 2>&5
19308  ac_status=$?
19309  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19310  test $ac_status = 0; }; then :
19311  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19312# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19313# work properly (i.e., refer to `conftest.exe'), while it won't with
19314# `rm'.
19315for ac_file in conftest.exe conftest conftest.*; do
19316  test -f "$ac_file" || continue
19317  case $ac_file in
19318    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19319    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19320	  break;;
19321    * ) break;;
19322  esac
19323done
19324else
19325  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19326$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19327as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19328See \`config.log' for more details" "$LINENO" 5 ; }
19329fi
19330rm -f conftest conftest$ac_cv_exeext
19331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19332$as_echo "$ac_cv_exeext" >&6; }
19333
19334rm -f conftest.$ac_ext
19335EXEEXT=$ac_cv_exeext
19336ac_exeext=$EXEEXT
19337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19338/* end confdefs.h.  */
19339#include <stdio.h>
19340int
19341main ()
19342{
19343FILE *f = fopen ("conftest.out", "w");
19344 return ferror (f) || fclose (f) != 0;
19345
19346  ;
19347  return 0;
19348}
19349_ACEOF
19350ac_clean_files="$ac_clean_files conftest.out"
19351# Check that the compiler produces executables we can run.  If not, either
19352# the compiler is broken, or we cross compile.
19353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19354$as_echo_n "checking whether we are cross compiling... " >&6; }
19355if test "$cross_compiling" != yes; then
19356  { { ac_try="$ac_link"
19357case "(($ac_try" in
19358  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19359  *) ac_try_echo=$ac_try;;
19360esac
19361eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19362$as_echo "$ac_try_echo"; } >&5
19363  (eval "$ac_link") 2>&5
19364  ac_status=$?
19365  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19366  test $ac_status = 0; }
19367  if { ac_try='./conftest$ac_cv_exeext'
19368  { { case "(($ac_try" in
19369  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19370  *) ac_try_echo=$ac_try;;
19371esac
19372eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19373$as_echo "$ac_try_echo"; } >&5
19374  (eval "$ac_try") 2>&5
19375  ac_status=$?
19376  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19377  test $ac_status = 0; }; }; then
19378    cross_compiling=no
19379  else
19380    if test "$cross_compiling" = maybe; then
19381	cross_compiling=yes
19382    else
19383	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19384$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19385as_fn_error $? "cannot run C compiled programs.
19386If you meant to cross compile, use \`--host'.
19387See \`config.log' for more details" "$LINENO" 5 ; }
19388    fi
19389  fi
19390fi
19391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19392$as_echo "$cross_compiling" >&6; }
19393
19394rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19395ac_clean_files=$ac_clean_files_save
19396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19397$as_echo_n "checking for suffix of object files... " >&6; }
19398if test "${ac_cv_objext+set}" = set; then :
19399  $as_echo_n "(cached) " >&6
19400else
19401  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19402/* end confdefs.h.  */
19403
19404int
19405main ()
19406{
19407
19408  ;
19409  return 0;
19410}
19411_ACEOF
19412rm -f conftest.o conftest.obj
19413if { { ac_try="$ac_compile"
19414case "(($ac_try" in
19415  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19416  *) ac_try_echo=$ac_try;;
19417esac
19418eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19419$as_echo "$ac_try_echo"; } >&5
19420  (eval "$ac_compile") 2>&5
19421  ac_status=$?
19422  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19423  test $ac_status = 0; }; then :
19424  for ac_file in conftest.o conftest.obj conftest.*; do
19425  test -f "$ac_file" || continue;
19426  case $ac_file in
19427    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19428    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19429       break;;
19430  esac
19431done
19432else
19433  $as_echo "$as_me: failed program was:" >&5
19434sed 's/^/| /' conftest.$ac_ext >&5
19435
19436{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19437$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19438as_fn_error $? "cannot compute suffix of object files: cannot compile
19439See \`config.log' for more details" "$LINENO" 5 ; }
19440fi
19441rm -f conftest.$ac_cv_objext conftest.$ac_ext
19442fi
19443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19444$as_echo "$ac_cv_objext" >&6; }
19445OBJEXT=$ac_cv_objext
19446ac_objext=$OBJEXT
19447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19448$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19449if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19450  $as_echo_n "(cached) " >&6
19451else
19452  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19453/* end confdefs.h.  */
19454
19455int
19456main ()
19457{
19458#ifndef __GNUC__
19459       choke me
19460#endif
19461
19462  ;
19463  return 0;
19464}
19465_ACEOF
19466if ac_fn_c_try_compile "$LINENO"; then :
19467  ac_compiler_gnu=yes
19468else
19469  ac_compiler_gnu=no
19470fi
19471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19472ac_cv_c_compiler_gnu=$ac_compiler_gnu
19473
19474fi
19475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19476$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19477if test $ac_compiler_gnu = yes; then
19478  GCC=yes
19479else
19480  GCC=
19481fi
19482ac_test_CFLAGS=${CFLAGS+set}
19483ac_save_CFLAGS=$CFLAGS
19484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19485$as_echo_n "checking whether $CC accepts -g... " >&6; }
19486if test "${ac_cv_prog_cc_g+set}" = set; then :
19487  $as_echo_n "(cached) " >&6
19488else
19489  ac_save_c_werror_flag=$ac_c_werror_flag
19490   ac_c_werror_flag=yes
19491   ac_cv_prog_cc_g=no
19492   CFLAGS="-g"
19493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19494/* end confdefs.h.  */
19495
19496int
19497main ()
19498{
19499
19500  ;
19501  return 0;
19502}
19503_ACEOF
19504if ac_fn_c_try_compile "$LINENO"; then :
19505  ac_cv_prog_cc_g=yes
19506else
19507  CFLAGS=""
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
19521else
19522  ac_c_werror_flag=$ac_save_c_werror_flag
19523	 CFLAGS="-g"
19524	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19525/* end confdefs.h.  */
19526
19527int
19528main ()
19529{
19530
19531  ;
19532  return 0;
19533}
19534_ACEOF
19535if ac_fn_c_try_compile "$LINENO"; then :
19536  ac_cv_prog_cc_g=yes
19537fi
19538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19539fi
19540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19541fi
19542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19543   ac_c_werror_flag=$ac_save_c_werror_flag
19544fi
19545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19546$as_echo "$ac_cv_prog_cc_g" >&6; }
19547if test "$ac_test_CFLAGS" = set; then
19548  CFLAGS=$ac_save_CFLAGS
19549elif test $ac_cv_prog_cc_g = yes; then
19550  if test "$GCC" = yes; then
19551    CFLAGS="-g -O2"
19552  else
19553    CFLAGS="-g"
19554  fi
19555else
19556  if test "$GCC" = yes; then
19557    CFLAGS="-O2"
19558  else
19559    CFLAGS=
19560  fi
19561fi
19562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19563$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19564if test "${ac_cv_prog_cc_c89+set}" = set; then :
19565  $as_echo_n "(cached) " >&6
19566else
19567  ac_cv_prog_cc_c89=no
19568ac_save_CC=$CC
19569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19570/* end confdefs.h.  */
19571#include <stdarg.h>
19572#include <stdio.h>
19573#include <sys/types.h>
19574#include <sys/stat.h>
19575/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19576struct buf { int x; };
19577FILE * (*rcsopen) (struct buf *, struct stat *, int);
19578static char *e (p, i)
19579     char **p;
19580     int i;
19581{
19582  return p[i];
19583}
19584static char *f (char * (*g) (char **, int), char **p, ...)
19585{
19586  char *s;
19587  va_list v;
19588  va_start (v,p);
19589  s = g (p, va_arg (v,int));
19590  va_end (v);
19591  return s;
19592}
19593
19594/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19595   function prototypes and stuff, but not '\xHH' hex character constants.
19596   These don't provoke an error unfortunately, instead are silently treated
19597   as 'x'.  The following induces an error, until -std is added to get
19598   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19599   array size at least.  It's necessary to write '\x00'==0 to get something
19600   that's true only with -std.  */
19601int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19602
19603/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19604   inside strings and character constants.  */
19605#define FOO(x) 'x'
19606int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19607
19608int test (int i, double x);
19609struct s1 {int (*f) (int a);};
19610struct s2 {int (*f) (double a);};
19611int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19612int argc;
19613char **argv;
19614int
19615main ()
19616{
19617return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19618  ;
19619  return 0;
19620}
19621_ACEOF
19622for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19623	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19624do
19625  CC="$ac_save_CC $ac_arg"
19626  if ac_fn_c_try_compile "$LINENO"; then :
19627  ac_cv_prog_cc_c89=$ac_arg
19628fi
19629rm -f core conftest.err conftest.$ac_objext
19630  test "x$ac_cv_prog_cc_c89" != "xno" && break
19631done
19632rm -f conftest.$ac_ext
19633CC=$ac_save_CC
19634
19635fi
19636# AC_CACHE_VAL
19637case "x$ac_cv_prog_cc_c89" in
19638  x)
19639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19640$as_echo "none needed" >&6; } ;;
19641  xno)
19642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19643$as_echo "unsupported" >&6; } ;;
19644  *)
19645    CC="$CC $ac_cv_prog_cc_c89"
19646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19647$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19648esac
19649if test "x$ac_cv_prog_cc_c89" != xno; then :
19650
19651fi
19652
19653ac_ext=cpp
19654ac_cpp='$CXXCPP $CPPFLAGS'
19655ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19656ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19657ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19658
19659
19660### Locate C++ compiler (CXX)
19661
19662if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19663  # Do not probe for CC on MacOSX.
19664  COMPILER_CHECK_LIST="cl g++"
19665else
19666  COMPILER_CHECK_LIST="cl CC g++"
19667fi
19668
19669  COMPILER_NAME=C++
19670
19671  CXX=
19672  # If TOOLS_DIR is set, check for all compiler names in there first
19673  # before checking the rest of the PATH.
19674  if test -n "$TOOLS_DIR"; then
19675    PATH_save="$PATH"
19676    PATH="$TOOLS_DIR"
19677    for ac_prog in $COMPILER_CHECK_LIST
19678do
19679  # Extract the first word of "$ac_prog", so it can be a program name with args.
19680set dummy $ac_prog; ac_word=$2
19681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19682$as_echo_n "checking for $ac_word... " >&6; }
19683if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19684  $as_echo_n "(cached) " >&6
19685else
19686  case $TOOLS_DIR_CXX in
19687  [\\/]* | ?:[\\/]*)
19688  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19689  ;;
19690  *)
19691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19692for as_dir in $PATH
19693do
19694  IFS=$as_save_IFS
19695  test -z "$as_dir" && as_dir=.
19696    for ac_exec_ext in '' $ac_executable_extensions; do
19697  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19698    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19700    break 2
19701  fi
19702done
19703  done
19704IFS=$as_save_IFS
19705
19706  ;;
19707esac
19708fi
19709TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19710if test -n "$TOOLS_DIR_CXX"; then
19711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19712$as_echo "$TOOLS_DIR_CXX" >&6; }
19713else
19714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19715$as_echo "no" >&6; }
19716fi
19717
19718
19719  test -n "$TOOLS_DIR_CXX" && break
19720done
19721
19722    CXX=$TOOLS_DIR_CXX
19723    PATH="$PATH_save"
19724  fi
19725
19726  # AC_PATH_PROGS can't be run multiple times with the same variable,
19727  # so create a new name for this run.
19728  if test "x$CXX" = x; then
19729    for ac_prog in $COMPILER_CHECK_LIST
19730do
19731  # Extract the first word of "$ac_prog", so it can be a program name with args.
19732set dummy $ac_prog; ac_word=$2
19733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19734$as_echo_n "checking for $ac_word... " >&6; }
19735if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19736  $as_echo_n "(cached) " >&6
19737else
19738  case $POTENTIAL_CXX in
19739  [\\/]* | ?:[\\/]*)
19740  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19741  ;;
19742  *)
19743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19744for as_dir in $PATH
19745do
19746  IFS=$as_save_IFS
19747  test -z "$as_dir" && as_dir=.
19748    for ac_exec_ext in '' $ac_executable_extensions; do
19749  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19750    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19752    break 2
19753  fi
19754done
19755  done
19756IFS=$as_save_IFS
19757
19758  ;;
19759esac
19760fi
19761POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19762if test -n "$POTENTIAL_CXX"; then
19763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19764$as_echo "$POTENTIAL_CXX" >&6; }
19765else
19766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19767$as_echo "no" >&6; }
19768fi
19769
19770
19771  test -n "$POTENTIAL_CXX" && break
19772done
19773
19774    CXX=$POTENTIAL_CXX
19775  fi
19776
19777  if test "x$CXX" = x; then
19778
19779    # Print a helpful message on how to acquire the necessary build dependency.
19780    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19781    MISSING_DEPENDENCY=devkit
19782    PKGHANDLER_COMMAND=
19783
19784    case $PKGHANDLER in
19785	apt-get)
19786                apt_help     $MISSING_DEPENDENCY ;;
19787    yum)
19788                yum_help     $MISSING_DEPENDENCY ;;
19789	port)
19790                port_help    $MISSING_DEPENDENCY ;;
19791	pkgutil)
19792                pkgutil_help $MISSING_DEPENDENCY ;;
19793	pkgadd)
19794                pkgadd_help  $MISSING_DEPENDENCY ;;
19795    * )
19796      break ;;
19797    esac
19798
19799    if test "x$PKGHANDLER_COMMAND" != x; then
19800        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19801    fi
19802
19803      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19804  fi
19805
19806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19807
19808  # First separate the path from the arguments. This will split at the first
19809  # space.
19810  complete="$CXX"
19811  path="${complete%% *}"
19812  tmp="$complete EOL"
19813  arguments="${tmp#* }"
19814
19815  # Input might be given as Windows format, start by converting to
19816  # unix format.
19817  new_path=`$CYGPATH -u "$path"`
19818
19819  # Now try to locate executable using which
19820  new_path=`$WHICH "$new_path" 2> /dev/null`
19821  # bat and cmd files are not always considered executable in cygwin causing which
19822  # to not find them
19823  if test "x$new_path" = x \
19824           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19825           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19826    new_path=`$CYGPATH -u "$path"`
19827  fi
19828  if test "x$new_path" = x; then
19829    # Oops. Which didn't find the executable.
19830    # The splitting of arguments from the executable at a space might have been incorrect,
19831    # since paths with space are more likely in Windows. Give it another try with the whole
19832    # argument.
19833    path="$complete"
19834    arguments="EOL"
19835    new_path=`$CYGPATH -u "$path"`
19836    new_path=`$WHICH "$new_path" 2> /dev/null`
19837    # bat and cmd files are not always considered executable in cygwin causing which
19838    # to not find them
19839    if test "x$new_path" = x \
19840             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19841             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19842      new_path=`$CYGPATH -u "$path"`
19843    fi
19844    if test "x$new_path" = x; then
19845      # It's still not found. Now this is an unrecoverable error.
19846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19847$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19848      has_space=`$ECHO "$complete" | $GREP " "`
19849      if test "x$has_space" != x; then
19850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19852      fi
19853      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19854    fi
19855  fi
19856
19857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19860  # "foo.exe" is OK but "foo" is an error.
19861  #
19862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19863  # It is also a way to make sure we got the proper file name for the real test later on.
19864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19865  if test "x$test_shortpath" = x; then
19866    # Short path failed, file does not exist as specified.
19867    # Try adding .exe or .cmd
19868    if test -f "${new_path}.exe"; then
19869       input_to_shortpath="${new_path}.exe"
19870    elif test -f "${new_path}.cmd"; then
19871       input_to_shortpath="${new_path}.cmd"
19872    else
19873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19874$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19877      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19878    fi
19879  else
19880    input_to_shortpath="$new_path"
19881  fi
19882
19883  # Call helper function which possibly converts this using DOS-style short mode.
19884  # If so, the updated path is stored in $new_path.
19885  new_path="$input_to_shortpath"
19886
19887  input_path="$input_to_shortpath"
19888  # Check if we need to convert this using DOS-style short mode. If the path
19889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19890  # take no chances and rewrite it.
19891  # Note: m4 eats our [], so we need to use [ and ] instead.
19892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19893  if test "x$has_forbidden_chars" != x; then
19894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19898      # Going to short mode and back again did indeed matter. Since short mode is
19899      # case insensitive, let's make it lowercase to improve readability.
19900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19901      # Now convert it back to Unix-stile (cygpath)
19902      input_path=`$CYGPATH -u "$shortmode_path"`
19903      new_path="$input_path"
19904    fi
19905  fi
19906
19907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19908  if test "x$test_cygdrive_prefix" = x; then
19909    # As a simple fix, exclude /usr/bin since it's not a real path.
19910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19912      # a path prefixed by /cygdrive for fixpath to work.
19913      new_path="$CYGWIN_ROOT_PATH$input_path"
19914    fi
19915  fi
19916
19917  # remove trailing .exe if any
19918  new_path="${new_path/%.exe/}"
19919
19920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19921
19922  # First separate the path from the arguments. This will split at the first
19923  # space.
19924  complete="$CXX"
19925  path="${complete%% *}"
19926  tmp="$complete EOL"
19927  arguments="${tmp#* }"
19928
19929  # Input might be given as Windows format, start by converting to
19930  # unix format.
19931  new_path="$path"
19932
19933  windows_path="$new_path"
19934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19935    unix_path=`$CYGPATH -u "$windows_path"`
19936    new_path="$unix_path"
19937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19939    new_path="$unix_path"
19940  fi
19941
19942
19943  # Now try to locate executable using which
19944  new_path=`$WHICH "$new_path" 2> /dev/null`
19945
19946  if test "x$new_path" = x; then
19947    # Oops. Which didn't find the executable.
19948    # The splitting of arguments from the executable at a space might have been incorrect,
19949    # since paths with space are more likely in Windows. Give it another try with the whole
19950    # argument.
19951    path="$complete"
19952    arguments="EOL"
19953    new_path="$path"
19954
19955  windows_path="$new_path"
19956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19957    unix_path=`$CYGPATH -u "$windows_path"`
19958    new_path="$unix_path"
19959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19961    new_path="$unix_path"
19962  fi
19963
19964
19965    new_path=`$WHICH "$new_path" 2> /dev/null`
19966
19967    if test "x$new_path" = x; then
19968      # It's still not found. Now this is an unrecoverable error.
19969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19970$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19971      has_space=`$ECHO "$complete" | $GREP " "`
19972      if test "x$has_space" != x; then
19973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19975      fi
19976      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19977    fi
19978  fi
19979
19980  # Now new_path has a complete unix path to the binary
19981  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19982    # Keep paths in /bin as-is, but remove trailing .exe if any
19983    new_path="${new_path/%.exe/}"
19984    # Do not save /bin paths to all_fixpath_prefixes!
19985  else
19986    # Not in mixed or Windows style, start by that.
19987    new_path=`cmd //c echo $new_path`
19988
19989  input_path="$new_path"
19990  # Check if we need to convert this using DOS-style short mode. If the path
19991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19992  # take no chances and rewrite it.
19993  # Note: m4 eats our [], so we need to use [ and ] instead.
19994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19995  if test "x$has_forbidden_chars" != x; then
19996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19998  fi
19999
20000    # Output is in $new_path
20001
20002  windows_path="$new_path"
20003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20004    unix_path=`$CYGPATH -u "$windows_path"`
20005    new_path="$unix_path"
20006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20008    new_path="$unix_path"
20009  fi
20010
20011    # remove trailing .exe if any
20012    new_path="${new_path/%.exe/}"
20013
20014    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20015    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20016  fi
20017
20018  else
20019    # We're on a posix platform. Hooray! :)
20020    # First separate the path from the arguments. This will split at the first
20021    # space.
20022    complete="$CXX"
20023    path="${complete%% *}"
20024    tmp="$complete EOL"
20025    arguments="${tmp#* }"
20026
20027    # Cannot rely on the command "which" here since it doesn't always work.
20028    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20029    if test -z "$is_absolute_path"; then
20030      # Path to executable is not absolute. Find it.
20031      IFS_save="$IFS"
20032      IFS=:
20033      for p in $PATH; do
20034        if test -f "$p/$path" && test -x "$p/$path"; then
20035          new_path="$p/$path"
20036          break
20037        fi
20038      done
20039      IFS="$IFS_save"
20040    else
20041      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20042$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20043      new_path="$path"
20044    fi
20045
20046    if test "x$new_path" = x; then
20047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20048$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20049        has_space=`$ECHO "$complete" | $GREP " "`
20050        if test "x$has_space" != x; then
20051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20053        fi
20054        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20055      fi
20056  fi
20057
20058      # Now join together the path and the arguments once again
20059      if test "x$arguments" != xEOL; then
20060        new_complete="$new_path ${arguments% *}"
20061      else
20062        new_complete="$new_path"
20063      fi
20064
20065  if test "x$complete" != "x$new_complete"; then
20066      CXX="$new_complete"
20067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20068$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20069    fi
20070
20071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20072$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20073  TEST_COMPILER="$CXX"
20074
20075    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20076        # Follow a chain of symbolic links. Use readlink
20077        # where it exists, else fall back to horribly
20078        # complicated shell code.
20079        if test "x$READLINK_TESTED" != yes; then
20080            # On MacOSX there is a readlink tool with a different
20081            # purpose than the GNU readlink tool. Check the found readlink.
20082            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20083            if test "x$ISGNU" = x; then
20084                 # A readlink that we do not know how to use.
20085                 # Are there other non-GNU readlinks out there?
20086                 READLINK_TESTED=yes
20087                 READLINK=
20088            fi
20089        fi
20090
20091        if test "x$READLINK" != x; then
20092            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20093        else
20094            # Save the current directory for restoring afterwards
20095            STARTDIR=$PWD
20096            COUNTER=0
20097            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20098            sym_link_file=`$BASENAME $TEST_COMPILER`
20099            # Use the system pwd and not the shell builtin to resolve directory symlinks
20100            cd $sym_link_dir
20101            cd `$THEPWDCMD`
20102            sym_link_dir=`$THEPWDCMD`
20103            # Resolve file symlinks
20104            while test $COUNTER -lt 20; do
20105                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20106                if test "x$ISLINK" == x; then
20107                    # This is not a symbolic link! We are done!
20108                    break
20109                fi
20110                # Again resolve directory symlinks since the target of the just found
20111                # link could be in a different directory
20112                cd `$DIRNAME $ISLINK`
20113                sym_link_dir=`$THEPWDCMD`
20114                sym_link_file=`$BASENAME $ISLINK`
20115                let COUNTER=COUNTER+1
20116            done
20117            cd $STARTDIR
20118            TEST_COMPILER=$sym_link_dir/$sym_link_file
20119        fi
20120    fi
20121
20122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20123$as_echo "$TEST_COMPILER" >&6; }
20124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20125$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20126
20127  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20128  if test "x$COMPILER_BASENAME" = "xccache"; then
20129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20130$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20131    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20132    # We want to control ccache invocation ourselves, so ignore this cc and try
20133    # searching again.
20134
20135    # Remove the path to the fake ccache cc from the PATH
20136    RETRY_COMPILER_SAVED_PATH="$PATH"
20137    COMPILER_DIRNAME=`$DIRNAME $CXX`
20138    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20139
20140    # Try again looking for our compiler
20141    if test -n "$ac_tool_prefix"; then
20142  for ac_prog in $COMPILER_CHECK_LIST
20143  do
20144    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20145set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20147$as_echo_n "checking for $ac_word... " >&6; }
20148if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20149  $as_echo_n "(cached) " >&6
20150else
20151  if test -n "$PROPER_COMPILER_CXX"; then
20152  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20153else
20154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20155for as_dir in $PATH
20156do
20157  IFS=$as_save_IFS
20158  test -z "$as_dir" && as_dir=.
20159    for ac_exec_ext in '' $ac_executable_extensions; do
20160  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20161    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20163    break 2
20164  fi
20165done
20166  done
20167IFS=$as_save_IFS
20168
20169fi
20170fi
20171PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20172if test -n "$PROPER_COMPILER_CXX"; then
20173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20174$as_echo "$PROPER_COMPILER_CXX" >&6; }
20175else
20176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20177$as_echo "no" >&6; }
20178fi
20179
20180
20181    test -n "$PROPER_COMPILER_CXX" && break
20182  done
20183fi
20184if test -z "$PROPER_COMPILER_CXX"; then
20185  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20186  for ac_prog in $COMPILER_CHECK_LIST
20187do
20188  # Extract the first word of "$ac_prog", so it can be a program name with args.
20189set dummy $ac_prog; ac_word=$2
20190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20191$as_echo_n "checking for $ac_word... " >&6; }
20192if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20193  $as_echo_n "(cached) " >&6
20194else
20195  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20196  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20197else
20198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20199for as_dir in $PATH
20200do
20201  IFS=$as_save_IFS
20202  test -z "$as_dir" && as_dir=.
20203    for ac_exec_ext in '' $ac_executable_extensions; do
20204  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20205    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20207    break 2
20208  fi
20209done
20210  done
20211IFS=$as_save_IFS
20212
20213fi
20214fi
20215ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20216if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20218$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20219else
20220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20221$as_echo "no" >&6; }
20222fi
20223
20224
20225  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20226done
20227
20228  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20229    PROPER_COMPILER_CXX=""
20230  else
20231    case $cross_compiling:$ac_tool_warned in
20232yes:)
20233{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20234$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20235ac_tool_warned=yes ;;
20236esac
20237    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20238  fi
20239fi
20240
20241
20242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20243
20244  # First separate the path from the arguments. This will split at the first
20245  # space.
20246  complete="$PROPER_COMPILER_CXX"
20247  path="${complete%% *}"
20248  tmp="$complete EOL"
20249  arguments="${tmp#* }"
20250
20251  # Input might be given as Windows format, start by converting to
20252  # unix format.
20253  new_path=`$CYGPATH -u "$path"`
20254
20255  # Now try to locate executable using which
20256  new_path=`$WHICH "$new_path" 2> /dev/null`
20257  # bat and cmd files are not always considered executable in cygwin causing which
20258  # to not find them
20259  if test "x$new_path" = x \
20260           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20261           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20262    new_path=`$CYGPATH -u "$path"`
20263  fi
20264  if test "x$new_path" = x; then
20265    # Oops. Which didn't find the executable.
20266    # The splitting of arguments from the executable at a space might have been incorrect,
20267    # since paths with space are more likely in Windows. Give it another try with the whole
20268    # argument.
20269    path="$complete"
20270    arguments="EOL"
20271    new_path=`$CYGPATH -u "$path"`
20272    new_path=`$WHICH "$new_path" 2> /dev/null`
20273    # bat and cmd files are not always considered executable in cygwin causing which
20274    # to not find them
20275    if test "x$new_path" = x \
20276             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20277             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20278      new_path=`$CYGPATH -u "$path"`
20279    fi
20280    if test "x$new_path" = x; then
20281      # It's still not found. Now this is an unrecoverable error.
20282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20283$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20284      has_space=`$ECHO "$complete" | $GREP " "`
20285      if test "x$has_space" != x; then
20286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20288      fi
20289      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20290    fi
20291  fi
20292
20293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20296  # "foo.exe" is OK but "foo" is an error.
20297  #
20298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20299  # It is also a way to make sure we got the proper file name for the real test later on.
20300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20301  if test "x$test_shortpath" = x; then
20302    # Short path failed, file does not exist as specified.
20303    # Try adding .exe or .cmd
20304    if test -f "${new_path}.exe"; then
20305       input_to_shortpath="${new_path}.exe"
20306    elif test -f "${new_path}.cmd"; then
20307       input_to_shortpath="${new_path}.cmd"
20308    else
20309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20310$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20313      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20314    fi
20315  else
20316    input_to_shortpath="$new_path"
20317  fi
20318
20319  # Call helper function which possibly converts this using DOS-style short mode.
20320  # If so, the updated path is stored in $new_path.
20321  new_path="$input_to_shortpath"
20322
20323  input_path="$input_to_shortpath"
20324  # Check if we need to convert this using DOS-style short mode. If the path
20325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20326  # take no chances and rewrite it.
20327  # Note: m4 eats our [], so we need to use [ and ] instead.
20328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20329  if test "x$has_forbidden_chars" != x; then
20330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20334      # Going to short mode and back again did indeed matter. Since short mode is
20335      # case insensitive, let's make it lowercase to improve readability.
20336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20337      # Now convert it back to Unix-stile (cygpath)
20338      input_path=`$CYGPATH -u "$shortmode_path"`
20339      new_path="$input_path"
20340    fi
20341  fi
20342
20343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20344  if test "x$test_cygdrive_prefix" = x; then
20345    # As a simple fix, exclude /usr/bin since it's not a real path.
20346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20348      # a path prefixed by /cygdrive for fixpath to work.
20349      new_path="$CYGWIN_ROOT_PATH$input_path"
20350    fi
20351  fi
20352
20353  # remove trailing .exe if any
20354  new_path="${new_path/%.exe/}"
20355
20356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20357
20358  # First separate the path from the arguments. This will split at the first
20359  # space.
20360  complete="$PROPER_COMPILER_CXX"
20361  path="${complete%% *}"
20362  tmp="$complete EOL"
20363  arguments="${tmp#* }"
20364
20365  # Input might be given as Windows format, start by converting to
20366  # unix format.
20367  new_path="$path"
20368
20369  windows_path="$new_path"
20370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20371    unix_path=`$CYGPATH -u "$windows_path"`
20372    new_path="$unix_path"
20373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20375    new_path="$unix_path"
20376  fi
20377
20378
20379  # Now try to locate executable using which
20380  new_path=`$WHICH "$new_path" 2> /dev/null`
20381
20382  if test "x$new_path" = x; then
20383    # Oops. Which didn't find the executable.
20384    # The splitting of arguments from the executable at a space might have been incorrect,
20385    # since paths with space are more likely in Windows. Give it another try with the whole
20386    # argument.
20387    path="$complete"
20388    arguments="EOL"
20389    new_path="$path"
20390
20391  windows_path="$new_path"
20392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20393    unix_path=`$CYGPATH -u "$windows_path"`
20394    new_path="$unix_path"
20395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20397    new_path="$unix_path"
20398  fi
20399
20400
20401    new_path=`$WHICH "$new_path" 2> /dev/null`
20402
20403    if test "x$new_path" = x; then
20404      # It's still not found. Now this is an unrecoverable error.
20405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20406$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20407      has_space=`$ECHO "$complete" | $GREP " "`
20408      if test "x$has_space" != x; then
20409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20411      fi
20412      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20413    fi
20414  fi
20415
20416  # Now new_path has a complete unix path to the binary
20417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20418    # Keep paths in /bin as-is, but remove trailing .exe if any
20419    new_path="${new_path/%.exe/}"
20420    # Do not save /bin paths to all_fixpath_prefixes!
20421  else
20422    # Not in mixed or Windows style, start by that.
20423    new_path=`cmd //c echo $new_path`
20424
20425  input_path="$new_path"
20426  # Check if we need to convert this using DOS-style short mode. If the path
20427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20428  # take no chances and rewrite it.
20429  # Note: m4 eats our [], so we need to use [ and ] instead.
20430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20431  if test "x$has_forbidden_chars" != x; then
20432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20434  fi
20435
20436    # Output is in $new_path
20437
20438  windows_path="$new_path"
20439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20440    unix_path=`$CYGPATH -u "$windows_path"`
20441    new_path="$unix_path"
20442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20444    new_path="$unix_path"
20445  fi
20446
20447    # remove trailing .exe if any
20448    new_path="${new_path/%.exe/}"
20449
20450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20452  fi
20453
20454  else
20455    # We're on a posix platform. Hooray! :)
20456    # First separate the path from the arguments. This will split at the first
20457    # space.
20458    complete="$PROPER_COMPILER_CXX"
20459    path="${complete%% *}"
20460    tmp="$complete EOL"
20461    arguments="${tmp#* }"
20462
20463    # Cannot rely on the command "which" here since it doesn't always work.
20464    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20465    if test -z "$is_absolute_path"; then
20466      # Path to executable is not absolute. Find it.
20467      IFS_save="$IFS"
20468      IFS=:
20469      for p in $PATH; do
20470        if test -f "$p/$path" && test -x "$p/$path"; then
20471          new_path="$p/$path"
20472          break
20473        fi
20474      done
20475      IFS="$IFS_save"
20476    else
20477      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20478$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20479      new_path="$path"
20480    fi
20481
20482    if test "x$new_path" = x; then
20483        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20484$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20485        has_space=`$ECHO "$complete" | $GREP " "`
20486        if test "x$has_space" != x; then
20487          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20488$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20489        fi
20490        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20491      fi
20492  fi
20493
20494      # Now join together the path and the arguments once again
20495      if test "x$arguments" != xEOL; then
20496        new_complete="$new_path ${arguments% *}"
20497      else
20498        new_complete="$new_path"
20499      fi
20500
20501  if test "x$complete" != "x$new_complete"; then
20502      PROPER_COMPILER_CXX="$new_complete"
20503      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20504$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20505    fi
20506
20507    PATH="$RETRY_COMPILER_SAVED_PATH"
20508
20509    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20510$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20511
20512    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20513        # Follow a chain of symbolic links. Use readlink
20514        # where it exists, else fall back to horribly
20515        # complicated shell code.
20516        if test "x$READLINK_TESTED" != yes; then
20517            # On MacOSX there is a readlink tool with a different
20518            # purpose than the GNU readlink tool. Check the found readlink.
20519            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20520            if test "x$ISGNU" = x; then
20521                 # A readlink that we do not know how to use.
20522                 # Are there other non-GNU readlinks out there?
20523                 READLINK_TESTED=yes
20524                 READLINK=
20525            fi
20526        fi
20527
20528        if test "x$READLINK" != x; then
20529            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20530        else
20531            # Save the current directory for restoring afterwards
20532            STARTDIR=$PWD
20533            COUNTER=0
20534            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20535            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20536            # Use the system pwd and not the shell builtin to resolve directory symlinks
20537            cd $sym_link_dir
20538            cd `$THEPWDCMD`
20539            sym_link_dir=`$THEPWDCMD`
20540            # Resolve file symlinks
20541            while test $COUNTER -lt 20; do
20542                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20543                if test "x$ISLINK" == x; then
20544                    # This is not a symbolic link! We are done!
20545                    break
20546                fi
20547                # Again resolve directory symlinks since the target of the just found
20548                # link could be in a different directory
20549                cd `$DIRNAME $ISLINK`
20550                sym_link_dir=`$THEPWDCMD`
20551                sym_link_file=`$BASENAME $ISLINK`
20552                let COUNTER=COUNTER+1
20553            done
20554            cd $STARTDIR
20555            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20556        fi
20557    fi
20558
20559    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20560$as_echo "$PROPER_COMPILER_CXX" >&6; }
20561    CXX="$PROPER_COMPILER_CXX"
20562  else
20563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20564$as_echo "no, keeping CXX" >&6; }
20565    CXX="$TEST_COMPILER"
20566  fi
20567
20568  COMPILER=$CXX
20569  COMPILER_NAME=$COMPILER_NAME
20570
20571  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20572    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20573    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20574    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20575    if test $? -ne 0; then
20576      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20577
20578      { $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
20579$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20580      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20581$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20582      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20583    else
20584      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20585      COMPILER_VENDOR="Sun Studio"
20586    fi
20587  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20588    # First line typically looks something like:
20589    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20590    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20591    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20592    COMPILER_VENDOR="Microsoft CL.EXE"
20593    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20594    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20595      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20596        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20597      fi
20598    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20599      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20600        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20601      fi
20602    fi
20603  else
20604    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20605    # Check that this is likely to be GCC.
20606    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20607    if test $? -ne 0; then
20608      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20609$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20610      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20611$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20612      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20613    fi
20614
20615    # First line typically looks something like:
20616    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20617    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20618    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20619  fi
20620  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20621  CXX_VERSION="$COMPILER_VERSION"
20622  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20623  CXX_VENDOR="$COMPILER_VENDOR"
20624
20625  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20626$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20627
20628
20629# Now that we have resolved CXX ourself, let autoconf have it's go at it
20630ac_ext=cpp
20631ac_cpp='$CXXCPP $CPPFLAGS'
20632ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20633ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20634ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20635if test -z "$CXX"; then
20636  if test -n "$CCC"; then
20637    CXX=$CCC
20638  else
20639    if test -n "$ac_tool_prefix"; then
20640  for ac_prog in $CXX
20641  do
20642    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20643set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20645$as_echo_n "checking for $ac_word... " >&6; }
20646if test "${ac_cv_prog_CXX+set}" = set; then :
20647  $as_echo_n "(cached) " >&6
20648else
20649  if test -n "$CXX"; then
20650  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20651else
20652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20653for as_dir in $PATH
20654do
20655  IFS=$as_save_IFS
20656  test -z "$as_dir" && as_dir=.
20657    for ac_exec_ext in '' $ac_executable_extensions; do
20658  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20659    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20661    break 2
20662  fi
20663done
20664  done
20665IFS=$as_save_IFS
20666
20667fi
20668fi
20669CXX=$ac_cv_prog_CXX
20670if test -n "$CXX"; then
20671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20672$as_echo "$CXX" >&6; }
20673else
20674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20675$as_echo "no" >&6; }
20676fi
20677
20678
20679    test -n "$CXX" && break
20680  done
20681fi
20682if test -z "$CXX"; then
20683  ac_ct_CXX=$CXX
20684  for ac_prog in $CXX
20685do
20686  # Extract the first word of "$ac_prog", so it can be a program name with args.
20687set dummy $ac_prog; ac_word=$2
20688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20689$as_echo_n "checking for $ac_word... " >&6; }
20690if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20691  $as_echo_n "(cached) " >&6
20692else
20693  if test -n "$ac_ct_CXX"; then
20694  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20695else
20696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20697for as_dir in $PATH
20698do
20699  IFS=$as_save_IFS
20700  test -z "$as_dir" && as_dir=.
20701    for ac_exec_ext in '' $ac_executable_extensions; do
20702  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20703    ac_cv_prog_ac_ct_CXX="$ac_prog"
20704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20705    break 2
20706  fi
20707done
20708  done
20709IFS=$as_save_IFS
20710
20711fi
20712fi
20713ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20714if test -n "$ac_ct_CXX"; then
20715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20716$as_echo "$ac_ct_CXX" >&6; }
20717else
20718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20719$as_echo "no" >&6; }
20720fi
20721
20722
20723  test -n "$ac_ct_CXX" && break
20724done
20725
20726  if test "x$ac_ct_CXX" = x; then
20727    CXX="g++"
20728  else
20729    case $cross_compiling:$ac_tool_warned in
20730yes:)
20731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20733ac_tool_warned=yes ;;
20734esac
20735    CXX=$ac_ct_CXX
20736  fi
20737fi
20738
20739  fi
20740fi
20741# Provide some information about the compiler.
20742$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20743set X $ac_compile
20744ac_compiler=$2
20745for ac_option in --version -v -V -qversion; do
20746  { { ac_try="$ac_compiler $ac_option >&5"
20747case "(($ac_try" in
20748  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20749  *) ac_try_echo=$ac_try;;
20750esac
20751eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20752$as_echo "$ac_try_echo"; } >&5
20753  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20754  ac_status=$?
20755  if test -s conftest.err; then
20756    sed '10a\
20757... rest of stderr output deleted ...
20758         10q' conftest.err >conftest.er1
20759    cat conftest.er1 >&5
20760  fi
20761  rm -f conftest.er1 conftest.err
20762  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20763  test $ac_status = 0; }
20764done
20765
20766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20767$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20768if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20769  $as_echo_n "(cached) " >&6
20770else
20771  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20772/* end confdefs.h.  */
20773
20774int
20775main ()
20776{
20777#ifndef __GNUC__
20778       choke me
20779#endif
20780
20781  ;
20782  return 0;
20783}
20784_ACEOF
20785if ac_fn_cxx_try_compile "$LINENO"; then :
20786  ac_compiler_gnu=yes
20787else
20788  ac_compiler_gnu=no
20789fi
20790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20791ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20792
20793fi
20794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20795$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20796if test $ac_compiler_gnu = yes; then
20797  GXX=yes
20798else
20799  GXX=
20800fi
20801ac_test_CXXFLAGS=${CXXFLAGS+set}
20802ac_save_CXXFLAGS=$CXXFLAGS
20803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20804$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20805if test "${ac_cv_prog_cxx_g+set}" = set; then :
20806  $as_echo_n "(cached) " >&6
20807else
20808  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20809   ac_cxx_werror_flag=yes
20810   ac_cv_prog_cxx_g=no
20811   CXXFLAGS="-g"
20812   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20813/* end confdefs.h.  */
20814
20815int
20816main ()
20817{
20818
20819  ;
20820  return 0;
20821}
20822_ACEOF
20823if ac_fn_cxx_try_compile "$LINENO"; then :
20824  ac_cv_prog_cxx_g=yes
20825else
20826  CXXFLAGS=""
20827      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20828/* end confdefs.h.  */
20829
20830int
20831main ()
20832{
20833
20834  ;
20835  return 0;
20836}
20837_ACEOF
20838if ac_fn_cxx_try_compile "$LINENO"; then :
20839
20840else
20841  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20842	 CXXFLAGS="-g"
20843	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20844/* end confdefs.h.  */
20845
20846int
20847main ()
20848{
20849
20850  ;
20851  return 0;
20852}
20853_ACEOF
20854if ac_fn_cxx_try_compile "$LINENO"; then :
20855  ac_cv_prog_cxx_g=yes
20856fi
20857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20858fi
20859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20860fi
20861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20862   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20863fi
20864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20865$as_echo "$ac_cv_prog_cxx_g" >&6; }
20866if test "$ac_test_CXXFLAGS" = set; then
20867  CXXFLAGS=$ac_save_CXXFLAGS
20868elif test $ac_cv_prog_cxx_g = yes; then
20869  if test "$GXX" = yes; then
20870    CXXFLAGS="-g -O2"
20871  else
20872    CXXFLAGS="-g"
20873  fi
20874else
20875  if test "$GXX" = yes; then
20876    CXXFLAGS="-O2"
20877  else
20878    CXXFLAGS=
20879  fi
20880fi
20881ac_ext=cpp
20882ac_cpp='$CXXCPP $CPPFLAGS'
20883ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20884ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20885ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20886
20887
20888### Locate other tools
20889
20890if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20891    ac_ext=m
20892ac_cpp='$OBJCPP $CPPFLAGS'
20893ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20894ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20895ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20896if test -n "$ac_tool_prefix"; then
20897  for ac_prog in gcc objcc objc cc CC
20898  do
20899    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20900set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20902$as_echo_n "checking for $ac_word... " >&6; }
20903if test "${ac_cv_prog_OBJC+set}" = set; then :
20904  $as_echo_n "(cached) " >&6
20905else
20906  if test -n "$OBJC"; then
20907  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20908else
20909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20910for as_dir in $PATH
20911do
20912  IFS=$as_save_IFS
20913  test -z "$as_dir" && as_dir=.
20914    for ac_exec_ext in '' $ac_executable_extensions; do
20915  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20916    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20918    break 2
20919  fi
20920done
20921  done
20922IFS=$as_save_IFS
20923
20924fi
20925fi
20926OBJC=$ac_cv_prog_OBJC
20927if test -n "$OBJC"; then
20928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20929$as_echo "$OBJC" >&6; }
20930else
20931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20932$as_echo "no" >&6; }
20933fi
20934
20935
20936    test -n "$OBJC" && break
20937  done
20938fi
20939if test -z "$OBJC"; then
20940  ac_ct_OBJC=$OBJC
20941  for ac_prog in gcc objcc objc cc CC
20942do
20943  # Extract the first word of "$ac_prog", so it can be a program name with args.
20944set dummy $ac_prog; ac_word=$2
20945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20946$as_echo_n "checking for $ac_word... " >&6; }
20947if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20948  $as_echo_n "(cached) " >&6
20949else
20950  if test -n "$ac_ct_OBJC"; then
20951  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20952else
20953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20954for as_dir in $PATH
20955do
20956  IFS=$as_save_IFS
20957  test -z "$as_dir" && as_dir=.
20958    for ac_exec_ext in '' $ac_executable_extensions; do
20959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20960    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20962    break 2
20963  fi
20964done
20965  done
20966IFS=$as_save_IFS
20967
20968fi
20969fi
20970ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20971if test -n "$ac_ct_OBJC"; then
20972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20973$as_echo "$ac_ct_OBJC" >&6; }
20974else
20975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20976$as_echo "no" >&6; }
20977fi
20978
20979
20980  test -n "$ac_ct_OBJC" && break
20981done
20982
20983  if test "x$ac_ct_OBJC" = x; then
20984    OBJC="gcc"
20985  else
20986    case $cross_compiling:$ac_tool_warned in
20987yes:)
20988{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20989$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20990ac_tool_warned=yes ;;
20991esac
20992    OBJC=$ac_ct_OBJC
20993  fi
20994fi
20995
20996# Provide some information about the compiler.
20997$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20998set X $ac_compile
20999ac_compiler=$2
21000for ac_option in --version -v -V -qversion; do
21001  { { ac_try="$ac_compiler $ac_option >&5"
21002case "(($ac_try" in
21003  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21004  *) ac_try_echo=$ac_try;;
21005esac
21006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21007$as_echo "$ac_try_echo"; } >&5
21008  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21009  ac_status=$?
21010  if test -s conftest.err; then
21011    sed '10a\
21012... rest of stderr output deleted ...
21013         10q' conftest.err >conftest.er1
21014    cat conftest.er1 >&5
21015  fi
21016  rm -f conftest.er1 conftest.err
21017  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21018  test $ac_status = 0; }
21019done
21020
21021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21022$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21023if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21024  $as_echo_n "(cached) " >&6
21025else
21026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21027/* end confdefs.h.  */
21028
21029int
21030main ()
21031{
21032#ifndef __GNUC__
21033       choke me
21034#endif
21035
21036  ;
21037  return 0;
21038}
21039_ACEOF
21040if ac_fn_objc_try_compile "$LINENO"; then :
21041  ac_compiler_gnu=yes
21042else
21043  ac_compiler_gnu=no
21044fi
21045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21046ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21047
21048fi
21049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21050$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21051if test $ac_compiler_gnu = yes; then
21052  GOBJC=yes
21053else
21054  GOBJC=
21055fi
21056ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21057ac_save_OBJCFLAGS=$OBJCFLAGS
21058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21059$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21060if test "${ac_cv_prog_objc_g+set}" = set; then :
21061  $as_echo_n "(cached) " >&6
21062else
21063  ac_save_objc_werror_flag=$ac_objc_werror_flag
21064   ac_objc_werror_flag=yes
21065   ac_cv_prog_objc_g=no
21066   OBJCFLAGS="-g"
21067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21068/* end confdefs.h.  */
21069
21070int
21071main ()
21072{
21073
21074  ;
21075  return 0;
21076}
21077_ACEOF
21078if ac_fn_objc_try_compile "$LINENO"; then :
21079  ac_cv_prog_objc_g=yes
21080else
21081  OBJCFLAGS=""
21082      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21083/* end confdefs.h.  */
21084
21085int
21086main ()
21087{
21088
21089  ;
21090  return 0;
21091}
21092_ACEOF
21093if ac_fn_objc_try_compile "$LINENO"; then :
21094
21095else
21096  ac_objc_werror_flag=$ac_save_objc_werror_flag
21097	 OBJCFLAGS="-g"
21098	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21099/* end confdefs.h.  */
21100
21101int
21102main ()
21103{
21104
21105  ;
21106  return 0;
21107}
21108_ACEOF
21109if ac_fn_objc_try_compile "$LINENO"; then :
21110  ac_cv_prog_objc_g=yes
21111fi
21112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21113fi
21114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21115fi
21116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21117   ac_objc_werror_flag=$ac_save_objc_werror_flag
21118fi
21119{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21120$as_echo "$ac_cv_prog_objc_g" >&6; }
21121if test "$ac_test_OBJCFLAGS" = set; then
21122  OBJCFLAGS=$ac_save_OBJCFLAGS
21123elif test $ac_cv_prog_objc_g = yes; then
21124  if test "$GOBJC" = yes; then
21125    OBJCFLAGS="-g -O2"
21126  else
21127    OBJCFLAGS="-g"
21128  fi
21129else
21130  if test "$GOBJC" = yes; then
21131    OBJCFLAGS="-O2"
21132  else
21133    OBJCFLAGS=
21134  fi
21135fi
21136ac_ext=cpp
21137ac_cpp='$CXXCPP $CPPFLAGS'
21138ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21139ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21140ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21141
21142
21143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21144
21145  # First separate the path from the arguments. This will split at the first
21146  # space.
21147  complete="$OBJC"
21148  path="${complete%% *}"
21149  tmp="$complete EOL"
21150  arguments="${tmp#* }"
21151
21152  # Input might be given as Windows format, start by converting to
21153  # unix format.
21154  new_path=`$CYGPATH -u "$path"`
21155
21156  # Now try to locate executable using which
21157  new_path=`$WHICH "$new_path" 2> /dev/null`
21158  # bat and cmd files are not always considered executable in cygwin causing which
21159  # to not find them
21160  if test "x$new_path" = x \
21161           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21162           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21163    new_path=`$CYGPATH -u "$path"`
21164  fi
21165  if test "x$new_path" = x; then
21166    # Oops. Which didn't find the executable.
21167    # The splitting of arguments from the executable at a space might have been incorrect,
21168    # since paths with space are more likely in Windows. Give it another try with the whole
21169    # argument.
21170    path="$complete"
21171    arguments="EOL"
21172    new_path=`$CYGPATH -u "$path"`
21173    new_path=`$WHICH "$new_path" 2> /dev/null`
21174    # bat and cmd files are not always considered executable in cygwin causing which
21175    # to not find them
21176    if test "x$new_path" = x \
21177             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21178             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21179      new_path=`$CYGPATH -u "$path"`
21180    fi
21181    if test "x$new_path" = x; then
21182      # It's still not found. Now this is an unrecoverable error.
21183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21184$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21185      has_space=`$ECHO "$complete" | $GREP " "`
21186      if test "x$has_space" != x; then
21187        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21188$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21189      fi
21190      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21191    fi
21192  fi
21193
21194  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21195  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21196  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21197  # "foo.exe" is OK but "foo" is an error.
21198  #
21199  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21200  # It is also a way to make sure we got the proper file name for the real test later on.
21201  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21202  if test "x$test_shortpath" = x; then
21203    # Short path failed, file does not exist as specified.
21204    # Try adding .exe or .cmd
21205    if test -f "${new_path}.exe"; then
21206       input_to_shortpath="${new_path}.exe"
21207    elif test -f "${new_path}.cmd"; then
21208       input_to_shortpath="${new_path}.cmd"
21209    else
21210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21211$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21212      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21213$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21214      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21215    fi
21216  else
21217    input_to_shortpath="$new_path"
21218  fi
21219
21220  # Call helper function which possibly converts this using DOS-style short mode.
21221  # If so, the updated path is stored in $new_path.
21222  new_path="$input_to_shortpath"
21223
21224  input_path="$input_to_shortpath"
21225  # Check if we need to convert this using DOS-style short mode. If the path
21226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21227  # take no chances and rewrite it.
21228  # Note: m4 eats our [], so we need to use [ and ] instead.
21229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21230  if test "x$has_forbidden_chars" != x; then
21231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21235      # Going to short mode and back again did indeed matter. Since short mode is
21236      # case insensitive, let's make it lowercase to improve readability.
21237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21238      # Now convert it back to Unix-stile (cygpath)
21239      input_path=`$CYGPATH -u "$shortmode_path"`
21240      new_path="$input_path"
21241    fi
21242  fi
21243
21244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21245  if test "x$test_cygdrive_prefix" = x; then
21246    # As a simple fix, exclude /usr/bin since it's not a real path.
21247    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21249      # a path prefixed by /cygdrive for fixpath to work.
21250      new_path="$CYGWIN_ROOT_PATH$input_path"
21251    fi
21252  fi
21253
21254  # remove trailing .exe if any
21255  new_path="${new_path/%.exe/}"
21256
21257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21258
21259  # First separate the path from the arguments. This will split at the first
21260  # space.
21261  complete="$OBJC"
21262  path="${complete%% *}"
21263  tmp="$complete EOL"
21264  arguments="${tmp#* }"
21265
21266  # Input might be given as Windows format, start by converting to
21267  # unix format.
21268  new_path="$path"
21269
21270  windows_path="$new_path"
21271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21272    unix_path=`$CYGPATH -u "$windows_path"`
21273    new_path="$unix_path"
21274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21276    new_path="$unix_path"
21277  fi
21278
21279
21280  # Now try to locate executable using which
21281  new_path=`$WHICH "$new_path" 2> /dev/null`
21282
21283  if test "x$new_path" = x; then
21284    # Oops. Which didn't find the executable.
21285    # The splitting of arguments from the executable at a space might have been incorrect,
21286    # since paths with space are more likely in Windows. Give it another try with the whole
21287    # argument.
21288    path="$complete"
21289    arguments="EOL"
21290    new_path="$path"
21291
21292  windows_path="$new_path"
21293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21294    unix_path=`$CYGPATH -u "$windows_path"`
21295    new_path="$unix_path"
21296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21298    new_path="$unix_path"
21299  fi
21300
21301
21302    new_path=`$WHICH "$new_path" 2> /dev/null`
21303
21304    if test "x$new_path" = x; then
21305      # It's still not found. Now this is an unrecoverable error.
21306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21307$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21308      has_space=`$ECHO "$complete" | $GREP " "`
21309      if test "x$has_space" != x; then
21310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21312      fi
21313      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21314    fi
21315  fi
21316
21317  # Now new_path has a complete unix path to the binary
21318  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21319    # Keep paths in /bin as-is, but remove trailing .exe if any
21320    new_path="${new_path/%.exe/}"
21321    # Do not save /bin paths to all_fixpath_prefixes!
21322  else
21323    # Not in mixed or Windows style, start by that.
21324    new_path=`cmd //c echo $new_path`
21325
21326  input_path="$new_path"
21327  # Check if we need to convert this using DOS-style short mode. If the path
21328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21329  # take no chances and rewrite it.
21330  # Note: m4 eats our [], so we need to use [ and ] instead.
21331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21332  if test "x$has_forbidden_chars" != x; then
21333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21335  fi
21336
21337    # Output is in $new_path
21338
21339  windows_path="$new_path"
21340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21341    unix_path=`$CYGPATH -u "$windows_path"`
21342    new_path="$unix_path"
21343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21345    new_path="$unix_path"
21346  fi
21347
21348    # remove trailing .exe if any
21349    new_path="${new_path/%.exe/}"
21350
21351    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21352    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21353  fi
21354
21355  else
21356    # We're on a posix platform. Hooray! :)
21357    # First separate the path from the arguments. This will split at the first
21358    # space.
21359    complete="$OBJC"
21360    path="${complete%% *}"
21361    tmp="$complete EOL"
21362    arguments="${tmp#* }"
21363
21364    # Cannot rely on the command "which" here since it doesn't always work.
21365    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21366    if test -z "$is_absolute_path"; then
21367      # Path to executable is not absolute. Find it.
21368      IFS_save="$IFS"
21369      IFS=:
21370      for p in $PATH; do
21371        if test -f "$p/$path" && test -x "$p/$path"; then
21372          new_path="$p/$path"
21373          break
21374        fi
21375      done
21376      IFS="$IFS_save"
21377    else
21378      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21379$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21380      new_path="$path"
21381    fi
21382
21383    if test "x$new_path" = x; then
21384        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21385$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21386        has_space=`$ECHO "$complete" | $GREP " "`
21387        if test "x$has_space" != x; then
21388          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21389$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21390        fi
21391        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21392      fi
21393  fi
21394
21395      # Now join together the path and the arguments once again
21396      if test "x$arguments" != xEOL; then
21397        new_complete="$new_path ${arguments% *}"
21398      else
21399        new_complete="$new_path"
21400      fi
21401
21402  if test "x$complete" != "x$new_complete"; then
21403      OBJC="$new_complete"
21404      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21405$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21406    fi
21407
21408else
21409    OBJC=
21410fi
21411
21412# Restore the flags to the user specified values.
21413# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21414CFLAGS="$ORG_CFLAGS"
21415CXXFLAGS="$ORG_CXXFLAGS"
21416OBJCFLAGS="$ORG_OBJCFLAGS"
21417
21418LD="$CC"
21419LDEXE="$CC"
21420LDCXX="$CXX"
21421LDEXECXX="$CXX"
21422
21423# LDEXE is the linker to use, when creating executables.
21424
21425# Linking C++ libraries.
21426
21427# Linking C++ executables.
21428
21429
21430if test "x$OPENJDK_TARGET_OS" != xwindows; then
21431    if test -n "$ac_tool_prefix"; then
21432  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21433set dummy ${ac_tool_prefix}ar; ac_word=$2
21434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21435$as_echo_n "checking for $ac_word... " >&6; }
21436if test "${ac_cv_prog_AR+set}" = set; then :
21437  $as_echo_n "(cached) " >&6
21438else
21439  if test -n "$AR"; then
21440  ac_cv_prog_AR="$AR" # Let the user override the test.
21441else
21442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21443for as_dir in $PATH
21444do
21445  IFS=$as_save_IFS
21446  test -z "$as_dir" && as_dir=.
21447    for ac_exec_ext in '' $ac_executable_extensions; do
21448  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21449    ac_cv_prog_AR="${ac_tool_prefix}ar"
21450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21451    break 2
21452  fi
21453done
21454  done
21455IFS=$as_save_IFS
21456
21457fi
21458fi
21459AR=$ac_cv_prog_AR
21460if test -n "$AR"; then
21461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21462$as_echo "$AR" >&6; }
21463else
21464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21465$as_echo "no" >&6; }
21466fi
21467
21468
21469fi
21470if test -z "$ac_cv_prog_AR"; then
21471  ac_ct_AR=$AR
21472  # Extract the first word of "ar", so it can be a program name with args.
21473set dummy ar; ac_word=$2
21474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21475$as_echo_n "checking for $ac_word... " >&6; }
21476if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21477  $as_echo_n "(cached) " >&6
21478else
21479  if test -n "$ac_ct_AR"; then
21480  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21481else
21482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21483for as_dir in $PATH
21484do
21485  IFS=$as_save_IFS
21486  test -z "$as_dir" && as_dir=.
21487    for ac_exec_ext in '' $ac_executable_extensions; do
21488  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21489    ac_cv_prog_ac_ct_AR="ar"
21490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21491    break 2
21492  fi
21493done
21494  done
21495IFS=$as_save_IFS
21496
21497fi
21498fi
21499ac_ct_AR=$ac_cv_prog_ac_ct_AR
21500if test -n "$ac_ct_AR"; then
21501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21502$as_echo "$ac_ct_AR" >&6; }
21503else
21504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21505$as_echo "no" >&6; }
21506fi
21507
21508  if test "x$ac_ct_AR" = x; then
21509    AR=""
21510  else
21511    case $cross_compiling:$ac_tool_warned in
21512yes:)
21513{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21514$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21515ac_tool_warned=yes ;;
21516esac
21517    AR=$ac_ct_AR
21518  fi
21519else
21520  AR="$ac_cv_prog_AR"
21521fi
21522
21523
21524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21525
21526  # First separate the path from the arguments. This will split at the first
21527  # space.
21528  complete="$AR"
21529  path="${complete%% *}"
21530  tmp="$complete EOL"
21531  arguments="${tmp#* }"
21532
21533  # Input might be given as Windows format, start by converting to
21534  # unix format.
21535  new_path=`$CYGPATH -u "$path"`
21536
21537  # Now try to locate executable using which
21538  new_path=`$WHICH "$new_path" 2> /dev/null`
21539  # bat and cmd files are not always considered executable in cygwin causing which
21540  # to not find them
21541  if test "x$new_path" = x \
21542           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21543           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21544    new_path=`$CYGPATH -u "$path"`
21545  fi
21546  if test "x$new_path" = x; then
21547    # Oops. Which didn't find the executable.
21548    # The splitting of arguments from the executable at a space might have been incorrect,
21549    # since paths with space are more likely in Windows. Give it another try with the whole
21550    # argument.
21551    path="$complete"
21552    arguments="EOL"
21553    new_path=`$CYGPATH -u "$path"`
21554    new_path=`$WHICH "$new_path" 2> /dev/null`
21555    # bat and cmd files are not always considered executable in cygwin causing which
21556    # to not find them
21557    if test "x$new_path" = x \
21558             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21559             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21560      new_path=`$CYGPATH -u "$path"`
21561    fi
21562    if test "x$new_path" = x; then
21563      # It's still not found. Now this is an unrecoverable error.
21564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21565$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21566      has_space=`$ECHO "$complete" | $GREP " "`
21567      if test "x$has_space" != x; then
21568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21570      fi
21571      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21572    fi
21573  fi
21574
21575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21578  # "foo.exe" is OK but "foo" is an error.
21579  #
21580  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21581  # It is also a way to make sure we got the proper file name for the real test later on.
21582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21583  if test "x$test_shortpath" = x; then
21584    # Short path failed, file does not exist as specified.
21585    # Try adding .exe or .cmd
21586    if test -f "${new_path}.exe"; then
21587       input_to_shortpath="${new_path}.exe"
21588    elif test -f "${new_path}.cmd"; then
21589       input_to_shortpath="${new_path}.cmd"
21590    else
21591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21592$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21595      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21596    fi
21597  else
21598    input_to_shortpath="$new_path"
21599  fi
21600
21601  # Call helper function which possibly converts this using DOS-style short mode.
21602  # If so, the updated path is stored in $new_path.
21603  new_path="$input_to_shortpath"
21604
21605  input_path="$input_to_shortpath"
21606  # Check if we need to convert this using DOS-style short mode. If the path
21607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21608  # take no chances and rewrite it.
21609  # Note: m4 eats our [], so we need to use [ and ] instead.
21610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21611  if test "x$has_forbidden_chars" != x; then
21612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21616      # Going to short mode and back again did indeed matter. Since short mode is
21617      # case insensitive, let's make it lowercase to improve readability.
21618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21619      # Now convert it back to Unix-stile (cygpath)
21620      input_path=`$CYGPATH -u "$shortmode_path"`
21621      new_path="$input_path"
21622    fi
21623  fi
21624
21625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21626  if test "x$test_cygdrive_prefix" = x; then
21627    # As a simple fix, exclude /usr/bin since it's not a real path.
21628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21630      # a path prefixed by /cygdrive for fixpath to work.
21631      new_path="$CYGWIN_ROOT_PATH$input_path"
21632    fi
21633  fi
21634
21635  # remove trailing .exe if any
21636  new_path="${new_path/%.exe/}"
21637
21638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21639
21640  # First separate the path from the arguments. This will split at the first
21641  # space.
21642  complete="$AR"
21643  path="${complete%% *}"
21644  tmp="$complete EOL"
21645  arguments="${tmp#* }"
21646
21647  # Input might be given as Windows format, start by converting to
21648  # unix format.
21649  new_path="$path"
21650
21651  windows_path="$new_path"
21652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21653    unix_path=`$CYGPATH -u "$windows_path"`
21654    new_path="$unix_path"
21655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21657    new_path="$unix_path"
21658  fi
21659
21660
21661  # Now try to locate executable using which
21662  new_path=`$WHICH "$new_path" 2> /dev/null`
21663
21664  if test "x$new_path" = x; then
21665    # Oops. Which didn't find the executable.
21666    # The splitting of arguments from the executable at a space might have been incorrect,
21667    # since paths with space are more likely in Windows. Give it another try with the whole
21668    # argument.
21669    path="$complete"
21670    arguments="EOL"
21671    new_path="$path"
21672
21673  windows_path="$new_path"
21674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21675    unix_path=`$CYGPATH -u "$windows_path"`
21676    new_path="$unix_path"
21677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21679    new_path="$unix_path"
21680  fi
21681
21682
21683    new_path=`$WHICH "$new_path" 2> /dev/null`
21684
21685    if test "x$new_path" = x; then
21686      # It's still not found. Now this is an unrecoverable error.
21687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21688$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21689      has_space=`$ECHO "$complete" | $GREP " "`
21690      if test "x$has_space" != x; then
21691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21693      fi
21694      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21695    fi
21696  fi
21697
21698  # Now new_path has a complete unix path to the binary
21699  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21700    # Keep paths in /bin as-is, but remove trailing .exe if any
21701    new_path="${new_path/%.exe/}"
21702    # Do not save /bin paths to all_fixpath_prefixes!
21703  else
21704    # Not in mixed or Windows style, start by that.
21705    new_path=`cmd //c echo $new_path`
21706
21707  input_path="$new_path"
21708  # Check if we need to convert this using DOS-style short mode. If the path
21709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21710  # take no chances and rewrite it.
21711  # Note: m4 eats our [], so we need to use [ and ] instead.
21712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21713  if test "x$has_forbidden_chars" != x; then
21714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21716  fi
21717
21718    # Output is in $new_path
21719
21720  windows_path="$new_path"
21721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21722    unix_path=`$CYGPATH -u "$windows_path"`
21723    new_path="$unix_path"
21724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21726    new_path="$unix_path"
21727  fi
21728
21729    # remove trailing .exe if any
21730    new_path="${new_path/%.exe/}"
21731
21732    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21733    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21734  fi
21735
21736  else
21737    # We're on a posix platform. Hooray! :)
21738    # First separate the path from the arguments. This will split at the first
21739    # space.
21740    complete="$AR"
21741    path="${complete%% *}"
21742    tmp="$complete EOL"
21743    arguments="${tmp#* }"
21744
21745    # Cannot rely on the command "which" here since it doesn't always work.
21746    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21747    if test -z "$is_absolute_path"; then
21748      # Path to executable is not absolute. Find it.
21749      IFS_save="$IFS"
21750      IFS=:
21751      for p in $PATH; do
21752        if test -f "$p/$path" && test -x "$p/$path"; then
21753          new_path="$p/$path"
21754          break
21755        fi
21756      done
21757      IFS="$IFS_save"
21758    else
21759      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21760$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21761      new_path="$path"
21762    fi
21763
21764    if test "x$new_path" = x; then
21765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21766$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21767        has_space=`$ECHO "$complete" | $GREP " "`
21768        if test "x$has_space" != x; then
21769          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21770$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21771        fi
21772        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21773      fi
21774  fi
21775
21776      # Now join together the path and the arguments once again
21777      if test "x$arguments" != xEOL; then
21778        new_complete="$new_path ${arguments% *}"
21779      else
21780        new_complete="$new_path"
21781      fi
21782
21783  if test "x$complete" != "x$new_complete"; then
21784      AR="$new_complete"
21785      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21786$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21787    fi
21788
21789fi
21790if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21791    ARFLAGS="-r"
21792else
21793    ARFLAGS=""
21794fi
21795
21796
21797# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21798HOTSPOT_CXX="$CXX"
21799HOTSPOT_LD="$LD"
21800
21801
21802
21803COMPILER_NAME=gcc
21804COMPILER_TYPE=CC
21805if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21806
21807    # For now, assume that we are always compiling using cl.exe.
21808    CC_OUT_OPTION=-Fo
21809    EXE_OUT_OPTION=-out:
21810    LD_OUT_OPTION=-out:
21811    AR_OUT_OPTION=-out:
21812    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21813    # program for something completely different.
21814    # Extract the first word of "link", so it can be a program name with args.
21815set dummy link; ac_word=$2
21816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21817$as_echo_n "checking for $ac_word... " >&6; }
21818if test "${ac_cv_prog_WINLD+set}" = set; then :
21819  $as_echo_n "(cached) " >&6
21820else
21821  if test -n "$WINLD"; then
21822  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21823else
21824  ac_prog_rejected=no
21825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21826for as_dir in $PATH
21827do
21828  IFS=$as_save_IFS
21829  test -z "$as_dir" && as_dir=.
21830    for ac_exec_ext in '' $ac_executable_extensions; do
21831  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21832    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21833       ac_prog_rejected=yes
21834       continue
21835     fi
21836    ac_cv_prog_WINLD="link"
21837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21838    break 2
21839  fi
21840done
21841  done
21842IFS=$as_save_IFS
21843
21844if test $ac_prog_rejected = yes; then
21845  # We found a bogon in the path, so make sure we never use it.
21846  set dummy $ac_cv_prog_WINLD
21847  shift
21848  if test $# != 0; then
21849    # We chose a different compiler from the bogus one.
21850    # However, it has the same basename, so the bogon will be chosen
21851    # first if we set WINLD to just the basename; use the full file name.
21852    shift
21853    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21854  fi
21855fi
21856fi
21857fi
21858WINLD=$ac_cv_prog_WINLD
21859if test -n "$WINLD"; then
21860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21861$as_echo "$WINLD" >&6; }
21862else
21863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21864$as_echo "no" >&6; }
21865fi
21866
21867
21868    # Since we must ignore the first found link, WINLD will contain
21869    # the full path to the link.exe program.
21870
21871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21872
21873  # First separate the path from the arguments. This will split at the first
21874  # space.
21875  complete="$WINLD"
21876  path="${complete%% *}"
21877  tmp="$complete EOL"
21878  arguments="${tmp#* }"
21879
21880  # Input might be given as Windows format, start by converting to
21881  # unix format.
21882  new_path=`$CYGPATH -u "$path"`
21883
21884  # Now try to locate executable using which
21885  new_path=`$WHICH "$new_path" 2> /dev/null`
21886  # bat and cmd files are not always considered executable in cygwin causing which
21887  # to not find them
21888  if test "x$new_path" = x \
21889           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21890           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21891    new_path=`$CYGPATH -u "$path"`
21892  fi
21893  if test "x$new_path" = x; then
21894    # Oops. Which didn't find the executable.
21895    # The splitting of arguments from the executable at a space might have been incorrect,
21896    # since paths with space are more likely in Windows. Give it another try with the whole
21897    # argument.
21898    path="$complete"
21899    arguments="EOL"
21900    new_path=`$CYGPATH -u "$path"`
21901    new_path=`$WHICH "$new_path" 2> /dev/null`
21902    # bat and cmd files are not always considered executable in cygwin causing which
21903    # to not find them
21904    if test "x$new_path" = x \
21905             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21906             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21907      new_path=`$CYGPATH -u "$path"`
21908    fi
21909    if test "x$new_path" = x; then
21910      # It's still not found. Now this is an unrecoverable error.
21911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21912$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21913      has_space=`$ECHO "$complete" | $GREP " "`
21914      if test "x$has_space" != x; then
21915        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21916$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21917      fi
21918      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21919    fi
21920  fi
21921
21922  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21923  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21924  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21925  # "foo.exe" is OK but "foo" is an error.
21926  #
21927  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21928  # It is also a way to make sure we got the proper file name for the real test later on.
21929  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21930  if test "x$test_shortpath" = x; then
21931    # Short path failed, file does not exist as specified.
21932    # Try adding .exe or .cmd
21933    if test -f "${new_path}.exe"; then
21934       input_to_shortpath="${new_path}.exe"
21935    elif test -f "${new_path}.cmd"; then
21936       input_to_shortpath="${new_path}.cmd"
21937    else
21938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21939$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21940      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21941$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21942      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21943    fi
21944  else
21945    input_to_shortpath="$new_path"
21946  fi
21947
21948  # Call helper function which possibly converts this using DOS-style short mode.
21949  # If so, the updated path is stored in $new_path.
21950  new_path="$input_to_shortpath"
21951
21952  input_path="$input_to_shortpath"
21953  # Check if we need to convert this using DOS-style short mode. If the path
21954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21955  # take no chances and rewrite it.
21956  # Note: m4 eats our [], so we need to use [ and ] instead.
21957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21958  if test "x$has_forbidden_chars" != x; then
21959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21963      # Going to short mode and back again did indeed matter. Since short mode is
21964      # case insensitive, let's make it lowercase to improve readability.
21965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21966      # Now convert it back to Unix-stile (cygpath)
21967      input_path=`$CYGPATH -u "$shortmode_path"`
21968      new_path="$input_path"
21969    fi
21970  fi
21971
21972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21973  if test "x$test_cygdrive_prefix" = x; then
21974    # As a simple fix, exclude /usr/bin since it's not a real path.
21975    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21977      # a path prefixed by /cygdrive for fixpath to work.
21978      new_path="$CYGWIN_ROOT_PATH$input_path"
21979    fi
21980  fi
21981
21982  # remove trailing .exe if any
21983  new_path="${new_path/%.exe/}"
21984
21985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21986
21987  # First separate the path from the arguments. This will split at the first
21988  # space.
21989  complete="$WINLD"
21990  path="${complete%% *}"
21991  tmp="$complete EOL"
21992  arguments="${tmp#* }"
21993
21994  # Input might be given as Windows format, start by converting to
21995  # unix format.
21996  new_path="$path"
21997
21998  windows_path="$new_path"
21999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22000    unix_path=`$CYGPATH -u "$windows_path"`
22001    new_path="$unix_path"
22002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22004    new_path="$unix_path"
22005  fi
22006
22007
22008  # Now try to locate executable using which
22009  new_path=`$WHICH "$new_path" 2> /dev/null`
22010
22011  if test "x$new_path" = x; then
22012    # Oops. Which didn't find the executable.
22013    # The splitting of arguments from the executable at a space might have been incorrect,
22014    # since paths with space are more likely in Windows. Give it another try with the whole
22015    # argument.
22016    path="$complete"
22017    arguments="EOL"
22018    new_path="$path"
22019
22020  windows_path="$new_path"
22021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22022    unix_path=`$CYGPATH -u "$windows_path"`
22023    new_path="$unix_path"
22024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22026    new_path="$unix_path"
22027  fi
22028
22029
22030    new_path=`$WHICH "$new_path" 2> /dev/null`
22031
22032    if test "x$new_path" = x; then
22033      # It's still not found. Now this is an unrecoverable error.
22034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22035$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22036      has_space=`$ECHO "$complete" | $GREP " "`
22037      if test "x$has_space" != x; then
22038        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22039$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22040      fi
22041      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22042    fi
22043  fi
22044
22045  # Now new_path has a complete unix path to the binary
22046  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22047    # Keep paths in /bin as-is, but remove trailing .exe if any
22048    new_path="${new_path/%.exe/}"
22049    # Do not save /bin paths to all_fixpath_prefixes!
22050  else
22051    # Not in mixed or Windows style, start by that.
22052    new_path=`cmd //c echo $new_path`
22053
22054  input_path="$new_path"
22055  # Check if we need to convert this using DOS-style short mode. If the path
22056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22057  # take no chances and rewrite it.
22058  # Note: m4 eats our [], so we need to use [ and ] instead.
22059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22060  if test "x$has_forbidden_chars" != x; then
22061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22062    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22063  fi
22064
22065    # Output is in $new_path
22066
22067  windows_path="$new_path"
22068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22069    unix_path=`$CYGPATH -u "$windows_path"`
22070    new_path="$unix_path"
22071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22073    new_path="$unix_path"
22074  fi
22075
22076    # remove trailing .exe if any
22077    new_path="${new_path/%.exe/}"
22078
22079    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22080    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22081  fi
22082
22083  else
22084    # We're on a posix platform. Hooray! :)
22085    # First separate the path from the arguments. This will split at the first
22086    # space.
22087    complete="$WINLD"
22088    path="${complete%% *}"
22089    tmp="$complete EOL"
22090    arguments="${tmp#* }"
22091
22092    # Cannot rely on the command "which" here since it doesn't always work.
22093    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22094    if test -z "$is_absolute_path"; then
22095      # Path to executable is not absolute. Find it.
22096      IFS_save="$IFS"
22097      IFS=:
22098      for p in $PATH; do
22099        if test -f "$p/$path" && test -x "$p/$path"; then
22100          new_path="$p/$path"
22101          break
22102        fi
22103      done
22104      IFS="$IFS_save"
22105    else
22106      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22107$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22108      new_path="$path"
22109    fi
22110
22111    if test "x$new_path" = x; then
22112        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22113$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22114        has_space=`$ECHO "$complete" | $GREP " "`
22115        if test "x$has_space" != x; then
22116          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22117$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22118        fi
22119        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22120      fi
22121  fi
22122
22123      # Now join together the path and the arguments once again
22124      if test "x$arguments" != xEOL; then
22125        new_complete="$new_path ${arguments% *}"
22126      else
22127        new_complete="$new_path"
22128      fi
22129
22130  if test "x$complete" != "x$new_complete"; then
22131      WINLD="$new_complete"
22132      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22133$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22134    fi
22135
22136    printf "Windows linker was found at $WINLD\n"
22137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22138$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22139    "$WINLD" --version > /dev/null
22140    if test $? -eq 0 ; then
22141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22142$as_echo "no" >&6; }
22143      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22144    else
22145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22146$as_echo "yes" >&6; }
22147    fi
22148    LD="$WINLD"
22149    LDEXE="$WINLD"
22150    LDCXX="$WINLD"
22151    LDEXECXX="$WINLD"
22152
22153    # Extract the first word of "mt", so it can be a program name with args.
22154set dummy mt; ac_word=$2
22155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22156$as_echo_n "checking for $ac_word... " >&6; }
22157if test "${ac_cv_prog_MT+set}" = set; then :
22158  $as_echo_n "(cached) " >&6
22159else
22160  if test -n "$MT"; then
22161  ac_cv_prog_MT="$MT" # Let the user override the test.
22162else
22163  ac_prog_rejected=no
22164as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22165for as_dir in $PATH
22166do
22167  IFS=$as_save_IFS
22168  test -z "$as_dir" && as_dir=.
22169    for ac_exec_ext in '' $ac_executable_extensions; do
22170  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22171    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22172       ac_prog_rejected=yes
22173       continue
22174     fi
22175    ac_cv_prog_MT="mt"
22176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22177    break 2
22178  fi
22179done
22180  done
22181IFS=$as_save_IFS
22182
22183if test $ac_prog_rejected = yes; then
22184  # We found a bogon in the path, so make sure we never use it.
22185  set dummy $ac_cv_prog_MT
22186  shift
22187  if test $# != 0; then
22188    # We chose a different compiler from the bogus one.
22189    # However, it has the same basename, so the bogon will be chosen
22190    # first if we set MT to just the basename; use the full file name.
22191    shift
22192    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22193  fi
22194fi
22195fi
22196fi
22197MT=$ac_cv_prog_MT
22198if test -n "$MT"; then
22199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22200$as_echo "$MT" >&6; }
22201else
22202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22203$as_echo "no" >&6; }
22204fi
22205
22206
22207
22208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22209
22210  # First separate the path from the arguments. This will split at the first
22211  # space.
22212  complete="$MT"
22213  path="${complete%% *}"
22214  tmp="$complete EOL"
22215  arguments="${tmp#* }"
22216
22217  # Input might be given as Windows format, start by converting to
22218  # unix format.
22219  new_path=`$CYGPATH -u "$path"`
22220
22221  # Now try to locate executable using which
22222  new_path=`$WHICH "$new_path" 2> /dev/null`
22223  # bat and cmd files are not always considered executable in cygwin causing which
22224  # to not find them
22225  if test "x$new_path" = x \
22226           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22227           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22228    new_path=`$CYGPATH -u "$path"`
22229  fi
22230  if test "x$new_path" = x; then
22231    # Oops. Which didn't find the executable.
22232    # The splitting of arguments from the executable at a space might have been incorrect,
22233    # since paths with space are more likely in Windows. Give it another try with the whole
22234    # argument.
22235    path="$complete"
22236    arguments="EOL"
22237    new_path=`$CYGPATH -u "$path"`
22238    new_path=`$WHICH "$new_path" 2> /dev/null`
22239    # bat and cmd files are not always considered executable in cygwin causing which
22240    # to not find them
22241    if test "x$new_path" = x \
22242             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22243             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22244      new_path=`$CYGPATH -u "$path"`
22245    fi
22246    if test "x$new_path" = x; then
22247      # It's still not found. Now this is an unrecoverable error.
22248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22249$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22250      has_space=`$ECHO "$complete" | $GREP " "`
22251      if test "x$has_space" != x; then
22252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22254      fi
22255      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22256    fi
22257  fi
22258
22259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22262  # "foo.exe" is OK but "foo" is an error.
22263  #
22264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22265  # It is also a way to make sure we got the proper file name for the real test later on.
22266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22267  if test "x$test_shortpath" = x; then
22268    # Short path failed, file does not exist as specified.
22269    # Try adding .exe or .cmd
22270    if test -f "${new_path}.exe"; then
22271       input_to_shortpath="${new_path}.exe"
22272    elif test -f "${new_path}.cmd"; then
22273       input_to_shortpath="${new_path}.cmd"
22274    else
22275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22276$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22277      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22278$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22279      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22280    fi
22281  else
22282    input_to_shortpath="$new_path"
22283  fi
22284
22285  # Call helper function which possibly converts this using DOS-style short mode.
22286  # If so, the updated path is stored in $new_path.
22287  new_path="$input_to_shortpath"
22288
22289  input_path="$input_to_shortpath"
22290  # Check if we need to convert this using DOS-style short mode. If the path
22291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22292  # take no chances and rewrite it.
22293  # Note: m4 eats our [], so we need to use [ and ] instead.
22294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22295  if test "x$has_forbidden_chars" != x; then
22296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22300      # Going to short mode and back again did indeed matter. Since short mode is
22301      # case insensitive, let's make it lowercase to improve readability.
22302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22303      # Now convert it back to Unix-stile (cygpath)
22304      input_path=`$CYGPATH -u "$shortmode_path"`
22305      new_path="$input_path"
22306    fi
22307  fi
22308
22309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22310  if test "x$test_cygdrive_prefix" = x; then
22311    # As a simple fix, exclude /usr/bin since it's not a real path.
22312    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22314      # a path prefixed by /cygdrive for fixpath to work.
22315      new_path="$CYGWIN_ROOT_PATH$input_path"
22316    fi
22317  fi
22318
22319  # remove trailing .exe if any
22320  new_path="${new_path/%.exe/}"
22321
22322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22323
22324  # First separate the path from the arguments. This will split at the first
22325  # space.
22326  complete="$MT"
22327  path="${complete%% *}"
22328  tmp="$complete EOL"
22329  arguments="${tmp#* }"
22330
22331  # Input might be given as Windows format, start by converting to
22332  # unix format.
22333  new_path="$path"
22334
22335  windows_path="$new_path"
22336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22337    unix_path=`$CYGPATH -u "$windows_path"`
22338    new_path="$unix_path"
22339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22341    new_path="$unix_path"
22342  fi
22343
22344
22345  # Now try to locate executable using which
22346  new_path=`$WHICH "$new_path" 2> /dev/null`
22347
22348  if test "x$new_path" = x; then
22349    # Oops. Which didn't find the executable.
22350    # The splitting of arguments from the executable at a space might have been incorrect,
22351    # since paths with space are more likely in Windows. Give it another try with the whole
22352    # argument.
22353    path="$complete"
22354    arguments="EOL"
22355    new_path="$path"
22356
22357  windows_path="$new_path"
22358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22359    unix_path=`$CYGPATH -u "$windows_path"`
22360    new_path="$unix_path"
22361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22363    new_path="$unix_path"
22364  fi
22365
22366
22367    new_path=`$WHICH "$new_path" 2> /dev/null`
22368
22369    if test "x$new_path" = x; then
22370      # It's still not found. Now this is an unrecoverable error.
22371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22372$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22373      has_space=`$ECHO "$complete" | $GREP " "`
22374      if test "x$has_space" != x; then
22375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22377      fi
22378      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22379    fi
22380  fi
22381
22382  # Now new_path has a complete unix path to the binary
22383  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22384    # Keep paths in /bin as-is, but remove trailing .exe if any
22385    new_path="${new_path/%.exe/}"
22386    # Do not save /bin paths to all_fixpath_prefixes!
22387  else
22388    # Not in mixed or Windows style, start by that.
22389    new_path=`cmd //c echo $new_path`
22390
22391  input_path="$new_path"
22392  # Check if we need to convert this using DOS-style short mode. If the path
22393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22394  # take no chances and rewrite it.
22395  # Note: m4 eats our [], so we need to use [ and ] instead.
22396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22397  if test "x$has_forbidden_chars" != x; then
22398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22400  fi
22401
22402    # Output is in $new_path
22403
22404  windows_path="$new_path"
22405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22406    unix_path=`$CYGPATH -u "$windows_path"`
22407    new_path="$unix_path"
22408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22410    new_path="$unix_path"
22411  fi
22412
22413    # remove trailing .exe if any
22414    new_path="${new_path/%.exe/}"
22415
22416    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22417    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22418  fi
22419
22420  else
22421    # We're on a posix platform. Hooray! :)
22422    # First separate the path from the arguments. This will split at the first
22423    # space.
22424    complete="$MT"
22425    path="${complete%% *}"
22426    tmp="$complete EOL"
22427    arguments="${tmp#* }"
22428
22429    # Cannot rely on the command "which" here since it doesn't always work.
22430    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22431    if test -z "$is_absolute_path"; then
22432      # Path to executable is not absolute. Find it.
22433      IFS_save="$IFS"
22434      IFS=:
22435      for p in $PATH; do
22436        if test -f "$p/$path" && test -x "$p/$path"; then
22437          new_path="$p/$path"
22438          break
22439        fi
22440      done
22441      IFS="$IFS_save"
22442    else
22443      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22444$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22445      new_path="$path"
22446    fi
22447
22448    if test "x$new_path" = x; then
22449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22450$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22451        has_space=`$ECHO "$complete" | $GREP " "`
22452        if test "x$has_space" != x; then
22453          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22454$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22455        fi
22456        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22457      fi
22458  fi
22459
22460      # Now join together the path and the arguments once again
22461      if test "x$arguments" != xEOL; then
22462        new_complete="$new_path ${arguments% *}"
22463      else
22464        new_complete="$new_path"
22465      fi
22466
22467  if test "x$complete" != "x$new_complete"; then
22468      MT="$new_complete"
22469      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22470$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22471    fi
22472
22473    # The resource compiler
22474    # Extract the first word of "rc", so it can be a program name with args.
22475set dummy rc; ac_word=$2
22476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22477$as_echo_n "checking for $ac_word... " >&6; }
22478if test "${ac_cv_prog_RC+set}" = set; then :
22479  $as_echo_n "(cached) " >&6
22480else
22481  if test -n "$RC"; then
22482  ac_cv_prog_RC="$RC" # Let the user override the test.
22483else
22484  ac_prog_rejected=no
22485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22486for as_dir in $PATH
22487do
22488  IFS=$as_save_IFS
22489  test -z "$as_dir" && as_dir=.
22490    for ac_exec_ext in '' $ac_executable_extensions; do
22491  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22492    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22493       ac_prog_rejected=yes
22494       continue
22495     fi
22496    ac_cv_prog_RC="rc"
22497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22498    break 2
22499  fi
22500done
22501  done
22502IFS=$as_save_IFS
22503
22504if test $ac_prog_rejected = yes; then
22505  # We found a bogon in the path, so make sure we never use it.
22506  set dummy $ac_cv_prog_RC
22507  shift
22508  if test $# != 0; then
22509    # We chose a different compiler from the bogus one.
22510    # However, it has the same basename, so the bogon will be chosen
22511    # first if we set RC to just the basename; use the full file name.
22512    shift
22513    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22514  fi
22515fi
22516fi
22517fi
22518RC=$ac_cv_prog_RC
22519if test -n "$RC"; then
22520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22521$as_echo "$RC" >&6; }
22522else
22523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22524$as_echo "no" >&6; }
22525fi
22526
22527
22528
22529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22530
22531  # First separate the path from the arguments. This will split at the first
22532  # space.
22533  complete="$RC"
22534  path="${complete%% *}"
22535  tmp="$complete EOL"
22536  arguments="${tmp#* }"
22537
22538  # Input might be given as Windows format, start by converting to
22539  # unix format.
22540  new_path=`$CYGPATH -u "$path"`
22541
22542  # Now try to locate executable using which
22543  new_path=`$WHICH "$new_path" 2> /dev/null`
22544  # bat and cmd files are not always considered executable in cygwin causing which
22545  # to not find them
22546  if test "x$new_path" = x \
22547           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22548           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22549    new_path=`$CYGPATH -u "$path"`
22550  fi
22551  if test "x$new_path" = x; then
22552    # Oops. Which didn't find the executable.
22553    # The splitting of arguments from the executable at a space might have been incorrect,
22554    # since paths with space are more likely in Windows. Give it another try with the whole
22555    # argument.
22556    path="$complete"
22557    arguments="EOL"
22558    new_path=`$CYGPATH -u "$path"`
22559    new_path=`$WHICH "$new_path" 2> /dev/null`
22560    # bat and cmd files are not always considered executable in cygwin causing which
22561    # to not find them
22562    if test "x$new_path" = x \
22563             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22564             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22565      new_path=`$CYGPATH -u "$path"`
22566    fi
22567    if test "x$new_path" = x; then
22568      # It's still not found. Now this is an unrecoverable error.
22569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22570$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22571      has_space=`$ECHO "$complete" | $GREP " "`
22572      if test "x$has_space" != x; then
22573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22575      fi
22576      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22577    fi
22578  fi
22579
22580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22583  # "foo.exe" is OK but "foo" is an error.
22584  #
22585  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22586  # It is also a way to make sure we got the proper file name for the real test later on.
22587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22588  if test "x$test_shortpath" = x; then
22589    # Short path failed, file does not exist as specified.
22590    # Try adding .exe or .cmd
22591    if test -f "${new_path}.exe"; then
22592       input_to_shortpath="${new_path}.exe"
22593    elif test -f "${new_path}.cmd"; then
22594       input_to_shortpath="${new_path}.cmd"
22595    else
22596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22597$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22598      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22599$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22600      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22601    fi
22602  else
22603    input_to_shortpath="$new_path"
22604  fi
22605
22606  # Call helper function which possibly converts this using DOS-style short mode.
22607  # If so, the updated path is stored in $new_path.
22608  new_path="$input_to_shortpath"
22609
22610  input_path="$input_to_shortpath"
22611  # Check if we need to convert this using DOS-style short mode. If the path
22612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22613  # take no chances and rewrite it.
22614  # Note: m4 eats our [], so we need to use [ and ] instead.
22615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22616  if test "x$has_forbidden_chars" != x; then
22617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22621      # Going to short mode and back again did indeed matter. Since short mode is
22622      # case insensitive, let's make it lowercase to improve readability.
22623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22624      # Now convert it back to Unix-stile (cygpath)
22625      input_path=`$CYGPATH -u "$shortmode_path"`
22626      new_path="$input_path"
22627    fi
22628  fi
22629
22630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22631  if test "x$test_cygdrive_prefix" = x; then
22632    # As a simple fix, exclude /usr/bin since it's not a real path.
22633    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22635      # a path prefixed by /cygdrive for fixpath to work.
22636      new_path="$CYGWIN_ROOT_PATH$input_path"
22637    fi
22638  fi
22639
22640  # remove trailing .exe if any
22641  new_path="${new_path/%.exe/}"
22642
22643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22644
22645  # First separate the path from the arguments. This will split at the first
22646  # space.
22647  complete="$RC"
22648  path="${complete%% *}"
22649  tmp="$complete EOL"
22650  arguments="${tmp#* }"
22651
22652  # Input might be given as Windows format, start by converting to
22653  # unix format.
22654  new_path="$path"
22655
22656  windows_path="$new_path"
22657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22658    unix_path=`$CYGPATH -u "$windows_path"`
22659    new_path="$unix_path"
22660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22662    new_path="$unix_path"
22663  fi
22664
22665
22666  # Now try to locate executable using which
22667  new_path=`$WHICH "$new_path" 2> /dev/null`
22668
22669  if test "x$new_path" = x; then
22670    # Oops. Which didn't find the executable.
22671    # The splitting of arguments from the executable at a space might have been incorrect,
22672    # since paths with space are more likely in Windows. Give it another try with the whole
22673    # argument.
22674    path="$complete"
22675    arguments="EOL"
22676    new_path="$path"
22677
22678  windows_path="$new_path"
22679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22680    unix_path=`$CYGPATH -u "$windows_path"`
22681    new_path="$unix_path"
22682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22684    new_path="$unix_path"
22685  fi
22686
22687
22688    new_path=`$WHICH "$new_path" 2> /dev/null`
22689
22690    if test "x$new_path" = x; then
22691      # It's still not found. Now this is an unrecoverable error.
22692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22693$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22694      has_space=`$ECHO "$complete" | $GREP " "`
22695      if test "x$has_space" != x; then
22696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22698      fi
22699      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22700    fi
22701  fi
22702
22703  # Now new_path has a complete unix path to the binary
22704  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22705    # Keep paths in /bin as-is, but remove trailing .exe if any
22706    new_path="${new_path/%.exe/}"
22707    # Do not save /bin paths to all_fixpath_prefixes!
22708  else
22709    # Not in mixed or Windows style, start by that.
22710    new_path=`cmd //c echo $new_path`
22711
22712  input_path="$new_path"
22713  # Check if we need to convert this using DOS-style short mode. If the path
22714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22715  # take no chances and rewrite it.
22716  # Note: m4 eats our [], so we need to use [ and ] instead.
22717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22718  if test "x$has_forbidden_chars" != x; then
22719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22721  fi
22722
22723    # Output is in $new_path
22724
22725  windows_path="$new_path"
22726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22727    unix_path=`$CYGPATH -u "$windows_path"`
22728    new_path="$unix_path"
22729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22731    new_path="$unix_path"
22732  fi
22733
22734    # remove trailing .exe if any
22735    new_path="${new_path/%.exe/}"
22736
22737    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22738    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22739  fi
22740
22741  else
22742    # We're on a posix platform. Hooray! :)
22743    # First separate the path from the arguments. This will split at the first
22744    # space.
22745    complete="$RC"
22746    path="${complete%% *}"
22747    tmp="$complete EOL"
22748    arguments="${tmp#* }"
22749
22750    # Cannot rely on the command "which" here since it doesn't always work.
22751    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22752    if test -z "$is_absolute_path"; then
22753      # Path to executable is not absolute. Find it.
22754      IFS_save="$IFS"
22755      IFS=:
22756      for p in $PATH; do
22757        if test -f "$p/$path" && test -x "$p/$path"; then
22758          new_path="$p/$path"
22759          break
22760        fi
22761      done
22762      IFS="$IFS_save"
22763    else
22764      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22765$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22766      new_path="$path"
22767    fi
22768
22769    if test "x$new_path" = x; then
22770        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22771$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22772        has_space=`$ECHO "$complete" | $GREP " "`
22773        if test "x$has_space" != x; then
22774          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22775$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22776        fi
22777        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22778      fi
22779  fi
22780
22781      # Now join together the path and the arguments once again
22782      if test "x$arguments" != xEOL; then
22783        new_complete="$new_path ${arguments% *}"
22784      else
22785        new_complete="$new_path"
22786      fi
22787
22788  if test "x$complete" != "x$new_complete"; then
22789      RC="$new_complete"
22790      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22791$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22792    fi
22793
22794
22795    # For hotspot, we need these in Windows mixed path,
22796    # so rewrite them all. Need added .exe suffix.
22797    HOTSPOT_CXX="$CXX.exe"
22798    HOTSPOT_LD="$LD.exe"
22799    HOTSPOT_MT="$MT.exe"
22800    HOTSPOT_RC="$RC.exe"
22801
22802  unix_path="$HOTSPOT_CXX"
22803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22804    windows_path=`$CYGPATH -m "$unix_path"`
22805    HOTSPOT_CXX="$windows_path"
22806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22807    windows_path=`cmd //c echo $unix_path`
22808    HOTSPOT_CXX="$windows_path"
22809  fi
22810
22811
22812  unix_path="$HOTSPOT_LD"
22813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22814    windows_path=`$CYGPATH -m "$unix_path"`
22815    HOTSPOT_LD="$windows_path"
22816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22817    windows_path=`cmd //c echo $unix_path`
22818    HOTSPOT_LD="$windows_path"
22819  fi
22820
22821
22822  unix_path="$HOTSPOT_MT"
22823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22824    windows_path=`$CYGPATH -m "$unix_path"`
22825    HOTSPOT_MT="$windows_path"
22826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22827    windows_path=`cmd //c echo $unix_path`
22828    HOTSPOT_MT="$windows_path"
22829  fi
22830
22831
22832  unix_path="$HOTSPOT_RC"
22833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22834    windows_path=`$CYGPATH -m "$unix_path"`
22835    HOTSPOT_RC="$windows_path"
22836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22837    windows_path=`cmd //c echo $unix_path`
22838    HOTSPOT_RC="$windows_path"
22839  fi
22840
22841
22842
22843
22844    RC_FLAGS="-nologo -l 0x409 -r"
22845    if test "x$VARIANT" = xOPT; then :
22846
22847        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22848
22849fi
22850    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22851    if test "x$JDK_UPDATE_VERSION" = x; then :
22852
22853        JDK_UPDATE_VERSION_NOTNULL=0
22854
22855fi
22856    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22857    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22858    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22859    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22860    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22861    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22862    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22863
22864    # lib.exe is used to create static libraries.
22865    # Extract the first word of "lib", so it can be a program name with args.
22866set dummy lib; ac_word=$2
22867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22868$as_echo_n "checking for $ac_word... " >&6; }
22869if test "${ac_cv_prog_WINAR+set}" = set; then :
22870  $as_echo_n "(cached) " >&6
22871else
22872  if test -n "$WINAR"; then
22873  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22874else
22875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22876for as_dir in $PATH
22877do
22878  IFS=$as_save_IFS
22879  test -z "$as_dir" && as_dir=.
22880    for ac_exec_ext in '' $ac_executable_extensions; do
22881  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22882    ac_cv_prog_WINAR="lib"
22883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22884    break 2
22885  fi
22886done
22887  done
22888IFS=$as_save_IFS
22889
22890fi
22891fi
22892WINAR=$ac_cv_prog_WINAR
22893if test -n "$WINAR"; then
22894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22895$as_echo "$WINAR" >&6; }
22896else
22897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22898$as_echo "no" >&6; }
22899fi
22900
22901
22902
22903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22904
22905  # First separate the path from the arguments. This will split at the first
22906  # space.
22907  complete="$WINAR"
22908  path="${complete%% *}"
22909  tmp="$complete EOL"
22910  arguments="${tmp#* }"
22911
22912  # Input might be given as Windows format, start by converting to
22913  # unix format.
22914  new_path=`$CYGPATH -u "$path"`
22915
22916  # Now try to locate executable using which
22917  new_path=`$WHICH "$new_path" 2> /dev/null`
22918  # bat and cmd files are not always considered executable in cygwin causing which
22919  # to not find them
22920  if test "x$new_path" = x \
22921           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22922           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22923    new_path=`$CYGPATH -u "$path"`
22924  fi
22925  if test "x$new_path" = x; then
22926    # Oops. Which didn't find the executable.
22927    # The splitting of arguments from the executable at a space might have been incorrect,
22928    # since paths with space are more likely in Windows. Give it another try with the whole
22929    # argument.
22930    path="$complete"
22931    arguments="EOL"
22932    new_path=`$CYGPATH -u "$path"`
22933    new_path=`$WHICH "$new_path" 2> /dev/null`
22934    # bat and cmd files are not always considered executable in cygwin causing which
22935    # to not find them
22936    if test "x$new_path" = x \
22937             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22938             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22939      new_path=`$CYGPATH -u "$path"`
22940    fi
22941    if test "x$new_path" = x; then
22942      # It's still not found. Now this is an unrecoverable error.
22943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22944$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22945      has_space=`$ECHO "$complete" | $GREP " "`
22946      if test "x$has_space" != x; then
22947        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22948$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22949      fi
22950      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22951    fi
22952  fi
22953
22954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22957  # "foo.exe" is OK but "foo" is an error.
22958  #
22959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22960  # It is also a way to make sure we got the proper file name for the real test later on.
22961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22962  if test "x$test_shortpath" = x; then
22963    # Short path failed, file does not exist as specified.
22964    # Try adding .exe or .cmd
22965    if test -f "${new_path}.exe"; then
22966       input_to_shortpath="${new_path}.exe"
22967    elif test -f "${new_path}.cmd"; then
22968       input_to_shortpath="${new_path}.cmd"
22969    else
22970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22971$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22972      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22973$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22974      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22975    fi
22976  else
22977    input_to_shortpath="$new_path"
22978  fi
22979
22980  # Call helper function which possibly converts this using DOS-style short mode.
22981  # If so, the updated path is stored in $new_path.
22982  new_path="$input_to_shortpath"
22983
22984  input_path="$input_to_shortpath"
22985  # Check if we need to convert this using DOS-style short mode. If the path
22986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22987  # take no chances and rewrite it.
22988  # Note: m4 eats our [], so we need to use [ and ] instead.
22989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22990  if test "x$has_forbidden_chars" != x; then
22991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22995      # Going to short mode and back again did indeed matter. Since short mode is
22996      # case insensitive, let's make it lowercase to improve readability.
22997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22998      # Now convert it back to Unix-stile (cygpath)
22999      input_path=`$CYGPATH -u "$shortmode_path"`
23000      new_path="$input_path"
23001    fi
23002  fi
23003
23004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23005  if test "x$test_cygdrive_prefix" = x; then
23006    # As a simple fix, exclude /usr/bin since it's not a real path.
23007    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23009      # a path prefixed by /cygdrive for fixpath to work.
23010      new_path="$CYGWIN_ROOT_PATH$input_path"
23011    fi
23012  fi
23013
23014  # remove trailing .exe if any
23015  new_path="${new_path/%.exe/}"
23016
23017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23018
23019  # First separate the path from the arguments. This will split at the first
23020  # space.
23021  complete="$WINAR"
23022  path="${complete%% *}"
23023  tmp="$complete EOL"
23024  arguments="${tmp#* }"
23025
23026  # Input might be given as Windows format, start by converting to
23027  # unix format.
23028  new_path="$path"
23029
23030  windows_path="$new_path"
23031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23032    unix_path=`$CYGPATH -u "$windows_path"`
23033    new_path="$unix_path"
23034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23036    new_path="$unix_path"
23037  fi
23038
23039
23040  # Now try to locate executable using which
23041  new_path=`$WHICH "$new_path" 2> /dev/null`
23042
23043  if test "x$new_path" = x; then
23044    # Oops. Which didn't find the executable.
23045    # The splitting of arguments from the executable at a space might have been incorrect,
23046    # since paths with space are more likely in Windows. Give it another try with the whole
23047    # argument.
23048    path="$complete"
23049    arguments="EOL"
23050    new_path="$path"
23051
23052  windows_path="$new_path"
23053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23054    unix_path=`$CYGPATH -u "$windows_path"`
23055    new_path="$unix_path"
23056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23058    new_path="$unix_path"
23059  fi
23060
23061
23062    new_path=`$WHICH "$new_path" 2> /dev/null`
23063
23064    if test "x$new_path" = x; then
23065      # It's still not found. Now this is an unrecoverable error.
23066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23067$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23068      has_space=`$ECHO "$complete" | $GREP " "`
23069      if test "x$has_space" != x; then
23070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23072      fi
23073      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23074    fi
23075  fi
23076
23077  # Now new_path has a complete unix path to the binary
23078  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23079    # Keep paths in /bin as-is, but remove trailing .exe if any
23080    new_path="${new_path/%.exe/}"
23081    # Do not save /bin paths to all_fixpath_prefixes!
23082  else
23083    # Not in mixed or Windows style, start by that.
23084    new_path=`cmd //c echo $new_path`
23085
23086  input_path="$new_path"
23087  # Check if we need to convert this using DOS-style short mode. If the path
23088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23089  # take no chances and rewrite it.
23090  # Note: m4 eats our [], so we need to use [ and ] instead.
23091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23092  if test "x$has_forbidden_chars" != x; then
23093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23095  fi
23096
23097    # Output is in $new_path
23098
23099  windows_path="$new_path"
23100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23101    unix_path=`$CYGPATH -u "$windows_path"`
23102    new_path="$unix_path"
23103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23105    new_path="$unix_path"
23106  fi
23107
23108    # remove trailing .exe if any
23109    new_path="${new_path/%.exe/}"
23110
23111    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23112    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23113  fi
23114
23115  else
23116    # We're on a posix platform. Hooray! :)
23117    # First separate the path from the arguments. This will split at the first
23118    # space.
23119    complete="$WINAR"
23120    path="${complete%% *}"
23121    tmp="$complete EOL"
23122    arguments="${tmp#* }"
23123
23124    # Cannot rely on the command "which" here since it doesn't always work.
23125    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23126    if test -z "$is_absolute_path"; then
23127      # Path to executable is not absolute. Find it.
23128      IFS_save="$IFS"
23129      IFS=:
23130      for p in $PATH; do
23131        if test -f "$p/$path" && test -x "$p/$path"; then
23132          new_path="$p/$path"
23133          break
23134        fi
23135      done
23136      IFS="$IFS_save"
23137    else
23138      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23139$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23140      new_path="$path"
23141    fi
23142
23143    if test "x$new_path" = x; then
23144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23145$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23146        has_space=`$ECHO "$complete" | $GREP " "`
23147        if test "x$has_space" != x; then
23148          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23149$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23150        fi
23151        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23152      fi
23153  fi
23154
23155      # Now join together the path and the arguments once again
23156      if test "x$arguments" != xEOL; then
23157        new_complete="$new_path ${arguments% *}"
23158      else
23159        new_complete="$new_path"
23160      fi
23161
23162  if test "x$complete" != "x$new_complete"; then
23163      WINAR="$new_complete"
23164      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23165$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23166    fi
23167
23168    AR="$WINAR"
23169    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23170
23171    # Extract the first word of "dumpbin", so it can be a program name with args.
23172set dummy dumpbin; ac_word=$2
23173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23174$as_echo_n "checking for $ac_word... " >&6; }
23175if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23176  $as_echo_n "(cached) " >&6
23177else
23178  if test -n "$DUMPBIN"; then
23179  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23180else
23181as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23182for as_dir in $PATH
23183do
23184  IFS=$as_save_IFS
23185  test -z "$as_dir" && as_dir=.
23186    for ac_exec_ext in '' $ac_executable_extensions; do
23187  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23188    ac_cv_prog_DUMPBIN="dumpbin"
23189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23190    break 2
23191  fi
23192done
23193  done
23194IFS=$as_save_IFS
23195
23196fi
23197fi
23198DUMPBIN=$ac_cv_prog_DUMPBIN
23199if test -n "$DUMPBIN"; then
23200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23201$as_echo "$DUMPBIN" >&6; }
23202else
23203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23204$as_echo "no" >&6; }
23205fi
23206
23207
23208
23209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23210
23211  # First separate the path from the arguments. This will split at the first
23212  # space.
23213  complete="$DUMPBIN"
23214  path="${complete%% *}"
23215  tmp="$complete EOL"
23216  arguments="${tmp#* }"
23217
23218  # Input might be given as Windows format, start by converting to
23219  # unix format.
23220  new_path=`$CYGPATH -u "$path"`
23221
23222  # Now try to locate executable using which
23223  new_path=`$WHICH "$new_path" 2> /dev/null`
23224  # bat and cmd files are not always considered executable in cygwin causing which
23225  # to not find them
23226  if test "x$new_path" = x \
23227           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23228           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23229    new_path=`$CYGPATH -u "$path"`
23230  fi
23231  if test "x$new_path" = x; then
23232    # Oops. Which didn't find the executable.
23233    # The splitting of arguments from the executable at a space might have been incorrect,
23234    # since paths with space are more likely in Windows. Give it another try with the whole
23235    # argument.
23236    path="$complete"
23237    arguments="EOL"
23238    new_path=`$CYGPATH -u "$path"`
23239    new_path=`$WHICH "$new_path" 2> /dev/null`
23240    # bat and cmd files are not always considered executable in cygwin causing which
23241    # to not find them
23242    if test "x$new_path" = x \
23243             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23244             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23245      new_path=`$CYGPATH -u "$path"`
23246    fi
23247    if test "x$new_path" = x; then
23248      # It's still not found. Now this is an unrecoverable error.
23249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23250$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23251      has_space=`$ECHO "$complete" | $GREP " "`
23252      if test "x$has_space" != x; then
23253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23255      fi
23256      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23257    fi
23258  fi
23259
23260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23263  # "foo.exe" is OK but "foo" is an error.
23264  #
23265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23266  # It is also a way to make sure we got the proper file name for the real test later on.
23267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23268  if test "x$test_shortpath" = x; then
23269    # Short path failed, file does not exist as specified.
23270    # Try adding .exe or .cmd
23271    if test -f "${new_path}.exe"; then
23272       input_to_shortpath="${new_path}.exe"
23273    elif test -f "${new_path}.cmd"; then
23274       input_to_shortpath="${new_path}.cmd"
23275    else
23276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23277$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23278      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23279$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23280      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23281    fi
23282  else
23283    input_to_shortpath="$new_path"
23284  fi
23285
23286  # Call helper function which possibly converts this using DOS-style short mode.
23287  # If so, the updated path is stored in $new_path.
23288  new_path="$input_to_shortpath"
23289
23290  input_path="$input_to_shortpath"
23291  # Check if we need to convert this using DOS-style short mode. If the path
23292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23293  # take no chances and rewrite it.
23294  # Note: m4 eats our [], so we need to use [ and ] instead.
23295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23296  if test "x$has_forbidden_chars" != x; then
23297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23301      # Going to short mode and back again did indeed matter. Since short mode is
23302      # case insensitive, let's make it lowercase to improve readability.
23303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23304      # Now convert it back to Unix-stile (cygpath)
23305      input_path=`$CYGPATH -u "$shortmode_path"`
23306      new_path="$input_path"
23307    fi
23308  fi
23309
23310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23311  if test "x$test_cygdrive_prefix" = x; then
23312    # As a simple fix, exclude /usr/bin since it's not a real path.
23313    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23315      # a path prefixed by /cygdrive for fixpath to work.
23316      new_path="$CYGWIN_ROOT_PATH$input_path"
23317    fi
23318  fi
23319
23320  # remove trailing .exe if any
23321  new_path="${new_path/%.exe/}"
23322
23323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23324
23325  # First separate the path from the arguments. This will split at the first
23326  # space.
23327  complete="$DUMPBIN"
23328  path="${complete%% *}"
23329  tmp="$complete EOL"
23330  arguments="${tmp#* }"
23331
23332  # Input might be given as Windows format, start by converting to
23333  # unix format.
23334  new_path="$path"
23335
23336  windows_path="$new_path"
23337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23338    unix_path=`$CYGPATH -u "$windows_path"`
23339    new_path="$unix_path"
23340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23342    new_path="$unix_path"
23343  fi
23344
23345
23346  # Now try to locate executable using which
23347  new_path=`$WHICH "$new_path" 2> /dev/null`
23348
23349  if test "x$new_path" = x; then
23350    # Oops. Which didn't find the executable.
23351    # The splitting of arguments from the executable at a space might have been incorrect,
23352    # since paths with space are more likely in Windows. Give it another try with the whole
23353    # argument.
23354    path="$complete"
23355    arguments="EOL"
23356    new_path="$path"
23357
23358  windows_path="$new_path"
23359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23360    unix_path=`$CYGPATH -u "$windows_path"`
23361    new_path="$unix_path"
23362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23364    new_path="$unix_path"
23365  fi
23366
23367
23368    new_path=`$WHICH "$new_path" 2> /dev/null`
23369
23370    if test "x$new_path" = x; then
23371      # It's still not found. Now this is an unrecoverable error.
23372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23373$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23374      has_space=`$ECHO "$complete" | $GREP " "`
23375      if test "x$has_space" != x; then
23376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23378      fi
23379      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23380    fi
23381  fi
23382
23383  # Now new_path has a complete unix path to the binary
23384  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23385    # Keep paths in /bin as-is, but remove trailing .exe if any
23386    new_path="${new_path/%.exe/}"
23387    # Do not save /bin paths to all_fixpath_prefixes!
23388  else
23389    # Not in mixed or Windows style, start by that.
23390    new_path=`cmd //c echo $new_path`
23391
23392  input_path="$new_path"
23393  # Check if we need to convert this using DOS-style short mode. If the path
23394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23395  # take no chances and rewrite it.
23396  # Note: m4 eats our [], so we need to use [ and ] instead.
23397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23398  if test "x$has_forbidden_chars" != x; then
23399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23401  fi
23402
23403    # Output is in $new_path
23404
23405  windows_path="$new_path"
23406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23407    unix_path=`$CYGPATH -u "$windows_path"`
23408    new_path="$unix_path"
23409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23411    new_path="$unix_path"
23412  fi
23413
23414    # remove trailing .exe if any
23415    new_path="${new_path/%.exe/}"
23416
23417    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23418    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23419  fi
23420
23421  else
23422    # We're on a posix platform. Hooray! :)
23423    # First separate the path from the arguments. This will split at the first
23424    # space.
23425    complete="$DUMPBIN"
23426    path="${complete%% *}"
23427    tmp="$complete EOL"
23428    arguments="${tmp#* }"
23429
23430    # Cannot rely on the command "which" here since it doesn't always work.
23431    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23432    if test -z "$is_absolute_path"; then
23433      # Path to executable is not absolute. Find it.
23434      IFS_save="$IFS"
23435      IFS=:
23436      for p in $PATH; do
23437        if test -f "$p/$path" && test -x "$p/$path"; then
23438          new_path="$p/$path"
23439          break
23440        fi
23441      done
23442      IFS="$IFS_save"
23443    else
23444      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23445$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23446      new_path="$path"
23447    fi
23448
23449    if test "x$new_path" = x; then
23450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23451$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23452        has_space=`$ECHO "$complete" | $GREP " "`
23453        if test "x$has_space" != x; then
23454          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23456        fi
23457        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23458      fi
23459  fi
23460
23461      # Now join together the path and the arguments once again
23462      if test "x$arguments" != xEOL; then
23463        new_complete="$new_path ${arguments% *}"
23464      else
23465        new_complete="$new_path"
23466      fi
23467
23468  if test "x$complete" != "x$new_complete"; then
23469      DUMPBIN="$new_complete"
23470      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23471$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23472    fi
23473
23474
23475    COMPILER_TYPE=CL
23476    CCXXFLAGS="$CCXXFLAGS -nologo"
23477
23478fi
23479
23480
23481
23482ac_ext=c
23483ac_cpp='$CPP $CPPFLAGS'
23484ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23485ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23486ac_compiler_gnu=$ac_cv_c_compiler_gnu
23487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23488$as_echo_n "checking how to run the C preprocessor... " >&6; }
23489# On Suns, sometimes $CPP names a directory.
23490if test -n "$CPP" && test -d "$CPP"; then
23491  CPP=
23492fi
23493if test -z "$CPP"; then
23494  if test "${ac_cv_prog_CPP+set}" = set; then :
23495  $as_echo_n "(cached) " >&6
23496else
23497      # Double quotes because CPP needs to be expanded
23498    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23499    do
23500      ac_preproc_ok=false
23501for ac_c_preproc_warn_flag in '' yes
23502do
23503  # Use a header file that comes with gcc, so configuring glibc
23504  # with a fresh cross-compiler works.
23505  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23506  # <limits.h> exists even on freestanding compilers.
23507  # On the NeXT, cc -E runs the code through the compiler's parser,
23508  # not just through cpp. "Syntax error" is here to catch this case.
23509  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23510/* end confdefs.h.  */
23511#ifdef __STDC__
23512# include <limits.h>
23513#else
23514# include <assert.h>
23515#endif
23516		     Syntax error
23517_ACEOF
23518if ac_fn_c_try_cpp "$LINENO"; then :
23519
23520else
23521  # Broken: fails on valid input.
23522continue
23523fi
23524rm -f conftest.err conftest.i conftest.$ac_ext
23525
23526  # OK, works on sane cases.  Now check whether nonexistent headers
23527  # can be detected and how.
23528  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23529/* end confdefs.h.  */
23530#include <ac_nonexistent.h>
23531_ACEOF
23532if ac_fn_c_try_cpp "$LINENO"; then :
23533  # Broken: success on invalid input.
23534continue
23535else
23536  # Passes both tests.
23537ac_preproc_ok=:
23538break
23539fi
23540rm -f conftest.err conftest.i conftest.$ac_ext
23541
23542done
23543# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23544rm -f conftest.i conftest.err conftest.$ac_ext
23545if $ac_preproc_ok; then :
23546  break
23547fi
23548
23549    done
23550    ac_cv_prog_CPP=$CPP
23551
23552fi
23553  CPP=$ac_cv_prog_CPP
23554else
23555  ac_cv_prog_CPP=$CPP
23556fi
23557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23558$as_echo "$CPP" >&6; }
23559ac_preproc_ok=false
23560for ac_c_preproc_warn_flag in '' yes
23561do
23562  # Use a header file that comes with gcc, so configuring glibc
23563  # with a fresh cross-compiler works.
23564  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23565  # <limits.h> exists even on freestanding compilers.
23566  # On the NeXT, cc -E runs the code through the compiler's parser,
23567  # not just through cpp. "Syntax error" is here to catch this case.
23568  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23569/* end confdefs.h.  */
23570#ifdef __STDC__
23571# include <limits.h>
23572#else
23573# include <assert.h>
23574#endif
23575		     Syntax error
23576_ACEOF
23577if ac_fn_c_try_cpp "$LINENO"; then :
23578
23579else
23580  # Broken: fails on valid input.
23581continue
23582fi
23583rm -f conftest.err conftest.i conftest.$ac_ext
23584
23585  # OK, works on sane cases.  Now check whether nonexistent headers
23586  # can be detected and how.
23587  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23588/* end confdefs.h.  */
23589#include <ac_nonexistent.h>
23590_ACEOF
23591if ac_fn_c_try_cpp "$LINENO"; then :
23592  # Broken: success on invalid input.
23593continue
23594else
23595  # Passes both tests.
23596ac_preproc_ok=:
23597break
23598fi
23599rm -f conftest.err conftest.i conftest.$ac_ext
23600
23601done
23602# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23603rm -f conftest.i conftest.err conftest.$ac_ext
23604if $ac_preproc_ok; then :
23605
23606else
23607  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23609as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23610See \`config.log' for more details" "$LINENO" 5 ; }
23611fi
23612
23613ac_ext=cpp
23614ac_cpp='$CXXCPP $CPPFLAGS'
23615ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23616ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23617ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23618
23619
23620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23621
23622  # First separate the path from the arguments. This will split at the first
23623  # space.
23624  complete="$CPP"
23625  path="${complete%% *}"
23626  tmp="$complete EOL"
23627  arguments="${tmp#* }"
23628
23629  # Input might be given as Windows format, start by converting to
23630  # unix format.
23631  new_path=`$CYGPATH -u "$path"`
23632
23633  # Now try to locate executable using which
23634  new_path=`$WHICH "$new_path" 2> /dev/null`
23635  # bat and cmd files are not always considered executable in cygwin causing which
23636  # to not find them
23637  if test "x$new_path" = x \
23638           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23639           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23640    new_path=`$CYGPATH -u "$path"`
23641  fi
23642  if test "x$new_path" = x; then
23643    # Oops. Which didn't find the executable.
23644    # The splitting of arguments from the executable at a space might have been incorrect,
23645    # since paths with space are more likely in Windows. Give it another try with the whole
23646    # argument.
23647    path="$complete"
23648    arguments="EOL"
23649    new_path=`$CYGPATH -u "$path"`
23650    new_path=`$WHICH "$new_path" 2> /dev/null`
23651    # bat and cmd files are not always considered executable in cygwin causing which
23652    # to not find them
23653    if test "x$new_path" = x \
23654             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23655             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23656      new_path=`$CYGPATH -u "$path"`
23657    fi
23658    if test "x$new_path" = x; then
23659      # It's still not found. Now this is an unrecoverable error.
23660      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23661$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23662      has_space=`$ECHO "$complete" | $GREP " "`
23663      if test "x$has_space" != x; then
23664        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23665$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23666      fi
23667      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23668    fi
23669  fi
23670
23671  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23672  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23673  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23674  # "foo.exe" is OK but "foo" is an error.
23675  #
23676  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23677  # It is also a way to make sure we got the proper file name for the real test later on.
23678  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23679  if test "x$test_shortpath" = x; then
23680    # Short path failed, file does not exist as specified.
23681    # Try adding .exe or .cmd
23682    if test -f "${new_path}.exe"; then
23683       input_to_shortpath="${new_path}.exe"
23684    elif test -f "${new_path}.cmd"; then
23685       input_to_shortpath="${new_path}.cmd"
23686    else
23687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23688$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23689      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23690$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23691      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23692    fi
23693  else
23694    input_to_shortpath="$new_path"
23695  fi
23696
23697  # Call helper function which possibly converts this using DOS-style short mode.
23698  # If so, the updated path is stored in $new_path.
23699  new_path="$input_to_shortpath"
23700
23701  input_path="$input_to_shortpath"
23702  # Check if we need to convert this using DOS-style short mode. If the path
23703  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23704  # take no chances and rewrite it.
23705  # Note: m4 eats our [], so we need to use [ and ] instead.
23706  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23707  if test "x$has_forbidden_chars" != x; then
23708    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23709    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23710    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23711    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23712      # Going to short mode and back again did indeed matter. Since short mode is
23713      # case insensitive, let's make it lowercase to improve readability.
23714      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23715      # Now convert it back to Unix-stile (cygpath)
23716      input_path=`$CYGPATH -u "$shortmode_path"`
23717      new_path="$input_path"
23718    fi
23719  fi
23720
23721  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23722  if test "x$test_cygdrive_prefix" = x; then
23723    # As a simple fix, exclude /usr/bin since it's not a real path.
23724    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23725      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23726      # a path prefixed by /cygdrive for fixpath to work.
23727      new_path="$CYGWIN_ROOT_PATH$input_path"
23728    fi
23729  fi
23730
23731  # remove trailing .exe if any
23732  new_path="${new_path/%.exe/}"
23733
23734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23735
23736  # First separate the path from the arguments. This will split at the first
23737  # space.
23738  complete="$CPP"
23739  path="${complete%% *}"
23740  tmp="$complete EOL"
23741  arguments="${tmp#* }"
23742
23743  # Input might be given as Windows format, start by converting to
23744  # unix format.
23745  new_path="$path"
23746
23747  windows_path="$new_path"
23748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23749    unix_path=`$CYGPATH -u "$windows_path"`
23750    new_path="$unix_path"
23751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23753    new_path="$unix_path"
23754  fi
23755
23756
23757  # Now try to locate executable using which
23758  new_path=`$WHICH "$new_path" 2> /dev/null`
23759
23760  if test "x$new_path" = x; then
23761    # Oops. Which didn't find the executable.
23762    # The splitting of arguments from the executable at a space might have been incorrect,
23763    # since paths with space are more likely in Windows. Give it another try with the whole
23764    # argument.
23765    path="$complete"
23766    arguments="EOL"
23767    new_path="$path"
23768
23769  windows_path="$new_path"
23770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23771    unix_path=`$CYGPATH -u "$windows_path"`
23772    new_path="$unix_path"
23773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23775    new_path="$unix_path"
23776  fi
23777
23778
23779    new_path=`$WHICH "$new_path" 2> /dev/null`
23780
23781    if test "x$new_path" = x; then
23782      # It's still not found. Now this is an unrecoverable error.
23783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23784$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23785      has_space=`$ECHO "$complete" | $GREP " "`
23786      if test "x$has_space" != x; then
23787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23789      fi
23790      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23791    fi
23792  fi
23793
23794  # Now new_path has a complete unix path to the binary
23795  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23796    # Keep paths in /bin as-is, but remove trailing .exe if any
23797    new_path="${new_path/%.exe/}"
23798    # Do not save /bin paths to all_fixpath_prefixes!
23799  else
23800    # Not in mixed or Windows style, start by that.
23801    new_path=`cmd //c echo $new_path`
23802
23803  input_path="$new_path"
23804  # Check if we need to convert this using DOS-style short mode. If the path
23805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23806  # take no chances and rewrite it.
23807  # Note: m4 eats our [], so we need to use [ and ] instead.
23808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23809  if test "x$has_forbidden_chars" != x; then
23810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23812  fi
23813
23814    # Output is in $new_path
23815
23816  windows_path="$new_path"
23817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23818    unix_path=`$CYGPATH -u "$windows_path"`
23819    new_path="$unix_path"
23820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23822    new_path="$unix_path"
23823  fi
23824
23825    # remove trailing .exe if any
23826    new_path="${new_path/%.exe/}"
23827
23828    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23829    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23830  fi
23831
23832  else
23833    # We're on a posix platform. Hooray! :)
23834    # First separate the path from the arguments. This will split at the first
23835    # space.
23836    complete="$CPP"
23837    path="${complete%% *}"
23838    tmp="$complete EOL"
23839    arguments="${tmp#* }"
23840
23841    # Cannot rely on the command "which" here since it doesn't always work.
23842    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23843    if test -z "$is_absolute_path"; then
23844      # Path to executable is not absolute. Find it.
23845      IFS_save="$IFS"
23846      IFS=:
23847      for p in $PATH; do
23848        if test -f "$p/$path" && test -x "$p/$path"; then
23849          new_path="$p/$path"
23850          break
23851        fi
23852      done
23853      IFS="$IFS_save"
23854    else
23855      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23856$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23857      new_path="$path"
23858    fi
23859
23860    if test "x$new_path" = x; then
23861        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23862$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23863        has_space=`$ECHO "$complete" | $GREP " "`
23864        if test "x$has_space" != x; then
23865          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23866$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23867        fi
23868        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23869      fi
23870  fi
23871
23872      # Now join together the path and the arguments once again
23873      if test "x$arguments" != xEOL; then
23874        new_complete="$new_path ${arguments% *}"
23875      else
23876        new_complete="$new_path"
23877      fi
23878
23879  if test "x$complete" != "x$new_complete"; then
23880      CPP="$new_complete"
23881      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23882$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23883    fi
23884
23885
23886ac_ext=cpp
23887ac_cpp='$CXXCPP $CPPFLAGS'
23888ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23889ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23890ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23892$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23893if test -z "$CXXCPP"; then
23894  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23895  $as_echo_n "(cached) " >&6
23896else
23897      # Double quotes because CXXCPP needs to be expanded
23898    for CXXCPP in "$CXX -E" "/lib/cpp"
23899    do
23900      ac_preproc_ok=false
23901for ac_cxx_preproc_warn_flag in '' yes
23902do
23903  # Use a header file that comes with gcc, so configuring glibc
23904  # with a fresh cross-compiler works.
23905  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23906  # <limits.h> exists even on freestanding compilers.
23907  # On the NeXT, cc -E runs the code through the compiler's parser,
23908  # not just through cpp. "Syntax error" is here to catch this case.
23909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23910/* end confdefs.h.  */
23911#ifdef __STDC__
23912# include <limits.h>
23913#else
23914# include <assert.h>
23915#endif
23916		     Syntax error
23917_ACEOF
23918if ac_fn_cxx_try_cpp "$LINENO"; then :
23919
23920else
23921  # Broken: fails on valid input.
23922continue
23923fi
23924rm -f conftest.err conftest.i conftest.$ac_ext
23925
23926  # OK, works on sane cases.  Now check whether nonexistent headers
23927  # can be detected and how.
23928  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23929/* end confdefs.h.  */
23930#include <ac_nonexistent.h>
23931_ACEOF
23932if ac_fn_cxx_try_cpp "$LINENO"; then :
23933  # Broken: success on invalid input.
23934continue
23935else
23936  # Passes both tests.
23937ac_preproc_ok=:
23938break
23939fi
23940rm -f conftest.err conftest.i conftest.$ac_ext
23941
23942done
23943# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23944rm -f conftest.i conftest.err conftest.$ac_ext
23945if $ac_preproc_ok; then :
23946  break
23947fi
23948
23949    done
23950    ac_cv_prog_CXXCPP=$CXXCPP
23951
23952fi
23953  CXXCPP=$ac_cv_prog_CXXCPP
23954else
23955  ac_cv_prog_CXXCPP=$CXXCPP
23956fi
23957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23958$as_echo "$CXXCPP" >&6; }
23959ac_preproc_ok=false
23960for ac_cxx_preproc_warn_flag in '' yes
23961do
23962  # Use a header file that comes with gcc, so configuring glibc
23963  # with a fresh cross-compiler works.
23964  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23965  # <limits.h> exists even on freestanding compilers.
23966  # On the NeXT, cc -E runs the code through the compiler's parser,
23967  # not just through cpp. "Syntax error" is here to catch this case.
23968  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23969/* end confdefs.h.  */
23970#ifdef __STDC__
23971# include <limits.h>
23972#else
23973# include <assert.h>
23974#endif
23975		     Syntax error
23976_ACEOF
23977if ac_fn_cxx_try_cpp "$LINENO"; then :
23978
23979else
23980  # Broken: fails on valid input.
23981continue
23982fi
23983rm -f conftest.err conftest.i conftest.$ac_ext
23984
23985  # OK, works on sane cases.  Now check whether nonexistent headers
23986  # can be detected and how.
23987  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23988/* end confdefs.h.  */
23989#include <ac_nonexistent.h>
23990_ACEOF
23991if ac_fn_cxx_try_cpp "$LINENO"; then :
23992  # Broken: success on invalid input.
23993continue
23994else
23995  # Passes both tests.
23996ac_preproc_ok=:
23997break
23998fi
23999rm -f conftest.err conftest.i conftest.$ac_ext
24000
24001done
24002# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24003rm -f conftest.i conftest.err conftest.$ac_ext
24004if $ac_preproc_ok; then :
24005
24006else
24007  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24009as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24010See \`config.log' for more details" "$LINENO" 5 ; }
24011fi
24012
24013ac_ext=cpp
24014ac_cpp='$CXXCPP $CPPFLAGS'
24015ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24016ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24017ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24018
24019
24020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24021
24022  # First separate the path from the arguments. This will split at the first
24023  # space.
24024  complete="$CXXCPP"
24025  path="${complete%% *}"
24026  tmp="$complete EOL"
24027  arguments="${tmp#* }"
24028
24029  # Input might be given as Windows format, start by converting to
24030  # unix format.
24031  new_path=`$CYGPATH -u "$path"`
24032
24033  # Now try to locate executable using which
24034  new_path=`$WHICH "$new_path" 2> /dev/null`
24035  # bat and cmd files are not always considered executable in cygwin causing which
24036  # to not find them
24037  if test "x$new_path" = x \
24038           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24039           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24040    new_path=`$CYGPATH -u "$path"`
24041  fi
24042  if test "x$new_path" = x; then
24043    # Oops. Which didn't find the executable.
24044    # The splitting of arguments from the executable at a space might have been incorrect,
24045    # since paths with space are more likely in Windows. Give it another try with the whole
24046    # argument.
24047    path="$complete"
24048    arguments="EOL"
24049    new_path=`$CYGPATH -u "$path"`
24050    new_path=`$WHICH "$new_path" 2> /dev/null`
24051    # bat and cmd files are not always considered executable in cygwin causing which
24052    # to not find them
24053    if test "x$new_path" = x \
24054             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24055             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24056      new_path=`$CYGPATH -u "$path"`
24057    fi
24058    if test "x$new_path" = x; then
24059      # It's still not found. Now this is an unrecoverable error.
24060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24061$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24062      has_space=`$ECHO "$complete" | $GREP " "`
24063      if test "x$has_space" != x; then
24064        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24065$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24066      fi
24067      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24068    fi
24069  fi
24070
24071  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24072  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24073  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24074  # "foo.exe" is OK but "foo" is an error.
24075  #
24076  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24077  # It is also a way to make sure we got the proper file name for the real test later on.
24078  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24079  if test "x$test_shortpath" = x; then
24080    # Short path failed, file does not exist as specified.
24081    # Try adding .exe or .cmd
24082    if test -f "${new_path}.exe"; then
24083       input_to_shortpath="${new_path}.exe"
24084    elif test -f "${new_path}.cmd"; then
24085       input_to_shortpath="${new_path}.cmd"
24086    else
24087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24088$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24089      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24090$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24091      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24092    fi
24093  else
24094    input_to_shortpath="$new_path"
24095  fi
24096
24097  # Call helper function which possibly converts this using DOS-style short mode.
24098  # If so, the updated path is stored in $new_path.
24099  new_path="$input_to_shortpath"
24100
24101  input_path="$input_to_shortpath"
24102  # Check if we need to convert this using DOS-style short mode. If the path
24103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24104  # take no chances and rewrite it.
24105  # Note: m4 eats our [], so we need to use [ and ] instead.
24106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24107  if test "x$has_forbidden_chars" != x; then
24108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24112      # Going to short mode and back again did indeed matter. Since short mode is
24113      # case insensitive, let's make it lowercase to improve readability.
24114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24115      # Now convert it back to Unix-stile (cygpath)
24116      input_path=`$CYGPATH -u "$shortmode_path"`
24117      new_path="$input_path"
24118    fi
24119  fi
24120
24121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24122  if test "x$test_cygdrive_prefix" = x; then
24123    # As a simple fix, exclude /usr/bin since it's not a real path.
24124    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24126      # a path prefixed by /cygdrive for fixpath to work.
24127      new_path="$CYGWIN_ROOT_PATH$input_path"
24128    fi
24129  fi
24130
24131  # remove trailing .exe if any
24132  new_path="${new_path/%.exe/}"
24133
24134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24135
24136  # First separate the path from the arguments. This will split at the first
24137  # space.
24138  complete="$CXXCPP"
24139  path="${complete%% *}"
24140  tmp="$complete EOL"
24141  arguments="${tmp#* }"
24142
24143  # Input might be given as Windows format, start by converting to
24144  # unix format.
24145  new_path="$path"
24146
24147  windows_path="$new_path"
24148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24149    unix_path=`$CYGPATH -u "$windows_path"`
24150    new_path="$unix_path"
24151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24153    new_path="$unix_path"
24154  fi
24155
24156
24157  # Now try to locate executable using which
24158  new_path=`$WHICH "$new_path" 2> /dev/null`
24159
24160  if test "x$new_path" = x; then
24161    # Oops. Which didn't find the executable.
24162    # The splitting of arguments from the executable at a space might have been incorrect,
24163    # since paths with space are more likely in Windows. Give it another try with the whole
24164    # argument.
24165    path="$complete"
24166    arguments="EOL"
24167    new_path="$path"
24168
24169  windows_path="$new_path"
24170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24171    unix_path=`$CYGPATH -u "$windows_path"`
24172    new_path="$unix_path"
24173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24175    new_path="$unix_path"
24176  fi
24177
24178
24179    new_path=`$WHICH "$new_path" 2> /dev/null`
24180
24181    if test "x$new_path" = x; then
24182      # It's still not found. Now this is an unrecoverable error.
24183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24184$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24185      has_space=`$ECHO "$complete" | $GREP " "`
24186      if test "x$has_space" != x; then
24187        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24188$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24189      fi
24190      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24191    fi
24192  fi
24193
24194  # Now new_path has a complete unix path to the binary
24195  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24196    # Keep paths in /bin as-is, but remove trailing .exe if any
24197    new_path="${new_path/%.exe/}"
24198    # Do not save /bin paths to all_fixpath_prefixes!
24199  else
24200    # Not in mixed or Windows style, start by that.
24201    new_path=`cmd //c echo $new_path`
24202
24203  input_path="$new_path"
24204  # Check if we need to convert this using DOS-style short mode. If the path
24205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24206  # take no chances and rewrite it.
24207  # Note: m4 eats our [], so we need to use [ and ] instead.
24208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24209  if test "x$has_forbidden_chars" != x; then
24210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24212  fi
24213
24214    # Output is in $new_path
24215
24216  windows_path="$new_path"
24217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24218    unix_path=`$CYGPATH -u "$windows_path"`
24219    new_path="$unix_path"
24220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24222    new_path="$unix_path"
24223  fi
24224
24225    # remove trailing .exe if any
24226    new_path="${new_path/%.exe/}"
24227
24228    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24229    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24230  fi
24231
24232  else
24233    # We're on a posix platform. Hooray! :)
24234    # First separate the path from the arguments. This will split at the first
24235    # space.
24236    complete="$CXXCPP"
24237    path="${complete%% *}"
24238    tmp="$complete EOL"
24239    arguments="${tmp#* }"
24240
24241    # Cannot rely on the command "which" here since it doesn't always work.
24242    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24243    if test -z "$is_absolute_path"; then
24244      # Path to executable is not absolute. Find it.
24245      IFS_save="$IFS"
24246      IFS=:
24247      for p in $PATH; do
24248        if test -f "$p/$path" && test -x "$p/$path"; then
24249          new_path="$p/$path"
24250          break
24251        fi
24252      done
24253      IFS="$IFS_save"
24254    else
24255      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24256$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24257      new_path="$path"
24258    fi
24259
24260    if test "x$new_path" = x; then
24261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24262$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24263        has_space=`$ECHO "$complete" | $GREP " "`
24264        if test "x$has_space" != x; then
24265          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24266$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24267        fi
24268        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24269      fi
24270  fi
24271
24272      # Now join together the path and the arguments once again
24273      if test "x$arguments" != xEOL; then
24274        new_complete="$new_path ${arguments% *}"
24275      else
24276        new_complete="$new_path"
24277      fi
24278
24279  if test "x$complete" != "x$new_complete"; then
24280      CXXCPP="$new_complete"
24281      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24282$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24283    fi
24284
24285
24286if test "x$COMPILE_TYPE" != "xcross"; then
24287    # If we are not cross compiling, use the same compilers for
24288    # building the build platform executables. The cross-compilation
24289    # case needed to be done earlier, but this can only be done after
24290    # the native tools have been localized.
24291    BUILD_CC="$CC"
24292    BUILD_CXX="$CXX"
24293    BUILD_LD="$LD"
24294fi
24295
24296# for solaris we really need solaris tools, and not gnu equivalent
24297#   these seems to normally reside in /usr/ccs/bin so add that to path before
24298#   starting to probe
24299#
24300#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24301#         so that it can be overriden --with-tools-dir
24302if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24303    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24304fi
24305
24306# Find the right assembler.
24307if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24308    # Extract the first word of "as", so it can be a program name with args.
24309set dummy as; ac_word=$2
24310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24311$as_echo_n "checking for $ac_word... " >&6; }
24312if test "${ac_cv_path_AS+set}" = set; then :
24313  $as_echo_n "(cached) " >&6
24314else
24315  case $AS in
24316  [\\/]* | ?:[\\/]*)
24317  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24318  ;;
24319  *)
24320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24321for as_dir in $PATH
24322do
24323  IFS=$as_save_IFS
24324  test -z "$as_dir" && as_dir=.
24325    for ac_exec_ext in '' $ac_executable_extensions; do
24326  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24327    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24329    break 2
24330  fi
24331done
24332  done
24333IFS=$as_save_IFS
24334
24335  ;;
24336esac
24337fi
24338AS=$ac_cv_path_AS
24339if test -n "$AS"; then
24340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24341$as_echo "$AS" >&6; }
24342else
24343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24344$as_echo "no" >&6; }
24345fi
24346
24347
24348
24349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24350
24351  # First separate the path from the arguments. This will split at the first
24352  # space.
24353  complete="$AS"
24354  path="${complete%% *}"
24355  tmp="$complete EOL"
24356  arguments="${tmp#* }"
24357
24358  # Input might be given as Windows format, start by converting to
24359  # unix format.
24360  new_path=`$CYGPATH -u "$path"`
24361
24362  # Now try to locate executable using which
24363  new_path=`$WHICH "$new_path" 2> /dev/null`
24364  # bat and cmd files are not always considered executable in cygwin causing which
24365  # to not find them
24366  if test "x$new_path" = x \
24367           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24368           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24369    new_path=`$CYGPATH -u "$path"`
24370  fi
24371  if test "x$new_path" = x; then
24372    # Oops. Which didn't find the executable.
24373    # The splitting of arguments from the executable at a space might have been incorrect,
24374    # since paths with space are more likely in Windows. Give it another try with the whole
24375    # argument.
24376    path="$complete"
24377    arguments="EOL"
24378    new_path=`$CYGPATH -u "$path"`
24379    new_path=`$WHICH "$new_path" 2> /dev/null`
24380    # bat and cmd files are not always considered executable in cygwin causing which
24381    # to not find them
24382    if test "x$new_path" = x \
24383             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24384             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24385      new_path=`$CYGPATH -u "$path"`
24386    fi
24387    if test "x$new_path" = x; then
24388      # It's still not found. Now this is an unrecoverable error.
24389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24390$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24391      has_space=`$ECHO "$complete" | $GREP " "`
24392      if test "x$has_space" != x; then
24393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24395      fi
24396      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24397    fi
24398  fi
24399
24400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24403  # "foo.exe" is OK but "foo" is an error.
24404  #
24405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24406  # It is also a way to make sure we got the proper file name for the real test later on.
24407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24408  if test "x$test_shortpath" = x; then
24409    # Short path failed, file does not exist as specified.
24410    # Try adding .exe or .cmd
24411    if test -f "${new_path}.exe"; then
24412       input_to_shortpath="${new_path}.exe"
24413    elif test -f "${new_path}.cmd"; then
24414       input_to_shortpath="${new_path}.cmd"
24415    else
24416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24417$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24418      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24419$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24420      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24421    fi
24422  else
24423    input_to_shortpath="$new_path"
24424  fi
24425
24426  # Call helper function which possibly converts this using DOS-style short mode.
24427  # If so, the updated path is stored in $new_path.
24428  new_path="$input_to_shortpath"
24429
24430  input_path="$input_to_shortpath"
24431  # Check if we need to convert this using DOS-style short mode. If the path
24432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24433  # take no chances and rewrite it.
24434  # Note: m4 eats our [], so we need to use [ and ] instead.
24435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24436  if test "x$has_forbidden_chars" != x; then
24437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24441      # Going to short mode and back again did indeed matter. Since short mode is
24442      # case insensitive, let's make it lowercase to improve readability.
24443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24444      # Now convert it back to Unix-stile (cygpath)
24445      input_path=`$CYGPATH -u "$shortmode_path"`
24446      new_path="$input_path"
24447    fi
24448  fi
24449
24450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24451  if test "x$test_cygdrive_prefix" = x; then
24452    # As a simple fix, exclude /usr/bin since it's not a real path.
24453    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24455      # a path prefixed by /cygdrive for fixpath to work.
24456      new_path="$CYGWIN_ROOT_PATH$input_path"
24457    fi
24458  fi
24459
24460  # remove trailing .exe if any
24461  new_path="${new_path/%.exe/}"
24462
24463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24464
24465  # First separate the path from the arguments. This will split at the first
24466  # space.
24467  complete="$AS"
24468  path="${complete%% *}"
24469  tmp="$complete EOL"
24470  arguments="${tmp#* }"
24471
24472  # Input might be given as Windows format, start by converting to
24473  # unix format.
24474  new_path="$path"
24475
24476  windows_path="$new_path"
24477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24478    unix_path=`$CYGPATH -u "$windows_path"`
24479    new_path="$unix_path"
24480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24482    new_path="$unix_path"
24483  fi
24484
24485
24486  # Now try to locate executable using which
24487  new_path=`$WHICH "$new_path" 2> /dev/null`
24488
24489  if test "x$new_path" = x; then
24490    # Oops. Which didn't find the executable.
24491    # The splitting of arguments from the executable at a space might have been incorrect,
24492    # since paths with space are more likely in Windows. Give it another try with the whole
24493    # argument.
24494    path="$complete"
24495    arguments="EOL"
24496    new_path="$path"
24497
24498  windows_path="$new_path"
24499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24500    unix_path=`$CYGPATH -u "$windows_path"`
24501    new_path="$unix_path"
24502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24504    new_path="$unix_path"
24505  fi
24506
24507
24508    new_path=`$WHICH "$new_path" 2> /dev/null`
24509
24510    if test "x$new_path" = x; then
24511      # It's still not found. Now this is an unrecoverable error.
24512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24513$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24514      has_space=`$ECHO "$complete" | $GREP " "`
24515      if test "x$has_space" != x; then
24516        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24517$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24518      fi
24519      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24520    fi
24521  fi
24522
24523  # Now new_path has a complete unix path to the binary
24524  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24525    # Keep paths in /bin as-is, but remove trailing .exe if any
24526    new_path="${new_path/%.exe/}"
24527    # Do not save /bin paths to all_fixpath_prefixes!
24528  else
24529    # Not in mixed or Windows style, start by that.
24530    new_path=`cmd //c echo $new_path`
24531
24532  input_path="$new_path"
24533  # Check if we need to convert this using DOS-style short mode. If the path
24534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24535  # take no chances and rewrite it.
24536  # Note: m4 eats our [], so we need to use [ and ] instead.
24537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24538  if test "x$has_forbidden_chars" != x; then
24539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24541  fi
24542
24543    # Output is in $new_path
24544
24545  windows_path="$new_path"
24546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24547    unix_path=`$CYGPATH -u "$windows_path"`
24548    new_path="$unix_path"
24549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24551    new_path="$unix_path"
24552  fi
24553
24554    # remove trailing .exe if any
24555    new_path="${new_path/%.exe/}"
24556
24557    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24558    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24559  fi
24560
24561  else
24562    # We're on a posix platform. Hooray! :)
24563    # First separate the path from the arguments. This will split at the first
24564    # space.
24565    complete="$AS"
24566    path="${complete%% *}"
24567    tmp="$complete EOL"
24568    arguments="${tmp#* }"
24569
24570    # Cannot rely on the command "which" here since it doesn't always work.
24571    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24572    if test -z "$is_absolute_path"; then
24573      # Path to executable is not absolute. Find it.
24574      IFS_save="$IFS"
24575      IFS=:
24576      for p in $PATH; do
24577        if test -f "$p/$path" && test -x "$p/$path"; then
24578          new_path="$p/$path"
24579          break
24580        fi
24581      done
24582      IFS="$IFS_save"
24583    else
24584      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24585$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24586      new_path="$path"
24587    fi
24588
24589    if test "x$new_path" = x; then
24590        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24591$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24592        has_space=`$ECHO "$complete" | $GREP " "`
24593        if test "x$has_space" != x; then
24594          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24595$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24596        fi
24597        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24598      fi
24599  fi
24600
24601      # Now join together the path and the arguments once again
24602      if test "x$arguments" != xEOL; then
24603        new_complete="$new_path ${arguments% *}"
24604      else
24605        new_complete="$new_path"
24606      fi
24607
24608  if test "x$complete" != "x$new_complete"; then
24609      AS="$new_complete"
24610      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24611$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24612    fi
24613
24614else
24615    AS="$CC -c"
24616fi
24617
24618
24619if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24620    for ac_prog in gnm nm
24621do
24622  # Extract the first word of "$ac_prog", so it can be a program name with args.
24623set dummy $ac_prog; ac_word=$2
24624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24625$as_echo_n "checking for $ac_word... " >&6; }
24626if test "${ac_cv_path_NM+set}" = set; then :
24627  $as_echo_n "(cached) " >&6
24628else
24629  case $NM in
24630  [\\/]* | ?:[\\/]*)
24631  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24632  ;;
24633  *)
24634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24635for as_dir in $PATH
24636do
24637  IFS=$as_save_IFS
24638  test -z "$as_dir" && as_dir=.
24639    for ac_exec_ext in '' $ac_executable_extensions; do
24640  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24641    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24643    break 2
24644  fi
24645done
24646  done
24647IFS=$as_save_IFS
24648
24649  ;;
24650esac
24651fi
24652NM=$ac_cv_path_NM
24653if test -n "$NM"; then
24654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24655$as_echo "$NM" >&6; }
24656else
24657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24658$as_echo "no" >&6; }
24659fi
24660
24661
24662  test -n "$NM" && break
24663done
24664
24665
24666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24667
24668  # First separate the path from the arguments. This will split at the first
24669  # space.
24670  complete="$NM"
24671  path="${complete%% *}"
24672  tmp="$complete EOL"
24673  arguments="${tmp#* }"
24674
24675  # Input might be given as Windows format, start by converting to
24676  # unix format.
24677  new_path=`$CYGPATH -u "$path"`
24678
24679  # Now try to locate executable using which
24680  new_path=`$WHICH "$new_path" 2> /dev/null`
24681  # bat and cmd files are not always considered executable in cygwin causing which
24682  # to not find them
24683  if test "x$new_path" = x \
24684           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24685           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24686    new_path=`$CYGPATH -u "$path"`
24687  fi
24688  if test "x$new_path" = x; then
24689    # Oops. Which didn't find the executable.
24690    # The splitting of arguments from the executable at a space might have been incorrect,
24691    # since paths with space are more likely in Windows. Give it another try with the whole
24692    # argument.
24693    path="$complete"
24694    arguments="EOL"
24695    new_path=`$CYGPATH -u "$path"`
24696    new_path=`$WHICH "$new_path" 2> /dev/null`
24697    # bat and cmd files are not always considered executable in cygwin causing which
24698    # to not find them
24699    if test "x$new_path" = x \
24700             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24701             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24702      new_path=`$CYGPATH -u "$path"`
24703    fi
24704    if test "x$new_path" = x; then
24705      # It's still not found. Now this is an unrecoverable error.
24706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24707$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24708      has_space=`$ECHO "$complete" | $GREP " "`
24709      if test "x$has_space" != x; then
24710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24712      fi
24713      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24714    fi
24715  fi
24716
24717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24720  # "foo.exe" is OK but "foo" is an error.
24721  #
24722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24723  # It is also a way to make sure we got the proper file name for the real test later on.
24724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24725  if test "x$test_shortpath" = x; then
24726    # Short path failed, file does not exist as specified.
24727    # Try adding .exe or .cmd
24728    if test -f "${new_path}.exe"; then
24729       input_to_shortpath="${new_path}.exe"
24730    elif test -f "${new_path}.cmd"; then
24731       input_to_shortpath="${new_path}.cmd"
24732    else
24733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24734$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24735      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24736$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24737      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24738    fi
24739  else
24740    input_to_shortpath="$new_path"
24741  fi
24742
24743  # Call helper function which possibly converts this using DOS-style short mode.
24744  # If so, the updated path is stored in $new_path.
24745  new_path="$input_to_shortpath"
24746
24747  input_path="$input_to_shortpath"
24748  # Check if we need to convert this using DOS-style short mode. If the path
24749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24750  # take no chances and rewrite it.
24751  # Note: m4 eats our [], so we need to use [ and ] instead.
24752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24753  if test "x$has_forbidden_chars" != x; then
24754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24758      # Going to short mode and back again did indeed matter. Since short mode is
24759      # case insensitive, let's make it lowercase to improve readability.
24760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24761      # Now convert it back to Unix-stile (cygpath)
24762      input_path=`$CYGPATH -u "$shortmode_path"`
24763      new_path="$input_path"
24764    fi
24765  fi
24766
24767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24768  if test "x$test_cygdrive_prefix" = x; then
24769    # As a simple fix, exclude /usr/bin since it's not a real path.
24770    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24772      # a path prefixed by /cygdrive for fixpath to work.
24773      new_path="$CYGWIN_ROOT_PATH$input_path"
24774    fi
24775  fi
24776
24777  # remove trailing .exe if any
24778  new_path="${new_path/%.exe/}"
24779
24780  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24781
24782  # First separate the path from the arguments. This will split at the first
24783  # space.
24784  complete="$NM"
24785  path="${complete%% *}"
24786  tmp="$complete EOL"
24787  arguments="${tmp#* }"
24788
24789  # Input might be given as Windows format, start by converting to
24790  # unix format.
24791  new_path="$path"
24792
24793  windows_path="$new_path"
24794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24795    unix_path=`$CYGPATH -u "$windows_path"`
24796    new_path="$unix_path"
24797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24799    new_path="$unix_path"
24800  fi
24801
24802
24803  # Now try to locate executable using which
24804  new_path=`$WHICH "$new_path" 2> /dev/null`
24805
24806  if test "x$new_path" = x; then
24807    # Oops. Which didn't find the executable.
24808    # The splitting of arguments from the executable at a space might have been incorrect,
24809    # since paths with space are more likely in Windows. Give it another try with the whole
24810    # argument.
24811    path="$complete"
24812    arguments="EOL"
24813    new_path="$path"
24814
24815  windows_path="$new_path"
24816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24817    unix_path=`$CYGPATH -u "$windows_path"`
24818    new_path="$unix_path"
24819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24821    new_path="$unix_path"
24822  fi
24823
24824
24825    new_path=`$WHICH "$new_path" 2> /dev/null`
24826
24827    if test "x$new_path" = x; then
24828      # It's still not found. Now this is an unrecoverable error.
24829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24830$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24831      has_space=`$ECHO "$complete" | $GREP " "`
24832      if test "x$has_space" != x; then
24833        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24834$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24835      fi
24836      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24837    fi
24838  fi
24839
24840  # Now new_path has a complete unix path to the binary
24841  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24842    # Keep paths in /bin as-is, but remove trailing .exe if any
24843    new_path="${new_path/%.exe/}"
24844    # Do not save /bin paths to all_fixpath_prefixes!
24845  else
24846    # Not in mixed or Windows style, start by that.
24847    new_path=`cmd //c echo $new_path`
24848
24849  input_path="$new_path"
24850  # Check if we need to convert this using DOS-style short mode. If the path
24851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24852  # take no chances and rewrite it.
24853  # Note: m4 eats our [], so we need to use [ and ] instead.
24854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24855  if test "x$has_forbidden_chars" != x; then
24856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24857    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24858  fi
24859
24860    # Output is in $new_path
24861
24862  windows_path="$new_path"
24863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24864    unix_path=`$CYGPATH -u "$windows_path"`
24865    new_path="$unix_path"
24866  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24867    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24868    new_path="$unix_path"
24869  fi
24870
24871    # remove trailing .exe if any
24872    new_path="${new_path/%.exe/}"
24873
24874    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24875    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24876  fi
24877
24878  else
24879    # We're on a posix platform. Hooray! :)
24880    # First separate the path from the arguments. This will split at the first
24881    # space.
24882    complete="$NM"
24883    path="${complete%% *}"
24884    tmp="$complete EOL"
24885    arguments="${tmp#* }"
24886
24887    # Cannot rely on the command "which" here since it doesn't always work.
24888    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24889    if test -z "$is_absolute_path"; then
24890      # Path to executable is not absolute. Find it.
24891      IFS_save="$IFS"
24892      IFS=:
24893      for p in $PATH; do
24894        if test -f "$p/$path" && test -x "$p/$path"; then
24895          new_path="$p/$path"
24896          break
24897        fi
24898      done
24899      IFS="$IFS_save"
24900    else
24901      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24902$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24903      new_path="$path"
24904    fi
24905
24906    if test "x$new_path" = x; then
24907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24908$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24909        has_space=`$ECHO "$complete" | $GREP " "`
24910        if test "x$has_space" != x; then
24911          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24913        fi
24914        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24915      fi
24916  fi
24917
24918      # Now join together the path and the arguments once again
24919      if test "x$arguments" != xEOL; then
24920        new_complete="$new_path ${arguments% *}"
24921      else
24922        new_complete="$new_path"
24923      fi
24924
24925  if test "x$complete" != "x$new_complete"; then
24926      NM="$new_complete"
24927      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24928$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24929    fi
24930
24931    # Extract the first word of "strip", so it can be a program name with args.
24932set dummy strip; ac_word=$2
24933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24934$as_echo_n "checking for $ac_word... " >&6; }
24935if test "${ac_cv_path_STRIP+set}" = set; then :
24936  $as_echo_n "(cached) " >&6
24937else
24938  case $STRIP in
24939  [\\/]* | ?:[\\/]*)
24940  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24941  ;;
24942  *)
24943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24944for as_dir in $PATH
24945do
24946  IFS=$as_save_IFS
24947  test -z "$as_dir" && as_dir=.
24948    for ac_exec_ext in '' $ac_executable_extensions; do
24949  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24950    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24952    break 2
24953  fi
24954done
24955  done
24956IFS=$as_save_IFS
24957
24958  ;;
24959esac
24960fi
24961STRIP=$ac_cv_path_STRIP
24962if test -n "$STRIP"; then
24963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24964$as_echo "$STRIP" >&6; }
24965else
24966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24967$as_echo "no" >&6; }
24968fi
24969
24970
24971
24972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24973
24974  # First separate the path from the arguments. This will split at the first
24975  # space.
24976  complete="$STRIP"
24977  path="${complete%% *}"
24978  tmp="$complete EOL"
24979  arguments="${tmp#* }"
24980
24981  # Input might be given as Windows format, start by converting to
24982  # unix format.
24983  new_path=`$CYGPATH -u "$path"`
24984
24985  # Now try to locate executable using which
24986  new_path=`$WHICH "$new_path" 2> /dev/null`
24987  # bat and cmd files are not always considered executable in cygwin causing which
24988  # to not find them
24989  if test "x$new_path" = x \
24990           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24991           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24992    new_path=`$CYGPATH -u "$path"`
24993  fi
24994  if test "x$new_path" = x; then
24995    # Oops. Which didn't find the executable.
24996    # The splitting of arguments from the executable at a space might have been incorrect,
24997    # since paths with space are more likely in Windows. Give it another try with the whole
24998    # argument.
24999    path="$complete"
25000    arguments="EOL"
25001    new_path=`$CYGPATH -u "$path"`
25002    new_path=`$WHICH "$new_path" 2> /dev/null`
25003    # bat and cmd files are not always considered executable in cygwin causing which
25004    # to not find them
25005    if test "x$new_path" = x \
25006             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25007             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25008      new_path=`$CYGPATH -u "$path"`
25009    fi
25010    if test "x$new_path" = x; then
25011      # It's still not found. Now this is an unrecoverable error.
25012      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25013$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25014      has_space=`$ECHO "$complete" | $GREP " "`
25015      if test "x$has_space" != x; then
25016        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25017$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25018      fi
25019      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25020    fi
25021  fi
25022
25023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25026  # "foo.exe" is OK but "foo" is an error.
25027  #
25028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25029  # It is also a way to make sure we got the proper file name for the real test later on.
25030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25031  if test "x$test_shortpath" = x; then
25032    # Short path failed, file does not exist as specified.
25033    # Try adding .exe or .cmd
25034    if test -f "${new_path}.exe"; then
25035       input_to_shortpath="${new_path}.exe"
25036    elif test -f "${new_path}.cmd"; then
25037       input_to_shortpath="${new_path}.cmd"
25038    else
25039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25040$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25041      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25042$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25043      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25044    fi
25045  else
25046    input_to_shortpath="$new_path"
25047  fi
25048
25049  # Call helper function which possibly converts this using DOS-style short mode.
25050  # If so, the updated path is stored in $new_path.
25051  new_path="$input_to_shortpath"
25052
25053  input_path="$input_to_shortpath"
25054  # Check if we need to convert this using DOS-style short mode. If the path
25055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25056  # take no chances and rewrite it.
25057  # Note: m4 eats our [], so we need to use [ and ] instead.
25058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25059  if test "x$has_forbidden_chars" != x; then
25060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25064      # Going to short mode and back again did indeed matter. Since short mode is
25065      # case insensitive, let's make it lowercase to improve readability.
25066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25067      # Now convert it back to Unix-stile (cygpath)
25068      input_path=`$CYGPATH -u "$shortmode_path"`
25069      new_path="$input_path"
25070    fi
25071  fi
25072
25073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25074  if test "x$test_cygdrive_prefix" = x; then
25075    # As a simple fix, exclude /usr/bin since it's not a real path.
25076    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25078      # a path prefixed by /cygdrive for fixpath to work.
25079      new_path="$CYGWIN_ROOT_PATH$input_path"
25080    fi
25081  fi
25082
25083  # remove trailing .exe if any
25084  new_path="${new_path/%.exe/}"
25085
25086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25087
25088  # First separate the path from the arguments. This will split at the first
25089  # space.
25090  complete="$STRIP"
25091  path="${complete%% *}"
25092  tmp="$complete EOL"
25093  arguments="${tmp#* }"
25094
25095  # Input might be given as Windows format, start by converting to
25096  # unix format.
25097  new_path="$path"
25098
25099  windows_path="$new_path"
25100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25101    unix_path=`$CYGPATH -u "$windows_path"`
25102    new_path="$unix_path"
25103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25105    new_path="$unix_path"
25106  fi
25107
25108
25109  # Now try to locate executable using which
25110  new_path=`$WHICH "$new_path" 2> /dev/null`
25111
25112  if test "x$new_path" = x; then
25113    # Oops. Which didn't find the executable.
25114    # The splitting of arguments from the executable at a space might have been incorrect,
25115    # since paths with space are more likely in Windows. Give it another try with the whole
25116    # argument.
25117    path="$complete"
25118    arguments="EOL"
25119    new_path="$path"
25120
25121  windows_path="$new_path"
25122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25123    unix_path=`$CYGPATH -u "$windows_path"`
25124    new_path="$unix_path"
25125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25127    new_path="$unix_path"
25128  fi
25129
25130
25131    new_path=`$WHICH "$new_path" 2> /dev/null`
25132
25133    if test "x$new_path" = x; then
25134      # It's still not found. Now this is an unrecoverable error.
25135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25136$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25137      has_space=`$ECHO "$complete" | $GREP " "`
25138      if test "x$has_space" != x; then
25139        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25140$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25141      fi
25142      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25143    fi
25144  fi
25145
25146  # Now new_path has a complete unix path to the binary
25147  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25148    # Keep paths in /bin as-is, but remove trailing .exe if any
25149    new_path="${new_path/%.exe/}"
25150    # Do not save /bin paths to all_fixpath_prefixes!
25151  else
25152    # Not in mixed or Windows style, start by that.
25153    new_path=`cmd //c echo $new_path`
25154
25155  input_path="$new_path"
25156  # Check if we need to convert this using DOS-style short mode. If the path
25157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25158  # take no chances and rewrite it.
25159  # Note: m4 eats our [], so we need to use [ and ] instead.
25160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25161  if test "x$has_forbidden_chars" != x; then
25162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25164  fi
25165
25166    # Output is in $new_path
25167
25168  windows_path="$new_path"
25169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25170    unix_path=`$CYGPATH -u "$windows_path"`
25171    new_path="$unix_path"
25172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25174    new_path="$unix_path"
25175  fi
25176
25177    # remove trailing .exe if any
25178    new_path="${new_path/%.exe/}"
25179
25180    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25181    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25182  fi
25183
25184  else
25185    # We're on a posix platform. Hooray! :)
25186    # First separate the path from the arguments. This will split at the first
25187    # space.
25188    complete="$STRIP"
25189    path="${complete%% *}"
25190    tmp="$complete EOL"
25191    arguments="${tmp#* }"
25192
25193    # Cannot rely on the command "which" here since it doesn't always work.
25194    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25195    if test -z "$is_absolute_path"; then
25196      # Path to executable is not absolute. Find it.
25197      IFS_save="$IFS"
25198      IFS=:
25199      for p in $PATH; do
25200        if test -f "$p/$path" && test -x "$p/$path"; then
25201          new_path="$p/$path"
25202          break
25203        fi
25204      done
25205      IFS="$IFS_save"
25206    else
25207      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25208$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25209      new_path="$path"
25210    fi
25211
25212    if test "x$new_path" = x; then
25213        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25214$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25215        has_space=`$ECHO "$complete" | $GREP " "`
25216        if test "x$has_space" != x; then
25217          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25218$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25219        fi
25220        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25221      fi
25222  fi
25223
25224      # Now join together the path and the arguments once again
25225      if test "x$arguments" != xEOL; then
25226        new_complete="$new_path ${arguments% *}"
25227      else
25228        new_complete="$new_path"
25229      fi
25230
25231  if test "x$complete" != "x$new_complete"; then
25232      STRIP="$new_complete"
25233      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25234$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25235    fi
25236
25237    # Extract the first word of "mcs", so it can be a program name with args.
25238set dummy mcs; ac_word=$2
25239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25240$as_echo_n "checking for $ac_word... " >&6; }
25241if test "${ac_cv_path_MCS+set}" = set; then :
25242  $as_echo_n "(cached) " >&6
25243else
25244  case $MCS in
25245  [\\/]* | ?:[\\/]*)
25246  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25247  ;;
25248  *)
25249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25250for as_dir in $PATH
25251do
25252  IFS=$as_save_IFS
25253  test -z "$as_dir" && as_dir=.
25254    for ac_exec_ext in '' $ac_executable_extensions; do
25255  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25256    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25258    break 2
25259  fi
25260done
25261  done
25262IFS=$as_save_IFS
25263
25264  ;;
25265esac
25266fi
25267MCS=$ac_cv_path_MCS
25268if test -n "$MCS"; then
25269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25270$as_echo "$MCS" >&6; }
25271else
25272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25273$as_echo "no" >&6; }
25274fi
25275
25276
25277
25278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25279
25280  # First separate the path from the arguments. This will split at the first
25281  # space.
25282  complete="$MCS"
25283  path="${complete%% *}"
25284  tmp="$complete EOL"
25285  arguments="${tmp#* }"
25286
25287  # Input might be given as Windows format, start by converting to
25288  # unix format.
25289  new_path=`$CYGPATH -u "$path"`
25290
25291  # Now try to locate executable using which
25292  new_path=`$WHICH "$new_path" 2> /dev/null`
25293  # bat and cmd files are not always considered executable in cygwin causing which
25294  # to not find them
25295  if test "x$new_path" = x \
25296           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25297           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25298    new_path=`$CYGPATH -u "$path"`
25299  fi
25300  if test "x$new_path" = x; then
25301    # Oops. Which didn't find the executable.
25302    # The splitting of arguments from the executable at a space might have been incorrect,
25303    # since paths with space are more likely in Windows. Give it another try with the whole
25304    # argument.
25305    path="$complete"
25306    arguments="EOL"
25307    new_path=`$CYGPATH -u "$path"`
25308    new_path=`$WHICH "$new_path" 2> /dev/null`
25309    # bat and cmd files are not always considered executable in cygwin causing which
25310    # to not find them
25311    if test "x$new_path" = x \
25312             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25313             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25314      new_path=`$CYGPATH -u "$path"`
25315    fi
25316    if test "x$new_path" = x; then
25317      # It's still not found. Now this is an unrecoverable error.
25318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25319$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25320      has_space=`$ECHO "$complete" | $GREP " "`
25321      if test "x$has_space" != x; then
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25324      fi
25325      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25326    fi
25327  fi
25328
25329  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25330  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25331  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25332  # "foo.exe" is OK but "foo" is an error.
25333  #
25334  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25335  # It is also a way to make sure we got the proper file name for the real test later on.
25336  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25337  if test "x$test_shortpath" = x; then
25338    # Short path failed, file does not exist as specified.
25339    # Try adding .exe or .cmd
25340    if test -f "${new_path}.exe"; then
25341       input_to_shortpath="${new_path}.exe"
25342    elif test -f "${new_path}.cmd"; then
25343       input_to_shortpath="${new_path}.cmd"
25344    else
25345      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25346$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25347      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25348$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25349      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25350    fi
25351  else
25352    input_to_shortpath="$new_path"
25353  fi
25354
25355  # Call helper function which possibly converts this using DOS-style short mode.
25356  # If so, the updated path is stored in $new_path.
25357  new_path="$input_to_shortpath"
25358
25359  input_path="$input_to_shortpath"
25360  # Check if we need to convert this using DOS-style short mode. If the path
25361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25362  # take no chances and rewrite it.
25363  # Note: m4 eats our [], so we need to use [ and ] instead.
25364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25365  if test "x$has_forbidden_chars" != x; then
25366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25367    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25368    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25369    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25370      # Going to short mode and back again did indeed matter. Since short mode is
25371      # case insensitive, let's make it lowercase to improve readability.
25372      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25373      # Now convert it back to Unix-stile (cygpath)
25374      input_path=`$CYGPATH -u "$shortmode_path"`
25375      new_path="$input_path"
25376    fi
25377  fi
25378
25379  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25380  if test "x$test_cygdrive_prefix" = x; then
25381    # As a simple fix, exclude /usr/bin since it's not a real path.
25382    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25383      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25384      # a path prefixed by /cygdrive for fixpath to work.
25385      new_path="$CYGWIN_ROOT_PATH$input_path"
25386    fi
25387  fi
25388
25389  # remove trailing .exe if any
25390  new_path="${new_path/%.exe/}"
25391
25392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25393
25394  # First separate the path from the arguments. This will split at the first
25395  # space.
25396  complete="$MCS"
25397  path="${complete%% *}"
25398  tmp="$complete EOL"
25399  arguments="${tmp#* }"
25400
25401  # Input might be given as Windows format, start by converting to
25402  # unix format.
25403  new_path="$path"
25404
25405  windows_path="$new_path"
25406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25407    unix_path=`$CYGPATH -u "$windows_path"`
25408    new_path="$unix_path"
25409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25411    new_path="$unix_path"
25412  fi
25413
25414
25415  # Now try to locate executable using which
25416  new_path=`$WHICH "$new_path" 2> /dev/null`
25417
25418  if test "x$new_path" = x; then
25419    # Oops. Which didn't find the executable.
25420    # The splitting of arguments from the executable at a space might have been incorrect,
25421    # since paths with space are more likely in Windows. Give it another try with the whole
25422    # argument.
25423    path="$complete"
25424    arguments="EOL"
25425    new_path="$path"
25426
25427  windows_path="$new_path"
25428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25429    unix_path=`$CYGPATH -u "$windows_path"`
25430    new_path="$unix_path"
25431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25433    new_path="$unix_path"
25434  fi
25435
25436
25437    new_path=`$WHICH "$new_path" 2> /dev/null`
25438
25439    if test "x$new_path" = x; then
25440      # It's still not found. Now this is an unrecoverable error.
25441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25442$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25443      has_space=`$ECHO "$complete" | $GREP " "`
25444      if test "x$has_space" != x; then
25445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25447      fi
25448      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25449    fi
25450  fi
25451
25452  # Now new_path has a complete unix path to the binary
25453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25454    # Keep paths in /bin as-is, but remove trailing .exe if any
25455    new_path="${new_path/%.exe/}"
25456    # Do not save /bin paths to all_fixpath_prefixes!
25457  else
25458    # Not in mixed or Windows style, start by that.
25459    new_path=`cmd //c echo $new_path`
25460
25461  input_path="$new_path"
25462  # Check if we need to convert this using DOS-style short mode. If the path
25463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25464  # take no chances and rewrite it.
25465  # Note: m4 eats our [], so we need to use [ and ] instead.
25466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25467  if test "x$has_forbidden_chars" != x; then
25468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25470  fi
25471
25472    # Output is in $new_path
25473
25474  windows_path="$new_path"
25475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25476    unix_path=`$CYGPATH -u "$windows_path"`
25477    new_path="$unix_path"
25478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25480    new_path="$unix_path"
25481  fi
25482
25483    # remove trailing .exe if any
25484    new_path="${new_path/%.exe/}"
25485
25486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25488  fi
25489
25490  else
25491    # We're on a posix platform. Hooray! :)
25492    # First separate the path from the arguments. This will split at the first
25493    # space.
25494    complete="$MCS"
25495    path="${complete%% *}"
25496    tmp="$complete EOL"
25497    arguments="${tmp#* }"
25498
25499    # Cannot rely on the command "which" here since it doesn't always work.
25500    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25501    if test -z "$is_absolute_path"; then
25502      # Path to executable is not absolute. Find it.
25503      IFS_save="$IFS"
25504      IFS=:
25505      for p in $PATH; do
25506        if test -f "$p/$path" && test -x "$p/$path"; then
25507          new_path="$p/$path"
25508          break
25509        fi
25510      done
25511      IFS="$IFS_save"
25512    else
25513      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25514$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25515      new_path="$path"
25516    fi
25517
25518    if test "x$new_path" = x; then
25519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25520$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25521        has_space=`$ECHO "$complete" | $GREP " "`
25522        if test "x$has_space" != x; then
25523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25525        fi
25526        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25527      fi
25528  fi
25529
25530      # Now join together the path and the arguments once again
25531      if test "x$arguments" != xEOL; then
25532        new_complete="$new_path ${arguments% *}"
25533      else
25534        new_complete="$new_path"
25535      fi
25536
25537  if test "x$complete" != "x$new_complete"; then
25538      MCS="$new_complete"
25539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25540$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25541    fi
25542
25543elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25544    if test -n "$ac_tool_prefix"; then
25545  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25546set dummy ${ac_tool_prefix}nm; ac_word=$2
25547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25548$as_echo_n "checking for $ac_word... " >&6; }
25549if test "${ac_cv_prog_NM+set}" = set; then :
25550  $as_echo_n "(cached) " >&6
25551else
25552  if test -n "$NM"; then
25553  ac_cv_prog_NM="$NM" # Let the user override the test.
25554else
25555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25556for as_dir in $PATH
25557do
25558  IFS=$as_save_IFS
25559  test -z "$as_dir" && as_dir=.
25560    for ac_exec_ext in '' $ac_executable_extensions; do
25561  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25562    ac_cv_prog_NM="${ac_tool_prefix}nm"
25563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25564    break 2
25565  fi
25566done
25567  done
25568IFS=$as_save_IFS
25569
25570fi
25571fi
25572NM=$ac_cv_prog_NM
25573if test -n "$NM"; then
25574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25575$as_echo "$NM" >&6; }
25576else
25577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25578$as_echo "no" >&6; }
25579fi
25580
25581
25582fi
25583if test -z "$ac_cv_prog_NM"; then
25584  ac_ct_NM=$NM
25585  # Extract the first word of "nm", so it can be a program name with args.
25586set dummy nm; ac_word=$2
25587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25588$as_echo_n "checking for $ac_word... " >&6; }
25589if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25590  $as_echo_n "(cached) " >&6
25591else
25592  if test -n "$ac_ct_NM"; then
25593  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25594else
25595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25596for as_dir in $PATH
25597do
25598  IFS=$as_save_IFS
25599  test -z "$as_dir" && as_dir=.
25600    for ac_exec_ext in '' $ac_executable_extensions; do
25601  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25602    ac_cv_prog_ac_ct_NM="nm"
25603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25604    break 2
25605  fi
25606done
25607  done
25608IFS=$as_save_IFS
25609
25610fi
25611fi
25612ac_ct_NM=$ac_cv_prog_ac_ct_NM
25613if test -n "$ac_ct_NM"; then
25614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25615$as_echo "$ac_ct_NM" >&6; }
25616else
25617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25618$as_echo "no" >&6; }
25619fi
25620
25621  if test "x$ac_ct_NM" = x; then
25622    NM=""
25623  else
25624    case $cross_compiling:$ac_tool_warned in
25625yes:)
25626{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25627$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25628ac_tool_warned=yes ;;
25629esac
25630    NM=$ac_ct_NM
25631  fi
25632else
25633  NM="$ac_cv_prog_NM"
25634fi
25635
25636
25637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25638
25639  # First separate the path from the arguments. This will split at the first
25640  # space.
25641  complete="$NM"
25642  path="${complete%% *}"
25643  tmp="$complete EOL"
25644  arguments="${tmp#* }"
25645
25646  # Input might be given as Windows format, start by converting to
25647  # unix format.
25648  new_path=`$CYGPATH -u "$path"`
25649
25650  # Now try to locate executable using which
25651  new_path=`$WHICH "$new_path" 2> /dev/null`
25652  # bat and cmd files are not always considered executable in cygwin causing which
25653  # to not find them
25654  if test "x$new_path" = x \
25655           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25656           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25657    new_path=`$CYGPATH -u "$path"`
25658  fi
25659  if test "x$new_path" = x; then
25660    # Oops. Which didn't find the executable.
25661    # The splitting of arguments from the executable at a space might have been incorrect,
25662    # since paths with space are more likely in Windows. Give it another try with the whole
25663    # argument.
25664    path="$complete"
25665    arguments="EOL"
25666    new_path=`$CYGPATH -u "$path"`
25667    new_path=`$WHICH "$new_path" 2> /dev/null`
25668    # bat and cmd files are not always considered executable in cygwin causing which
25669    # to not find them
25670    if test "x$new_path" = x \
25671             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25672             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25673      new_path=`$CYGPATH -u "$path"`
25674    fi
25675    if test "x$new_path" = x; then
25676      # It's still not found. Now this is an unrecoverable error.
25677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25678$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25679      has_space=`$ECHO "$complete" | $GREP " "`
25680      if test "x$has_space" != x; then
25681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25683      fi
25684      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25685    fi
25686  fi
25687
25688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25691  # "foo.exe" is OK but "foo" is an error.
25692  #
25693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25694  # It is also a way to make sure we got the proper file name for the real test later on.
25695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25696  if test "x$test_shortpath" = x; then
25697    # Short path failed, file does not exist as specified.
25698    # Try adding .exe or .cmd
25699    if test -f "${new_path}.exe"; then
25700       input_to_shortpath="${new_path}.exe"
25701    elif test -f "${new_path}.cmd"; then
25702       input_to_shortpath="${new_path}.cmd"
25703    else
25704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25705$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25706      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25707$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25708      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25709    fi
25710  else
25711    input_to_shortpath="$new_path"
25712  fi
25713
25714  # Call helper function which possibly converts this using DOS-style short mode.
25715  # If so, the updated path is stored in $new_path.
25716  new_path="$input_to_shortpath"
25717
25718  input_path="$input_to_shortpath"
25719  # Check if we need to convert this using DOS-style short mode. If the path
25720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25721  # take no chances and rewrite it.
25722  # Note: m4 eats our [], so we need to use [ and ] instead.
25723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25724  if test "x$has_forbidden_chars" != x; then
25725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25726    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25727    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25728    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25729      # Going to short mode and back again did indeed matter. Since short mode is
25730      # case insensitive, let's make it lowercase to improve readability.
25731      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25732      # Now convert it back to Unix-stile (cygpath)
25733      input_path=`$CYGPATH -u "$shortmode_path"`
25734      new_path="$input_path"
25735    fi
25736  fi
25737
25738  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25739  if test "x$test_cygdrive_prefix" = x; then
25740    # As a simple fix, exclude /usr/bin since it's not a real path.
25741    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25742      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25743      # a path prefixed by /cygdrive for fixpath to work.
25744      new_path="$CYGWIN_ROOT_PATH$input_path"
25745    fi
25746  fi
25747
25748  # remove trailing .exe if any
25749  new_path="${new_path/%.exe/}"
25750
25751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25752
25753  # First separate the path from the arguments. This will split at the first
25754  # space.
25755  complete="$NM"
25756  path="${complete%% *}"
25757  tmp="$complete EOL"
25758  arguments="${tmp#* }"
25759
25760  # Input might be given as Windows format, start by converting to
25761  # unix format.
25762  new_path="$path"
25763
25764  windows_path="$new_path"
25765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25766    unix_path=`$CYGPATH -u "$windows_path"`
25767    new_path="$unix_path"
25768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25770    new_path="$unix_path"
25771  fi
25772
25773
25774  # Now try to locate executable using which
25775  new_path=`$WHICH "$new_path" 2> /dev/null`
25776
25777  if test "x$new_path" = x; then
25778    # Oops. Which didn't find the executable.
25779    # The splitting of arguments from the executable at a space might have been incorrect,
25780    # since paths with space are more likely in Windows. Give it another try with the whole
25781    # argument.
25782    path="$complete"
25783    arguments="EOL"
25784    new_path="$path"
25785
25786  windows_path="$new_path"
25787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25788    unix_path=`$CYGPATH -u "$windows_path"`
25789    new_path="$unix_path"
25790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25792    new_path="$unix_path"
25793  fi
25794
25795
25796    new_path=`$WHICH "$new_path" 2> /dev/null`
25797
25798    if test "x$new_path" = x; then
25799      # It's still not found. Now this is an unrecoverable error.
25800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25801$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25802      has_space=`$ECHO "$complete" | $GREP " "`
25803      if test "x$has_space" != x; then
25804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25806      fi
25807      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25808    fi
25809  fi
25810
25811  # Now new_path has a complete unix path to the binary
25812  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25813    # Keep paths in /bin as-is, but remove trailing .exe if any
25814    new_path="${new_path/%.exe/}"
25815    # Do not save /bin paths to all_fixpath_prefixes!
25816  else
25817    # Not in mixed or Windows style, start by that.
25818    new_path=`cmd //c echo $new_path`
25819
25820  input_path="$new_path"
25821  # Check if we need to convert this using DOS-style short mode. If the path
25822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25823  # take no chances and rewrite it.
25824  # Note: m4 eats our [], so we need to use [ and ] instead.
25825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25826  if test "x$has_forbidden_chars" != x; then
25827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25828    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25829  fi
25830
25831    # Output is in $new_path
25832
25833  windows_path="$new_path"
25834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25835    unix_path=`$CYGPATH -u "$windows_path"`
25836    new_path="$unix_path"
25837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25839    new_path="$unix_path"
25840  fi
25841
25842    # remove trailing .exe if any
25843    new_path="${new_path/%.exe/}"
25844
25845    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25846    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25847  fi
25848
25849  else
25850    # We're on a posix platform. Hooray! :)
25851    # First separate the path from the arguments. This will split at the first
25852    # space.
25853    complete="$NM"
25854    path="${complete%% *}"
25855    tmp="$complete EOL"
25856    arguments="${tmp#* }"
25857
25858    # Cannot rely on the command "which" here since it doesn't always work.
25859    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25860    if test -z "$is_absolute_path"; then
25861      # Path to executable is not absolute. Find it.
25862      IFS_save="$IFS"
25863      IFS=:
25864      for p in $PATH; do
25865        if test -f "$p/$path" && test -x "$p/$path"; then
25866          new_path="$p/$path"
25867          break
25868        fi
25869      done
25870      IFS="$IFS_save"
25871    else
25872      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25873$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25874      new_path="$path"
25875    fi
25876
25877    if test "x$new_path" = x; then
25878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25879$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25880        has_space=`$ECHO "$complete" | $GREP " "`
25881        if test "x$has_space" != x; then
25882          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25883$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25884        fi
25885        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25886      fi
25887  fi
25888
25889      # Now join together the path and the arguments once again
25890      if test "x$arguments" != xEOL; then
25891        new_complete="$new_path ${arguments% *}"
25892      else
25893        new_complete="$new_path"
25894      fi
25895
25896  if test "x$complete" != "x$new_complete"; then
25897      NM="$new_complete"
25898      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25899$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25900    fi
25901
25902    if test -n "$ac_tool_prefix"; then
25903  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25904set dummy ${ac_tool_prefix}strip; ac_word=$2
25905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25906$as_echo_n "checking for $ac_word... " >&6; }
25907if test "${ac_cv_prog_STRIP+set}" = set; then :
25908  $as_echo_n "(cached) " >&6
25909else
25910  if test -n "$STRIP"; then
25911  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25912else
25913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25914for as_dir in $PATH
25915do
25916  IFS=$as_save_IFS
25917  test -z "$as_dir" && as_dir=.
25918    for ac_exec_ext in '' $ac_executable_extensions; do
25919  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25920    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25922    break 2
25923  fi
25924done
25925  done
25926IFS=$as_save_IFS
25927
25928fi
25929fi
25930STRIP=$ac_cv_prog_STRIP
25931if test -n "$STRIP"; then
25932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25933$as_echo "$STRIP" >&6; }
25934else
25935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25936$as_echo "no" >&6; }
25937fi
25938
25939
25940fi
25941if test -z "$ac_cv_prog_STRIP"; then
25942  ac_ct_STRIP=$STRIP
25943  # Extract the first word of "strip", so it can be a program name with args.
25944set dummy strip; ac_word=$2
25945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25946$as_echo_n "checking for $ac_word... " >&6; }
25947if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25948  $as_echo_n "(cached) " >&6
25949else
25950  if test -n "$ac_ct_STRIP"; then
25951  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25952else
25953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25954for as_dir in $PATH
25955do
25956  IFS=$as_save_IFS
25957  test -z "$as_dir" && as_dir=.
25958    for ac_exec_ext in '' $ac_executable_extensions; do
25959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25960    ac_cv_prog_ac_ct_STRIP="strip"
25961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25962    break 2
25963  fi
25964done
25965  done
25966IFS=$as_save_IFS
25967
25968fi
25969fi
25970ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25971if test -n "$ac_ct_STRIP"; then
25972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25973$as_echo "$ac_ct_STRIP" >&6; }
25974else
25975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25976$as_echo "no" >&6; }
25977fi
25978
25979  if test "x$ac_ct_STRIP" = x; then
25980    STRIP=""
25981  else
25982    case $cross_compiling:$ac_tool_warned in
25983yes:)
25984{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25985$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25986ac_tool_warned=yes ;;
25987esac
25988    STRIP=$ac_ct_STRIP
25989  fi
25990else
25991  STRIP="$ac_cv_prog_STRIP"
25992fi
25993
25994
25995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25996
25997  # First separate the path from the arguments. This will split at the first
25998  # space.
25999  complete="$STRIP"
26000  path="${complete%% *}"
26001  tmp="$complete EOL"
26002  arguments="${tmp#* }"
26003
26004  # Input might be given as Windows format, start by converting to
26005  # unix format.
26006  new_path=`$CYGPATH -u "$path"`
26007
26008  # Now try to locate executable using which
26009  new_path=`$WHICH "$new_path" 2> /dev/null`
26010  # bat and cmd files are not always considered executable in cygwin causing which
26011  # to not find them
26012  if test "x$new_path" = x \
26013           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26014           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26015    new_path=`$CYGPATH -u "$path"`
26016  fi
26017  if test "x$new_path" = x; then
26018    # Oops. Which didn't find the executable.
26019    # The splitting of arguments from the executable at a space might have been incorrect,
26020    # since paths with space are more likely in Windows. Give it another try with the whole
26021    # argument.
26022    path="$complete"
26023    arguments="EOL"
26024    new_path=`$CYGPATH -u "$path"`
26025    new_path=`$WHICH "$new_path" 2> /dev/null`
26026    # bat and cmd files are not always considered executable in cygwin causing which
26027    # to not find them
26028    if test "x$new_path" = x \
26029             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26030             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26031      new_path=`$CYGPATH -u "$path"`
26032    fi
26033    if test "x$new_path" = x; then
26034      # It's still not found. Now this is an unrecoverable error.
26035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26036$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26037      has_space=`$ECHO "$complete" | $GREP " "`
26038      if test "x$has_space" != x; then
26039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26041      fi
26042      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26043    fi
26044  fi
26045
26046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26049  # "foo.exe" is OK but "foo" is an error.
26050  #
26051  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26052  # It is also a way to make sure we got the proper file name for the real test later on.
26053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26054  if test "x$test_shortpath" = x; then
26055    # Short path failed, file does not exist as specified.
26056    # Try adding .exe or .cmd
26057    if test -f "${new_path}.exe"; then
26058       input_to_shortpath="${new_path}.exe"
26059    elif test -f "${new_path}.cmd"; then
26060       input_to_shortpath="${new_path}.cmd"
26061    else
26062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26063$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26064      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26065$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26066      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26067    fi
26068  else
26069    input_to_shortpath="$new_path"
26070  fi
26071
26072  # Call helper function which possibly converts this using DOS-style short mode.
26073  # If so, the updated path is stored in $new_path.
26074  new_path="$input_to_shortpath"
26075
26076  input_path="$input_to_shortpath"
26077  # Check if we need to convert this using DOS-style short mode. If the path
26078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26079  # take no chances and rewrite it.
26080  # Note: m4 eats our [], so we need to use [ and ] instead.
26081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26082  if test "x$has_forbidden_chars" != x; then
26083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26087      # Going to short mode and back again did indeed matter. Since short mode is
26088      # case insensitive, let's make it lowercase to improve readability.
26089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26090      # Now convert it back to Unix-stile (cygpath)
26091      input_path=`$CYGPATH -u "$shortmode_path"`
26092      new_path="$input_path"
26093    fi
26094  fi
26095
26096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26097  if test "x$test_cygdrive_prefix" = x; then
26098    # As a simple fix, exclude /usr/bin since it's not a real path.
26099    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26101      # a path prefixed by /cygdrive for fixpath to work.
26102      new_path="$CYGWIN_ROOT_PATH$input_path"
26103    fi
26104  fi
26105
26106  # remove trailing .exe if any
26107  new_path="${new_path/%.exe/}"
26108
26109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26110
26111  # First separate the path from the arguments. This will split at the first
26112  # space.
26113  complete="$STRIP"
26114  path="${complete%% *}"
26115  tmp="$complete EOL"
26116  arguments="${tmp#* }"
26117
26118  # Input might be given as Windows format, start by converting to
26119  # unix format.
26120  new_path="$path"
26121
26122  windows_path="$new_path"
26123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26124    unix_path=`$CYGPATH -u "$windows_path"`
26125    new_path="$unix_path"
26126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26128    new_path="$unix_path"
26129  fi
26130
26131
26132  # Now try to locate executable using which
26133  new_path=`$WHICH "$new_path" 2> /dev/null`
26134
26135  if test "x$new_path" = x; then
26136    # Oops. Which didn't find the executable.
26137    # The splitting of arguments from the executable at a space might have been incorrect,
26138    # since paths with space are more likely in Windows. Give it another try with the whole
26139    # argument.
26140    path="$complete"
26141    arguments="EOL"
26142    new_path="$path"
26143
26144  windows_path="$new_path"
26145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26146    unix_path=`$CYGPATH -u "$windows_path"`
26147    new_path="$unix_path"
26148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26150    new_path="$unix_path"
26151  fi
26152
26153
26154    new_path=`$WHICH "$new_path" 2> /dev/null`
26155
26156    if test "x$new_path" = x; then
26157      # It's still not found. Now this is an unrecoverable error.
26158      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26159$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26160      has_space=`$ECHO "$complete" | $GREP " "`
26161      if test "x$has_space" != x; then
26162        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26163$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26164      fi
26165      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26166    fi
26167  fi
26168
26169  # Now new_path has a complete unix path to the binary
26170  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26171    # Keep paths in /bin as-is, but remove trailing .exe if any
26172    new_path="${new_path/%.exe/}"
26173    # Do not save /bin paths to all_fixpath_prefixes!
26174  else
26175    # Not in mixed or Windows style, start by that.
26176    new_path=`cmd //c echo $new_path`
26177
26178  input_path="$new_path"
26179  # Check if we need to convert this using DOS-style short mode. If the path
26180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26181  # take no chances and rewrite it.
26182  # Note: m4 eats our [], so we need to use [ and ] instead.
26183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26184  if test "x$has_forbidden_chars" != x; then
26185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26186    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26187  fi
26188
26189    # Output is in $new_path
26190
26191  windows_path="$new_path"
26192  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26193    unix_path=`$CYGPATH -u "$windows_path"`
26194    new_path="$unix_path"
26195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26196    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26197    new_path="$unix_path"
26198  fi
26199
26200    # remove trailing .exe if any
26201    new_path="${new_path/%.exe/}"
26202
26203    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26204    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26205  fi
26206
26207  else
26208    # We're on a posix platform. Hooray! :)
26209    # First separate the path from the arguments. This will split at the first
26210    # space.
26211    complete="$STRIP"
26212    path="${complete%% *}"
26213    tmp="$complete EOL"
26214    arguments="${tmp#* }"
26215
26216    # Cannot rely on the command "which" here since it doesn't always work.
26217    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26218    if test -z "$is_absolute_path"; then
26219      # Path to executable is not absolute. Find it.
26220      IFS_save="$IFS"
26221      IFS=:
26222      for p in $PATH; do
26223        if test -f "$p/$path" && test -x "$p/$path"; then
26224          new_path="$p/$path"
26225          break
26226        fi
26227      done
26228      IFS="$IFS_save"
26229    else
26230      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26231$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26232      new_path="$path"
26233    fi
26234
26235    if test "x$new_path" = x; then
26236        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26237$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26238        has_space=`$ECHO "$complete" | $GREP " "`
26239        if test "x$has_space" != x; then
26240          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26242        fi
26243        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26244      fi
26245  fi
26246
26247      # Now join together the path and the arguments once again
26248      if test "x$arguments" != xEOL; then
26249        new_complete="$new_path ${arguments% *}"
26250      else
26251        new_complete="$new_path"
26252      fi
26253
26254  if test "x$complete" != "x$new_complete"; then
26255      STRIP="$new_complete"
26256      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26257$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26258    fi
26259
26260fi
26261
26262# objcopy is used for moving debug symbols to separate files when
26263# full debug symbols are enabled.
26264if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26265    if test -n "$ac_tool_prefix"; then
26266  for ac_prog in gobjcopy objcopy
26267  do
26268    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26269set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26271$as_echo_n "checking for $ac_word... " >&6; }
26272if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26273  $as_echo_n "(cached) " >&6
26274else
26275  if test -n "$OBJCOPY"; then
26276  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26277else
26278as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26279for as_dir in $PATH
26280do
26281  IFS=$as_save_IFS
26282  test -z "$as_dir" && as_dir=.
26283    for ac_exec_ext in '' $ac_executable_extensions; do
26284  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26285    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26287    break 2
26288  fi
26289done
26290  done
26291IFS=$as_save_IFS
26292
26293fi
26294fi
26295OBJCOPY=$ac_cv_prog_OBJCOPY
26296if test -n "$OBJCOPY"; then
26297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26298$as_echo "$OBJCOPY" >&6; }
26299else
26300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26301$as_echo "no" >&6; }
26302fi
26303
26304
26305    test -n "$OBJCOPY" && break
26306  done
26307fi
26308if test -z "$OBJCOPY"; then
26309  ac_ct_OBJCOPY=$OBJCOPY
26310  for ac_prog in gobjcopy objcopy
26311do
26312  # Extract the first word of "$ac_prog", so it can be a program name with args.
26313set dummy $ac_prog; ac_word=$2
26314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26315$as_echo_n "checking for $ac_word... " >&6; }
26316if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26317  $as_echo_n "(cached) " >&6
26318else
26319  if test -n "$ac_ct_OBJCOPY"; then
26320  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26321else
26322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26323for as_dir in $PATH
26324do
26325  IFS=$as_save_IFS
26326  test -z "$as_dir" && as_dir=.
26327    for ac_exec_ext in '' $ac_executable_extensions; do
26328  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26329    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26331    break 2
26332  fi
26333done
26334  done
26335IFS=$as_save_IFS
26336
26337fi
26338fi
26339ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26340if test -n "$ac_ct_OBJCOPY"; then
26341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26342$as_echo "$ac_ct_OBJCOPY" >&6; }
26343else
26344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26345$as_echo "no" >&6; }
26346fi
26347
26348
26349  test -n "$ac_ct_OBJCOPY" && break
26350done
26351
26352  if test "x$ac_ct_OBJCOPY" = x; then
26353    OBJCOPY=""
26354  else
26355    case $cross_compiling:$ac_tool_warned in
26356yes:)
26357{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26358$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26359ac_tool_warned=yes ;;
26360esac
26361    OBJCOPY=$ac_ct_OBJCOPY
26362  fi
26363fi
26364
26365    # Only call fixup if objcopy was found.
26366    if test -n "$OBJCOPY"; then
26367
26368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26369
26370  # First separate the path from the arguments. This will split at the first
26371  # space.
26372  complete="$OBJCOPY"
26373  path="${complete%% *}"
26374  tmp="$complete EOL"
26375  arguments="${tmp#* }"
26376
26377  # Input might be given as Windows format, start by converting to
26378  # unix format.
26379  new_path=`$CYGPATH -u "$path"`
26380
26381  # Now try to locate executable using which
26382  new_path=`$WHICH "$new_path" 2> /dev/null`
26383  # bat and cmd files are not always considered executable in cygwin causing which
26384  # to not find them
26385  if test "x$new_path" = x \
26386           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26387           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26388    new_path=`$CYGPATH -u "$path"`
26389  fi
26390  if test "x$new_path" = x; then
26391    # Oops. Which didn't find the executable.
26392    # The splitting of arguments from the executable at a space might have been incorrect,
26393    # since paths with space are more likely in Windows. Give it another try with the whole
26394    # argument.
26395    path="$complete"
26396    arguments="EOL"
26397    new_path=`$CYGPATH -u "$path"`
26398    new_path=`$WHICH "$new_path" 2> /dev/null`
26399    # bat and cmd files are not always considered executable in cygwin causing which
26400    # to not find them
26401    if test "x$new_path" = x \
26402             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26403             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26404      new_path=`$CYGPATH -u "$path"`
26405    fi
26406    if test "x$new_path" = x; then
26407      # It's still not found. Now this is an unrecoverable error.
26408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26409$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26410      has_space=`$ECHO "$complete" | $GREP " "`
26411      if test "x$has_space" != x; then
26412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26414      fi
26415      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26416    fi
26417  fi
26418
26419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26422  # "foo.exe" is OK but "foo" is an error.
26423  #
26424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26425  # It is also a way to make sure we got the proper file name for the real test later on.
26426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26427  if test "x$test_shortpath" = x; then
26428    # Short path failed, file does not exist as specified.
26429    # Try adding .exe or .cmd
26430    if test -f "${new_path}.exe"; then
26431       input_to_shortpath="${new_path}.exe"
26432    elif test -f "${new_path}.cmd"; then
26433       input_to_shortpath="${new_path}.cmd"
26434    else
26435      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26436$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26437      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26438$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26439      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26440    fi
26441  else
26442    input_to_shortpath="$new_path"
26443  fi
26444
26445  # Call helper function which possibly converts this using DOS-style short mode.
26446  # If so, the updated path is stored in $new_path.
26447  new_path="$input_to_shortpath"
26448
26449  input_path="$input_to_shortpath"
26450  # Check if we need to convert this using DOS-style short mode. If the path
26451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26452  # take no chances and rewrite it.
26453  # Note: m4 eats our [], so we need to use [ and ] instead.
26454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26455  if test "x$has_forbidden_chars" != x; then
26456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26460      # Going to short mode and back again did indeed matter. Since short mode is
26461      # case insensitive, let's make it lowercase to improve readability.
26462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26463      # Now convert it back to Unix-stile (cygpath)
26464      input_path=`$CYGPATH -u "$shortmode_path"`
26465      new_path="$input_path"
26466    fi
26467  fi
26468
26469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26470  if test "x$test_cygdrive_prefix" = x; then
26471    # As a simple fix, exclude /usr/bin since it's not a real path.
26472    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26474      # a path prefixed by /cygdrive for fixpath to work.
26475      new_path="$CYGWIN_ROOT_PATH$input_path"
26476    fi
26477  fi
26478
26479  # remove trailing .exe if any
26480  new_path="${new_path/%.exe/}"
26481
26482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26483
26484  # First separate the path from the arguments. This will split at the first
26485  # space.
26486  complete="$OBJCOPY"
26487  path="${complete%% *}"
26488  tmp="$complete EOL"
26489  arguments="${tmp#* }"
26490
26491  # Input might be given as Windows format, start by converting to
26492  # unix format.
26493  new_path="$path"
26494
26495  windows_path="$new_path"
26496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26497    unix_path=`$CYGPATH -u "$windows_path"`
26498    new_path="$unix_path"
26499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26501    new_path="$unix_path"
26502  fi
26503
26504
26505  # Now try to locate executable using which
26506  new_path=`$WHICH "$new_path" 2> /dev/null`
26507
26508  if test "x$new_path" = x; then
26509    # Oops. Which didn't find the executable.
26510    # The splitting of arguments from the executable at a space might have been incorrect,
26511    # since paths with space are more likely in Windows. Give it another try with the whole
26512    # argument.
26513    path="$complete"
26514    arguments="EOL"
26515    new_path="$path"
26516
26517  windows_path="$new_path"
26518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26519    unix_path=`$CYGPATH -u "$windows_path"`
26520    new_path="$unix_path"
26521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26523    new_path="$unix_path"
26524  fi
26525
26526
26527    new_path=`$WHICH "$new_path" 2> /dev/null`
26528
26529    if test "x$new_path" = x; then
26530      # It's still not found. Now this is an unrecoverable error.
26531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26532$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26533      has_space=`$ECHO "$complete" | $GREP " "`
26534      if test "x$has_space" != x; then
26535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26537      fi
26538      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26539    fi
26540  fi
26541
26542  # Now new_path has a complete unix path to the binary
26543  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26544    # Keep paths in /bin as-is, but remove trailing .exe if any
26545    new_path="${new_path/%.exe/}"
26546    # Do not save /bin paths to all_fixpath_prefixes!
26547  else
26548    # Not in mixed or Windows style, start by that.
26549    new_path=`cmd //c echo $new_path`
26550
26551  input_path="$new_path"
26552  # Check if we need to convert this using DOS-style short mode. If the path
26553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26554  # take no chances and rewrite it.
26555  # Note: m4 eats our [], so we need to use [ and ] instead.
26556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26557  if test "x$has_forbidden_chars" != x; then
26558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26560  fi
26561
26562    # Output is in $new_path
26563
26564  windows_path="$new_path"
26565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26566    unix_path=`$CYGPATH -u "$windows_path"`
26567    new_path="$unix_path"
26568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26570    new_path="$unix_path"
26571  fi
26572
26573    # remove trailing .exe if any
26574    new_path="${new_path/%.exe/}"
26575
26576    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26577    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26578  fi
26579
26580  else
26581    # We're on a posix platform. Hooray! :)
26582    # First separate the path from the arguments. This will split at the first
26583    # space.
26584    complete="$OBJCOPY"
26585    path="${complete%% *}"
26586    tmp="$complete EOL"
26587    arguments="${tmp#* }"
26588
26589    # Cannot rely on the command "which" here since it doesn't always work.
26590    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26591    if test -z "$is_absolute_path"; then
26592      # Path to executable is not absolute. Find it.
26593      IFS_save="$IFS"
26594      IFS=:
26595      for p in $PATH; do
26596        if test -f "$p/$path" && test -x "$p/$path"; then
26597          new_path="$p/$path"
26598          break
26599        fi
26600      done
26601      IFS="$IFS_save"
26602    else
26603      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26604$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26605      new_path="$path"
26606    fi
26607
26608    if test "x$new_path" = x; then
26609        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26610$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26611        has_space=`$ECHO "$complete" | $GREP " "`
26612        if test "x$has_space" != x; then
26613          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26614$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26615        fi
26616        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26617      fi
26618  fi
26619
26620      # Now join together the path and the arguments once again
26621      if test "x$arguments" != xEOL; then
26622        new_complete="$new_path ${arguments% *}"
26623      else
26624        new_complete="$new_path"
26625      fi
26626
26627  if test "x$complete" != "x$new_complete"; then
26628      OBJCOPY="$new_complete"
26629      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26630$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26631    fi
26632
26633    fi
26634fi
26635
26636if test -n "$ac_tool_prefix"; then
26637  for ac_prog in gobjdump objdump
26638  do
26639    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26640set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26642$as_echo_n "checking for $ac_word... " >&6; }
26643if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26644  $as_echo_n "(cached) " >&6
26645else
26646  if test -n "$OBJDUMP"; then
26647  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26648else
26649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26650for as_dir in $PATH
26651do
26652  IFS=$as_save_IFS
26653  test -z "$as_dir" && as_dir=.
26654    for ac_exec_ext in '' $ac_executable_extensions; do
26655  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26656    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26658    break 2
26659  fi
26660done
26661  done
26662IFS=$as_save_IFS
26663
26664fi
26665fi
26666OBJDUMP=$ac_cv_prog_OBJDUMP
26667if test -n "$OBJDUMP"; then
26668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26669$as_echo "$OBJDUMP" >&6; }
26670else
26671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26672$as_echo "no" >&6; }
26673fi
26674
26675
26676    test -n "$OBJDUMP" && break
26677  done
26678fi
26679if test -z "$OBJDUMP"; then
26680  ac_ct_OBJDUMP=$OBJDUMP
26681  for ac_prog in gobjdump objdump
26682do
26683  # Extract the first word of "$ac_prog", so it can be a program name with args.
26684set dummy $ac_prog; ac_word=$2
26685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26686$as_echo_n "checking for $ac_word... " >&6; }
26687if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26688  $as_echo_n "(cached) " >&6
26689else
26690  if test -n "$ac_ct_OBJDUMP"; then
26691  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26692else
26693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26694for as_dir in $PATH
26695do
26696  IFS=$as_save_IFS
26697  test -z "$as_dir" && as_dir=.
26698    for ac_exec_ext in '' $ac_executable_extensions; do
26699  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26700    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26702    break 2
26703  fi
26704done
26705  done
26706IFS=$as_save_IFS
26707
26708fi
26709fi
26710ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26711if test -n "$ac_ct_OBJDUMP"; then
26712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26713$as_echo "$ac_ct_OBJDUMP" >&6; }
26714else
26715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26716$as_echo "no" >&6; }
26717fi
26718
26719
26720  test -n "$ac_ct_OBJDUMP" && break
26721done
26722
26723  if test "x$ac_ct_OBJDUMP" = x; then
26724    OBJDUMP=""
26725  else
26726    case $cross_compiling:$ac_tool_warned in
26727yes:)
26728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26730ac_tool_warned=yes ;;
26731esac
26732    OBJDUMP=$ac_ct_OBJDUMP
26733  fi
26734fi
26735
26736if test "x$OBJDUMP" != x; then
26737  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26738
26739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26740
26741  # First separate the path from the arguments. This will split at the first
26742  # space.
26743  complete="$OBJDUMP"
26744  path="${complete%% *}"
26745  tmp="$complete EOL"
26746  arguments="${tmp#* }"
26747
26748  # Input might be given as Windows format, start by converting to
26749  # unix format.
26750  new_path=`$CYGPATH -u "$path"`
26751
26752  # Now try to locate executable using which
26753  new_path=`$WHICH "$new_path" 2> /dev/null`
26754  # bat and cmd files are not always considered executable in cygwin causing which
26755  # to not find them
26756  if test "x$new_path" = x \
26757           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26758           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26759    new_path=`$CYGPATH -u "$path"`
26760  fi
26761  if test "x$new_path" = x; then
26762    # Oops. Which didn't find the executable.
26763    # The splitting of arguments from the executable at a space might have been incorrect,
26764    # since paths with space are more likely in Windows. Give it another try with the whole
26765    # argument.
26766    path="$complete"
26767    arguments="EOL"
26768    new_path=`$CYGPATH -u "$path"`
26769    new_path=`$WHICH "$new_path" 2> /dev/null`
26770    # bat and cmd files are not always considered executable in cygwin causing which
26771    # to not find them
26772    if test "x$new_path" = x \
26773             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26774             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26775      new_path=`$CYGPATH -u "$path"`
26776    fi
26777    if test "x$new_path" = x; then
26778      # It's still not found. Now this is an unrecoverable error.
26779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26780$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26781      has_space=`$ECHO "$complete" | $GREP " "`
26782      if test "x$has_space" != x; then
26783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26785      fi
26786      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26787    fi
26788  fi
26789
26790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26793  # "foo.exe" is OK but "foo" is an error.
26794  #
26795  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26796  # It is also a way to make sure we got the proper file name for the real test later on.
26797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26798  if test "x$test_shortpath" = x; then
26799    # Short path failed, file does not exist as specified.
26800    # Try adding .exe or .cmd
26801    if test -f "${new_path}.exe"; then
26802       input_to_shortpath="${new_path}.exe"
26803    elif test -f "${new_path}.cmd"; then
26804       input_to_shortpath="${new_path}.cmd"
26805    else
26806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26807$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26810      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26811    fi
26812  else
26813    input_to_shortpath="$new_path"
26814  fi
26815
26816  # Call helper function which possibly converts this using DOS-style short mode.
26817  # If so, the updated path is stored in $new_path.
26818  new_path="$input_to_shortpath"
26819
26820  input_path="$input_to_shortpath"
26821  # Check if we need to convert this using DOS-style short mode. If the path
26822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26823  # take no chances and rewrite it.
26824  # Note: m4 eats our [], so we need to use [ and ] instead.
26825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26826  if test "x$has_forbidden_chars" != x; then
26827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26831      # Going to short mode and back again did indeed matter. Since short mode is
26832      # case insensitive, let's make it lowercase to improve readability.
26833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26834      # Now convert it back to Unix-stile (cygpath)
26835      input_path=`$CYGPATH -u "$shortmode_path"`
26836      new_path="$input_path"
26837    fi
26838  fi
26839
26840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26841  if test "x$test_cygdrive_prefix" = x; then
26842    # As a simple fix, exclude /usr/bin since it's not a real path.
26843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26845      # a path prefixed by /cygdrive for fixpath to work.
26846      new_path="$CYGWIN_ROOT_PATH$input_path"
26847    fi
26848  fi
26849
26850  # remove trailing .exe if any
26851  new_path="${new_path/%.exe/}"
26852
26853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26854
26855  # First separate the path from the arguments. This will split at the first
26856  # space.
26857  complete="$OBJDUMP"
26858  path="${complete%% *}"
26859  tmp="$complete EOL"
26860  arguments="${tmp#* }"
26861
26862  # Input might be given as Windows format, start by converting to
26863  # unix format.
26864  new_path="$path"
26865
26866  windows_path="$new_path"
26867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26868    unix_path=`$CYGPATH -u "$windows_path"`
26869    new_path="$unix_path"
26870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26872    new_path="$unix_path"
26873  fi
26874
26875
26876  # Now try to locate executable using which
26877  new_path=`$WHICH "$new_path" 2> /dev/null`
26878
26879  if test "x$new_path" = x; then
26880    # Oops. Which didn't find the executable.
26881    # The splitting of arguments from the executable at a space might have been incorrect,
26882    # since paths with space are more likely in Windows. Give it another try with the whole
26883    # argument.
26884    path="$complete"
26885    arguments="EOL"
26886    new_path="$path"
26887
26888  windows_path="$new_path"
26889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26890    unix_path=`$CYGPATH -u "$windows_path"`
26891    new_path="$unix_path"
26892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26894    new_path="$unix_path"
26895  fi
26896
26897
26898    new_path=`$WHICH "$new_path" 2> /dev/null`
26899
26900    if test "x$new_path" = x; then
26901      # It's still not found. Now this is an unrecoverable error.
26902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26903$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26904      has_space=`$ECHO "$complete" | $GREP " "`
26905      if test "x$has_space" != x; then
26906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26908      fi
26909      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26910    fi
26911  fi
26912
26913  # Now new_path has a complete unix path to the binary
26914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26915    # Keep paths in /bin as-is, but remove trailing .exe if any
26916    new_path="${new_path/%.exe/}"
26917    # Do not save /bin paths to all_fixpath_prefixes!
26918  else
26919    # Not in mixed or Windows style, start by that.
26920    new_path=`cmd //c echo $new_path`
26921
26922  input_path="$new_path"
26923  # Check if we need to convert this using DOS-style short mode. If the path
26924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26925  # take no chances and rewrite it.
26926  # Note: m4 eats our [], so we need to use [ and ] instead.
26927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26928  if test "x$has_forbidden_chars" != x; then
26929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26931  fi
26932
26933    # Output is in $new_path
26934
26935  windows_path="$new_path"
26936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26937    unix_path=`$CYGPATH -u "$windows_path"`
26938    new_path="$unix_path"
26939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26941    new_path="$unix_path"
26942  fi
26943
26944    # remove trailing .exe if any
26945    new_path="${new_path/%.exe/}"
26946
26947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26949  fi
26950
26951  else
26952    # We're on a posix platform. Hooray! :)
26953    # First separate the path from the arguments. This will split at the first
26954    # space.
26955    complete="$OBJDUMP"
26956    path="${complete%% *}"
26957    tmp="$complete EOL"
26958    arguments="${tmp#* }"
26959
26960    # Cannot rely on the command "which" here since it doesn't always work.
26961    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26962    if test -z "$is_absolute_path"; then
26963      # Path to executable is not absolute. Find it.
26964      IFS_save="$IFS"
26965      IFS=:
26966      for p in $PATH; do
26967        if test -f "$p/$path" && test -x "$p/$path"; then
26968          new_path="$p/$path"
26969          break
26970        fi
26971      done
26972      IFS="$IFS_save"
26973    else
26974      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26975$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26976      new_path="$path"
26977    fi
26978
26979    if test "x$new_path" = x; then
26980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26981$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26982        has_space=`$ECHO "$complete" | $GREP " "`
26983        if test "x$has_space" != x; then
26984          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26985$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26986        fi
26987        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26988      fi
26989  fi
26990
26991      # Now join together the path and the arguments once again
26992      if test "x$arguments" != xEOL; then
26993        new_complete="$new_path ${arguments% *}"
26994      else
26995        new_complete="$new_path"
26996      fi
26997
26998  if test "x$complete" != "x$new_complete"; then
26999      OBJDUMP="$new_complete"
27000      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
27001$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
27002    fi
27003
27004fi
27005
27006if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
27007   # Extract the first word of "lipo", so it can be a program name with args.
27008set dummy lipo; ac_word=$2
27009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27010$as_echo_n "checking for $ac_word... " >&6; }
27011if test "${ac_cv_path_LIPO+set}" = set; then :
27012  $as_echo_n "(cached) " >&6
27013else
27014  case $LIPO in
27015  [\\/]* | ?:[\\/]*)
27016  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
27017  ;;
27018  *)
27019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27020for as_dir in $PATH
27021do
27022  IFS=$as_save_IFS
27023  test -z "$as_dir" && as_dir=.
27024    for ac_exec_ext in '' $ac_executable_extensions; do
27025  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27026    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
27027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27028    break 2
27029  fi
27030done
27031  done
27032IFS=$as_save_IFS
27033
27034  ;;
27035esac
27036fi
27037LIPO=$ac_cv_path_LIPO
27038if test -n "$LIPO"; then
27039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27040$as_echo "$LIPO" >&6; }
27041else
27042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27043$as_echo "no" >&6; }
27044fi
27045
27046
27047
27048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27049
27050  # First separate the path from the arguments. This will split at the first
27051  # space.
27052  complete="$LIPO"
27053  path="${complete%% *}"
27054  tmp="$complete EOL"
27055  arguments="${tmp#* }"
27056
27057  # Input might be given as Windows format, start by converting to
27058  # unix format.
27059  new_path=`$CYGPATH -u "$path"`
27060
27061  # Now try to locate executable using which
27062  new_path=`$WHICH "$new_path" 2> /dev/null`
27063  # bat and cmd files are not always considered executable in cygwin causing which
27064  # to not find them
27065  if test "x$new_path" = x \
27066           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27067           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27068    new_path=`$CYGPATH -u "$path"`
27069  fi
27070  if test "x$new_path" = x; then
27071    # Oops. Which didn't find the executable.
27072    # The splitting of arguments from the executable at a space might have been incorrect,
27073    # since paths with space are more likely in Windows. Give it another try with the whole
27074    # argument.
27075    path="$complete"
27076    arguments="EOL"
27077    new_path=`$CYGPATH -u "$path"`
27078    new_path=`$WHICH "$new_path" 2> /dev/null`
27079    # bat and cmd files are not always considered executable in cygwin causing which
27080    # to not find them
27081    if test "x$new_path" = x \
27082             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27083             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27084      new_path=`$CYGPATH -u "$path"`
27085    fi
27086    if test "x$new_path" = x; then
27087      # It's still not found. Now this is an unrecoverable error.
27088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27089$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27090      has_space=`$ECHO "$complete" | $GREP " "`
27091      if test "x$has_space" != x; then
27092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27094      fi
27095      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27096    fi
27097  fi
27098
27099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27102  # "foo.exe" is OK but "foo" is an error.
27103  #
27104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27105  # It is also a way to make sure we got the proper file name for the real test later on.
27106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27107  if test "x$test_shortpath" = x; then
27108    # Short path failed, file does not exist as specified.
27109    # Try adding .exe or .cmd
27110    if test -f "${new_path}.exe"; then
27111       input_to_shortpath="${new_path}.exe"
27112    elif test -f "${new_path}.cmd"; then
27113       input_to_shortpath="${new_path}.cmd"
27114    else
27115      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27116$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27117      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27118$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27119      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27120    fi
27121  else
27122    input_to_shortpath="$new_path"
27123  fi
27124
27125  # Call helper function which possibly converts this using DOS-style short mode.
27126  # If so, the updated path is stored in $new_path.
27127  new_path="$input_to_shortpath"
27128
27129  input_path="$input_to_shortpath"
27130  # Check if we need to convert this using DOS-style short mode. If the path
27131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27132  # take no chances and rewrite it.
27133  # Note: m4 eats our [], so we need to use [ and ] instead.
27134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27135  if test "x$has_forbidden_chars" != x; then
27136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27140      # Going to short mode and back again did indeed matter. Since short mode is
27141      # case insensitive, let's make it lowercase to improve readability.
27142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27143      # Now convert it back to Unix-stile (cygpath)
27144      input_path=`$CYGPATH -u "$shortmode_path"`
27145      new_path="$input_path"
27146    fi
27147  fi
27148
27149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27150  if test "x$test_cygdrive_prefix" = x; then
27151    # As a simple fix, exclude /usr/bin since it's not a real path.
27152    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27154      # a path prefixed by /cygdrive for fixpath to work.
27155      new_path="$CYGWIN_ROOT_PATH$input_path"
27156    fi
27157  fi
27158
27159  # remove trailing .exe if any
27160  new_path="${new_path/%.exe/}"
27161
27162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27163
27164  # First separate the path from the arguments. This will split at the first
27165  # space.
27166  complete="$LIPO"
27167  path="${complete%% *}"
27168  tmp="$complete EOL"
27169  arguments="${tmp#* }"
27170
27171  # Input might be given as Windows format, start by converting to
27172  # unix format.
27173  new_path="$path"
27174
27175  windows_path="$new_path"
27176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27177    unix_path=`$CYGPATH -u "$windows_path"`
27178    new_path="$unix_path"
27179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27181    new_path="$unix_path"
27182  fi
27183
27184
27185  # Now try to locate executable using which
27186  new_path=`$WHICH "$new_path" 2> /dev/null`
27187
27188  if test "x$new_path" = x; then
27189    # Oops. Which didn't find the executable.
27190    # The splitting of arguments from the executable at a space might have been incorrect,
27191    # since paths with space are more likely in Windows. Give it another try with the whole
27192    # argument.
27193    path="$complete"
27194    arguments="EOL"
27195    new_path="$path"
27196
27197  windows_path="$new_path"
27198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27199    unix_path=`$CYGPATH -u "$windows_path"`
27200    new_path="$unix_path"
27201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27203    new_path="$unix_path"
27204  fi
27205
27206
27207    new_path=`$WHICH "$new_path" 2> /dev/null`
27208
27209    if test "x$new_path" = x; then
27210      # It's still not found. Now this is an unrecoverable error.
27211      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27212$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27213      has_space=`$ECHO "$complete" | $GREP " "`
27214      if test "x$has_space" != x; then
27215        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27216$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27217      fi
27218      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27219    fi
27220  fi
27221
27222  # Now new_path has a complete unix path to the binary
27223  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27224    # Keep paths in /bin as-is, but remove trailing .exe if any
27225    new_path="${new_path/%.exe/}"
27226    # Do not save /bin paths to all_fixpath_prefixes!
27227  else
27228    # Not in mixed or Windows style, start by that.
27229    new_path=`cmd //c echo $new_path`
27230
27231  input_path="$new_path"
27232  # Check if we need to convert this using DOS-style short mode. If the path
27233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27234  # take no chances and rewrite it.
27235  # Note: m4 eats our [], so we need to use [ and ] instead.
27236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27237  if test "x$has_forbidden_chars" != x; then
27238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27240  fi
27241
27242    # Output is in $new_path
27243
27244  windows_path="$new_path"
27245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27246    unix_path=`$CYGPATH -u "$windows_path"`
27247    new_path="$unix_path"
27248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27250    new_path="$unix_path"
27251  fi
27252
27253    # remove trailing .exe if any
27254    new_path="${new_path/%.exe/}"
27255
27256    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27257    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27258  fi
27259
27260  else
27261    # We're on a posix platform. Hooray! :)
27262    # First separate the path from the arguments. This will split at the first
27263    # space.
27264    complete="$LIPO"
27265    path="${complete%% *}"
27266    tmp="$complete EOL"
27267    arguments="${tmp#* }"
27268
27269    # Cannot rely on the command "which" here since it doesn't always work.
27270    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27271    if test -z "$is_absolute_path"; then
27272      # Path to executable is not absolute. Find it.
27273      IFS_save="$IFS"
27274      IFS=:
27275      for p in $PATH; do
27276        if test -f "$p/$path" && test -x "$p/$path"; then
27277          new_path="$p/$path"
27278          break
27279        fi
27280      done
27281      IFS="$IFS_save"
27282    else
27283      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27284$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27285      new_path="$path"
27286    fi
27287
27288    if test "x$new_path" = x; then
27289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27290$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27291        has_space=`$ECHO "$complete" | $GREP " "`
27292        if test "x$has_space" != x; then
27293          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27294$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27295        fi
27296        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27297      fi
27298  fi
27299
27300      # Now join together the path and the arguments once again
27301      if test "x$arguments" != xEOL; then
27302        new_complete="$new_path ${arguments% *}"
27303      else
27304        new_complete="$new_path"
27305      fi
27306
27307  if test "x$complete" != "x$new_complete"; then
27308      LIPO="$new_complete"
27309      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27310$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27311    fi
27312
27313fi
27314
27315# Restore old path without tools dir
27316PATH="$OLD_PATH"
27317
27318
27319# FIXME: Currently we must test this after paths but before flags. Fix!
27320
27321# And we can test some aspects on the target using configure macros.
27322
27323
27324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27325$as_echo_n "checking for ANSI C header files... " >&6; }
27326if test "${ac_cv_header_stdc+set}" = set; then :
27327  $as_echo_n "(cached) " >&6
27328else
27329  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27330/* end confdefs.h.  */
27331#include <stdlib.h>
27332#include <stdarg.h>
27333#include <string.h>
27334#include <float.h>
27335
27336int
27337main ()
27338{
27339
27340  ;
27341  return 0;
27342}
27343_ACEOF
27344if ac_fn_cxx_try_compile "$LINENO"; then :
27345  ac_cv_header_stdc=yes
27346else
27347  ac_cv_header_stdc=no
27348fi
27349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27350
27351if test $ac_cv_header_stdc = yes; then
27352  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27353  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27354/* end confdefs.h.  */
27355#include <string.h>
27356
27357_ACEOF
27358if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27359  $EGREP "memchr" >/dev/null 2>&1; then :
27360
27361else
27362  ac_cv_header_stdc=no
27363fi
27364rm -f conftest*
27365
27366fi
27367
27368if test $ac_cv_header_stdc = yes; then
27369  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27371/* end confdefs.h.  */
27372#include <stdlib.h>
27373
27374_ACEOF
27375if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27376  $EGREP "free" >/dev/null 2>&1; then :
27377
27378else
27379  ac_cv_header_stdc=no
27380fi
27381rm -f conftest*
27382
27383fi
27384
27385if test $ac_cv_header_stdc = yes; then
27386  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27387  if test "$cross_compiling" = yes; then :
27388  :
27389else
27390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27391/* end confdefs.h.  */
27392#include <ctype.h>
27393#include <stdlib.h>
27394#if ((' ' & 0x0FF) == 0x020)
27395# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27396# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27397#else
27398# define ISLOWER(c) \
27399		   (('a' <= (c) && (c) <= 'i') \
27400		     || ('j' <= (c) && (c) <= 'r') \
27401		     || ('s' <= (c) && (c) <= 'z'))
27402# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27403#endif
27404
27405#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27406int
27407main ()
27408{
27409  int i;
27410  for (i = 0; i < 256; i++)
27411    if (XOR (islower (i), ISLOWER (i))
27412	|| toupper (i) != TOUPPER (i))
27413      return 2;
27414  return 0;
27415}
27416_ACEOF
27417if ac_fn_cxx_try_run "$LINENO"; then :
27418
27419else
27420  ac_cv_header_stdc=no
27421fi
27422rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27423  conftest.$ac_objext conftest.beam conftest.$ac_ext
27424fi
27425
27426fi
27427fi
27428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27429$as_echo "$ac_cv_header_stdc" >&6; }
27430if test $ac_cv_header_stdc = yes; then
27431
27432$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27433
27434fi
27435
27436# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27437for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27438		  inttypes.h stdint.h unistd.h
27439do :
27440  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27441ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27442"
27443if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27444  cat >>confdefs.h <<_ACEOF
27445#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27446_ACEOF
27447
27448fi
27449
27450done
27451
27452
27453
27454###############################################################################
27455#
27456# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27457# (The JVM can use 32 or 64 bit Java pointers but that decision
27458# is made at runtime.)
27459#
27460if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27461  # Always specify -m flags on Solaris
27462
27463  # keep track of c/cxx flags that we added outselves...
27464  #   to prevent emitting warning...
27465  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27466  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27467  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27468
27469  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27470  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27471  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27472
27473  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27474  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27475  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27476
27477elif test "x$COMPILE_TYPE" = xreduced; then
27478  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27479    # Specify -m if running reduced on other Posix platforms
27480
27481  # keep track of c/cxx flags that we added outselves...
27482  #   to prevent emitting warning...
27483  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27484  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27485  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27486
27487  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27488  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27489  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27490
27491  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27492  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27493  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27494
27495  fi
27496fi
27497
27498# Make compilation sanity check
27499for ac_header in stdio.h
27500do :
27501  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27502if test "x$ac_cv_header_stdio_h" = x""yes; then :
27503  cat >>confdefs.h <<_ACEOF
27504#define HAVE_STDIO_H 1
27505_ACEOF
27506
27507else
27508
27509  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27510$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27511  if test "x$COMPILE_TYPE" = xreduced; then
27512    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27513$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27514  elif test "x$COMPILE_TYPE" = xcross; then
27515    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27516$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27517  fi
27518  as_fn_error $? "Cannot continue." "$LINENO" 5
27519
27520fi
27521
27522done
27523
27524
27525# The cast to long int works around a bug in the HP C Compiler
27526# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27527# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27528# This bug is HP SR number 8606223364.
27529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27530$as_echo_n "checking size of int *... " >&6; }
27531if test "${ac_cv_sizeof_int_p+set}" = set; then :
27532  $as_echo_n "(cached) " >&6
27533else
27534  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27535
27536else
27537  if test "$ac_cv_type_int_p" = yes; then
27538     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27539$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27540as_fn_error 77 "cannot compute sizeof (int *)
27541See \`config.log' for more details" "$LINENO" 5 ; }
27542   else
27543     ac_cv_sizeof_int_p=0
27544   fi
27545fi
27546
27547fi
27548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27549$as_echo "$ac_cv_sizeof_int_p" >&6; }
27550
27551
27552
27553cat >>confdefs.h <<_ACEOF
27554#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27555_ACEOF
27556
27557
27558
27559if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27560  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27561  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27562fi
27563
27564if test "x$SIZEOF_INT_P" = x; then
27565    # The test failed, lets stick to the assumed value.
27566    { $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
27567$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27568else
27569    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27570
27571    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27572        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
27573    fi
27574fi
27575
27576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27577$as_echo_n "checking for target address size... " >&6; }
27578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27579$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27580
27581
27582###############################################################################
27583#
27584# Is the target little of big endian?
27585#
27586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27587$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27588if test "${ac_cv_c_bigendian+set}" = set; then :
27589  $as_echo_n "(cached) " >&6
27590else
27591  ac_cv_c_bigendian=unknown
27592    # See if we're dealing with a universal compiler.
27593    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27594/* end confdefs.h.  */
27595#ifndef __APPLE_CC__
27596	       not a universal capable compiler
27597	     #endif
27598	     typedef int dummy;
27599
27600_ACEOF
27601if ac_fn_cxx_try_compile "$LINENO"; then :
27602
27603	# Check for potential -arch flags.  It is not universal unless
27604	# there are at least two -arch flags with different values.
27605	ac_arch=
27606	ac_prev=
27607	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27608	 if test -n "$ac_prev"; then
27609	   case $ac_word in
27610	     i?86 | x86_64 | ppc | ppc64)
27611	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27612		 ac_arch=$ac_word
27613	       else
27614		 ac_cv_c_bigendian=universal
27615		 break
27616	       fi
27617	       ;;
27618	   esac
27619	   ac_prev=
27620	 elif test "x$ac_word" = "x-arch"; then
27621	   ac_prev=arch
27622	 fi
27623       done
27624fi
27625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27626    if test $ac_cv_c_bigendian = unknown; then
27627      # See if sys/param.h defines the BYTE_ORDER macro.
27628      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27629/* end confdefs.h.  */
27630#include <sys/types.h>
27631	     #include <sys/param.h>
27632
27633int
27634main ()
27635{
27636#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27637		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27638		     && LITTLE_ENDIAN)
27639	      bogus endian macros
27640	     #endif
27641
27642  ;
27643  return 0;
27644}
27645_ACEOF
27646if ac_fn_cxx_try_compile "$LINENO"; then :
27647  # It does; now see whether it defined to BIG_ENDIAN or not.
27648	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27649/* end confdefs.h.  */
27650#include <sys/types.h>
27651		#include <sys/param.h>
27652
27653int
27654main ()
27655{
27656#if BYTE_ORDER != BIG_ENDIAN
27657		 not big endian
27658		#endif
27659
27660  ;
27661  return 0;
27662}
27663_ACEOF
27664if ac_fn_cxx_try_compile "$LINENO"; then :
27665  ac_cv_c_bigendian=yes
27666else
27667  ac_cv_c_bigendian=no
27668fi
27669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27670fi
27671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27672    fi
27673    if test $ac_cv_c_bigendian = unknown; then
27674      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27675      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27676/* end confdefs.h.  */
27677#include <limits.h>
27678
27679int
27680main ()
27681{
27682#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27683	      bogus endian macros
27684	     #endif
27685
27686  ;
27687  return 0;
27688}
27689_ACEOF
27690if ac_fn_cxx_try_compile "$LINENO"; then :
27691  # It does; now see whether it defined to _BIG_ENDIAN or not.
27692	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27693/* end confdefs.h.  */
27694#include <limits.h>
27695
27696int
27697main ()
27698{
27699#ifndef _BIG_ENDIAN
27700		 not big endian
27701		#endif
27702
27703  ;
27704  return 0;
27705}
27706_ACEOF
27707if ac_fn_cxx_try_compile "$LINENO"; then :
27708  ac_cv_c_bigendian=yes
27709else
27710  ac_cv_c_bigendian=no
27711fi
27712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27713fi
27714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27715    fi
27716    if test $ac_cv_c_bigendian = unknown; then
27717      # Compile a test program.
27718      if test "$cross_compiling" = yes; then :
27719  # Try to guess by grepping values from an object file.
27720	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27721/* end confdefs.h.  */
27722short int ascii_mm[] =
27723		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27724		short int ascii_ii[] =
27725		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27726		int use_ascii (int i) {
27727		  return ascii_mm[i] + ascii_ii[i];
27728		}
27729		short int ebcdic_ii[] =
27730		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27731		short int ebcdic_mm[] =
27732		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27733		int use_ebcdic (int i) {
27734		  return ebcdic_mm[i] + ebcdic_ii[i];
27735		}
27736		extern int foo;
27737
27738int
27739main ()
27740{
27741return use_ascii (foo) == use_ebcdic (foo);
27742  ;
27743  return 0;
27744}
27745_ACEOF
27746if ac_fn_cxx_try_compile "$LINENO"; then :
27747  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27748	      ac_cv_c_bigendian=yes
27749	    fi
27750	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27751	      if test "$ac_cv_c_bigendian" = unknown; then
27752		ac_cv_c_bigendian=no
27753	      else
27754		# finding both strings is unlikely to happen, but who knows?
27755		ac_cv_c_bigendian=unknown
27756	      fi
27757	    fi
27758fi
27759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27760else
27761  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27762/* end confdefs.h.  */
27763$ac_includes_default
27764int
27765main ()
27766{
27767
27768	     /* Are we little or big endian?  From Harbison&Steele.  */
27769	     union
27770	     {
27771	       long int l;
27772	       char c[sizeof (long int)];
27773	     } u;
27774	     u.l = 1;
27775	     return u.c[sizeof (long int) - 1] == 1;
27776
27777  ;
27778  return 0;
27779}
27780_ACEOF
27781if ac_fn_cxx_try_run "$LINENO"; then :
27782  ac_cv_c_bigendian=no
27783else
27784  ac_cv_c_bigendian=yes
27785fi
27786rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27787  conftest.$ac_objext conftest.beam conftest.$ac_ext
27788fi
27789
27790    fi
27791fi
27792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27793$as_echo "$ac_cv_c_bigendian" >&6; }
27794 case $ac_cv_c_bigendian in #(
27795   yes)
27796     ENDIAN="big";; #(
27797   no)
27798     ENDIAN="little" ;; #(
27799   universal)
27800     ENDIAN="universal_endianness"
27801     ;; #(
27802   *)
27803     ENDIAN="unknown" ;;
27804 esac
27805
27806
27807if test "x$ENDIAN" = xuniversal_endianness; then
27808    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27809fi
27810if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27811    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
27812fi
27813
27814
27815# Configure flags for the tools
27816
27817
27818###############################################################################
27819#
27820# How to compile shared libraries.
27821#
27822
27823if test "x$GCC" = xyes; then
27824    COMPILER_NAME=gcc
27825    PICFLAG="-fPIC"
27826    LIBRARY_PREFIX=lib
27827    SHARED_LIBRARY='lib$1.so'
27828    STATIC_LIBRARY='lib$1.a'
27829    SHARED_LIBRARY_FLAGS="-shared"
27830    SHARED_LIBRARY_SUFFIX='.so'
27831    STATIC_LIBRARY_SUFFIX='.a'
27832    OBJ_SUFFIX='.o'
27833    EXE_SUFFIX=''
27834    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27835    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27836    C_FLAG_REORDER=''
27837    CXX_FLAG_REORDER=''
27838    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27839    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27840    LD="$CC"
27841    LDEXE="$CC"
27842    LDCXX="$CXX"
27843    LDEXECXX="$CXX"
27844    POST_STRIP_CMD="$STRIP -g"
27845
27846    # Linking is different on MacOSX
27847    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27848        # Might change in the future to clang.
27849        COMPILER_NAME=gcc
27850        SHARED_LIBRARY='lib$1.dylib'
27851        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27852        SHARED_LIBRARY_SUFFIX='.dylib'
27853        EXE_SUFFIX=''
27854        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27855        SET_SHARED_LIBRARY_MAPFILE=''
27856        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27857        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27858        POST_STRIP_CMD="$STRIP -S"
27859    fi
27860else
27861    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27862        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27863        COMPILER_NAME=ossc
27864        PICFLAG="-KPIC"
27865        LIBRARY_PREFIX=lib
27866        SHARED_LIBRARY='lib$1.so'
27867        STATIC_LIBRARY='lib$1.a'
27868        SHARED_LIBRARY_FLAGS="-G"
27869        SHARED_LIBRARY_SUFFIX='.so'
27870        STATIC_LIBRARY_SUFFIX='.a'
27871        OBJ_SUFFIX='.o'
27872        EXE_SUFFIX=''
27873        SET_SHARED_LIBRARY_NAME=''
27874        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27875	C_FLAG_REORDER='-xF'
27876	CXX_FLAG_REORDER='-xF'
27877        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27878        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27879        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27880        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27881        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27882        POST_STRIP_CMD="$STRIP -x"
27883        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27884    fi
27885    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27886        # If it is not gcc, then assume it is the MS Visual Studio compiler
27887        COMPILER_NAME=cl
27888        PICFLAG=""
27889        LIBRARY_PREFIX=
27890        SHARED_LIBRARY='$1.dll'
27891        STATIC_LIBRARY='$1.lib'
27892        SHARED_LIBRARY_FLAGS="-LD"
27893        SHARED_LIBRARY_SUFFIX='.dll'
27894        STATIC_LIBRARY_SUFFIX='.lib'
27895        OBJ_SUFFIX='.obj'
27896        EXE_SUFFIX='.exe'
27897        SET_SHARED_LIBRARY_NAME=''
27898        SET_SHARED_LIBRARY_MAPFILE=''
27899        SET_SHARED_LIBRARY_ORIGIN=''
27900        SET_EXECUTABLE_ORIGIN=''
27901    fi
27902fi
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921# The (cross) compiler is now configured, we can now test capabilities
27922# of the target platform.
27923
27924
27925
27926###############################################################################
27927#
27928# Setup the opt flags for different compilers
27929# and different operating systems.
27930#
27931
27932#
27933# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27934#
27935if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27936    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27937    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27938    CFLAGS="$CFLAGS -mstackrealign"
27939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27940$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27941    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27942/* end confdefs.h.  */
27943int main() { return 0; }
27944_ACEOF
27945if ac_fn_cxx_try_link "$LINENO"; then :
27946
27947		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27948$as_echo "yes" >&6; }
27949
27950else
27951
27952		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27953$as_echo "no" >&6; }
27954	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27955
27956fi
27957rm -f core conftest.err conftest.$ac_objext \
27958    conftest$ac_exeext conftest.$ac_ext
27959fi
27960
27961C_FLAG_DEPS="-MMD -MF"
27962CXX_FLAG_DEPS="-MMD -MF"
27963
27964case $COMPILER_TYPE in
27965  CC )
27966    D_FLAG="-g"
27967    case $COMPILER_NAME in
27968      gcc )
27969      	case $OPENJDK_TARGET_OS in
27970	  macosx )
27971	    # On MacOSX we optimize for size, something
27972	    # we should do for all platforms?
27973	    C_O_FLAG_HI="-Os"
27974	    C_O_FLAG_NORM="-Os"
27975	    C_O_FLAG_NONE=""
27976	    ;;
27977	  *)
27978	    C_O_FLAG_HI="-O3"
27979	    C_O_FLAG_NORM="-O2"
27980	    C_O_FLAG_NONE="-O0"
27981	    CFLAGS_DEBUG_SYMBOLS="-g"
27982	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27983	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27984	       CFLAGS_DEBUG_SYMBOLS="-g1"
27985	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27986	    fi
27987	    ;;
27988	esac
27989        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27990        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27991        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27992        ;;
27993      ossc )
27994        #
27995        # Forte has different names for this with their C++ compiler...
27996        #
27997        C_FLAG_DEPS="-xMMD -xMF"
27998        CXX_FLAG_DEPS="-xMMD -xMF"
27999
28000        # Extra options used with HIGHEST
28001        #
28002        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
28003        #          done with care, there are some assumptions below that need to
28004        #          be understood about the use of pointers, and IEEE behavior.
28005        #
28006        # Use non-standard floating point mode (not IEEE 754)
28007        CC_HIGHEST="$CC_HIGHEST -fns"
28008        # Do some simplification of floating point arithmetic (not IEEE 754)
28009        CC_HIGHEST="$CC_HIGHEST -fsimple"
28010        # Use single precision floating point with 'float'
28011        CC_HIGHEST="$CC_HIGHEST -fsingle"
28012        # Assume memory references via basic pointer types do not alias
28013        #   (Source with excessing pointer casting and data access with mixed
28014        #    pointer types are not recommended)
28015        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
28016        # Use intrinsic or inline versions for math/std functions
28017        #   (If you expect perfect errno behavior, do not use this)
28018        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
28019        # Loop data dependency optimizations (need -xO3 or higher)
28020        CC_HIGHEST="$CC_HIGHEST -xdepend"
28021        # Pointer parameters to functions do not overlap
28022        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
28023        #    If you pass in multiple pointers to the same data, do not use this)
28024        CC_HIGHEST="$CC_HIGHEST -xrestrict"
28025        # Inline some library routines
28026        #   (If you expect perfect errno behavior, do not use this)
28027        CC_HIGHEST="$CC_HIGHEST -xlibmil"
28028        # Use optimized math routines
28029        #   (If you expect perfect errno behavior, do not use this)
28030        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
28031        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
28032
28033        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28034          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28035          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28036        fi
28037
28038        case $OPENJDK_TARGET_CPU_ARCH in
28039          x86)
28040            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28041            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28042            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28043            C_O_FLAG_NONE="-xregs=no%frameptr"
28044            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28045            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28046            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28047            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28048            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28049               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28050               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28051            fi
28052            ;;
28053          sparc)
28054            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28055            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28056            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28057            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28058            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28059            C_O_FLAG_NONE=""
28060            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28061            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28062            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28063            CXX_O_FLAG_NONE=""
28064            ;;
28065        esac
28066
28067    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28068    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28069    esac
28070    ;;
28071  CL )
28072    D_FLAG=
28073    C_O_FLAG_HIGHEST="-O2"
28074    C_O_FLAG_HI="-O1"
28075    C_O_FLAG_NORM="-O1"
28076    C_O_FLAG_NONE="-Od"
28077    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28078    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28079    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28080    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28081    ;;
28082esac
28083
28084if test -z "$C_O_FLAG_HIGHEST"; then
28085   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28086fi
28087
28088if test -z "$CXX_O_FLAG_HIGHEST"; then
28089   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28090fi
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28106   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28107$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28108fi
28109
28110if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28111   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28112$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28113fi
28114
28115if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28116   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28117$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28118fi
28119
28120
28121# Check whether --with-extra-cflags was given.
28122if test "${with_extra_cflags+set}" = set; then :
28123  withval=$with_extra_cflags;
28124fi
28125
28126
28127
28128# Check whether --with-extra-cxxflags was given.
28129if test "${with_extra_cxxflags+set}" = set; then :
28130  withval=$with_extra_cxxflags;
28131fi
28132
28133
28134
28135# Check whether --with-extra-ldflags was given.
28136if test "${with_extra_ldflags+set}" = set; then :
28137  withval=$with_extra_ldflags;
28138fi
28139
28140
28141CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28142CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28143LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28144
28145# Hotspot needs these set in their legacy form
28146LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28147LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28148LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28149
28150
28151
28152
28153
28154###############################################################################
28155#
28156# Now setup the CFLAGS and LDFLAGS for the JDK build.
28157# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28158#
28159case $COMPILER_NAME in
28160      gcc )
28161      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28162                          -pipe \
28163                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28164	  case $OPENJDK_TARGET_CPU_ARCH in
28165	  arm )
28166            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28167	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28168	  ;;
28169	  ppc )
28170            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28171	  ;;
28172	  * )
28173	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28174	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28175          ;;
28176	  esac
28177          ;;
28178      ossc )
28179          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28180          case $OPENJDK_TARGET_CPU_ARCH in
28181          x86 )
28182            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28183       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28184          ;;
28185          esac
28186
28187      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28188      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28189
28190          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28191          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28192          ;;
28193      cl )
28194          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28195               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28196	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28197	       -DWIN32 -DIAL"
28198          case $OPENJDK_TARGET_CPU in
28199              x86 )
28200                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28201                  ;;
28202              x86_64 )
28203                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28204                  ;;
28205          esac
28206          ;;
28207esac
28208
28209###############################################################################
28210
28211CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28212
28213# The package path is used only on macosx?
28214PACKAGE_PATH=/opt/local
28215
28216
28217if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28218    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28219    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28220    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28221    #   Note: -Dmacro         is the same as    #define macro 1
28222    #         -Dmacro=	    is the same as    #define macro
28223    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28224        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28225    else
28226        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28227    fi
28228else
28229    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28230fi
28231if test "x$OPENJDK_TARGET_OS" = xlinux; then
28232    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28233fi
28234if test "x$OPENJDK_TARGET_OS" = xwindows; then
28235    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28236fi
28237if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28238    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28239fi
28240if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28241    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28242    # Setting these parameters makes it an error to link to macosx APIs that are
28243    # newer than the given OS version and makes the linked binaries compatible even
28244    # if built on a newer version of the OS.
28245    # The expected format is X.Y.Z
28246    MACOSX_VERSION_MIN=10.7.0
28247
28248    # The macro takes the version with no dots, ex: 1070
28249    # Let the flags variables get resolved in make for easier override on make
28250    # command line.
28251    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28252    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
28253fi
28254if test "x$OPENJDK_TARGET_OS" = xbsd; then
28255    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28256fi
28257if test "x$DEBUG_LEVEL" = xrelease; then
28258    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28259    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28260        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28261    fi
28262else
28263    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28264fi
28265
28266CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28267CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28268
28269CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28270        -I${JDK_OUTPUTDIR}/include \
28271        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28272        -I${JDK_TOPDIR}/src/share/javavm/export \
28273        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28274        -I${JDK_TOPDIR}/src/share/native/common \
28275        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28276
28277# The shared libraries are compiled using the picflag.
28278CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28279CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28280
28281# Executable flags
28282CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28283CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28284
28285# Now this is odd. The JDK native libraries have to link against libjvm.so
28286# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28287# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28288# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28289# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28290# libraries will link to whatever is in memory. Yuck.
28291#
28292# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28293if test "x$COMPILER_NAME" = xcl; then
28294    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28295    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28296        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28297    fi
28298    # TODO: make -debug optional "--disable-full-debug-symbols"
28299    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28300    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28301    LDFLAGS_JDKLIB_SUFFIX=""
28302    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28303        LDFLAGS_STACK_SIZE=1048576
28304    else
28305        LDFLAGS_STACK_SIZE=327680
28306    fi
28307    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28308else
28309    if test "x$COMPILER_NAME" = xgcc; then
28310        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28311        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28312        if test -n "$HAS_GNU_HASH"; then
28313            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28314        fi
28315        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28316          # And since we now know that the linker is gnu, then add -z defs, to forbid
28317          # undefined symbols in object files.
28318          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28319          if test "x$DEBUG_LEVEL" = "xrelease"; then
28320              # When building release libraries, tell the linker optimize them.
28321              # Should this be supplied to the OSS linker as well?
28322              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28323          fi
28324        fi
28325    fi
28326    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28327                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28328
28329    # On some platforms (mac) the linker warns about non existing -L dirs.
28330    # Add server first if available. Linking aginst client does not always produce the same results.
28331    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28332    # Default to server for other variants.
28333    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28334        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28335    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28336        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28337    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28338        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28339    else
28340        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28341    fi
28342
28343    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28344    if test "x$COMPILER_NAME" = xossc; then
28345        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28346    fi
28347
28348    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28349    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28350        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28351    fi
28352fi
28353
28354# Adjust flags according to debug level.
28355case $DEBUG_LEVEL in
28356      fastdebug )
28357              CFLAGS="$CFLAGS $D_FLAG"
28358              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28359              ;;
28360      slowdebug )
28361              CFLAGS="$CFLAGS $D_FLAG"
28362	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28363	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28364	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28365	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28366              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28367              ;;
28368esac
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384# Setup debug symbols (need objcopy from the toolchain for that)
28385
28386#
28387# ENABLE_DEBUG_SYMBOLS
28388# This must be done after the toolchain is setup, since we're looking at objcopy.
28389#
28390# Check whether --enable-debug-symbols was given.
28391if test "${enable_debug_symbols+set}" = set; then :
28392  enableval=$enable_debug_symbols;
28393fi
28394
28395
28396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28397$as_echo_n "checking if we should generate debug symbols... " >&6; }
28398
28399if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28400   # explicit enabling of enable-debug-symbols and can't find objcopy
28401   #   this is an error
28402   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28403fi
28404
28405if test "x$enable_debug_symbols" = "xyes"; then
28406  ENABLE_DEBUG_SYMBOLS=true
28407elif test "x$enable_debug_symbols" = "xno"; then
28408  ENABLE_DEBUG_SYMBOLS=false
28409else
28410  # default on macosx is false
28411  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28412    ENABLE_DEBUG_SYMBOLS=false
28413  # Default is on if objcopy is found, otherwise off
28414  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28415    ENABLE_DEBUG_SYMBOLS=true
28416  else
28417    ENABLE_DEBUG_SYMBOLS=false
28418  fi
28419fi
28420
28421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28422$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28423
28424#
28425# ZIP_DEBUGINFO_FILES
28426#
28427# Check whether --enable-zip-debug-info was given.
28428if test "${enable_zip_debug_info+set}" = set; then :
28429  enableval=$enable_zip_debug_info;
28430fi
28431
28432
28433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28434$as_echo_n "checking if we should zip debug-info files... " >&6; }
28435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28436$as_echo "${enable_zip_debug_info}" >&6; }
28437
28438if test "x${enable_zip_debug_info}" = "xno"; then
28439   ZIP_DEBUGINFO_FILES=false
28440else
28441   ZIP_DEBUGINFO_FILES=true
28442fi
28443
28444
28445
28446
28447
28448
28449
28450###############################################################################
28451#
28452# Check dependencies for external and internal libraries.
28453#
28454###############################################################################
28455
28456
28457
28458###############################################################################
28459#
28460# OS specific settings that we never will need to probe.
28461#
28462if test "x$OPENJDK_TARGET_OS" = xlinux; then
28463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28464$as_echo_n "checking what is not needed on Linux?... " >&6; }
28465    PULSE_NOT_NEEDED=yes
28466    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28467$as_echo "pulse" >&6; }
28468fi
28469
28470if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28472$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28473    ALSA_NOT_NEEDED=yes
28474    PULSE_NOT_NEEDED=yes
28475    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28476$as_echo "alsa pulse" >&6; }
28477fi
28478
28479if test "x$OPENJDK_TARGET_OS" = xwindows; then
28480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28481$as_echo_n "checking what is not needed on Windows?... " >&6; }
28482    CUPS_NOT_NEEDED=yes
28483    ALSA_NOT_NEEDED=yes
28484    PULSE_NOT_NEEDED=yes
28485    X11_NOT_NEEDED=yes
28486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28487$as_echo "alsa cups pulse x11" >&6; }
28488fi
28489
28490if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28491    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28492$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28493    ALSA_NOT_NEEDED=yes
28494    PULSE_NOT_NEEDED=yes
28495    X11_NOT_NEEDED=yes
28496    FREETYPE2_NOT_NEEDED=yes
28497    # If the java runtime framework is disabled, then we need X11.
28498    # This will be adjusted below.
28499    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28500$as_echo "alsa pulse x11" >&6; }
28501fi
28502
28503if test "x$OPENJDK_TARGET_OS" = xbsd; then
28504    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28505$as_echo_n "checking what is not needed on bsd?... " >&6; }
28506    ALSA_NOT_NEEDED=yes
28507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28508$as_echo "alsa" >&6; }
28509fi
28510
28511if test "x$OPENJDK" = "xfalse"; then
28512    FREETYPE2_NOT_NEEDED=yes
28513fi
28514
28515if test "x$SUPPORT_HEADFUL" = xno; then
28516    X11_NOT_NEEDED=yes
28517fi
28518
28519###############################################################################
28520#
28521# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28522# that uses this API.
28523#
28524# Check whether --enable-macosx-runtime-support was given.
28525if test "${enable_macosx_runtime_support+set}" = set; then :
28526  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28527else
28528  MACOSX_RUNTIME_SUPPORT="no"
28529fi
28530
28531
28532USE_MACOSX_RUNTIME_SUPPORT=no
28533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28534$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28535if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28536    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28537        MACOSX_RUNTIME_SUPPORT=yes
28538        USE_MACOSX_RUNTIME_SUPPORT=yes
28539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28540$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28541    else
28542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28543$as_echo "yes, but explicitly disabled." >&6; }
28544    fi
28545else
28546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28547$as_echo "no" >&6; }
28548fi
28549
28550if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28552$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28553    X11_NOT_NEEDED=
28554    FREETYPE2_NOT_NEEDED=
28555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28556$as_echo "alsa pulse" >&6; }
28557fi
28558
28559
28560
28561
28562###############################################################################
28563#
28564# Check for X Windows
28565#
28566
28567# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28568# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28569# --x-libraries for the sysroot, if that seems to be correct.
28570if test "x$SYS_ROOT" != "x/"; then
28571  if test "x$x_includes" = xNONE; then
28572    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28573      x_includes="$SYS_ROOT/usr/X11R6/include"
28574    fi
28575  fi
28576  if test "x$x_libraries" = xNONE; then
28577    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28578      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28579    fi
28580  fi
28581fi
28582
28583# Now let autoconf do it's magic
28584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28585$as_echo_n "checking for X... " >&6; }
28586
28587
28588# Check whether --with-x was given.
28589if test "${with_x+set}" = set; then :
28590  withval=$with_x;
28591fi
28592
28593# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28594if test "x$with_x" = xno; then
28595  # The user explicitly disabled X.
28596  have_x=disabled
28597else
28598  case $x_includes,$x_libraries in #(
28599    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28600    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28601  $as_echo_n "(cached) " >&6
28602else
28603  # One or both of the vars are not set, and there is no cached value.
28604ac_x_includes=no ac_x_libraries=no
28605rm -f -r conftest.dir
28606if mkdir conftest.dir; then
28607  cd conftest.dir
28608  cat >Imakefile <<'_ACEOF'
28609incroot:
28610	@echo incroot='${INCROOT}'
28611usrlibdir:
28612	@echo usrlibdir='${USRLIBDIR}'
28613libdir:
28614	@echo libdir='${LIBDIR}'
28615_ACEOF
28616  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28617    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28618    for ac_var in incroot usrlibdir libdir; do
28619      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28620    done
28621    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28622    for ac_extension in a so sl dylib la dll; do
28623      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28624	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28625	ac_im_usrlibdir=$ac_im_libdir; break
28626      fi
28627    done
28628    # Screen out bogus values from the imake configuration.  They are
28629    # bogus both because they are the default anyway, and because
28630    # using them would break gcc on systems where it needs fixed includes.
28631    case $ac_im_incroot in
28632	/usr/include) ac_x_includes= ;;
28633	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28634    esac
28635    case $ac_im_usrlibdir in
28636	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28637	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28638    esac
28639  fi
28640  cd ..
28641  rm -f -r conftest.dir
28642fi
28643
28644# Standard set of common directories for X headers.
28645# Check X11 before X11Rn because it is often a symlink to the current release.
28646ac_x_header_dirs='
28647/usr/X11/include
28648/usr/X11R7/include
28649/usr/X11R6/include
28650/usr/X11R5/include
28651/usr/X11R4/include
28652
28653/usr/include/X11
28654/usr/include/X11R7
28655/usr/include/X11R6
28656/usr/include/X11R5
28657/usr/include/X11R4
28658
28659/usr/local/X11/include
28660/usr/local/X11R7/include
28661/usr/local/X11R6/include
28662/usr/local/X11R5/include
28663/usr/local/X11R4/include
28664
28665/usr/local/include/X11
28666/usr/local/include/X11R7
28667/usr/local/include/X11R6
28668/usr/local/include/X11R5
28669/usr/local/include/X11R4
28670
28671/usr/X386/include
28672/usr/x386/include
28673/usr/XFree86/include/X11
28674
28675/usr/include
28676/usr/local/include
28677/usr/unsupported/include
28678/usr/athena/include
28679/usr/local/x11r5/include
28680/usr/lpp/Xamples/include
28681
28682/usr/openwin/include
28683/usr/openwin/share/include'
28684
28685if test "$ac_x_includes" = no; then
28686  # Guess where to find include files, by looking for Xlib.h.
28687  # First, try using that file with no special directory specified.
28688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28689/* end confdefs.h.  */
28690#include <X11/Xlib.h>
28691_ACEOF
28692if ac_fn_cxx_try_cpp "$LINENO"; then :
28693  # We can compile using X headers with no special include directory.
28694ac_x_includes=
28695else
28696  for ac_dir in $ac_x_header_dirs; do
28697  if test -r "$ac_dir/X11/Xlib.h"; then
28698    ac_x_includes=$ac_dir
28699    break
28700  fi
28701done
28702fi
28703rm -f conftest.err conftest.i conftest.$ac_ext
28704fi # $ac_x_includes = no
28705
28706if test "$ac_x_libraries" = no; then
28707  # Check for the libraries.
28708  # See if we find them without any special options.
28709  # Don't add to $LIBS permanently.
28710  ac_save_LIBS=$LIBS
28711  LIBS="-lX11 $LIBS"
28712  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28713/* end confdefs.h.  */
28714#include <X11/Xlib.h>
28715int
28716main ()
28717{
28718XrmInitialize ()
28719  ;
28720  return 0;
28721}
28722_ACEOF
28723if ac_fn_cxx_try_link "$LINENO"; then :
28724  LIBS=$ac_save_LIBS
28725# We can link X programs with no special library path.
28726ac_x_libraries=
28727else
28728  LIBS=$ac_save_LIBS
28729for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28730do
28731  # Don't even attempt the hair of trying to link an X program!
28732  for ac_extension in a so sl dylib la dll; do
28733    if test -r "$ac_dir/libX11.$ac_extension"; then
28734      ac_x_libraries=$ac_dir
28735      break 2
28736    fi
28737  done
28738done
28739fi
28740rm -f core conftest.err conftest.$ac_objext \
28741    conftest$ac_exeext conftest.$ac_ext
28742fi # $ac_x_libraries = no
28743
28744case $ac_x_includes,$ac_x_libraries in #(
28745  no,* | *,no | *\'*)
28746    # Didn't find X, or a directory has "'" in its name.
28747    ac_cv_have_x="have_x=no";; #(
28748  *)
28749    # Record where we found X for the cache.
28750    ac_cv_have_x="have_x=yes\
28751	ac_x_includes='$ac_x_includes'\
28752	ac_x_libraries='$ac_x_libraries'"
28753esac
28754fi
28755;; #(
28756    *) have_x=yes;;
28757  esac
28758  eval "$ac_cv_have_x"
28759fi # $with_x != no
28760
28761if test "$have_x" != yes; then
28762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28763$as_echo "$have_x" >&6; }
28764  no_x=yes
28765else
28766  # If each of the values was on the command line, it overrides each guess.
28767  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28768  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28769  # Update the cache value to reflect the command line values.
28770  ac_cv_have_x="have_x=yes\
28771	ac_x_includes='$x_includes'\
28772	ac_x_libraries='$x_libraries'"
28773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28774$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28775fi
28776
28777if test "$no_x" = yes; then
28778  # Not all programs may use this symbol, but it does not hurt to define it.
28779
28780$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28781
28782  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28783else
28784  if test -n "$x_includes"; then
28785    X_CFLAGS="$X_CFLAGS -I$x_includes"
28786  fi
28787
28788  # It would also be nice to do this for all -L options, not just this one.
28789  if test -n "$x_libraries"; then
28790    X_LIBS="$X_LIBS -L$x_libraries"
28791    # For Solaris; some versions of Sun CC require a space after -R and
28792    # others require no space.  Words are not sufficient . . . .
28793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28794$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28795    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28796    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28797    ac_cxx_werror_flag=yes
28798    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28799/* end confdefs.h.  */
28800
28801int
28802main ()
28803{
28804
28805  ;
28806  return 0;
28807}
28808_ACEOF
28809if ac_fn_cxx_try_link "$LINENO"; then :
28810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28811$as_echo "no" >&6; }
28812       X_LIBS="$X_LIBS -R$x_libraries"
28813else
28814  LIBS="$ac_xsave_LIBS -R $x_libraries"
28815       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28816/* end confdefs.h.  */
28817
28818int
28819main ()
28820{
28821
28822  ;
28823  return 0;
28824}
28825_ACEOF
28826if ac_fn_cxx_try_link "$LINENO"; then :
28827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28828$as_echo "yes" >&6; }
28829	  X_LIBS="$X_LIBS -R $x_libraries"
28830else
28831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28832$as_echo "neither works" >&6; }
28833fi
28834rm -f core conftest.err conftest.$ac_objext \
28835    conftest$ac_exeext conftest.$ac_ext
28836fi
28837rm -f core conftest.err conftest.$ac_objext \
28838    conftest$ac_exeext conftest.$ac_ext
28839    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28840    LIBS=$ac_xsave_LIBS
28841  fi
28842
28843  # Check for system-dependent libraries X programs must link with.
28844  # Do this before checking for the system-independent R6 libraries
28845  # (-lICE), since we may need -lsocket or whatever for X linking.
28846
28847  if test "$ISC" = yes; then
28848    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28849  else
28850    # Martyn Johnson says this is needed for Ultrix, if the X
28851    # libraries were built with DECnet support.  And Karl Berry says
28852    # the Alpha needs dnet_stub (dnet does not exist).
28853    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28854    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28855/* end confdefs.h.  */
28856
28857/* Override any GCC internal prototype to avoid an error.
28858   Use char because int might match the return type of a GCC
28859   builtin and then its argument prototype would still apply.  */
28860#ifdef __cplusplus
28861extern "C"
28862#endif
28863char XOpenDisplay ();
28864int
28865main ()
28866{
28867return XOpenDisplay ();
28868  ;
28869  return 0;
28870}
28871_ACEOF
28872if ac_fn_cxx_try_link "$LINENO"; then :
28873
28874else
28875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28876$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28877if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28878  $as_echo_n "(cached) " >&6
28879else
28880  ac_check_lib_save_LIBS=$LIBS
28881LIBS="-ldnet  $LIBS"
28882cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28883/* end confdefs.h.  */
28884
28885/* Override any GCC internal prototype to avoid an error.
28886   Use char because int might match the return type of a GCC
28887   builtin and then its argument prototype would still apply.  */
28888#ifdef __cplusplus
28889extern "C"
28890#endif
28891char dnet_ntoa ();
28892int
28893main ()
28894{
28895return dnet_ntoa ();
28896  ;
28897  return 0;
28898}
28899_ACEOF
28900if ac_fn_cxx_try_link "$LINENO"; then :
28901  ac_cv_lib_dnet_dnet_ntoa=yes
28902else
28903  ac_cv_lib_dnet_dnet_ntoa=no
28904fi
28905rm -f core conftest.err conftest.$ac_objext \
28906    conftest$ac_exeext conftest.$ac_ext
28907LIBS=$ac_check_lib_save_LIBS
28908fi
28909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28910$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28911if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28912  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28913fi
28914
28915    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28917$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28918if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28919  $as_echo_n "(cached) " >&6
28920else
28921  ac_check_lib_save_LIBS=$LIBS
28922LIBS="-ldnet_stub  $LIBS"
28923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28924/* end confdefs.h.  */
28925
28926/* Override any GCC internal prototype to avoid an error.
28927   Use char because int might match the return type of a GCC
28928   builtin and then its argument prototype would still apply.  */
28929#ifdef __cplusplus
28930extern "C"
28931#endif
28932char dnet_ntoa ();
28933int
28934main ()
28935{
28936return dnet_ntoa ();
28937  ;
28938  return 0;
28939}
28940_ACEOF
28941if ac_fn_cxx_try_link "$LINENO"; then :
28942  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28943else
28944  ac_cv_lib_dnet_stub_dnet_ntoa=no
28945fi
28946rm -f core conftest.err conftest.$ac_objext \
28947    conftest$ac_exeext conftest.$ac_ext
28948LIBS=$ac_check_lib_save_LIBS
28949fi
28950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28951$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28952if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28953  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28954fi
28955
28956    fi
28957fi
28958rm -f core conftest.err conftest.$ac_objext \
28959    conftest$ac_exeext conftest.$ac_ext
28960    LIBS="$ac_xsave_LIBS"
28961
28962    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28963    # to get the SysV transport functions.
28964    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28965    # needs -lnsl.
28966    # The nsl library prevents programs from opening the X display
28967    # on Irix 5.2, according to T.E. Dickey.
28968    # The functions gethostbyname, getservbyname, and inet_addr are
28969    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28970    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28971if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28972
28973fi
28974
28975    if test $ac_cv_func_gethostbyname = no; then
28976      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28977$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28978if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28979  $as_echo_n "(cached) " >&6
28980else
28981  ac_check_lib_save_LIBS=$LIBS
28982LIBS="-lnsl  $LIBS"
28983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28984/* end confdefs.h.  */
28985
28986/* Override any GCC internal prototype to avoid an error.
28987   Use char because int might match the return type of a GCC
28988   builtin and then its argument prototype would still apply.  */
28989#ifdef __cplusplus
28990extern "C"
28991#endif
28992char gethostbyname ();
28993int
28994main ()
28995{
28996return gethostbyname ();
28997  ;
28998  return 0;
28999}
29000_ACEOF
29001if ac_fn_cxx_try_link "$LINENO"; then :
29002  ac_cv_lib_nsl_gethostbyname=yes
29003else
29004  ac_cv_lib_nsl_gethostbyname=no
29005fi
29006rm -f core conftest.err conftest.$ac_objext \
29007    conftest$ac_exeext conftest.$ac_ext
29008LIBS=$ac_check_lib_save_LIBS
29009fi
29010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
29011$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
29012if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
29013  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
29014fi
29015
29016      if test $ac_cv_lib_nsl_gethostbyname = no; then
29017	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
29018$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
29019if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
29020  $as_echo_n "(cached) " >&6
29021else
29022  ac_check_lib_save_LIBS=$LIBS
29023LIBS="-lbsd  $LIBS"
29024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29025/* end confdefs.h.  */
29026
29027/* Override any GCC internal prototype to avoid an error.
29028   Use char because int might match the return type of a GCC
29029   builtin and then its argument prototype would still apply.  */
29030#ifdef __cplusplus
29031extern "C"
29032#endif
29033char gethostbyname ();
29034int
29035main ()
29036{
29037return gethostbyname ();
29038  ;
29039  return 0;
29040}
29041_ACEOF
29042if ac_fn_cxx_try_link "$LINENO"; then :
29043  ac_cv_lib_bsd_gethostbyname=yes
29044else
29045  ac_cv_lib_bsd_gethostbyname=no
29046fi
29047rm -f core conftest.err conftest.$ac_objext \
29048    conftest$ac_exeext conftest.$ac_ext
29049LIBS=$ac_check_lib_save_LIBS
29050fi
29051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29052$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29053if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29054  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29055fi
29056
29057      fi
29058    fi
29059
29060    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29061    # socket/setsockopt and other routines are undefined under SCO ODT
29062    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29063    # on later versions), says Simon Leinen: it contains gethostby*
29064    # variants that don't use the name server (or something).  -lsocket
29065    # must be given before -lnsl if both are needed.  We assume that
29066    # if connect needs -lnsl, so does gethostbyname.
29067    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29068if test "x$ac_cv_func_connect" = x""yes; then :
29069
29070fi
29071
29072    if test $ac_cv_func_connect = no; then
29073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29074$as_echo_n "checking for connect in -lsocket... " >&6; }
29075if test "${ac_cv_lib_socket_connect+set}" = set; then :
29076  $as_echo_n "(cached) " >&6
29077else
29078  ac_check_lib_save_LIBS=$LIBS
29079LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29081/* end confdefs.h.  */
29082
29083/* Override any GCC internal prototype to avoid an error.
29084   Use char because int might match the return type of a GCC
29085   builtin and then its argument prototype would still apply.  */
29086#ifdef __cplusplus
29087extern "C"
29088#endif
29089char connect ();
29090int
29091main ()
29092{
29093return connect ();
29094  ;
29095  return 0;
29096}
29097_ACEOF
29098if ac_fn_cxx_try_link "$LINENO"; then :
29099  ac_cv_lib_socket_connect=yes
29100else
29101  ac_cv_lib_socket_connect=no
29102fi
29103rm -f core conftest.err conftest.$ac_objext \
29104    conftest$ac_exeext conftest.$ac_ext
29105LIBS=$ac_check_lib_save_LIBS
29106fi
29107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29108$as_echo "$ac_cv_lib_socket_connect" >&6; }
29109if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29110  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29111fi
29112
29113    fi
29114
29115    # Guillermo Gomez says -lposix is necessary on A/UX.
29116    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29117if test "x$ac_cv_func_remove" = x""yes; then :
29118
29119fi
29120
29121    if test $ac_cv_func_remove = no; then
29122      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29123$as_echo_n "checking for remove in -lposix... " >&6; }
29124if test "${ac_cv_lib_posix_remove+set}" = set; then :
29125  $as_echo_n "(cached) " >&6
29126else
29127  ac_check_lib_save_LIBS=$LIBS
29128LIBS="-lposix  $LIBS"
29129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29130/* end confdefs.h.  */
29131
29132/* Override any GCC internal prototype to avoid an error.
29133   Use char because int might match the return type of a GCC
29134   builtin and then its argument prototype would still apply.  */
29135#ifdef __cplusplus
29136extern "C"
29137#endif
29138char remove ();
29139int
29140main ()
29141{
29142return remove ();
29143  ;
29144  return 0;
29145}
29146_ACEOF
29147if ac_fn_cxx_try_link "$LINENO"; then :
29148  ac_cv_lib_posix_remove=yes
29149else
29150  ac_cv_lib_posix_remove=no
29151fi
29152rm -f core conftest.err conftest.$ac_objext \
29153    conftest$ac_exeext conftest.$ac_ext
29154LIBS=$ac_check_lib_save_LIBS
29155fi
29156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29157$as_echo "$ac_cv_lib_posix_remove" >&6; }
29158if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29159  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29160fi
29161
29162    fi
29163
29164    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29165    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29166if test "x$ac_cv_func_shmat" = x""yes; then :
29167
29168fi
29169
29170    if test $ac_cv_func_shmat = no; then
29171      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29172$as_echo_n "checking for shmat in -lipc... " >&6; }
29173if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29174  $as_echo_n "(cached) " >&6
29175else
29176  ac_check_lib_save_LIBS=$LIBS
29177LIBS="-lipc  $LIBS"
29178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29179/* end confdefs.h.  */
29180
29181/* Override any GCC internal prototype to avoid an error.
29182   Use char because int might match the return type of a GCC
29183   builtin and then its argument prototype would still apply.  */
29184#ifdef __cplusplus
29185extern "C"
29186#endif
29187char shmat ();
29188int
29189main ()
29190{
29191return shmat ();
29192  ;
29193  return 0;
29194}
29195_ACEOF
29196if ac_fn_cxx_try_link "$LINENO"; then :
29197  ac_cv_lib_ipc_shmat=yes
29198else
29199  ac_cv_lib_ipc_shmat=no
29200fi
29201rm -f core conftest.err conftest.$ac_objext \
29202    conftest$ac_exeext conftest.$ac_ext
29203LIBS=$ac_check_lib_save_LIBS
29204fi
29205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29206$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29207if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29208  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29209fi
29210
29211    fi
29212  fi
29213
29214  # Check for libraries that X11R6 Xt/Xaw programs need.
29215  ac_save_LDFLAGS=$LDFLAGS
29216  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29217  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29218  # check for ICE first), but we must link in the order -lSM -lICE or
29219  # we get undefined symbols.  So assume we have SM if we have ICE.
29220  # These have to be linked with before -lX11, unlike the other
29221  # libraries we check for below, so use a different variable.
29222  # John Interrante, Karl Berry
29223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29224$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29225if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29226  $as_echo_n "(cached) " >&6
29227else
29228  ac_check_lib_save_LIBS=$LIBS
29229LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29231/* end confdefs.h.  */
29232
29233/* Override any GCC internal prototype to avoid an error.
29234   Use char because int might match the return type of a GCC
29235   builtin and then its argument prototype would still apply.  */
29236#ifdef __cplusplus
29237extern "C"
29238#endif
29239char IceConnectionNumber ();
29240int
29241main ()
29242{
29243return IceConnectionNumber ();
29244  ;
29245  return 0;
29246}
29247_ACEOF
29248if ac_fn_cxx_try_link "$LINENO"; then :
29249  ac_cv_lib_ICE_IceConnectionNumber=yes
29250else
29251  ac_cv_lib_ICE_IceConnectionNumber=no
29252fi
29253rm -f core conftest.err conftest.$ac_objext \
29254    conftest$ac_exeext conftest.$ac_ext
29255LIBS=$ac_check_lib_save_LIBS
29256fi
29257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29258$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29259if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29260  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29261fi
29262
29263  LDFLAGS=$ac_save_LDFLAGS
29264
29265fi
29266
29267
29268# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
29269# this doesn't make sense so we remove it.
29270if test "x$COMPILE_TYPE" = xcross; then
29271  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
29272fi
29273
29274if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29275
29276    # Print a helpful message on how to acquire the necessary build dependency.
29277    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29278    MISSING_DEPENDENCY=x11
29279    PKGHANDLER_COMMAND=
29280
29281    case $PKGHANDLER in
29282	apt-get)
29283                apt_help     $MISSING_DEPENDENCY ;;
29284    yum)
29285                yum_help     $MISSING_DEPENDENCY ;;
29286	port)
29287                port_help    $MISSING_DEPENDENCY ;;
29288	pkgutil)
29289                pkgutil_help $MISSING_DEPENDENCY ;;
29290	pkgadd)
29291                pkgadd_help  $MISSING_DEPENDENCY ;;
29292    * )
29293      break ;;
29294    esac
29295
29296    if test "x$PKGHANDLER_COMMAND" != x; then
29297        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29298    fi
29299
29300    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29301fi
29302
29303# Some of the old makefiles require a setting of OPENWIN_HOME
29304# Since the X11R6 directory has disappeared on later Linuxes,
29305# we need to probe for it.
29306if test "x$OPENJDK_TARGET_OS" = xlinux; then
29307    if test -d "$SYS_ROOT/usr/X11R6"; then
29308        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29309    fi
29310    if test -d "$SYS_ROOT/usr/include/X11"; then
29311        OPENWIN_HOME="$SYS_ROOT/usr"
29312    fi
29313fi
29314if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29315    OPENWIN_HOME="/usr/openwin"
29316fi
29317
29318
29319
29320#
29321# Weird Sol10 something check...TODO change to try compile
29322#
29323if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29324  if test "`uname -r`" = "5.10"; then
29325     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29326     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29327     fi
29328  fi
29329fi
29330
29331ac_ext=c
29332ac_cpp='$CPP $CPPFLAGS'
29333ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29334ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29335ac_compiler_gnu=$ac_cv_c_compiler_gnu
29336
29337OLD_CFLAGS="$CFLAGS"
29338CFLAGS="$CFLAGS $X_CFLAGS"
29339
29340# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29341for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29342do :
29343  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29344ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29345                   # include <X11/Xutil.h>
29346
29347"
29348if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29349  cat >>confdefs.h <<_ACEOF
29350#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29351_ACEOF
29352 X11_A_OK=yes
29353else
29354  X11_A_OK=no
29355fi
29356
29357done
29358
29359
29360CFLAGS="$OLD_CFLAGS"
29361ac_ext=cpp
29362ac_cpp='$CXXCPP $CPPFLAGS'
29363ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29364ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29365ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29366
29367
29368if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29369
29370    # Print a helpful message on how to acquire the necessary build dependency.
29371    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29372    MISSING_DEPENDENCY=x11
29373    PKGHANDLER_COMMAND=
29374
29375    case $PKGHANDLER in
29376	apt-get)
29377                apt_help     $MISSING_DEPENDENCY ;;
29378    yum)
29379                yum_help     $MISSING_DEPENDENCY ;;
29380	port)
29381                port_help    $MISSING_DEPENDENCY ;;
29382	pkgutil)
29383                pkgutil_help $MISSING_DEPENDENCY ;;
29384	pkgadd)
29385                pkgadd_help  $MISSING_DEPENDENCY ;;
29386    * )
29387      break ;;
29388    esac
29389
29390    if test "x$PKGHANDLER_COMMAND" != x; then
29391        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29392    fi
29393
29394    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29395fi
29396
29397
29398
29399
29400
29401
29402###############################################################################
29403#
29404# The common unix printing system cups is used to print from java.
29405#
29406
29407# Check whether --with-cups was given.
29408if test "${with_cups+set}" = set; then :
29409  withval=$with_cups;
29410fi
29411
29412
29413# Check whether --with-cups-include was given.
29414if test "${with_cups_include+set}" = set; then :
29415  withval=$with_cups_include;
29416fi
29417
29418
29419if test "x$CUPS_NOT_NEEDED" = xyes; then
29420	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29421		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29422$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29423	fi
29424	CUPS_CFLAGS=
29425else
29426	CUPS_FOUND=no
29427
29428	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29429	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29430	fi
29431
29432	if test "x${with_cups}" != x; then
29433	    CUPS_CFLAGS="-I${with_cups}/include"
29434	    CUPS_FOUND=yes
29435	fi
29436	if test "x${with_cups_include}" != x; then
29437	    CUPS_CFLAGS="-I${with_cups_include}"
29438	    CUPS_FOUND=yes
29439	fi
29440	if test "x$CUPS_FOUND" = xno; then
29441
29442
29443    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29444        # Source the builddeps file again, to make sure it uses the latest variables!
29445        . $builddepsfile
29446        # Look for a target and build machine specific resource!
29447        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29448        if test "x$resource" = x; then
29449            # Ok, lets instead look for a target specific resource
29450            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29451        fi
29452        if test "x$resource" = x; then
29453            # Ok, lets instead look for a build specific resource
29454            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29455        fi
29456        if test "x$resource" = x; then
29457            # Ok, lets instead look for a generic resource
29458            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29459            resource=${builddep_cups}
29460        fi
29461        if test "x$resource" != x; then
29462            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29463$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29464	    # If the resource in the builddeps.conf file is an existing directory,
29465	    # for example /java/linux/cups
29466	    if test -d ${resource}; then
29467	       depdir=${resource}
29468	    else
29469
29470# cups is for example mymodule
29471# $resource is for example libs/general/libmymod_1_2_3.zip
29472# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29473# $with_builddeps_dir is for example /localhome/builddeps
29474# depdir is the name of the variable into which we store the depdir, eg MYMOD
29475# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29476# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29477    filename=`basename $resource`
29478    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29479    filebase=${filename%%.*}
29480    extension=${filename#*.}
29481    installdir=$with_builddeps_dir/$filebase
29482    if test ! -f $installdir/$filename.unpacked; then
29483        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29484$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29485        if test ! -d $installdir; then
29486            mkdir -p $installdir
29487        fi
29488        if test ! -d $installdir; then
29489            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29490        fi
29491        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29492        touch $tmpfile
29493        if test ! -f $tmpfile; then
29494            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29495        fi
29496
29497    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29498    # $tmpfile is the local file name for the downloaded file.
29499    VALID_TOOL=no
29500    if test "x$BDEPS_FTP" = xwget; then
29501       VALID_TOOL=yes
29502       wget -O $tmpfile $with_builddeps_server/$resource
29503    fi
29504    if test "x$BDEPS_FTP" = xlftp; then
29505       VALID_TOOL=yes
29506       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29507    fi
29508    if test "x$BDEPS_FTP" = xftp; then
29509        VALID_TOOL=yes
29510        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29511        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29512        FTPUSERPWD=${FTPSERVER%%@*}
29513        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29514            FTPUSER=${userpwd%%:*}
29515            FTPPWD=${userpwd#*@}
29516            FTPSERVER=${FTPSERVER#*@}
29517        else
29518            FTPUSER=ftp
29519            FTPPWD=ftp
29520        fi
29521        # the "pass" command does not work on some
29522        # ftp clients (read ftp.exe) but if it works,
29523        # passive mode is better!
29524        (\
29525            echo "user $FTPUSER $FTPPWD"        ;\
29526            echo "pass"                         ;\
29527            echo "bin"                          ;\
29528            echo "get $FTPPATH $tmpfile"              ;\
29529        ) | ftp -in $FTPSERVER
29530    fi
29531    if test "x$VALID_TOOL" != xyes; then
29532       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29533    fi
29534
29535        mv $tmpfile $installdir/$filename
29536        if test ! -s $installdir/$filename; then
29537            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29538        fi
29539        case "$extension" in
29540            zip)  echo "Unzipping $installdir/$filename..."
29541               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29542            ;;
29543            tar.gz) echo "Untaring $installdir/$filename..."
29544               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29545            ;;
29546            tgz) echo "Untaring $installdir/$filename..."
29547               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29548            ;;
29549            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29550            ;;
29551        esac
29552    fi
29553    if test -f $installdir/$filename.unpacked; then
29554        depdir=$installdir
29555    fi
29556
29557	    fi
29558            # Source the builddeps file again, because in the previous command, the depdir
29559            # was updated to point at the current build dependency install directory.
29560            . $builddepsfile
29561            # Now extract variables from the builddeps.conf files.
29562            theroot=${builddep_cups_ROOT}
29563            thecflags=${builddep_cups_CFLAGS}
29564            thelibs=${builddep_cups_LIBS}
29565            if test "x$depdir" = x; then
29566                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29567            fi
29568            CUPS=$depdir
29569            if test "x$theroot" != x; then
29570               CUPS="$theroot"
29571            fi
29572            if test "x$thecflags" != x; then
29573               CUPS_CFLAGS="$thecflags"
29574            fi
29575            if test "x$thelibs" != x; then
29576               CUPS_LIBS="$thelibs"
29577            fi
29578            CUPS_FOUND=yes
29579
29580        fi
29581
29582    fi
29583
29584	fi
29585	if test "x$CUPS_FOUND" = xno; then
29586	    # Are the cups headers installed in the default /usr/include location?
29587	    for ac_header in cups/cups.h cups/ppd.h
29588do :
29589  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29590ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29591if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29592  cat >>confdefs.h <<_ACEOF
29593#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29594_ACEOF
29595 CUPS_FOUND=yes
29596	                      CUPS_CFLAGS=
29597	                      DEFAULT_CUPS=yes
29598fi
29599
29600done
29601
29602	fi
29603	if test "x$CUPS_FOUND" = xno; then
29604	    # Getting nervous now? Lets poke around for standard Solaris third-party
29605	    # package installation locations.
29606	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29607$as_echo_n "checking for cups headers... " >&6; }
29608	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29609	       # An SFW package seems to be installed!
29610	       CUPS_FOUND=yes
29611	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29612	    elif test -s /opt/csw/include/cups/cups.h; then
29613	       # A CSW package seems to be installed!
29614	       CUPS_FOUND=yes
29615	       CUPS_CFLAGS="-I/opt/csw/include"
29616	    fi
29617	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29618$as_echo "$CUPS_FOUND" >&6; }
29619	fi
29620	if test "x$CUPS_FOUND" = xno; then
29621
29622    # Print a helpful message on how to acquire the necessary build dependency.
29623    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29624    MISSING_DEPENDENCY=cups
29625    PKGHANDLER_COMMAND=
29626
29627    case $PKGHANDLER in
29628	apt-get)
29629                apt_help     $MISSING_DEPENDENCY ;;
29630    yum)
29631                yum_help     $MISSING_DEPENDENCY ;;
29632	port)
29633                port_help    $MISSING_DEPENDENCY ;;
29634	pkgutil)
29635                pkgutil_help $MISSING_DEPENDENCY ;;
29636	pkgadd)
29637                pkgadd_help  $MISSING_DEPENDENCY ;;
29638    * )
29639      break ;;
29640    esac
29641
29642    if test "x$PKGHANDLER_COMMAND" != x; then
29643        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29644    fi
29645
29646	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29647	fi
29648fi
29649
29650
29651
29652
29653
29654
29655###############################################################################
29656#
29657# The ubiquitous freetype2 library is used to render fonts.
29658#
29659
29660# Check whether --with-freetype was given.
29661if test "${with_freetype+set}" = set; then :
29662  withval=$with_freetype;
29663fi
29664
29665
29666# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29667USING_SYSTEM_FT_LIB=false
29668
29669if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29670	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29671		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29672$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29673	fi
29674	FREETYPE2_CFLAGS=
29675	FREETYPE2_LIBS=
29676        FREETYPE2_LIB_PATH=
29677else
29678	FREETYPE2_FOUND=no
29679
29680	if test "x$with_freetype" != x; then
29681
29682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29683
29684  # Input might be given as Windows format, start by converting to
29685  # unix format.
29686  path="$with_freetype"
29687  new_path=`$CYGPATH -u "$path"`
29688
29689  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29690  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29691  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29692  # "foo.exe" is OK but "foo" is an error.
29693  #
29694  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29695  # It is also a way to make sure we got the proper file name for the real test later on.
29696  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29697  if test "x$test_shortpath" = x; then
29698    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29699$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29700    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29701  fi
29702
29703  # Call helper function which possibly converts this using DOS-style short mode.
29704  # If so, the updated path is stored in $new_path.
29705
29706  input_path="$new_path"
29707  # Check if we need to convert this using DOS-style short mode. If the path
29708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29709  # take no chances and rewrite it.
29710  # Note: m4 eats our [], so we need to use [ and ] instead.
29711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29712  if test "x$has_forbidden_chars" != x; then
29713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29714    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29715    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29716    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29717      # Going to short mode and back again did indeed matter. Since short mode is
29718      # case insensitive, let's make it lowercase to improve readability.
29719      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29720      # Now convert it back to Unix-stile (cygpath)
29721      input_path=`$CYGPATH -u "$shortmode_path"`
29722      new_path="$input_path"
29723    fi
29724  fi
29725
29726  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29727  if test "x$test_cygdrive_prefix" = x; then
29728    # As a simple fix, exclude /usr/bin since it's not a real path.
29729    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29730      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29731      # a path prefixed by /cygdrive for fixpath to work.
29732      new_path="$CYGWIN_ROOT_PATH$input_path"
29733    fi
29734  fi
29735
29736
29737  if test "x$path" != "x$new_path"; then
29738    with_freetype="$new_path"
29739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29740$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29741  fi
29742
29743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29744
29745  path="$with_freetype"
29746  has_colon=`$ECHO $path | $GREP ^.:`
29747  new_path="$path"
29748  if test "x$has_colon" = x; then
29749    # Not in mixed or Windows style, start by that.
29750    new_path=`cmd //c echo $path`
29751  fi
29752
29753
29754  input_path="$new_path"
29755  # Check if we need to convert this using DOS-style short mode. If the path
29756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29757  # take no chances and rewrite it.
29758  # Note: m4 eats our [], so we need to use [ and ] instead.
29759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29760  if test "x$has_forbidden_chars" != x; then
29761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29763  fi
29764
29765
29766  windows_path="$new_path"
29767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29768    unix_path=`$CYGPATH -u "$windows_path"`
29769    new_path="$unix_path"
29770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29772    new_path="$unix_path"
29773  fi
29774
29775  if test "x$path" != "x$new_path"; then
29776    with_freetype="$new_path"
29777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29778$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29779  fi
29780
29781  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29782  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29783
29784  else
29785    # We're on a posix platform. Hooray! :)
29786    path="$with_freetype"
29787
29788    if test ! -f "$path" && test ! -d "$path"; then
29789      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29790    fi
29791
29792    has_space=`$ECHO "$path" | $GREP " "`
29793    if test "x$has_space" != x; then
29794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29795$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29796      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29797    fi
29798  fi
29799
29800	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29801            FREETYPE2_LIB_PATH="$with_freetype/lib"
29802            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29803                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29804                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29805            fi
29806            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29807                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29808            fi
29809	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29810            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29811                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29812            fi
29813 	    FREETYPE2_FOUND=yes
29814   	    if test "x$FREETYPE2_FOUND" = xyes; then
29815	        # Verify that the directories exist
29816                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29817		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29818		fi
29819	        # List the contents of the lib.
29820		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29821                if test "x$FREETYPELIB" = x; then
29822		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29823		fi
29824	        # Check one h-file
29825                if ! test -s "$with_freetype/include/ft2build.h"; then
29826		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29827		fi
29828            fi
29829        fi
29830	if test "x$FREETYPE2_FOUND" = xno; then
29831
29832
29833    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29834        # Source the builddeps file again, to make sure it uses the latest variables!
29835        . $builddepsfile
29836        # Look for a target and build machine specific resource!
29837        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29838        if test "x$resource" = x; then
29839            # Ok, lets instead look for a target specific resource
29840            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29841        fi
29842        if test "x$resource" = x; then
29843            # Ok, lets instead look for a build specific resource
29844            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29845        fi
29846        if test "x$resource" = x; then
29847            # Ok, lets instead look for a generic resource
29848            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29849            resource=${builddep_freetype2}
29850        fi
29851        if test "x$resource" != x; then
29852            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29853$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29854	    # If the resource in the builddeps.conf file is an existing directory,
29855	    # for example /java/linux/cups
29856	    if test -d ${resource}; then
29857	       depdir=${resource}
29858	    else
29859
29860# freetype2 is for example mymodule
29861# $resource is for example libs/general/libmymod_1_2_3.zip
29862# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29863# $with_builddeps_dir is for example /localhome/builddeps
29864# depdir is the name of the variable into which we store the depdir, eg MYMOD
29865# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29866# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29867    filename=`basename $resource`
29868    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29869    filebase=${filename%%.*}
29870    extension=${filename#*.}
29871    installdir=$with_builddeps_dir/$filebase
29872    if test ! -f $installdir/$filename.unpacked; then
29873        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29874$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29875        if test ! -d $installdir; then
29876            mkdir -p $installdir
29877        fi
29878        if test ! -d $installdir; then
29879            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29880        fi
29881        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29882        touch $tmpfile
29883        if test ! -f $tmpfile; then
29884            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29885        fi
29886
29887    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29888    # $tmpfile is the local file name for the downloaded file.
29889    VALID_TOOL=no
29890    if test "x$BDEPS_FTP" = xwget; then
29891       VALID_TOOL=yes
29892       wget -O $tmpfile $with_builddeps_server/$resource
29893    fi
29894    if test "x$BDEPS_FTP" = xlftp; then
29895       VALID_TOOL=yes
29896       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29897    fi
29898    if test "x$BDEPS_FTP" = xftp; then
29899        VALID_TOOL=yes
29900        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29901        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29902        FTPUSERPWD=${FTPSERVER%%@*}
29903        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29904            FTPUSER=${userpwd%%:*}
29905            FTPPWD=${userpwd#*@}
29906            FTPSERVER=${FTPSERVER#*@}
29907        else
29908            FTPUSER=ftp
29909            FTPPWD=ftp
29910        fi
29911        # the "pass" command does not work on some
29912        # ftp clients (read ftp.exe) but if it works,
29913        # passive mode is better!
29914        (\
29915            echo "user $FTPUSER $FTPPWD"        ;\
29916            echo "pass"                         ;\
29917            echo "bin"                          ;\
29918            echo "get $FTPPATH $tmpfile"              ;\
29919        ) | ftp -in $FTPSERVER
29920    fi
29921    if test "x$VALID_TOOL" != xyes; then
29922       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29923    fi
29924
29925        mv $tmpfile $installdir/$filename
29926        if test ! -s $installdir/$filename; then
29927            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29928        fi
29929        case "$extension" in
29930            zip)  echo "Unzipping $installdir/$filename..."
29931               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29932            ;;
29933            tar.gz) echo "Untaring $installdir/$filename..."
29934               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29935            ;;
29936            tgz) echo "Untaring $installdir/$filename..."
29937               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29938            ;;
29939            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29940            ;;
29941        esac
29942    fi
29943    if test -f $installdir/$filename.unpacked; then
29944        depdir=$installdir
29945    fi
29946
29947	    fi
29948            # Source the builddeps file again, because in the previous command, the depdir
29949            # was updated to point at the current build dependency install directory.
29950            . $builddepsfile
29951            # Now extract variables from the builddeps.conf files.
29952            theroot=${builddep_freetype2_ROOT}
29953            thecflags=${builddep_freetype2_CFLAGS}
29954            thelibs=${builddep_freetype2_LIBS}
29955            if test "x$depdir" = x; then
29956                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29957            fi
29958            FREETYPE2=$depdir
29959            if test "x$theroot" != x; then
29960               FREETYPE2="$theroot"
29961            fi
29962            if test "x$thecflags" != x; then
29963               FREETYPE2_CFLAGS="$thecflags"
29964            fi
29965            if test "x$thelibs" != x; then
29966               FREETYPE2_LIBS="$thelibs"
29967            fi
29968            FREETYPE2_FOUND=yes
29969            else FREETYPE2_FOUND=no
29970
29971        fi
29972        else FREETYPE2_FOUND=no
29973
29974    fi
29975
29976            USING_SYSTEM_FT_LIB=true
29977	fi
29978	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29979            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29980
29981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29982
29983  # Input might be given as Windows format, start by converting to
29984  # unix format.
29985  path="$FREETYPELOCATION"
29986  new_path=`$CYGPATH -u "$path"`
29987
29988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29991  # "foo.exe" is OK but "foo" is an error.
29992  #
29993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29994  # It is also a way to make sure we got the proper file name for the real test later on.
29995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29996  if test "x$test_shortpath" = x; then
29997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29998$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29999    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
30000  fi
30001
30002  # Call helper function which possibly converts this using DOS-style short mode.
30003  # If so, the updated path is stored in $new_path.
30004
30005  input_path="$new_path"
30006  # Check if we need to convert this using DOS-style short mode. If the path
30007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30008  # take no chances and rewrite it.
30009  # Note: m4 eats our [], so we need to use [ and ] instead.
30010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30011  if test "x$has_forbidden_chars" != x; then
30012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30016      # Going to short mode and back again did indeed matter. Since short mode is
30017      # case insensitive, let's make it lowercase to improve readability.
30018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30019      # Now convert it back to Unix-stile (cygpath)
30020      input_path=`$CYGPATH -u "$shortmode_path"`
30021      new_path="$input_path"
30022    fi
30023  fi
30024
30025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30026  if test "x$test_cygdrive_prefix" = x; then
30027    # As a simple fix, exclude /usr/bin since it's not a real path.
30028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30030      # a path prefixed by /cygdrive for fixpath to work.
30031      new_path="$CYGWIN_ROOT_PATH$input_path"
30032    fi
30033  fi
30034
30035
30036  if test "x$path" != "x$new_path"; then
30037    FREETYPELOCATION="$new_path"
30038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30039$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30040  fi
30041
30042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30043
30044  path="$FREETYPELOCATION"
30045  has_colon=`$ECHO $path | $GREP ^.:`
30046  new_path="$path"
30047  if test "x$has_colon" = x; then
30048    # Not in mixed or Windows style, start by that.
30049    new_path=`cmd //c echo $path`
30050  fi
30051
30052
30053  input_path="$new_path"
30054  # Check if we need to convert this using DOS-style short mode. If the path
30055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30056  # take no chances and rewrite it.
30057  # Note: m4 eats our [], so we need to use [ and ] instead.
30058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30059  if test "x$has_forbidden_chars" != x; then
30060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30062  fi
30063
30064
30065  windows_path="$new_path"
30066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30067    unix_path=`$CYGPATH -u "$windows_path"`
30068    new_path="$unix_path"
30069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30071    new_path="$unix_path"
30072  fi
30073
30074  if test "x$path" != "x$new_path"; then
30075    FREETYPELOCATION="$new_path"
30076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30077$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30078  fi
30079
30080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30082
30083  else
30084    # We're on a posix platform. Hooray! :)
30085    path="$FREETYPELOCATION"
30086
30087    if test ! -f "$path" && test ! -d "$path"; then
30088      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30089    fi
30090
30091    has_space=`$ECHO "$path" | $GREP " "`
30092    if test "x$has_space" != x; then
30093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30094$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30095      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30096    fi
30097  fi
30098
30099	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30100$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30101	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30102	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30103	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30104 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30105                if ! test -s "$FREETYPE2_LIBS"; then
30106		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30107		fi
30108                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30109		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30110		fi
30111                USING_SYSTEM_FT_LIB=true
30112                FREETYPE2_FOUND=yes
30113	    fi
30114	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30115$as_echo "$FREETYPE2_FOUND" >&6; }
30116        fi
30117	if test "x$FREETYPE2_FOUND" = xno; then
30118
30119pkg_failed=no
30120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30121$as_echo_n "checking for FREETYPE2... " >&6; }
30122
30123if test -n "$FREETYPE2_CFLAGS"; then
30124    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30125 elif test -n "$PKG_CONFIG"; then
30126    if test -n "$PKG_CONFIG" && \
30127    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30128  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30129  ac_status=$?
30130  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30131  test $ac_status = 0; }; then
30132  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30133else
30134  pkg_failed=yes
30135fi
30136 else
30137    pkg_failed=untried
30138fi
30139if test -n "$FREETYPE2_LIBS"; then
30140    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30141 elif test -n "$PKG_CONFIG"; then
30142    if test -n "$PKG_CONFIG" && \
30143    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30144  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30145  ac_status=$?
30146  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30147  test $ac_status = 0; }; then
30148  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30149else
30150  pkg_failed=yes
30151fi
30152 else
30153    pkg_failed=untried
30154fi
30155
30156
30157
30158if test $pkg_failed = yes; then
30159
30160if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30161        _pkg_short_errors_supported=yes
30162else
30163        _pkg_short_errors_supported=no
30164fi
30165        if test $_pkg_short_errors_supported = yes; then
30166	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30167        else
30168	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30169        fi
30170	# Put the nasty error message in config.log where it belongs
30171	echo "$FREETYPE2_PKG_ERRORS" >&5
30172
30173	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30174$as_echo "no" >&6; }
30175                FREETYPE2_FOUND=no
30176elif test $pkg_failed = untried; then
30177	FREETYPE2_FOUND=no
30178else
30179	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30180	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30182$as_echo "yes" >&6; }
30183	FREETYPE2_FOUND=yes
30184fi
30185            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30186            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30187            USING_SYSTEM_FT_LIB=true
30188            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30189            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30190              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30191            fi
30192	fi
30193	if test "x$FREETYPE2_FOUND" = xno; then
30194	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30195$as_echo_n "checking for freetype in some standard locations... " >&6; }
30196
30197	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30198	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30199	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30200	    fi
30201	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30202	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30203	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30204	    fi
30205
30206	    PREV_CXXCFLAGS="$CXXFLAGS"
30207	    PREV_LDFLAGS="$LDFLAGS"
30208	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30209	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30210	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30211/* end confdefs.h.  */
30212#include<ft2build.h>
30213	                    #include FT_FREETYPE_H
30214	                   int main() { return 0; }
30215
30216_ACEOF
30217if ac_fn_cxx_try_link "$LINENO"; then :
30218
30219	                      # Yes, the default cflags and libs did the trick.
30220	                      FREETYPE2_FOUND=yes
30221	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30222	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30223
30224else
30225
30226	                      FREETYPE2_FOUND=no
30227
30228fi
30229rm -f core conftest.err conftest.$ac_objext \
30230    conftest$ac_exeext conftest.$ac_ext
30231            CXXCFLAGS="$PREV_CXXFLAGS"
30232	    LDFLAGS="$PREV_LDFLAGS"
30233	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30234$as_echo "$FREETYPE2_FOUND" >&6; }
30235            USING_SYSTEM_FT_LIB=true
30236	fi
30237	if test "x$FREETYPE2_FOUND" = xno; then
30238
30239    # Print a helpful message on how to acquire the necessary build dependency.
30240    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30241    MISSING_DEPENDENCY=freetype2
30242    PKGHANDLER_COMMAND=
30243
30244    case $PKGHANDLER in
30245	apt-get)
30246                apt_help     $MISSING_DEPENDENCY ;;
30247    yum)
30248                yum_help     $MISSING_DEPENDENCY ;;
30249	port)
30250                port_help    $MISSING_DEPENDENCY ;;
30251	pkgutil)
30252                pkgutil_help $MISSING_DEPENDENCY ;;
30253	pkgadd)
30254                pkgadd_help  $MISSING_DEPENDENCY ;;
30255    * )
30256      break ;;
30257    esac
30258
30259    if test "x$PKGHANDLER_COMMAND" != x; then
30260        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30261    fi
30262
30263		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30264	fi
30265
30266        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30267            # AC_CHECK_LIB does not support use of cl.exe
30268            PREV_LDFLAGS="$LDFLAGS"
30269            LDFLAGS="$FREETYPE2_LIBS"
30270            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30271$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30272if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30273  $as_echo_n "(cached) " >&6
30274else
30275  ac_check_lib_save_LIBS=$LIBS
30276LIBS="-lfreetype  $LIBS"
30277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30278/* end confdefs.h.  */
30279
30280/* Override any GCC internal prototype to avoid an error.
30281   Use char because int might match the return type of a GCC
30282   builtin and then its argument prototype would still apply.  */
30283#ifdef __cplusplus
30284extern "C"
30285#endif
30286char FT_Init_FreeType ();
30287int
30288main ()
30289{
30290return FT_Init_FreeType ();
30291  ;
30292  return 0;
30293}
30294_ACEOF
30295if ac_fn_cxx_try_link "$LINENO"; then :
30296  ac_cv_lib_freetype_FT_Init_FreeType=yes
30297else
30298  ac_cv_lib_freetype_FT_Init_FreeType=no
30299fi
30300rm -f core conftest.err conftest.$ac_objext \
30301    conftest$ac_exeext conftest.$ac_ext
30302LIBS=$ac_check_lib_save_LIBS
30303fi
30304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30305$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30306if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30307  FREETYPE2_FOUND=true
30308else
30309  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30310fi
30311
30312            LDFLAGS="$PREV_LDFLAGS"
30313        fi
30314fi
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324###############################################################################
30325#
30326# Check for alsa headers and libraries. Used on Linux/GNU systems.
30327#
30328
30329# Check whether --with-alsa was given.
30330if test "${with_alsa+set}" = set; then :
30331  withval=$with_alsa;
30332fi
30333
30334
30335# Check whether --with-alsa-include was given.
30336if test "${with_alsa_include+set}" = set; then :
30337  withval=$with_alsa_include;
30338fi
30339
30340
30341# Check whether --with-alsa-lib was given.
30342if test "${with_alsa_lib+set}" = set; then :
30343  withval=$with_alsa_lib;
30344fi
30345
30346
30347if test "x$ALSA_NOT_NEEDED" = xyes; then
30348	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30349		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30350$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30351	fi
30352	ALSA_CFLAGS=
30353	ALSA_LIBS=
30354else
30355	ALSA_FOUND=no
30356
30357	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30358	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30359	fi
30360
30361	if test "x${with_alsa}" != x; then
30362	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30363	    ALSA_CFLAGS="-I${with_alsa}/include"
30364	    ALSA_FOUND=yes
30365	fi
30366	if test "x${with_alsa_include}" != x; then
30367	    ALSA_CFLAGS="-I${with_alsa_include}"
30368	    ALSA_FOUND=yes
30369	fi
30370	if test "x${with_alsa_lib}" != x; then
30371	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30372	    ALSA_FOUND=yes
30373	fi
30374	if test "x$ALSA_FOUND" = xno; then
30375
30376
30377    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30378        # Source the builddeps file again, to make sure it uses the latest variables!
30379        . $builddepsfile
30380        # Look for a target and build machine specific resource!
30381        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30382        if test "x$resource" = x; then
30383            # Ok, lets instead look for a target specific resource
30384            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30385        fi
30386        if test "x$resource" = x; then
30387            # Ok, lets instead look for a build specific resource
30388            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30389        fi
30390        if test "x$resource" = x; then
30391            # Ok, lets instead look for a generic resource
30392            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30393            resource=${builddep_alsa}
30394        fi
30395        if test "x$resource" != x; then
30396            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30397$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30398	    # If the resource in the builddeps.conf file is an existing directory,
30399	    # for example /java/linux/cups
30400	    if test -d ${resource}; then
30401	       depdir=${resource}
30402	    else
30403
30404# alsa is for example mymodule
30405# $resource is for example libs/general/libmymod_1_2_3.zip
30406# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30407# $with_builddeps_dir is for example /localhome/builddeps
30408# depdir is the name of the variable into which we store the depdir, eg MYMOD
30409# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30410# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30411    filename=`basename $resource`
30412    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30413    filebase=${filename%%.*}
30414    extension=${filename#*.}
30415    installdir=$with_builddeps_dir/$filebase
30416    if test ! -f $installdir/$filename.unpacked; then
30417        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30418$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30419        if test ! -d $installdir; then
30420            mkdir -p $installdir
30421        fi
30422        if test ! -d $installdir; then
30423            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30424        fi
30425        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30426        touch $tmpfile
30427        if test ! -f $tmpfile; then
30428            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30429        fi
30430
30431    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30432    # $tmpfile is the local file name for the downloaded file.
30433    VALID_TOOL=no
30434    if test "x$BDEPS_FTP" = xwget; then
30435       VALID_TOOL=yes
30436       wget -O $tmpfile $with_builddeps_server/$resource
30437    fi
30438    if test "x$BDEPS_FTP" = xlftp; then
30439       VALID_TOOL=yes
30440       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30441    fi
30442    if test "x$BDEPS_FTP" = xftp; then
30443        VALID_TOOL=yes
30444        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30445        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30446        FTPUSERPWD=${FTPSERVER%%@*}
30447        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30448            FTPUSER=${userpwd%%:*}
30449            FTPPWD=${userpwd#*@}
30450            FTPSERVER=${FTPSERVER#*@}
30451        else
30452            FTPUSER=ftp
30453            FTPPWD=ftp
30454        fi
30455        # the "pass" command does not work on some
30456        # ftp clients (read ftp.exe) but if it works,
30457        # passive mode is better!
30458        (\
30459            echo "user $FTPUSER $FTPPWD"        ;\
30460            echo "pass"                         ;\
30461            echo "bin"                          ;\
30462            echo "get $FTPPATH $tmpfile"              ;\
30463        ) | ftp -in $FTPSERVER
30464    fi
30465    if test "x$VALID_TOOL" != xyes; then
30466       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30467    fi
30468
30469        mv $tmpfile $installdir/$filename
30470        if test ! -s $installdir/$filename; then
30471            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30472        fi
30473        case "$extension" in
30474            zip)  echo "Unzipping $installdir/$filename..."
30475               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30476            ;;
30477            tar.gz) echo "Untaring $installdir/$filename..."
30478               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30479            ;;
30480            tgz) echo "Untaring $installdir/$filename..."
30481               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30482            ;;
30483            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30484            ;;
30485        esac
30486    fi
30487    if test -f $installdir/$filename.unpacked; then
30488        depdir=$installdir
30489    fi
30490
30491	    fi
30492            # Source the builddeps file again, because in the previous command, the depdir
30493            # was updated to point at the current build dependency install directory.
30494            . $builddepsfile
30495            # Now extract variables from the builddeps.conf files.
30496            theroot=${builddep_alsa_ROOT}
30497            thecflags=${builddep_alsa_CFLAGS}
30498            thelibs=${builddep_alsa_LIBS}
30499            if test "x$depdir" = x; then
30500                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30501            fi
30502            ALSA=$depdir
30503            if test "x$theroot" != x; then
30504               ALSA="$theroot"
30505            fi
30506            if test "x$thecflags" != x; then
30507               ALSA_CFLAGS="$thecflags"
30508            fi
30509            if test "x$thelibs" != x; then
30510               ALSA_LIBS="$thelibs"
30511            fi
30512            ALSA_FOUND=yes
30513            else ALSA_FOUND=no
30514
30515        fi
30516        else ALSA_FOUND=no
30517
30518    fi
30519
30520	fi
30521	if test "x$ALSA_FOUND" = xno; then
30522
30523pkg_failed=no
30524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30525$as_echo_n "checking for ALSA... " >&6; }
30526
30527if test -n "$ALSA_CFLAGS"; then
30528    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30529 elif test -n "$PKG_CONFIG"; then
30530    if test -n "$PKG_CONFIG" && \
30531    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30532  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30533  ac_status=$?
30534  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30535  test $ac_status = 0; }; then
30536  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30537else
30538  pkg_failed=yes
30539fi
30540 else
30541    pkg_failed=untried
30542fi
30543if test -n "$ALSA_LIBS"; then
30544    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30545 elif test -n "$PKG_CONFIG"; then
30546    if test -n "$PKG_CONFIG" && \
30547    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30548  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30549  ac_status=$?
30550  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30551  test $ac_status = 0; }; then
30552  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30553else
30554  pkg_failed=yes
30555fi
30556 else
30557    pkg_failed=untried
30558fi
30559
30560
30561
30562if test $pkg_failed = yes; then
30563
30564if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30565        _pkg_short_errors_supported=yes
30566else
30567        _pkg_short_errors_supported=no
30568fi
30569        if test $_pkg_short_errors_supported = yes; then
30570	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30571        else
30572	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30573        fi
30574	# Put the nasty error message in config.log where it belongs
30575	echo "$ALSA_PKG_ERRORS" >&5
30576
30577	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30578$as_echo "no" >&6; }
30579                ALSA_FOUND=no
30580elif test $pkg_failed = untried; then
30581	ALSA_FOUND=no
30582else
30583	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30584	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30586$as_echo "yes" >&6; }
30587	ALSA_FOUND=yes
30588fi
30589	fi
30590	if test "x$ALSA_FOUND" = xno; then
30591	    for ac_header in alsa/asoundlib.h
30592do :
30593  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30594if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30595  cat >>confdefs.h <<_ACEOF
30596#define HAVE_ALSA_ASOUNDLIB_H 1
30597_ACEOF
30598 ALSA_FOUND=yes
30599	                      ALSA_CFLAGS=-Iignoreme
30600	                      ALSA_LIBS=-lasound
30601	                      DEFAULT_ALSA=yes
30602else
30603  ALSA_FOUND=no
30604fi
30605
30606done
30607
30608	fi
30609	if test "x$ALSA_FOUND" = xno; then
30610
30611    # Print a helpful message on how to acquire the necessary build dependency.
30612    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30613    MISSING_DEPENDENCY=alsa
30614    PKGHANDLER_COMMAND=
30615
30616    case $PKGHANDLER in
30617	apt-get)
30618                apt_help     $MISSING_DEPENDENCY ;;
30619    yum)
30620                yum_help     $MISSING_DEPENDENCY ;;
30621	port)
30622                port_help    $MISSING_DEPENDENCY ;;
30623	pkgutil)
30624                pkgutil_help $MISSING_DEPENDENCY ;;
30625	pkgadd)
30626                pkgadd_help  $MISSING_DEPENDENCY ;;
30627    * )
30628      break ;;
30629    esac
30630
30631    if test "x$PKGHANDLER_COMMAND" != x; then
30632        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30633    fi
30634
30635	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30636	fi
30637fi
30638
30639
30640
30641
30642
30643
30644
30645###############################################################################
30646#
30647# Check for the jpeg library
30648#
30649
30650USE_EXTERNAL_LIBJPEG=true
30651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30652$as_echo_n "checking for main in -ljpeg... " >&6; }
30653if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30654  $as_echo_n "(cached) " >&6
30655else
30656  ac_check_lib_save_LIBS=$LIBS
30657LIBS="-ljpeg  $LIBS"
30658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30659/* end confdefs.h.  */
30660
30661
30662int
30663main ()
30664{
30665return main ();
30666  ;
30667  return 0;
30668}
30669_ACEOF
30670if ac_fn_cxx_try_link "$LINENO"; then :
30671  ac_cv_lib_jpeg_main=yes
30672else
30673  ac_cv_lib_jpeg_main=no
30674fi
30675rm -f core conftest.err conftest.$ac_objext \
30676    conftest$ac_exeext conftest.$ac_ext
30677LIBS=$ac_check_lib_save_LIBS
30678fi
30679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30680$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30681if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30682  cat >>confdefs.h <<_ACEOF
30683#define HAVE_LIBJPEG 1
30684_ACEOF
30685
30686  LIBS="-ljpeg $LIBS"
30687
30688else
30689   USE_EXTERNAL_LIBJPEG=false
30690               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30691$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30692
30693fi
30694
30695
30696
30697###############################################################################
30698#
30699# Check for the gif library
30700#
30701
30702USE_EXTERNAL_LIBJPEG=true
30703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30704$as_echo_n "checking for main in -lgif... " >&6; }
30705if test "${ac_cv_lib_gif_main+set}" = set; then :
30706  $as_echo_n "(cached) " >&6
30707else
30708  ac_check_lib_save_LIBS=$LIBS
30709LIBS="-lgif  $LIBS"
30710cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30711/* end confdefs.h.  */
30712
30713
30714int
30715main ()
30716{
30717return main ();
30718  ;
30719  return 0;
30720}
30721_ACEOF
30722if ac_fn_cxx_try_link "$LINENO"; then :
30723  ac_cv_lib_gif_main=yes
30724else
30725  ac_cv_lib_gif_main=no
30726fi
30727rm -f core conftest.err conftest.$ac_objext \
30728    conftest$ac_exeext conftest.$ac_ext
30729LIBS=$ac_check_lib_save_LIBS
30730fi
30731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30732$as_echo "$ac_cv_lib_gif_main" >&6; }
30733if test "x$ac_cv_lib_gif_main" = x""yes; then :
30734  cat >>confdefs.h <<_ACEOF
30735#define HAVE_LIBGIF 1
30736_ACEOF
30737
30738  LIBS="-lgif $LIBS"
30739
30740else
30741   USE_EXTERNAL_LIBGIF=false
30742               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30743$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30744
30745fi
30746
30747
30748
30749###############################################################################
30750#
30751# Check for the zlib library
30752#
30753
30754
30755# Check whether --with-zlib was given.
30756if test "${with_zlib+set}" = set; then :
30757  withval=$with_zlib;
30758fi
30759
30760
30761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30762$as_echo_n "checking for compress in -lz... " >&6; }
30763if test "${ac_cv_lib_z_compress+set}" = set; then :
30764  $as_echo_n "(cached) " >&6
30765else
30766  ac_check_lib_save_LIBS=$LIBS
30767LIBS="-lz  $LIBS"
30768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30769/* end confdefs.h.  */
30770
30771/* Override any GCC internal prototype to avoid an error.
30772   Use char because int might match the return type of a GCC
30773   builtin and then its argument prototype would still apply.  */
30774#ifdef __cplusplus
30775extern "C"
30776#endif
30777char compress ();
30778int
30779main ()
30780{
30781return compress ();
30782  ;
30783  return 0;
30784}
30785_ACEOF
30786if ac_fn_cxx_try_link "$LINENO"; then :
30787  ac_cv_lib_z_compress=yes
30788else
30789  ac_cv_lib_z_compress=no
30790fi
30791rm -f core conftest.err conftest.$ac_objext \
30792    conftest$ac_exeext conftest.$ac_ext
30793LIBS=$ac_check_lib_save_LIBS
30794fi
30795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30796$as_echo "$ac_cv_lib_z_compress" >&6; }
30797if test "x$ac_cv_lib_z_compress" = x""yes; then :
30798   ZLIB_FOUND=yes
30799else
30800   ZLIB_FOUND=no
30801fi
30802
30803
30804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30805$as_echo_n "checking for which zlib to use... " >&6; }
30806
30807DEFAULT_ZLIB=bundled
30808if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30809#
30810# On macosx default is system...on others default is
30811#
30812    DEFAULT_ZLIB=system
30813fi
30814
30815if test "x${ZLIB_FOUND}" != "xyes"; then
30816#
30817# If we don't find any system...set default to bundled
30818#
30819    DEFAULT_ZLIB=bundled
30820fi
30821
30822#
30823# If user didn't specify, use DEFAULT_ZLIB
30824#
30825if test "x${with_zlib}" = "x"; then
30826    with_zlib=${DEFAULT_ZLIB}
30827fi
30828
30829if test "x${with_zlib}" = "xbundled"; then
30830    USE_EXTERNAL_LIBZ=false
30831    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30832$as_echo "bundled" >&6; }
30833elif test "x${with_zlib}" = "xsystem"; then
30834    if test "x${ZLIB_FOUND}" = "xyes"; then
30835        USE_EXTERNAL_LIBZ=true
30836        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30837$as_echo "system" >&6; }
30838    else
30839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30840$as_echo "system not found" >&6; }
30841        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30842    fi
30843else
30844    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30845fi
30846
30847
30848
30849###############################################################################
30850LIBZIP_CAN_USE_MMAP=true
30851
30852
30853
30854###############################################################################
30855#
30856# Check if altzone exists in time.h
30857#
30858
30859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30860/* end confdefs.h.  */
30861#include <time.h>
30862int
30863main ()
30864{
30865return (int)altzone;
30866  ;
30867  return 0;
30868}
30869_ACEOF
30870if ac_fn_cxx_try_link "$LINENO"; then :
30871  has_altzone=yes
30872else
30873  has_altzone=no
30874fi
30875rm -f core conftest.err conftest.$ac_objext \
30876    conftest$ac_exeext conftest.$ac_ext
30877if test "x$has_altzone" = xyes; then
30878
30879$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30880
30881fi
30882
30883###############################################################################
30884#
30885# Check the maths library
30886#
30887
30888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30889$as_echo_n "checking for cos in -lm... " >&6; }
30890if test "${ac_cv_lib_m_cos+set}" = set; then :
30891  $as_echo_n "(cached) " >&6
30892else
30893  ac_check_lib_save_LIBS=$LIBS
30894LIBS="-lm  $LIBS"
30895cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30896/* end confdefs.h.  */
30897
30898/* Override any GCC internal prototype to avoid an error.
30899   Use char because int might match the return type of a GCC
30900   builtin and then its argument prototype would still apply.  */
30901#ifdef __cplusplus
30902extern "C"
30903#endif
30904char cos ();
30905int
30906main ()
30907{
30908return cos ();
30909  ;
30910  return 0;
30911}
30912_ACEOF
30913if ac_fn_cxx_try_link "$LINENO"; then :
30914  ac_cv_lib_m_cos=yes
30915else
30916  ac_cv_lib_m_cos=no
30917fi
30918rm -f core conftest.err conftest.$ac_objext \
30919    conftest$ac_exeext conftest.$ac_ext
30920LIBS=$ac_check_lib_save_LIBS
30921fi
30922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30923$as_echo "$ac_cv_lib_m_cos" >&6; }
30924if test "x$ac_cv_lib_m_cos" = x""yes; then :
30925  cat >>confdefs.h <<_ACEOF
30926#define HAVE_LIBM 1
30927_ACEOF
30928
30929  LIBS="-lm $LIBS"
30930
30931else
30932
30933                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30934$as_echo "$as_me: Maths library was not found" >&6;}
30935
30936fi
30937
30938
30939
30940###############################################################################
30941#
30942# Check for libdl.so
30943
30944save_LIBS="$LIBS"
30945LIBS=""
30946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30947$as_echo_n "checking for dlopen in -ldl... " >&6; }
30948if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30949  $as_echo_n "(cached) " >&6
30950else
30951  ac_check_lib_save_LIBS=$LIBS
30952LIBS="-ldl  $LIBS"
30953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30954/* end confdefs.h.  */
30955
30956/* Override any GCC internal prototype to avoid an error.
30957   Use char because int might match the return type of a GCC
30958   builtin and then its argument prototype would still apply.  */
30959#ifdef __cplusplus
30960extern "C"
30961#endif
30962char dlopen ();
30963int
30964main ()
30965{
30966return dlopen ();
30967  ;
30968  return 0;
30969}
30970_ACEOF
30971if ac_fn_cxx_try_link "$LINENO"; then :
30972  ac_cv_lib_dl_dlopen=yes
30973else
30974  ac_cv_lib_dl_dlopen=no
30975fi
30976rm -f core conftest.err conftest.$ac_objext \
30977    conftest$ac_exeext conftest.$ac_ext
30978LIBS=$ac_check_lib_save_LIBS
30979fi
30980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30981$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30982if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30983  cat >>confdefs.h <<_ACEOF
30984#define HAVE_LIBDL 1
30985_ACEOF
30986
30987  LIBS="-ldl $LIBS"
30988
30989fi
30990
30991LIBDL="$LIBS"
30992
30993LIBS="$save_LIBS"
30994
30995
30996
30997###############################################################################
30998#
30999# statically link libstdc++ before C++ ABI is stablized on Linux unless
31000# dynamic build is configured on command line.
31001#
31002
31003# Check whether --with-stdc++lib was given.
31004if test "${with_stdc__lib+set}" = set; then :
31005  withval=$with_stdc__lib;
31006    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
31007        && test "x$with_stdc__lib" != xdefault; then
31008      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
31009    fi
31010
31011else
31012  with_stdc__lib=default
31013
31014fi
31015
31016
31017if test "x$OPENJDK_TARGET_OS" = xlinux; then
31018    # Test if -lstdc++ works.
31019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
31020$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
31021    ac_ext=cpp
31022ac_cpp='$CXXCPP $CPPFLAGS'
31023ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31024ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31025ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31026
31027    OLD_CXXFLAGS="$CXXFLAGS"
31028    CXXFLAGS="$CXXFLAGS -lstdc++"
31029    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31030/* end confdefs.h.  */
31031
31032int
31033main ()
31034{
31035return 0;
31036  ;
31037  return 0;
31038}
31039_ACEOF
31040if ac_fn_cxx_try_link "$LINENO"; then :
31041  has_dynamic_libstdcxx=yes
31042else
31043  has_dynamic_libstdcxx=no
31044fi
31045rm -f core conftest.err conftest.$ac_objext \
31046    conftest$ac_exeext conftest.$ac_ext
31047    CXXFLAGS="$OLD_CXXFLAGS"
31048    ac_ext=cpp
31049ac_cpp='$CXXCPP $CPPFLAGS'
31050ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31051ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31052ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31053
31054    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31055$as_echo "$has_dynamic_libstdcxx" >&6; }
31056
31057    # Test if stdc++ can be linked statically.
31058    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31059$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31060    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31061    ac_ext=cpp
31062ac_cpp='$CXXCPP $CPPFLAGS'
31063ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31064ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31065ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31066
31067    OLD_LIBS="$LIBS"
31068    OLD_CXX="$CXX"
31069    LIBS="$STATIC_STDCXX_FLAGS"
31070    CXX="$CC"
31071    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31072/* end confdefs.h.  */
31073
31074int
31075main ()
31076{
31077return 0;
31078  ;
31079  return 0;
31080}
31081_ACEOF
31082if ac_fn_cxx_try_link "$LINENO"; then :
31083  has_static_libstdcxx=yes
31084else
31085  has_static_libstdcxx=no
31086fi
31087rm -f core conftest.err conftest.$ac_objext \
31088    conftest$ac_exeext conftest.$ac_ext
31089    LIBS="$OLD_LIBS"
31090    CXX="$OLD_CXX"
31091    ac_ext=cpp
31092ac_cpp='$CXXCPP $CPPFLAGS'
31093ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31094ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31095ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31096
31097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31098$as_echo "$has_static_libstdcxx" >&6; }
31099
31100    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31101        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31102    fi
31103
31104    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31105        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31106    fi
31107
31108    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31109        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31110    fi
31111
31112    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31113$as_echo_n "checking how to link with libstdc++... " >&6; }
31114    # If dynamic was requested, it's available since it would fail above otherwise.
31115    # If dynamic wasn't requested, go with static unless it isn't available.
31116    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31117        LIBCXX="$LIBCXX -lstdc++"
31118        LDCXX="$CXX"
31119        STATIC_CXX_SETTING="STATIC_CXX=false"
31120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31121$as_echo "dynamic" >&6; }
31122    else
31123        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31124        LDCXX="$CC"
31125        STATIC_CXX_SETTING="STATIC_CXX=true"
31126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31127$as_echo "static" >&6; }
31128    fi
31129fi
31130
31131
31132# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31133if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31134    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31135fi
31136
31137# TODO better (platform agnostic) test
31138if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31139    LIBCXX="-lstdc++"
31140fi
31141
31142
31143
31144
31145
31146# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31147
31148# When using cygwin or msys, we need a wrapper binary that renames
31149# /cygdrive/c/ arguments into c:/ arguments and peeks into
31150# @files and rewrites these too! This wrapper binary is
31151# called fixpath.
31152FIXPATH=
31153if test "x$OPENJDK_BUILD_OS" = xwindows; then
31154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31155$as_echo_n "checking if fixpath can be created... " >&6; }
31156    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31157    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31158    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31159      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31160      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31161      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31162      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31163    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31164      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31165      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31166
31167      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31168      # @ was chosen as separator to minimize risk of other tools messing around with it
31169      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31170      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31171
31172      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31173    fi
31174    rm -f $OUTPUT_ROOT/fixpath*
31175    cd $OUTPUT_ROOT
31176    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31177    cd $CURDIR
31178
31179    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31181$as_echo "no" >&6; }
31182        cat $OUTPUT_ROOT/fixpath1.log
31183        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31184    fi
31185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31186$as_echo "yes" >&6; }
31187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31188$as_echo_n "checking if fixpath.exe works... " >&6; }
31189    cd $OUTPUT_ROOT
31190    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31191    cd $CURDIR
31192    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31194$as_echo "no" >&6; }
31195        cat $OUTPUT_ROOT/fixpath2.log
31196        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31197    fi
31198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31199$as_echo "yes" >&6; }
31200    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31201fi
31202
31203
31204
31205
31206###############################################################################
31207#
31208# We need to do some final tweaking, when everything else is done.
31209#
31210###############################################################################
31211
31212
31213HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31214
31215
31216# The name of the Service Agent jar.
31217SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31218if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31219  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31220fi
31221
31222
31223
31224
31225###############################################################################
31226#
31227# Configure parts of the build that only affect the build performance,
31228# not the result.
31229#
31230###############################################################################
31231
31232
31233  # How many cores do we have on this build system?
31234
31235# Check whether --with-num-cores was given.
31236if test "${with_num_cores+set}" = set; then :
31237  withval=$with_num_cores;
31238fi
31239
31240  if test "x$with_num_cores" = x; then
31241    # The number of cores were not specified, try to probe them.
31242
31243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31244$as_echo_n "checking for number of cores... " >&6; }
31245    NUM_CORES=1
31246    FOUND_CORES=no
31247
31248    if test -f /proc/cpuinfo; then
31249        # Looks like a Linux (or cygwin) system
31250        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31251        FOUND_CORES=yes
31252    elif test -x /usr/sbin/psrinfo; then
31253        # Looks like a Solaris system
31254        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31255        FOUND_CORES=yes
31256    elif test -x /usr/sbin/system_profiler; then
31257        # Looks like a MacOSX system
31258        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31259        FOUND_CORES=yes
31260    elif test -n "$NUMBER_OF_PROCESSORS"; then
31261        # On windows, look in the env
31262        NUM_CORES=$NUMBER_OF_PROCESSORS
31263        FOUND_CORES=yes
31264    fi
31265
31266    if test "x$FOUND_CORES" = xyes; then
31267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31268$as_echo "$NUM_CORES" >&6; }
31269    else
31270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31271$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31272        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31273$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31274    fi
31275
31276
31277  else
31278    NUM_CORES=$with_num_cores
31279  fi
31280
31281
31282
31283  # How much memory do we have on this build system?
31284
31285# Check whether --with-memory-size was given.
31286if test "${with_memory_size+set}" = set; then :
31287  withval=$with_memory_size;
31288fi
31289
31290  if test "x$with_memory_size" = x; then
31291    # The memory size was not specified, try to probe it.
31292
31293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31294$as_echo_n "checking for memory size... " >&6; }
31295    # Default to 1024 MB
31296    MEMORY_SIZE=1024
31297    FOUND_MEM=no
31298
31299    if test -f /proc/meminfo; then
31300        # Looks like a Linux (or cygwin) system
31301        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31302        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31303        FOUND_MEM=yes
31304    elif test -x /usr/sbin/prtconf; then
31305        # Looks like a Solaris system
31306        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31307        FOUND_MEM=yes
31308    elif test -x /usr/sbin/system_profiler; then
31309        # Looks like a MacOSX system
31310        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31311        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31312        FOUND_MEM=yes
31313    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31314        # Windows, but without cygwin
31315        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31316        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31317        FOUND_MEM=yes
31318    fi
31319
31320    if test "x$FOUND_MEM" = xyes; then
31321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31322$as_echo "$MEMORY_SIZE MB" >&6; }
31323    else
31324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31325$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31327$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31328    fi
31329
31330  else
31331    MEMORY_SIZE=$with_memory_size
31332  fi
31333
31334
31335
31336  # Provide a decent default number of parallel jobs for make depending on
31337  # number of cores, amount of memory and machine architecture.
31338
31339# Check whether --with-jobs was given.
31340if test "${with_jobs+set}" = set; then :
31341  withval=$with_jobs;
31342fi
31343
31344  if test "x$with_jobs" = x; then
31345    # Number of jobs was not specified, calculate.
31346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
31347$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
31348    # Approximate memory in GB, rounding up a bit.
31349    memory_gb=`expr $MEMORY_SIZE / 1100`
31350    # Pick the lowest of memory in gb and number of cores.
31351    if test "$memory_gb" -lt "$NUM_CORES"; then
31352      JOBS="$memory_gb"
31353    else
31354      JOBS="$NUM_CORES"
31355      # On bigger machines, leave some room for other processes to run
31356      if test "$JOBS" -gt "4"; then
31357        JOBS=`expr $JOBS '*' 90 / 100`
31358      fi
31359    fi
31360    # Cap number of jobs to 16
31361    if test "$JOBS" -gt "16"; then
31362      JOBS=16
31363    fi
31364    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
31365$as_echo "$JOBS" >&6; }
31366  else
31367    JOBS=$with_jobs
31368  fi
31369
31370
31371
31372# Setup smart javac (after cores and memory have been setup)
31373
31374
31375# Check whether --with-sjavac-server-java was given.
31376if test "${with_sjavac_server_java+set}" = set; then :
31377  withval=$with_sjavac_server_java;
31378fi
31379
31380
31381if test "x$with_sjavac_server_java" != x; then
31382    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31383    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31384    if test "x$FOUND_VERSION" = x; then
31385        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31386    fi
31387else
31388    SJAVAC_SERVER_JAVA=""
31389    # Hotspot specific options.
31390
31391    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31392    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31393    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31394    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31395    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31396        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31397    fi
31398
31399    # JRockit specific options.
31400
31401    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31402    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31403    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31404    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31405    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31406        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31407    fi
31408
31409    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31410fi
31411
31412
31413
31414# Check whether --with-sjavac-server-cores was given.
31415if test "${with_sjavac_server_cores+set}" = set; then :
31416  withval=$with_sjavac_server_cores;
31417fi
31418
31419if test "x$with_sjavac_server_cores" != x; then
31420    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31421else
31422    if test "$NUM_CORES" -gt 16; then
31423        # We set this arbitrary limit because we want to limit the heap
31424        # size of the javac server.
31425        # In the future we will make the javac compilers in the server
31426        # share more and more state, thus enabling us to use more and
31427        # more concurrent threads in the server.
31428        SJAVAC_SERVER_CORES="16"
31429    else
31430        SJAVAC_SERVER_CORES="$NUM_CORES"
31431    fi
31432
31433    if test "$MEMORY_SIZE" -gt "17000"; then
31434        MAX_HEAP_MEM=10000
31435
31436    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31437    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31438    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31439    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31440    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31441        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31442    fi
31443
31444
31445    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31446    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31447    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31448    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -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 -Xms10G -Xmx10G"
31451    fi
31452
31453    elif test "$MEMORY_SIZE" -gt "10000"; then
31454        MAX_HEAP_MEM=6000
31455
31456    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31457    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31458    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31459    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31460    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31461        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31462    fi
31463
31464
31465    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31466    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31467    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31468    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -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 -Xms6G -Xmx6G"
31471    fi
31472
31473    elif test "$MEMORY_SIZE" -gt "5000"; then
31474        MAX_HEAP_MEM=3000
31475
31476    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31477    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31478    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31479    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31480    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31481        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31482    fi
31483
31484
31485    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31486    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31487    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31488    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -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 -Xmx3G"
31491    fi
31492
31493    elif test "$MEMORY_SIZE" -gt "3800"; then
31494        MAX_HEAP_MEM=2500
31495
31496    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31497    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31498    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31499    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -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 -Xms1G -Xmx2500M"
31502    fi
31503
31504    elif test "$MEMORY_SIZE" -gt "1900"; then
31505        MAX_HEAP_MEM=1200
31506
31507    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31508    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31509    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31510    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -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 -Xms700M -Xmx1400M"
31513    fi
31514
31515    elif test "$MEMORY_SIZE" -gt "1000"; then
31516        MAX_HEAP_MEM=900
31517
31518    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31519    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31520    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31521    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -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 -Xms400M -Xmx1100M"
31524    fi
31525
31526    else
31527        MAX_HEAP_MEM=512
31528
31529    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31530    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31531    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31532    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -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 -Xms256M -Xmx512M"
31535    fi
31536
31537    fi
31538
31539
31540    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31541    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31542    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31543    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31544    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31545        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31546    fi
31547
31548
31549    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31550    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31551    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31552    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31553    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31554        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31555    fi
31556
31557
31558    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31559    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31560    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31561    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31562    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31563        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31564    fi
31565
31566
31567    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31568    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31569        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31570$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31571        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31572        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31573$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31574    fi
31575fi
31576
31577
31578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31579$as_echo_n "checking whether to use sjavac... " >&6; }
31580# Check whether --enable-sjavac was given.
31581if test "${enable_sjavac+set}" = set; then :
31582  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31583else
31584  ENABLE_SJAVAC='no'
31585fi
31586
31587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31588$as_echo "$ENABLE_SJAVAC" >&6; }
31589
31590
31591if test "x$ENABLE_SJAVAC" = xyes; then
31592    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31593else
31594    SJAVAC_SERVER_DIR=
31595fi
31596
31597
31598
31599
31600# Can the C/C++ compiler use precompiled headers?
31601
31602
31603###############################################################################
31604#
31605# Can the C/C++ compiler use precompiled headers?
31606#
31607# Check whether --enable-precompiled-headers was given.
31608if test "${enable_precompiled_headers+set}" = set; then :
31609  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31610else
31611  ENABLE_PRECOMPH=yes
31612fi
31613
31614
31615USE_PRECOMPILED_HEADER=1
31616if test "x$ENABLE_PRECOMPH" = xno; then
31617    USE_PRECOMPILED_HEADER=0
31618fi
31619
31620if test "x$ENABLE_PRECOMPH" = xyes; then
31621    # Check that the compiler actually supports precomp headers.
31622    if test "x$GCC" = xyes; then
31623         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31624$as_echo_n "checking that precompiled headers work... " >&6; }
31625         echo "int alfa();" > conftest.h
31626         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31627         if test ! -f conftest.hpp.gch; then
31628             USE_PRECOMPILED_HEADER=0
31629             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31630$as_echo "no" >&6; }
31631         else
31632             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31633$as_echo "yes" >&6; }
31634         fi
31635         rm -f conftest.h conftest.hpp.gch
31636    fi
31637fi
31638
31639
31640
31641
31642# Setup use of ccache, if available
31643
31644    # Check whether --enable-ccache was given.
31645if test "${enable_ccache+set}" = set; then :
31646  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31647else
31648  ENABLE_CCACHE=yes
31649fi
31650
31651    if test "x$ENABLE_CCACHE" = xyes; then
31652        # Extract the first word of "ccache", so it can be a program name with args.
31653set dummy ccache; ac_word=$2
31654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31655$as_echo_n "checking for $ac_word... " >&6; }
31656if test "${ac_cv_path_CCACHE+set}" = set; then :
31657  $as_echo_n "(cached) " >&6
31658else
31659  case $CCACHE in
31660  [\\/]* | ?:[\\/]*)
31661  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31662  ;;
31663  *)
31664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31665for as_dir in $PATH
31666do
31667  IFS=$as_save_IFS
31668  test -z "$as_dir" && as_dir=.
31669    for ac_exec_ext in '' $ac_executable_extensions; do
31670  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31671    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31673    break 2
31674  fi
31675done
31676  done
31677IFS=$as_save_IFS
31678
31679  ;;
31680esac
31681fi
31682CCACHE=$ac_cv_path_CCACHE
31683if test -n "$CCACHE"; then
31684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31685$as_echo "$CCACHE" >&6; }
31686else
31687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31688$as_echo "no" >&6; }
31689fi
31690
31691
31692    else
31693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31694$as_echo_n "checking for ccache... " >&6; }
31695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31696$as_echo "explicitly disabled" >&6; }
31697        CCACHE=
31698    fi
31699
31700
31701
31702# Check whether --with-ccache-dir was given.
31703if test "${with_ccache_dir+set}" = set; then :
31704  withval=$with_ccache_dir;
31705fi
31706
31707
31708    if test "x$with_ccache_dir" != x; then
31709        # When using a non home ccache directory, assume the use is to share ccache files
31710        # with other users. Thus change the umask.
31711        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31712    fi
31713    CCACHE_FOUND=""
31714    if test "x$CCACHE" != x; then
31715
31716    if test "x$CCACHE" != x; then
31717        CCACHE_FOUND="true"
31718        # Only use ccache if it is 3.1.4 or later, which supports
31719        # precompiled headers.
31720        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31721$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31722        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31723        if test "x$HAS_GOOD_CCACHE" = x; then
31724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31725$as_echo "no, disabling ccache" >&6; }
31726            CCACHE=
31727        else
31728            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31729$as_echo "yes" >&6; }
31730            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31731$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31732            PUSHED_FLAGS="$CXXFLAGS"
31733            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31734            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31735/* end confdefs.h.  */
31736
31737int
31738main ()
31739{
31740
31741  ;
31742  return 0;
31743}
31744_ACEOF
31745if ac_fn_cxx_try_compile "$LINENO"; then :
31746  CC_KNOWS_CCACHE_TRICK=yes
31747else
31748  CC_KNOWS_CCACHE_TRICK=no
31749fi
31750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31751            CXXFLAGS="$PUSHED_FLAGS"
31752            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31753                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31754$as_echo "yes" >&6; }
31755            else
31756                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31757$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31758                CCACHE=
31759            fi
31760        fi
31761    fi
31762
31763    if test "x$CCACHE" != x; then
31764        CCACHE_SLOPPINESS=time_macros
31765        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31766        CCACHE_FLAGS=-fpch-preprocess
31767
31768        if test "x$SET_CCACHE_DIR" != x; then
31769            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31770	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31771        fi
31772    fi
31773
31774    fi
31775
31776
31777###############################################################################
31778#
31779# And now the finish...
31780#
31781###############################################################################
31782
31783# Check for some common pitfalls
31784
31785  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31786    file_to_test="$SRC_ROOT/LICENSE"
31787    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31788      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
31789    fi
31790  fi
31791
31792
31793
31794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31795$as_echo_n "checking if build directory is on local disk... " >&6; }
31796
31797	# df -l lists only local disks; if the given directory is not found then
31798	# a non-zero exit code is given
31799  if test "x$DF" = x; then
31800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31801      # msys does not have df; use Windows "net use" instead.
31802      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31803      if test "x$IS_NETWORK_DISK" = x; then
31804        OUTPUT_DIR_IS_LOCAL="yes"
31805      else
31806        OUTPUT_DIR_IS_LOCAL="no"
31807      fi
31808    else
31809      # No df here, say it's local
31810      OUTPUT_DIR_IS_LOCAL="yes"
31811    fi
31812  else
31813    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31814      OUTPUT_DIR_IS_LOCAL="yes"
31815    else
31816      OUTPUT_DIR_IS_LOCAL="no"
31817    fi
31818  fi
31819
31820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31821$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31822
31823
31824
31825# Check if the user has any old-style ALT_ variables set.
31826FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31827
31828# Before generating output files, test if they exist. If they do, this is a reconfigure.
31829# Since we can't properly handle the dependencies for this, warn the user about the situation
31830if test -e $OUTPUT_ROOT/spec.gmk; then
31831  IS_RECONFIGURE=yes
31832else
31833  IS_RECONFIGURE=no
31834fi
31835
31836if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31837  HIDE_PERFORMANCE_HINTS=yes
31838else
31839  HIDE_PERFORMANCE_HINTS=no
31840  # Hide it the next time around...
31841  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31842fi
31843
31844
31845
31846# At the end, call the custom hook. (Dummy macro if no custom sources available)
31847
31848
31849# We're messing a bit with internal autoconf variables to put the config.status
31850# in the output directory instead of the current directory.
31851CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31852# Create the actual output files. Now the main work of configure is done.
31853cat >confcache <<\_ACEOF
31854# This file is a shell script that caches the results of configure
31855# tests run on this system so they can be shared between configure
31856# scripts and configure runs, see configure's option --config-cache.
31857# It is not useful on other systems.  If it contains results you don't
31858# want to keep, you may remove or edit it.
31859#
31860# config.status only pays attention to the cache file if you give it
31861# the --recheck option to rerun configure.
31862#
31863# `ac_cv_env_foo' variables (set or unset) will be overridden when
31864# loading this file, other *unset* `ac_cv_foo' will be assigned the
31865# following values.
31866
31867_ACEOF
31868
31869# The following way of writing the cache mishandles newlines in values,
31870# but we know of no workaround that is simple, portable, and efficient.
31871# So, we kill variables containing newlines.
31872# Ultrix sh set writes to stderr and can't be redirected directly,
31873# and sets the high bit in the cache file unless we assign to the vars.
31874(
31875  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31876    eval ac_val=\$$ac_var
31877    case $ac_val in #(
31878    *${as_nl}*)
31879      case $ac_var in #(
31880      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31881$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31882      esac
31883      case $ac_var in #(
31884      _ | IFS | as_nl) ;; #(
31885      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31886      *) { eval $ac_var=; unset $ac_var;} ;;
31887      esac ;;
31888    esac
31889  done
31890
31891  (set) 2>&1 |
31892    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31893    *${as_nl}ac_space=\ *)
31894      # `set' does not quote correctly, so add quotes: double-quote
31895      # substitution turns \\\\ into \\, and sed turns \\ into \.
31896      sed -n \
31897	"s/'/'\\\\''/g;
31898	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31899      ;; #(
31900    *)
31901      # `set' quotes correctly as required by POSIX, so do not add quotes.
31902      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31903      ;;
31904    esac |
31905    sort
31906) |
31907  sed '
31908     /^ac_cv_env_/b end
31909     t clear
31910     :clear
31911     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31912     t end
31913     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31914     :end' >>confcache
31915if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31916  if test -w "$cache_file"; then
31917    test "x$cache_file" != "x/dev/null" &&
31918      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31919$as_echo "$as_me: updating cache $cache_file" >&6;}
31920    cat confcache >$cache_file
31921  else
31922    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31923$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31924  fi
31925fi
31926rm -f confcache
31927
31928test "x$prefix" = xNONE && prefix=$ac_default_prefix
31929# Let make expand exec_prefix.
31930test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31931
31932DEFS=-DHAVE_CONFIG_H
31933
31934ac_libobjs=
31935ac_ltlibobjs=
31936U=
31937for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31938  # 1. Remove the extension, and $U if already installed.
31939  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31940  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31941  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31942  #    will be set to the directory where LIBOBJS objects are built.
31943  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31944  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31945done
31946LIBOBJS=$ac_libobjs
31947
31948LTLIBOBJS=$ac_ltlibobjs
31949
31950
31951
31952: ${CONFIG_STATUS=./config.status}
31953ac_write_fail=0
31954ac_clean_files_save=$ac_clean_files
31955ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31956{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31957$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31958as_write_fail=0
31959cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31960#! $SHELL
31961# Generated by $as_me.
31962# Run this file to recreate the current configuration.
31963# Compiler output produced by configure, useful for debugging
31964# configure, is in config.log if it exists.
31965
31966debug=false
31967ac_cs_recheck=false
31968ac_cs_silent=false
31969
31970SHELL=\${CONFIG_SHELL-$SHELL}
31971export SHELL
31972_ASEOF
31973cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31974## -------------------- ##
31975## M4sh Initialization. ##
31976## -------------------- ##
31977
31978# Be more Bourne compatible
31979DUALCASE=1; export DUALCASE # for MKS sh
31980if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31981  emulate sh
31982  NULLCMD=:
31983  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31984  # is contrary to our usage.  Disable this feature.
31985  alias -g '${1+"$@"}'='"$@"'
31986  setopt NO_GLOB_SUBST
31987else
31988  case `(set -o) 2>/dev/null` in #(
31989  *posix*) :
31990    set -o posix ;; #(
31991  *) :
31992     ;;
31993esac
31994fi
31995
31996
31997as_nl='
31998'
31999export as_nl
32000# Printing a long string crashes Solaris 7 /usr/bin/printf.
32001as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32002as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32003as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32004# Prefer a ksh shell builtin over an external printf program on Solaris,
32005# but without wasting forks for bash or zsh.
32006if test -z "$BASH_VERSION$ZSH_VERSION" \
32007    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32008  as_echo='print -r --'
32009  as_echo_n='print -rn --'
32010elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32011  as_echo='printf %s\n'
32012  as_echo_n='printf %s'
32013else
32014  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32015    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
32016    as_echo_n='/usr/ucb/echo -n'
32017  else
32018    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32019    as_echo_n_body='eval
32020      arg=$1;
32021      case $arg in #(
32022      *"$as_nl"*)
32023	expr "X$arg" : "X\\(.*\\)$as_nl";
32024	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32025      esac;
32026      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
32027    '
32028    export as_echo_n_body
32029    as_echo_n='sh -c $as_echo_n_body as_echo'
32030  fi
32031  export as_echo_body
32032  as_echo='sh -c $as_echo_body as_echo'
32033fi
32034
32035# The user is always right.
32036if test "${PATH_SEPARATOR+set}" != set; then
32037  PATH_SEPARATOR=:
32038  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32039    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32040      PATH_SEPARATOR=';'
32041  }
32042fi
32043
32044
32045# IFS
32046# We need space, tab and new line, in precisely that order.  Quoting is
32047# there to prevent editors from complaining about space-tab.
32048# (If _AS_PATH_WALK were called with IFS unset, it would disable word
32049# splitting by setting IFS to empty value.)
32050IFS=" ""	$as_nl"
32051
32052# Find who we are.  Look in the path if we contain no directory separator.
32053case $0 in #((
32054  *[\\/]* ) as_myself=$0 ;;
32055  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32056for as_dir in $PATH
32057do
32058  IFS=$as_save_IFS
32059  test -z "$as_dir" && as_dir=.
32060    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32061  done
32062IFS=$as_save_IFS
32063
32064     ;;
32065esac
32066# We did not find ourselves, most probably we were run as `sh COMMAND'
32067# in which case we are not to be found in the path.
32068if test "x$as_myself" = x; then
32069  as_myself=$0
32070fi
32071if test ! -f "$as_myself"; then
32072  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32073  exit 1
32074fi
32075
32076# Unset variables that we do not need and which cause bugs (e.g. in
32077# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
32078# suppresses any "Segmentation fault" message there.  '((' could
32079# trigger a bug in pdksh 5.2.14.
32080for as_var in BASH_ENV ENV MAIL MAILPATH
32081do eval test x\${$as_var+set} = xset \
32082  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32083done
32084PS1='$ '
32085PS2='> '
32086PS4='+ '
32087
32088# NLS nuisances.
32089LC_ALL=C
32090export LC_ALL
32091LANGUAGE=C
32092export LANGUAGE
32093
32094# CDPATH.
32095(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32096
32097
32098# as_fn_error STATUS ERROR [LINENO LOG_FD]
32099# ----------------------------------------
32100# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32101# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32102# script with STATUS, using 1 if that was 0.
32103as_fn_error ()
32104{
32105  as_status=$1; test $as_status -eq 0 && as_status=1
32106  if test "$4"; then
32107    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32108    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32109  fi
32110  $as_echo "$as_me: error: $2" >&2
32111  as_fn_exit $as_status
32112} # as_fn_error
32113
32114
32115# as_fn_set_status STATUS
32116# -----------------------
32117# Set $? to STATUS, without forking.
32118as_fn_set_status ()
32119{
32120  return $1
32121} # as_fn_set_status
32122
32123# as_fn_exit STATUS
32124# -----------------
32125# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32126as_fn_exit ()
32127{
32128  set +e
32129  as_fn_set_status $1
32130  exit $1
32131} # as_fn_exit
32132
32133# as_fn_unset VAR
32134# ---------------
32135# Portably unset VAR.
32136as_fn_unset ()
32137{
32138  { eval $1=; unset $1;}
32139}
32140as_unset=as_fn_unset
32141# as_fn_append VAR VALUE
32142# ----------------------
32143# Append the text in VALUE to the end of the definition contained in VAR. Take
32144# advantage of any shell optimizations that allow amortized linear growth over
32145# repeated appends, instead of the typical quadratic growth present in naive
32146# implementations.
32147if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32148  eval 'as_fn_append ()
32149  {
32150    eval $1+=\$2
32151  }'
32152else
32153  as_fn_append ()
32154  {
32155    eval $1=\$$1\$2
32156  }
32157fi # as_fn_append
32158
32159# as_fn_arith ARG...
32160# ------------------
32161# Perform arithmetic evaluation on the ARGs, and store the result in the
32162# global $as_val. Take advantage of shells that can avoid forks. The arguments
32163# must be portable across $(()) and expr.
32164if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32165  eval 'as_fn_arith ()
32166  {
32167    as_val=$(( $* ))
32168  }'
32169else
32170  as_fn_arith ()
32171  {
32172    as_val=`expr "$@" || test $? -eq 1`
32173  }
32174fi # as_fn_arith
32175
32176
32177if expr a : '\(a\)' >/dev/null 2>&1 &&
32178   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32179  as_expr=expr
32180else
32181  as_expr=false
32182fi
32183
32184if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32185  as_basename=basename
32186else
32187  as_basename=false
32188fi
32189
32190if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32191  as_dirname=dirname
32192else
32193  as_dirname=false
32194fi
32195
32196as_me=`$as_basename -- "$0" ||
32197$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32198	 X"$0" : 'X\(//\)$' \| \
32199	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32200$as_echo X/"$0" |
32201    sed '/^.*\/\([^/][^/]*\)\/*$/{
32202	    s//\1/
32203	    q
32204	  }
32205	  /^X\/\(\/\/\)$/{
32206	    s//\1/
32207	    q
32208	  }
32209	  /^X\/\(\/\).*/{
32210	    s//\1/
32211	    q
32212	  }
32213	  s/.*/./; q'`
32214
32215# Avoid depending upon Character Ranges.
32216as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32217as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32218as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32219as_cr_digits='0123456789'
32220as_cr_alnum=$as_cr_Letters$as_cr_digits
32221
32222ECHO_C= ECHO_N= ECHO_T=
32223case `echo -n x` in #(((((
32224-n*)
32225  case `echo 'xy\c'` in
32226  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32227  xy)  ECHO_C='\c';;
32228  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32229       ECHO_T='	';;
32230  esac;;
32231*)
32232  ECHO_N='-n';;
32233esac
32234
32235rm -f conf$$ conf$$.exe conf$$.file
32236if test -d conf$$.dir; then
32237  rm -f conf$$.dir/conf$$.file
32238else
32239  rm -f conf$$.dir
32240  mkdir conf$$.dir 2>/dev/null
32241fi
32242if (echo >conf$$.file) 2>/dev/null; then
32243  if ln -s conf$$.file conf$$ 2>/dev/null; then
32244    as_ln_s='ln -s'
32245    # ... but there are two gotchas:
32246    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32247    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32248    # In both cases, we have to default to `cp -p'.
32249    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32250      as_ln_s='cp -p'
32251  elif ln conf$$.file conf$$ 2>/dev/null; then
32252    as_ln_s=ln
32253  else
32254    as_ln_s='cp -p'
32255  fi
32256else
32257  as_ln_s='cp -p'
32258fi
32259rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32260rmdir conf$$.dir 2>/dev/null
32261
32262
32263# as_fn_mkdir_p
32264# -------------
32265# Create "$as_dir" as a directory, including parents if necessary.
32266as_fn_mkdir_p ()
32267{
32268
32269  case $as_dir in #(
32270  -*) as_dir=./$as_dir;;
32271  esac
32272  test -d "$as_dir" || eval $as_mkdir_p || {
32273    as_dirs=
32274    while :; do
32275      case $as_dir in #(
32276      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32277      *) as_qdir=$as_dir;;
32278      esac
32279      as_dirs="'$as_qdir' $as_dirs"
32280      as_dir=`$as_dirname -- "$as_dir" ||
32281$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32282	 X"$as_dir" : 'X\(//\)[^/]' \| \
32283	 X"$as_dir" : 'X\(//\)$' \| \
32284	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32285$as_echo X"$as_dir" |
32286    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32287	    s//\1/
32288	    q
32289	  }
32290	  /^X\(\/\/\)[^/].*/{
32291	    s//\1/
32292	    q
32293	  }
32294	  /^X\(\/\/\)$/{
32295	    s//\1/
32296	    q
32297	  }
32298	  /^X\(\/\).*/{
32299	    s//\1/
32300	    q
32301	  }
32302	  s/.*/./; q'`
32303      test -d "$as_dir" && break
32304    done
32305    test -z "$as_dirs" || eval "mkdir $as_dirs"
32306  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32307
32308
32309} # as_fn_mkdir_p
32310if mkdir -p . 2>/dev/null; then
32311  as_mkdir_p='mkdir -p "$as_dir"'
32312else
32313  test -d ./-p && rmdir ./-p
32314  as_mkdir_p=false
32315fi
32316
32317if test -x / >/dev/null 2>&1; then
32318  as_test_x='test -x'
32319else
32320  if ls -dL / >/dev/null 2>&1; then
32321    as_ls_L_option=L
32322  else
32323    as_ls_L_option=
32324  fi
32325  as_test_x='
32326    eval sh -c '\''
32327      if test -d "$1"; then
32328	test -d "$1/.";
32329      else
32330	case $1 in #(
32331	-*)set "./$1";;
32332	esac;
32333	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32334	???[sx]*):;;*)false;;esac;fi
32335    '\'' sh
32336  '
32337fi
32338as_executable_p=$as_test_x
32339
32340# Sed expression to map a string onto a valid CPP name.
32341as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32342
32343# Sed expression to map a string onto a valid variable name.
32344as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32345
32346
32347exec 6>&1
32348## ----------------------------------- ##
32349## Main body of $CONFIG_STATUS script. ##
32350## ----------------------------------- ##
32351_ASEOF
32352test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32353
32354cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32355# Save the log message, to keep $0 and so on meaningful, and to
32356# report actual input values of CONFIG_FILES etc. instead of their
32357# values after options handling.
32358ac_log="
32359This file was extended by OpenJDK $as_me jdk8, which was
32360generated by GNU Autoconf 2.67.  Invocation command line was
32361
32362  CONFIG_FILES    = $CONFIG_FILES
32363  CONFIG_HEADERS  = $CONFIG_HEADERS
32364  CONFIG_LINKS    = $CONFIG_LINKS
32365  CONFIG_COMMANDS = $CONFIG_COMMANDS
32366  $ $0 $@
32367
32368on `(hostname || uname -n) 2>/dev/null | sed 1q`
32369"
32370
32371_ACEOF
32372
32373case $ac_config_files in *"
32374"*) set x $ac_config_files; shift; ac_config_files=$*;;
32375esac
32376
32377case $ac_config_headers in *"
32378"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32379esac
32380
32381
32382cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32383# Files that config.status was made for.
32384config_files="$ac_config_files"
32385config_headers="$ac_config_headers"
32386
32387_ACEOF
32388
32389cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32390ac_cs_usage="\
32391\`$as_me' instantiates files and other configuration actions
32392from templates according to the current configuration.  Unless the files
32393and actions are specified as TAGs, all are instantiated by default.
32394
32395Usage: $0 [OPTION]... [TAG]...
32396
32397  -h, --help       print this help, then exit
32398  -V, --version    print version number and configuration settings, then exit
32399      --config     print configuration, then exit
32400  -q, --quiet, --silent
32401                   do not print progress messages
32402  -d, --debug      don't remove temporary files
32403      --recheck    update $as_me by reconfiguring in the same conditions
32404      --file=FILE[:TEMPLATE]
32405                   instantiate the configuration file FILE
32406      --header=FILE[:TEMPLATE]
32407                   instantiate the configuration header FILE
32408
32409Configuration files:
32410$config_files
32411
32412Configuration headers:
32413$config_headers
32414
32415Report bugs to <build-dev@openjdk.java.net>.
32416OpenJDK home page: <http://openjdk.java.net>."
32417
32418_ACEOF
32419cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32420ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32421ac_cs_version="\\
32422OpenJDK config.status jdk8
32423configured by $0, generated by GNU Autoconf 2.67,
32424  with options \\"\$ac_cs_config\\"
32425
32426Copyright (C) 2010 Free Software Foundation, Inc.
32427This config.status script is free software; the Free Software Foundation
32428gives unlimited permission to copy, distribute and modify it."
32429
32430ac_pwd='$ac_pwd'
32431srcdir='$srcdir'
32432AWK='$AWK'
32433test -n "\$AWK" || AWK=awk
32434_ACEOF
32435
32436cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32437# The default lists apply if the user does not specify any file.
32438ac_need_defaults=:
32439while test $# != 0
32440do
32441  case $1 in
32442  --*=?*)
32443    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32444    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32445    ac_shift=:
32446    ;;
32447  --*=)
32448    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32449    ac_optarg=
32450    ac_shift=:
32451    ;;
32452  *)
32453    ac_option=$1
32454    ac_optarg=$2
32455    ac_shift=shift
32456    ;;
32457  esac
32458
32459  case $ac_option in
32460  # Handling of the options.
32461  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32462    ac_cs_recheck=: ;;
32463  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32464    $as_echo "$ac_cs_version"; exit ;;
32465  --config | --confi | --conf | --con | --co | --c )
32466    $as_echo "$ac_cs_config"; exit ;;
32467  --debug | --debu | --deb | --de | --d | -d )
32468    debug=: ;;
32469  --file | --fil | --fi | --f )
32470    $ac_shift
32471    case $ac_optarg in
32472    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32473    '') as_fn_error $? "missing file argument" ;;
32474    esac
32475    as_fn_append CONFIG_FILES " '$ac_optarg'"
32476    ac_need_defaults=false;;
32477  --header | --heade | --head | --hea )
32478    $ac_shift
32479    case $ac_optarg in
32480    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32481    esac
32482    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32483    ac_need_defaults=false;;
32484  --he | --h)
32485    # Conflict between --help and --header
32486    as_fn_error $? "ambiguous option: \`$1'
32487Try \`$0 --help' for more information.";;
32488  --help | --hel | -h )
32489    $as_echo "$ac_cs_usage"; exit ;;
32490  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32491  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32492    ac_cs_silent=: ;;
32493
32494  # This is an error.
32495  -*) as_fn_error $? "unrecognized option: \`$1'
32496Try \`$0 --help' for more information." ;;
32497
32498  *) as_fn_append ac_config_targets " $1"
32499     ac_need_defaults=false ;;
32500
32501  esac
32502  shift
32503done
32504
32505ac_configure_extra_args=
32506
32507if $ac_cs_silent; then
32508  exec 6>/dev/null
32509  ac_configure_extra_args="$ac_configure_extra_args --silent"
32510fi
32511
32512_ACEOF
32513cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32514if \$ac_cs_recheck; then
32515  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32516  shift
32517  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32518  CONFIG_SHELL='$SHELL'
32519  export CONFIG_SHELL
32520  exec "\$@"
32521fi
32522
32523_ACEOF
32524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32525exec 5>>config.log
32526{
32527  echo
32528  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32529## Running $as_me. ##
32530_ASBOX
32531  $as_echo "$ac_log"
32532} >&5
32533
32534_ACEOF
32535cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32536_ACEOF
32537
32538cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32539
32540# Handling of arguments.
32541for ac_config_target in $ac_config_targets
32542do
32543  case $ac_config_target in
32544    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32545    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32546    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32547    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32548    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32549    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32550    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32551
32552  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32553  esac
32554done
32555
32556
32557# If the user did not use the arguments to specify the items to instantiate,
32558# then the envvar interface is used.  Set only those that are not.
32559# We use the long form for the default assignment because of an extremely
32560# bizarre bug on SunOS 4.1.3.
32561if $ac_need_defaults; then
32562  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32563  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32564fi
32565
32566# Have a temporary directory for convenience.  Make it in the build tree
32567# simply because there is no reason against having it here, and in addition,
32568# creating and moving files from /tmp can sometimes cause problems.
32569# Hook for its removal unless debugging.
32570# Note that there is a small window in which the directory will not be cleaned:
32571# after its creation but before its name has been assigned to `$tmp'.
32572$debug ||
32573{
32574  tmp=
32575  trap 'exit_status=$?
32576  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32577' 0
32578  trap 'as_fn_exit 1' 1 2 13 15
32579}
32580# Create a (secure) tmp directory for tmp files.
32581
32582{
32583  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32584  test -n "$tmp" && test -d "$tmp"
32585}  ||
32586{
32587  tmp=./conf$$-$RANDOM
32588  (umask 077 && mkdir "$tmp")
32589} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32590
32591# Set up the scripts for CONFIG_FILES section.
32592# No need to generate them if there are no CONFIG_FILES.
32593# This happens for instance with `./config.status config.h'.
32594if test -n "$CONFIG_FILES"; then
32595
32596
32597ac_cr=`echo X | tr X '\015'`
32598# On cygwin, bash can eat \r inside `` if the user requested igncr.
32599# But we know of no other shell where ac_cr would be empty at this
32600# point, so we can use a bashism as a fallback.
32601if test "x$ac_cr" = x; then
32602  eval ac_cr=\$\'\\r\'
32603fi
32604ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32605if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32606  ac_cs_awk_cr='\\r'
32607else
32608  ac_cs_awk_cr=$ac_cr
32609fi
32610
32611echo 'BEGIN {' >"$tmp/subs1.awk" &&
32612_ACEOF
32613
32614
32615{
32616  echo "cat >conf$$subs.awk <<_ACEOF" &&
32617  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32618  echo "_ACEOF"
32619} >conf$$subs.sh ||
32620  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32621ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32622ac_delim='%!_!# '
32623for ac_last_try in false false false false false :; do
32624  . ./conf$$subs.sh ||
32625    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32626
32627  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32628  if test $ac_delim_n = $ac_delim_num; then
32629    break
32630  elif $ac_last_try; then
32631    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32632  else
32633    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32634  fi
32635done
32636rm -f conf$$subs.sh
32637
32638cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32639cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32640_ACEOF
32641sed -n '
32642h
32643s/^/S["/; s/!.*/"]=/
32644p
32645g
32646s/^[^!]*!//
32647:repl
32648t repl
32649s/'"$ac_delim"'$//
32650t delim
32651:nl
32652h
32653s/\(.\{148\}\)..*/\1/
32654t more1
32655s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32656p
32657n
32658b repl
32659:more1
32660s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32661p
32662g
32663s/.\{148\}//
32664t nl
32665:delim
32666h
32667s/\(.\{148\}\)..*/\1/
32668t more2
32669s/["\\]/\\&/g; s/^/"/; s/$/"/
32670p
32671b
32672:more2
32673s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32674p
32675g
32676s/.\{148\}//
32677t delim
32678' <conf$$subs.awk | sed '
32679/^[^""]/{
32680  N
32681  s/\n//
32682}
32683' >>$CONFIG_STATUS || ac_write_fail=1
32684rm -f conf$$subs.awk
32685cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32686_ACAWK
32687cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32688  for (key in S) S_is_set[key] = 1
32689  FS = ""
32690
32691}
32692{
32693  line = $ 0
32694  nfields = split(line, field, "@")
32695  substed = 0
32696  len = length(field[1])
32697  for (i = 2; i < nfields; i++) {
32698    key = field[i]
32699    keylen = length(key)
32700    if (S_is_set[key]) {
32701      value = S[key]
32702      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32703      len += length(value) + length(field[++i])
32704      substed = 1
32705    } else
32706      len += 1 + keylen
32707  }
32708
32709  print line
32710}
32711
32712_ACAWK
32713_ACEOF
32714cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32715if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32716  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32717else
32718  cat
32719fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32720  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32721_ACEOF
32722
32723# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32724# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32725# trailing colons and then remove the whole line if VPATH becomes empty
32726# (actually we leave an empty line to preserve line numbers).
32727if test "x$srcdir" = x.; then
32728  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32729h
32730s///
32731s/^/:/
32732s/[	 ]*$/:/
32733s/:\$(srcdir):/:/g
32734s/:\${srcdir}:/:/g
32735s/:@srcdir@:/:/g
32736s/^:*//
32737s/:*$//
32738x
32739s/\(=[	 ]*\).*/\1/
32740G
32741s/\n//
32742s/^[^=]*=[	 ]*$//
32743}'
32744fi
32745
32746cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32747fi # test -n "$CONFIG_FILES"
32748
32749# Set up the scripts for CONFIG_HEADERS section.
32750# No need to generate them if there are no CONFIG_HEADERS.
32751# This happens for instance with `./config.status Makefile'.
32752if test -n "$CONFIG_HEADERS"; then
32753cat >"$tmp/defines.awk" <<\_ACAWK ||
32754BEGIN {
32755_ACEOF
32756
32757# Transform confdefs.h into an awk script `defines.awk', embedded as
32758# here-document in config.status, that substitutes the proper values into
32759# config.h.in to produce config.h.
32760
32761# Create a delimiter string that does not exist in confdefs.h, to ease
32762# handling of long lines.
32763ac_delim='%!_!# '
32764for ac_last_try in false false :; do
32765  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32766  if test -z "$ac_t"; then
32767    break
32768  elif $ac_last_try; then
32769    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32770  else
32771    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32772  fi
32773done
32774
32775# For the awk script, D is an array of macro values keyed by name,
32776# likewise P contains macro parameters if any.  Preserve backslash
32777# newline sequences.
32778
32779ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32780sed -n '
32781s/.\{148\}/&'"$ac_delim"'/g
32782t rset
32783:rset
32784s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32785t def
32786d
32787:def
32788s/\\$//
32789t bsnl
32790s/["\\]/\\&/g
32791s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32792D["\1"]=" \3"/p
32793s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32794d
32795:bsnl
32796s/["\\]/\\&/g
32797s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32798D["\1"]=" \3\\\\\\n"\\/p
32799t cont
32800s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32801t cont
32802d
32803:cont
32804n
32805s/.\{148\}/&'"$ac_delim"'/g
32806t clear
32807:clear
32808s/\\$//
32809t bsnlc
32810s/["\\]/\\&/g; s/^/"/; s/$/"/p
32811d
32812:bsnlc
32813s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32814b cont
32815' <confdefs.h | sed '
32816s/'"$ac_delim"'/"\\\
32817"/g' >>$CONFIG_STATUS || ac_write_fail=1
32818
32819cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32820  for (key in D) D_is_set[key] = 1
32821  FS = ""
32822}
32823/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32824  line = \$ 0
32825  split(line, arg, " ")
32826  if (arg[1] == "#") {
32827    defundef = arg[2]
32828    mac1 = arg[3]
32829  } else {
32830    defundef = substr(arg[1], 2)
32831    mac1 = arg[2]
32832  }
32833  split(mac1, mac2, "(") #)
32834  macro = mac2[1]
32835  prefix = substr(line, 1, index(line, defundef) - 1)
32836  if (D_is_set[macro]) {
32837    # Preserve the white space surrounding the "#".
32838    print prefix "define", macro P[macro] D[macro]
32839    next
32840  } else {
32841    # Replace #undef with comments.  This is necessary, for example,
32842    # in the case of _POSIX_SOURCE, which is predefined and required
32843    # on some systems where configure will not decide to define it.
32844    if (defundef == "undef") {
32845      print "/*", prefix defundef, macro, "*/"
32846      next
32847    }
32848  }
32849}
32850{ print }
32851_ACAWK
32852_ACEOF
32853cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32854  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32855fi # test -n "$CONFIG_HEADERS"
32856
32857
32858eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32859shift
32860for ac_tag
32861do
32862  case $ac_tag in
32863  :[FHLC]) ac_mode=$ac_tag; continue;;
32864  esac
32865  case $ac_mode$ac_tag in
32866  :[FHL]*:*);;
32867  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32868  :[FH]-) ac_tag=-:-;;
32869  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32870  esac
32871  ac_save_IFS=$IFS
32872  IFS=:
32873  set x $ac_tag
32874  IFS=$ac_save_IFS
32875  shift
32876  ac_file=$1
32877  shift
32878
32879  case $ac_mode in
32880  :L) ac_source=$1;;
32881  :[FH])
32882    ac_file_inputs=
32883    for ac_f
32884    do
32885      case $ac_f in
32886      -) ac_f="$tmp/stdin";;
32887      *) # Look for the file first in the build tree, then in the source tree
32888	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32889	 # because $ac_f cannot contain `:'.
32890	 test -f "$ac_f" ||
32891	   case $ac_f in
32892	   [\\/$]*) false;;
32893	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32894	   esac ||
32895	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32896      esac
32897      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32898      as_fn_append ac_file_inputs " '$ac_f'"
32899    done
32900
32901    # Let's still pretend it is `configure' which instantiates (i.e., don't
32902    # use $as_me), people would be surprised to read:
32903    #    /* config.h.  Generated by config.status.  */
32904    configure_input='Generated from '`
32905	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32906	`' by configure.'
32907    if test x"$ac_file" != x-; then
32908      configure_input="$ac_file.  $configure_input"
32909      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32910$as_echo "$as_me: creating $ac_file" >&6;}
32911    fi
32912    # Neutralize special characters interpreted by sed in replacement strings.
32913    case $configure_input in #(
32914    *\&* | *\|* | *\\* )
32915       ac_sed_conf_input=`$as_echo "$configure_input" |
32916       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32917    *) ac_sed_conf_input=$configure_input;;
32918    esac
32919
32920    case $ac_tag in
32921    *:-:* | *:-) cat >"$tmp/stdin" \
32922      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32923    esac
32924    ;;
32925  esac
32926
32927  ac_dir=`$as_dirname -- "$ac_file" ||
32928$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32929	 X"$ac_file" : 'X\(//\)[^/]' \| \
32930	 X"$ac_file" : 'X\(//\)$' \| \
32931	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32932$as_echo X"$ac_file" |
32933    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32934	    s//\1/
32935	    q
32936	  }
32937	  /^X\(\/\/\)[^/].*/{
32938	    s//\1/
32939	    q
32940	  }
32941	  /^X\(\/\/\)$/{
32942	    s//\1/
32943	    q
32944	  }
32945	  /^X\(\/\).*/{
32946	    s//\1/
32947	    q
32948	  }
32949	  s/.*/./; q'`
32950  as_dir="$ac_dir"; as_fn_mkdir_p
32951  ac_builddir=.
32952
32953case "$ac_dir" in
32954.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32955*)
32956  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32957  # A ".." for each directory in $ac_dir_suffix.
32958  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32959  case $ac_top_builddir_sub in
32960  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32961  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32962  esac ;;
32963esac
32964ac_abs_top_builddir=$ac_pwd
32965ac_abs_builddir=$ac_pwd$ac_dir_suffix
32966# for backward compatibility:
32967ac_top_builddir=$ac_top_build_prefix
32968
32969case $srcdir in
32970  .)  # We are building in place.
32971    ac_srcdir=.
32972    ac_top_srcdir=$ac_top_builddir_sub
32973    ac_abs_top_srcdir=$ac_pwd ;;
32974  [\\/]* | ?:[\\/]* )  # Absolute name.
32975    ac_srcdir=$srcdir$ac_dir_suffix;
32976    ac_top_srcdir=$srcdir
32977    ac_abs_top_srcdir=$srcdir ;;
32978  *) # Relative name.
32979    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32980    ac_top_srcdir=$ac_top_build_prefix$srcdir
32981    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32982esac
32983ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32984
32985
32986  case $ac_mode in
32987  :F)
32988  #
32989  # CONFIG_FILE
32990  #
32991
32992_ACEOF
32993
32994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32995# If the template does not know about datarootdir, expand it.
32996# FIXME: This hack should be removed a few years after 2.60.
32997ac_datarootdir_hack=; ac_datarootdir_seen=
32998ac_sed_dataroot='
32999/datarootdir/ {
33000  p
33001  q
33002}
33003/@datadir@/p
33004/@docdir@/p
33005/@infodir@/p
33006/@localedir@/p
33007/@mandir@/p'
33008case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33009*datarootdir*) ac_datarootdir_seen=yes;;
33010*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
33011  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33012$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33013_ACEOF
33014cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33015  ac_datarootdir_hack='
33016  s&@datadir@&$datadir&g
33017  s&@docdir@&$docdir&g
33018  s&@infodir@&$infodir&g
33019  s&@localedir@&$localedir&g
33020  s&@mandir@&$mandir&g
33021  s&\\\${datarootdir}&$datarootdir&g' ;;
33022esac
33023_ACEOF
33024
33025# Neutralize VPATH when `$srcdir' = `.'.
33026# Shell code in configure.ac might set extrasub.
33027# FIXME: do we really want to maintain this feature?
33028cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33029ac_sed_extra="$ac_vpsub
33030$extrasub
33031_ACEOF
33032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33033:t
33034/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
33035s|@configure_input@|$ac_sed_conf_input|;t t
33036s&@top_builddir@&$ac_top_builddir_sub&;t t
33037s&@top_build_prefix@&$ac_top_build_prefix&;t t
33038s&@srcdir@&$ac_srcdir&;t t
33039s&@abs_srcdir@&$ac_abs_srcdir&;t t
33040s&@top_srcdir@&$ac_top_srcdir&;t t
33041s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
33042s&@builddir@&$ac_builddir&;t t
33043s&@abs_builddir@&$ac_abs_builddir&;t t
33044s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
33045$ac_datarootdir_hack
33046"
33047eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
33048  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33049
33050test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33051  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
33052  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
33053  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33054which seems to be undefined.  Please make sure it is defined" >&5
33055$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
33056which seems to be undefined.  Please make sure it is defined" >&2;}
33057
33058  rm -f "$tmp/stdin"
33059  case $ac_file in
33060  -) cat "$tmp/out" && rm -f "$tmp/out";;
33061  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
33062  esac \
33063  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33064 ;;
33065  :H)
33066  #
33067  # CONFIG_HEADER
33068  #
33069  if test x"$ac_file" != x-; then
33070    {
33071      $as_echo "/* $configure_input  */" \
33072      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
33073    } >"$tmp/config.h" \
33074      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33075    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
33076      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33077$as_echo "$as_me: $ac_file is unchanged" >&6;}
33078    else
33079      rm -f "$ac_file"
33080      mv "$tmp/config.h" "$ac_file" \
33081	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33082    fi
33083  else
33084    $as_echo "/* $configure_input  */" \
33085      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33086      || as_fn_error $? "could not create -" "$LINENO" 5
33087  fi
33088 ;;
33089
33090
33091  esac
33092
33093done # for ac_tag
33094
33095
33096as_fn_exit 0
33097_ACEOF
33098ac_clean_files=$ac_clean_files_save
33099
33100test $ac_write_fail = 0 ||
33101  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33102
33103
33104# configure is writing to config.log, and then calls config.status.
33105# config.status does its own redirection, appending to config.log.
33106# Unfortunately, on DOS this fails, as config.log is still kept open
33107# by configure, so config.status won't be able to write to it; its
33108# output is simply discarded.  So we exec the FD to /dev/null,
33109# effectively closing config.log, so it can be properly (re)opened and
33110# appended to by config.status.  When coming back to configure, we
33111# need to make the FD available again.
33112if test "$no_create" != yes; then
33113  ac_cs_success=:
33114  ac_config_status_args=
33115  test "$silent" = yes &&
33116    ac_config_status_args="$ac_config_status_args --quiet"
33117  exec 5>/dev/null
33118  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33119  exec 5>>config.log
33120  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33121  # would make configure fail if this is the last instruction.
33122  $ac_cs_success || as_fn_exit 1
33123fi
33124if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33125  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33126$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33127fi
33128
33129
33130# Make the compare script executable
33131$CHMOD +x $OUTPUT_ROOT/compare.sh
33132
33133# Finally output some useful information to the user
33134
33135# Finally output some useful information to the user
33136
33137if test "x$CCACHE_FOUND" != x; then
33138	if  test "x$HAS_GOOD_CCACHE" = x; then
33139		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33140		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33141	else
33142		CCACHE_STATUS="installed and in use"
33143	fi
33144else
33145	if test "x$GCC" = xyes; then
33146		CCACHE_STATUS="not installed (consider installing)"
33147		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33148	else
33149		CCACHE_STATUS="not available for your system"
33150	fi
33151fi
33152
33153printf "\n"
33154printf "====================================================\n"
33155printf "A new configuration has been successfully created in\n"
33156printf "$OUTPUT_ROOT\n"
33157if test "x$CONFIGURE_COMMAND_LINE" != x; then
33158	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33159else
33160	printf "using default settings.\n"
33161fi
33162
33163printf "\n"
33164printf "Configuration summary:\n"
33165printf "* Debug level:    $DEBUG_LEVEL\n"
33166printf "* JDK variant:    $JDK_VARIANT\n"
33167printf "* JVM variants:   $with_jvm_variants\n"
33168printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33169
33170printf "\n"
33171printf "Tools summary:\n"
33172if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33173  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33174fi
33175printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33176printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33177printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33178
33179printf "\n"
33180printf "Build performance summary:\n"
33181printf "* Cores to use:   $JOBS\n"
33182printf "* Memory limit:   $MEMORY_SIZE MB\n"
33183printf "* ccache status:  $CCACHE_STATUS\n"
33184printf "\n"
33185
33186if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33187	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33188	printf "$CCACHE_HELP_MSG\n"
33189
33190    # Print a helpful message on how to acquire the necessary build dependency.
33191    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33192    MISSING_DEPENDENCY=ccache
33193    PKGHANDLER_COMMAND=
33194
33195    case $PKGHANDLER in
33196	apt-get)
33197                apt_help     $MISSING_DEPENDENCY ;;
33198    yum)
33199                yum_help     $MISSING_DEPENDENCY ;;
33200	port)
33201                port_help    $MISSING_DEPENDENCY ;;
33202	pkgutil)
33203                pkgutil_help $MISSING_DEPENDENCY ;;
33204	pkgadd)
33205                pkgadd_help  $MISSING_DEPENDENCY ;;
33206    * )
33207      break ;;
33208    esac
33209
33210    if test "x$PKGHANDLER_COMMAND" != x; then
33211        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33212    fi
33213
33214	printf "$HELP_MSG\n"
33215	printf "\n"
33216fi
33217
33218if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33219	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33220	printf "will result in longer build times.\n"
33221	printf "\n"
33222fi
33223
33224if test "x$FOUND_ALT_VARIABLES" != "x"; then
33225	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33226	printf "These are not respected, and will be ignored. It is recommended\n"
33227	printf "that you clean your environment. The following variables are set:\n"
33228	printf "$FOUND_ALT_VARIABLES\n"
33229	printf "\n"
33230fi
33231
33232if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33233	printf "WARNING: Your build output directory is not on a local disk.\n"
33234	printf "This will severely degrade build performance!\n"
33235	printf "It is recommended that you create an output directory on a local disk,\n"
33236	printf "and run the configure script again from that directory.\n"
33237	printf "\n"
33238fi
33239
33240if test "x$IS_RECONFIGURE" = "xyes"; then
33241	printf "WARNING: The result of this configuration has overridden an older\n"
33242	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33243	printf "proper build. Failure to do so might result in strange build problems.\n"
33244	printf "\n"
33245fi
33246
33247