generated-configure.sh revision 575:3540aa40c868
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for OpenJDK jdk8.
4#
5# Report bugs to <build-dev@openjdk.java.net>.
6#
7#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10# Foundation, Inc.
11#
12#
13# This configure script is free software; the Free Software Foundation
14# gives unlimited permission to copy, distribute and modify it.
15## -------------------- ##
16## M4sh Initialization. ##
17## -------------------- ##
18
19# Be more Bourne compatible
20DUALCASE=1; export DUALCASE # for MKS sh
21if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22  emulate sh
23  NULLCMD=:
24  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25  # is contrary to our usage.  Disable this feature.
26  alias -g '${1+"$@"}'='"$@"'
27  setopt NO_GLOB_SUBST
28else
29  case `(set -o) 2>/dev/null` in #(
30  *posix*) :
31    set -o posix ;; #(
32  *) :
33     ;;
34esac
35fi
36
37
38as_nl='
39'
40export as_nl
41# Printing a long string crashes Solaris 7 /usr/bin/printf.
42as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45# Prefer a ksh shell builtin over an external printf program on Solaris,
46# but without wasting forks for bash or zsh.
47if test -z "$BASH_VERSION$ZSH_VERSION" \
48    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49  as_echo='print -r --'
50  as_echo_n='print -rn --'
51elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52  as_echo='printf %s\n'
53  as_echo_n='printf %s'
54else
55  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57    as_echo_n='/usr/ucb/echo -n'
58  else
59    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60    as_echo_n_body='eval
61      arg=$1;
62      case $arg in #(
63      *"$as_nl"*)
64	expr "X$arg" : "X\\(.*\\)$as_nl";
65	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66      esac;
67      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68    '
69    export as_echo_n_body
70    as_echo_n='sh -c $as_echo_n_body as_echo'
71  fi
72  export as_echo_body
73  as_echo='sh -c $as_echo_body as_echo'
74fi
75
76# The user is always right.
77if test "${PATH_SEPARATOR+set}" != set; then
78  PATH_SEPARATOR=:
79  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81      PATH_SEPARATOR=';'
82  }
83fi
84
85
86# IFS
87# We need space, tab and new line, in precisely that order.  Quoting is
88# there to prevent editors from complaining about space-tab.
89# (If _AS_PATH_WALK were called with IFS unset, it would disable word
90# splitting by setting IFS to empty value.)
91IFS=" ""	$as_nl"
92
93# Find who we are.  Look in the path if we contain no directory separator.
94case $0 in #((
95  *[\\/]* ) as_myself=$0 ;;
96  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99  IFS=$as_save_IFS
100  test -z "$as_dir" && as_dir=.
101    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102  done
103IFS=$as_save_IFS
104
105     ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110  as_myself=$0
111fi
112if test ! -f "$as_myself"; then
113  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114  exit 1
115fi
116
117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there.  '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138if test "x$CONFIG_SHELL" = x; then
139  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
140  emulate sh
141  NULLCMD=:
142  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
143  # is contrary to our usage.  Disable this feature.
144  alias -g '\${1+\"\$@\"}'='\"\$@\"'
145  setopt NO_GLOB_SUBST
146else
147  case \`(set -o) 2>/dev/null\` in #(
148  *posix*) :
149    set -o posix ;; #(
150  *) :
151     ;;
152esac
153fi
154"
155  as_required="as_fn_return () { (exit \$1); }
156as_fn_success () { as_fn_return 0; }
157as_fn_failure () { as_fn_return 1; }
158as_fn_ret_success () { return 0; }
159as_fn_ret_failure () { return 1; }
160
161exitcode=0
162as_fn_success || { exitcode=1; echo as_fn_success failed.; }
163as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
164as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
165as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
166if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
167
168else
169  exitcode=1; echo positional parameters were not saved.
170fi
171test x\$exitcode = x0 || exit 1"
172  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
173  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
174  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
175  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
176test \$(( 1 + 1 )) = 2 || exit 1"
177  if (eval "$as_required") 2>/dev/null; then :
178  as_have_required=yes
179else
180  as_have_required=no
181fi
182  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
183
184else
185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
186as_found=false
187for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
188do
189  IFS=$as_save_IFS
190  test -z "$as_dir" && as_dir=.
191  as_found=:
192  case $as_dir in #(
193	 /*)
194	   for as_base in sh bash ksh sh5; do
195	     # Try only shells that exist, to save several forks.
196	     as_shell=$as_dir/$as_base
197	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
198		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
199  CONFIG_SHELL=$as_shell as_have_required=yes
200		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
201  break 2
202fi
203fi
204	   done;;
205       esac
206  as_found=false
207done
208$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
209	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
210  CONFIG_SHELL=$SHELL as_have_required=yes
211fi; }
212IFS=$as_save_IFS
213
214
215      if test "x$CONFIG_SHELL" != x; then :
216  # We cannot yet assume a decent shell, so we have to provide a
217	# neutralization value for shells without unset; and this also
218	# works around shells that cannot unset nonexistent variables.
219	BASH_ENV=/dev/null
220	ENV=/dev/null
221	(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
222	export CONFIG_SHELL
223	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
224fi
225
226    if test x$as_have_required = xno; then :
227  $as_echo "$0: This script requires a shell more modern than all"
228  $as_echo "$0: the shells that I found on your system."
229  if test x${ZSH_VERSION+set} = xset ; then
230    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
231    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
232  else
233    $as_echo "$0: Please tell bug-autoconf@gnu.org and
234$0: build-dev@openjdk.java.net about your system, including
235$0: any error possibly output before this message. Then
236$0: install a modern shell, or manually run the script
237$0: under such a shell if you do have one."
238  fi
239  exit 1
240fi
241fi
242fi
243SHELL=${CONFIG_SHELL-/bin/sh}
244export SHELL
245# Unset more variables known to interfere with behavior of common tools.
246CLICOLOR_FORCE= GREP_OPTIONS=
247unset CLICOLOR_FORCE GREP_OPTIONS
248
249## --------------------- ##
250## M4sh Shell Functions. ##
251## --------------------- ##
252# as_fn_unset VAR
253# ---------------
254# Portably unset VAR.
255as_fn_unset ()
256{
257  { eval $1=; unset $1;}
258}
259as_unset=as_fn_unset
260
261# as_fn_set_status STATUS
262# -----------------------
263# Set $? to STATUS, without forking.
264as_fn_set_status ()
265{
266  return $1
267} # as_fn_set_status
268
269# as_fn_exit STATUS
270# -----------------
271# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
272as_fn_exit ()
273{
274  set +e
275  as_fn_set_status $1
276  exit $1
277} # as_fn_exit
278
279# as_fn_mkdir_p
280# -------------
281# Create "$as_dir" as a directory, including parents if necessary.
282as_fn_mkdir_p ()
283{
284
285  case $as_dir in #(
286  -*) as_dir=./$as_dir;;
287  esac
288  test -d "$as_dir" || eval $as_mkdir_p || {
289    as_dirs=
290    while :; do
291      case $as_dir in #(
292      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
293      *) as_qdir=$as_dir;;
294      esac
295      as_dirs="'$as_qdir' $as_dirs"
296      as_dir=`$as_dirname -- "$as_dir" ||
297$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
298	 X"$as_dir" : 'X\(//\)[^/]' \| \
299	 X"$as_dir" : 'X\(//\)$' \| \
300	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
301$as_echo X"$as_dir" |
302    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
303	    s//\1/
304	    q
305	  }
306	  /^X\(\/\/\)[^/].*/{
307	    s//\1/
308	    q
309	  }
310	  /^X\(\/\/\)$/{
311	    s//\1/
312	    q
313	  }
314	  /^X\(\/\).*/{
315	    s//\1/
316	    q
317	  }
318	  s/.*/./; q'`
319      test -d "$as_dir" && break
320    done
321    test -z "$as_dirs" || eval "mkdir $as_dirs"
322  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
323
324
325} # as_fn_mkdir_p
326# as_fn_append VAR VALUE
327# ----------------------
328# Append the text in VALUE to the end of the definition contained in VAR. Take
329# advantage of any shell optimizations that allow amortized linear growth over
330# repeated appends, instead of the typical quadratic growth present in naive
331# implementations.
332if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
333  eval 'as_fn_append ()
334  {
335    eval $1+=\$2
336  }'
337else
338  as_fn_append ()
339  {
340    eval $1=\$$1\$2
341  }
342fi # as_fn_append
343
344# as_fn_arith ARG...
345# ------------------
346# Perform arithmetic evaluation on the ARGs, and store the result in the
347# global $as_val. Take advantage of shells that can avoid forks. The arguments
348# must be portable across $(()) and expr.
349if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
350  eval 'as_fn_arith ()
351  {
352    as_val=$(( $* ))
353  }'
354else
355  as_fn_arith ()
356  {
357    as_val=`expr "$@" || test $? -eq 1`
358  }
359fi # as_fn_arith
360
361
362# as_fn_error STATUS ERROR [LINENO LOG_FD]
363# ----------------------------------------
364# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
365# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
366# script with STATUS, using 1 if that was 0.
367as_fn_error ()
368{
369  as_status=$1; test $as_status -eq 0 && as_status=1
370  if test "$4"; then
371    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
372    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
373  fi
374  $as_echo "$as_me: error: $2" >&2
375  as_fn_exit $as_status
376} # as_fn_error
377
378if expr a : '\(a\)' >/dev/null 2>&1 &&
379   test "X`expr 00001 : '.*\(...\)'`" = X001; then
380  as_expr=expr
381else
382  as_expr=false
383fi
384
385if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
386  as_basename=basename
387else
388  as_basename=false
389fi
390
391if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
392  as_dirname=dirname
393else
394  as_dirname=false
395fi
396
397as_me=`$as_basename -- "$0" ||
398$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
399	 X"$0" : 'X\(//\)$' \| \
400	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
401$as_echo X/"$0" |
402    sed '/^.*\/\([^/][^/]*\)\/*$/{
403	    s//\1/
404	    q
405	  }
406	  /^X\/\(\/\/\)$/{
407	    s//\1/
408	    q
409	  }
410	  /^X\/\(\/\).*/{
411	    s//\1/
412	    q
413	  }
414	  s/.*/./; q'`
415
416# Avoid depending upon Character Ranges.
417as_cr_letters='abcdefghijklmnopqrstuvwxyz'
418as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
419as_cr_Letters=$as_cr_letters$as_cr_LETTERS
420as_cr_digits='0123456789'
421as_cr_alnum=$as_cr_Letters$as_cr_digits
422
423
424  as_lineno_1=$LINENO as_lineno_1a=$LINENO
425  as_lineno_2=$LINENO as_lineno_2a=$LINENO
426  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
427  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
428  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
429  sed -n '
430    p
431    /[$]LINENO/=
432  ' <$as_myself |
433    sed '
434      s/[$]LINENO.*/&-/
435      t lineno
436      b
437      :lineno
438      N
439      :loop
440      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
441      t loop
442      s/-\n.*//
443    ' >$as_me.lineno &&
444  chmod +x "$as_me.lineno" ||
445    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
446
447  # Don't try to exec as it changes $[0], causing all sort of problems
448  # (the dirname of $[0] is not the place where we might find the
449  # original and so on.  Autoconf is especially sensitive to this).
450  . "./$as_me.lineno"
451  # Exit status is that of the last command.
452  exit
453}
454
455ECHO_C= ECHO_N= ECHO_T=
456case `echo -n x` in #(((((
457-n*)
458  case `echo 'xy\c'` in
459  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
460  xy)  ECHO_C='\c';;
461  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
462       ECHO_T='	';;
463  esac;;
464*)
465  ECHO_N='-n';;
466esac
467
468rm -f conf$$ conf$$.exe conf$$.file
469if test -d conf$$.dir; then
470  rm -f conf$$.dir/conf$$.file
471else
472  rm -f conf$$.dir
473  mkdir conf$$.dir 2>/dev/null
474fi
475if (echo >conf$$.file) 2>/dev/null; then
476  if ln -s conf$$.file conf$$ 2>/dev/null; then
477    as_ln_s='ln -s'
478    # ... but there are two gotchas:
479    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
480    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
481    # In both cases, we have to default to `cp -p'.
482    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
483      as_ln_s='cp -p'
484  elif ln conf$$.file conf$$ 2>/dev/null; then
485    as_ln_s=ln
486  else
487    as_ln_s='cp -p'
488  fi
489else
490  as_ln_s='cp -p'
491fi
492rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
493rmdir conf$$.dir 2>/dev/null
494
495if mkdir -p . 2>/dev/null; then
496  as_mkdir_p='mkdir -p "$as_dir"'
497else
498  test -d ./-p && rmdir ./-p
499  as_mkdir_p=false
500fi
501
502if test -x / >/dev/null 2>&1; then
503  as_test_x='test -x'
504else
505  if ls -dL / >/dev/null 2>&1; then
506    as_ls_L_option=L
507  else
508    as_ls_L_option=
509  fi
510  as_test_x='
511    eval sh -c '\''
512      if test -d "$1"; then
513	test -d "$1/.";
514      else
515	case $1 in #(
516	-*)set "./$1";;
517	esac;
518	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
519	???[sx]*):;;*)false;;esac;fi
520    '\'' sh
521  '
522fi
523as_executable_p=$as_test_x
524
525# Sed expression to map a string onto a valid CPP name.
526as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
527
528# Sed expression to map a string onto a valid variable name.
529as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
530
531
532test -n "$DJDIR" || exec 7<&0 </dev/null
533exec 6>&1
534
535# Name of the host.
536# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
537# so uname gets run too.
538ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
539
540#
541# Initializations.
542#
543ac_default_prefix=/usr/local
544ac_clean_files=
545ac_config_libobj_dir=.
546LIBOBJS=
547cross_compiling=no
548subdirs=
549MFLAGS=
550MAKEFLAGS=
551
552# Identity of this package.
553PACKAGE_NAME='OpenJDK'
554PACKAGE_TARNAME='openjdk'
555PACKAGE_VERSION='jdk8'
556PACKAGE_STRING='OpenJDK jdk8'
557PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
558PACKAGE_URL='http://openjdk.java.net'
559
560# Factoring default headers for most tests.
561ac_includes_default="\
562#include <stdio.h>
563#ifdef HAVE_SYS_TYPES_H
564# include <sys/types.h>
565#endif
566#ifdef HAVE_SYS_STAT_H
567# include <sys/stat.h>
568#endif
569#ifdef STDC_HEADERS
570# include <stdlib.h>
571# include <stddef.h>
572#else
573# ifdef HAVE_STDLIB_H
574#  include <stdlib.h>
575# endif
576#endif
577#ifdef HAVE_STRING_H
578# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
579#  include <memory.h>
580# endif
581# include <string.h>
582#endif
583#ifdef HAVE_STRINGS_H
584# include <strings.h>
585#endif
586#ifdef HAVE_INTTYPES_H
587# include <inttypes.h>
588#endif
589#ifdef HAVE_STDINT_H
590# include <stdint.h>
591#endif
592#ifdef HAVE_UNISTD_H
593# include <unistd.h>
594#endif"
595
596ac_subst_vars='LTLIBOBJS
597LIBOBJS
598CCACHE
599USE_PRECOMPILED_HEADER
600SJAVAC_SERVER_DIR
601ENABLE_SJAVAC
602SJAVAC_SERVER_CORES
603SJAVAC_SERVER_JAVA
604MEMORY_SIZE
605CONCURRENT_BUILD_JOBS
606NUM_CORES
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611STATIC_CXX_SETTING
612LIBDL
613LIBM
614LIBZIP_CAN_USE_MMAP
615USE_EXTERNAL_LIBZ
616USE_EXTERNAL_LIBGIF
617USE_EXTERNAL_LIBJPEG
618ALSA_LIBS
619ALSA_CFLAGS
620FREETYPE2_LIB_PATH
621USING_SYSTEM_FT_LIB
622FREETYPE2_LIBS
623FREETYPE2_CFLAGS
624CUPS_CFLAGS
625OPENWIN_HOME
626X_EXTRA_LIBS
627X_LIBS
628X_PRE_LIBS
629X_CFLAGS
630XMKMF
631CXXFLAGS_DEBUG_SYMBOLS
632CFLAGS_DEBUG_SYMBOLS
633ZIP_DEBUGINFO_FILES
634ENABLE_DEBUG_SYMBOLS
635LDFLAGS_CXX_JDK
636LDFLAGS_JDKEXE_SUFFIX
637LDFLAGS_JDKLIB_SUFFIX
638LDFLAGS_JDKEXE
639LDFLAGS_JDKLIB
640CXXFLAGS_JDKEXE
641CXXFLAGS_JDKLIB
642CFLAGS_JDKEXE
643CFLAGS_JDKLIB
644PACKAGE_PATH
645LEGACY_EXTRA_LDFLAGS
646LEGACY_EXTRA_CXXFLAGS
647LEGACY_EXTRA_CFLAGS
648CXX_FLAG_DEPS
649C_FLAG_DEPS
650CXX_O_FLAG_NONE
651CXX_O_FLAG_NORM
652CXX_O_FLAG_HI
653CXX_O_FLAG_HIGHEST
654C_O_FLAG_NONE
655C_O_FLAG_NORM
656C_O_FLAG_HI
657C_O_FLAG_HIGHEST
658POST_MCS_CMD
659POST_STRIP_CMD
660SET_EXECUTABLE_ORIGIN
661SET_SHARED_LIBRARY_ORIGIN
662CXX_FLAG_REORDER
663C_FLAG_REORDER
664SET_SHARED_LIBRARY_MAPFILE
665SET_SHARED_LIBRARY_NAME
666SHARED_LIBRARY_FLAGS
667EXE_SUFFIX
668STATIC_LIBRARY_SUFFIX
669SHARED_LIBRARY_SUFFIX
670LIBRARY_PREFIX
671STATIC_LIBRARY
672SHARED_LIBRARY
673OBJ_SUFFIX
674LIPO
675ac_ct_OBJDUMP
676OBJDUMP
677ac_ct_OBJCOPY
678OBJCOPY
679MCS
680STRIP
681NM
682AS
683CXXCPP
684CPP
685COMPILER_TYPE
686RC_FLAGS
687DUMPBIN
688WINAR
689HOTSPOT_RC
690HOTSPOT_MT
691RC
692MT
693WINLD
694HOTSPOT_LD
695HOTSPOT_CXX
696ARFLAGS
697AR
698LDEXECXX
699LDCXX
700LDEXE
701LD
702ac_ct_OBJC
703OBJCFLAGS
704OBJC
705ac_ct_CXX
706CXXFLAGS
707CXX
708ac_ct_PROPER_COMPILER_CXX
709PROPER_COMPILER_CXX
710POTENTIAL_CXX
711TOOLS_DIR_CXX
712OBJEXT
713EXEEXT
714ac_ct_CC
715CPPFLAGS
716LDFLAGS
717CFLAGS
718CC
719ac_ct_PROPER_COMPILER_CC
720PROPER_COMPILER_CC
721POTENTIAL_CC
722TOOLS_DIR_CC
723BUILD_LD
724BUILD_CXX
725BUILD_CC
726MSVCR_DLL
727VS_PATH
728VS_LIB
729VS_INCLUDE
730CYGWIN_LINK
731AR_OUT_OPTION
732LD_OUT_OPTION
733EXE_OUT_OPTION
734CC_OUT_OPTION
735BUILD_HOTSPOT
736HOTSPOT_DIST
737BUILD_OUTPUT
738OVERRIDE_SRC_ROOT
739ADD_SRC_ROOT
740JDK_TOPDIR
741HOTSPOT_TOPDIR
742JAXWS_TOPDIR
743JAXP_TOPDIR
744CORBA_TOPDIR
745LANGTOOLS_TOPDIR
746BOOT_JDK_JVMARGS
747JAVAC_FLAGS
748BOOT_JDK_SOURCETARGET
749BOOT_JDK
750BOOT_TOOLSJAR
751BOOT_RTJAR
752JAVA_CHECK
753JAVAC_CHECK
754COOKED_BUILD_NUMBER
755JDK_VERSION
756COPYRIGHT_YEAR
757MACOSX_BUNDLE_ID_BASE
758MACOSX_BUNDLE_NAME_BASE
759COMPANY_NAME
760JDK_RC_PLATFORM_NAME
761PRODUCT_SUFFIX
762PRODUCT_NAME
763LAUNCHER_NAME
764MILESTONE
765JDK_BUILD_NUMBER
766JDK_UPDATE_VERSION
767JDK_MICRO_VERSION
768JDK_MINOR_VERSION
769JDK_MAJOR_VERSION
770USER_RELEASE_SUFFIX
771COMPRESS_JARS
772UNLIMITED_CRYPTO
773CACERTS_FILE
774TEST_IN_BUILD
775BUILD_HEADLESS
776SUPPORT_HEADFUL
777SUPPORT_HEADLESS
778BDEPS_FTP
779BDEPS_UNZIP
780OS_VERSION_MICRO
781OS_VERSION_MINOR
782OS_VERSION_MAJOR
783PKG_CONFIG
784TIME
785STAT
786HG
787READELF
788OTOOL
789LDD
790ZIP
791UNZIP
792FIND_DELETE
793MAKE
794CHECK_TOOLSDIR_MAKE
795CHECK_TOOLSDIR_GMAKE
796CHECK_MAKE
797CHECK_GMAKE
798PKGHANDLER
799OUTPUT_ROOT
800CONF_NAME
801SPEC
802BUILD_VARIANT_RELEASE
803DEBUG_CLASSFILES
804FASTDEBUG
805VARIANT
806DEBUG_LEVEL
807MACOSX_UNIVERSAL
808JVM_VARIANT_ZEROSHARK
809JVM_VARIANT_ZERO
810JVM_VARIANT_KERNEL
811JVM_VARIANT_MINIMAL1
812JVM_VARIANT_CLIENT
813JVM_VARIANT_SERVER
814JVM_VARIANTS
815JDK_VARIANT
816SET_OPENJDK
817BUILD_LOG_WRAPPER
818BUILD_LOG_PREVIOUS
819BUILD_LOG
820SYS_ROOT
821PATH_SEP
822SRC_ROOT
823DEFINE_CROSS_COMPILE_ARCH
824LP64
825OPENJDK_TARGET_OS_API_DIR
826OPENJDK_TARGET_CPU_JLI_CFLAGS
827OPENJDK_TARGET_CPU_OSARCH
828OPENJDK_TARGET_CPU_ISADIR
829OPENJDK_TARGET_CPU_LIBDIR
830OPENJDK_TARGET_CPU_LEGACY_LIB
831OPENJDK_TARGET_CPU_LEGACY
832REQUIRED_OS_VERSION
833REQUIRED_OS_NAME
834COMPILE_TYPE
835OPENJDK_TARGET_CPU_ENDIAN
836OPENJDK_TARGET_CPU_BITS
837OPENJDK_TARGET_CPU_ARCH
838OPENJDK_TARGET_CPU
839OPENJDK_TARGET_OS_API
840OPENJDK_TARGET_OS
841OPENJDK_BUILD_CPU_ENDIAN
842OPENJDK_BUILD_CPU_BITS
843OPENJDK_BUILD_CPU_ARCH
844OPENJDK_BUILD_CPU
845OPENJDK_BUILD_OS_API
846OPENJDK_BUILD_OS
847OPENJDK_BUILD_AUTOCONF_NAME
848OPENJDK_TARGET_AUTOCONF_NAME
849target_os
850target_vendor
851target_cpu
852target
853host_os
854host_vendor
855host_cpu
856host
857build_os
858build_vendor
859build_cpu
860build
861SETFILE
862DF
863READLINK
864CYGPATH
865NAWK
866SED
867FGREP
868EGREP
869GREP
870AWK
871XARGS
872WHICH
873WC
874UNIQ
875UNAME
876TR
877TOUCH
878TEE
879TAR
880TAIL
881SORT
882SH
883RM
884THEPWDCMD
885PRINTF
886MV
887MKTEMP
888MKDIR
889LS
890LN
891HEAD
892FIND
893FILE
894EXPR
895ECHO
896DIRNAME
897DIFF
898DATE
899CUT
900CPIO
901CP
902COMM
903CMP
904CHMOD
905CAT
906BASH
907BASENAME
908DATE_WHEN_CONFIGURED
909CONFIGURE_COMMAND_LINE
910CUSTOM_MAKE_DIR
911target_alias
912host_alias
913build_alias
914LIBS
915ECHO_T
916ECHO_N
917ECHO_C
918DEFS
919mandir
920localedir
921libdir
922psdir
923pdfdir
924dvidir
925htmldir
926infodir
927docdir
928oldincludedir
929includedir
930localstatedir
931sharedstatedir
932sysconfdir
933datadir
934datarootdir
935libexecdir
936sbindir
937bindir
938program_transform_name
939prefix
940exec_prefix
941PACKAGE_URL
942PACKAGE_BUGREPORT
943PACKAGE_STRING
944PACKAGE_VERSION
945PACKAGE_TARNAME
946PACKAGE_NAME
947PATH_SEPARATOR
948SHELL'
949ac_subst_files=''
950ac_user_opts='
951enable_option_checking
952with_custom_make_dir
953with_target_bits
954with_sys_root
955with_tools_dir
956with_devkit
957enable_openjdk_only
958with_jdk_variant
959with_jvm_variants
960enable_debug
961with_debug_level
962with_conf_name
963with_builddeps_conf
964with_builddeps_server
965with_builddeps_dir
966with_builddeps_group
967enable_headful
968enable_hotspot_test_in_build
969with_cacerts_file
970enable_unlimited_crypto
971with_milestone
972with_build_number
973with_user_release_suffix
974with_boot_jdk
975with_boot_jdk_jvmargs
976with_add_source_root
977with_override_source_root
978with_adds_and_overrides
979with_override_langtools
980with_override_corba
981with_override_jaxp
982with_override_jaxws
983with_override_hotspot
984with_override_jdk
985with_import_hotspot
986with_msvcr_dll
987with_extra_cflags
988with_extra_cxxflags
989with_extra_ldflags
990enable_debug_symbols
991enable_zip_debug_info
992enable_macosx_runtime_support
993with_x
994with_cups
995with_cups_include
996with_freetype
997with_alsa
998with_alsa_include
999with_alsa_lib
1000with_zlib
1001with_stdc__lib
1002with_num_cores
1003with_memory_size
1004with_sjavac_server_java
1005with_sjavac_server_cores
1006enable_sjavac
1007enable_precompiled_headers
1008enable_ccache
1009with_ccache_dir
1010'
1011      ac_precious_vars='build_alias
1012host_alias
1013target_alias
1014PKG_CONFIG
1015CC
1016CFLAGS
1017LDFLAGS
1018LIBS
1019CPPFLAGS
1020CXX
1021CXXFLAGS
1022CCC
1023OBJC
1024OBJCFLAGS
1025CPP
1026CXXCPP
1027XMKMF
1028FREETYPE2_CFLAGS
1029FREETYPE2_LIBS
1030ALSA_CFLAGS
1031ALSA_LIBS'
1032
1033
1034# Initialize some variables set by options.
1035ac_init_help=
1036ac_init_version=false
1037ac_unrecognized_opts=
1038ac_unrecognized_sep=
1039# The variables have the same names as the options, with
1040# dashes changed to underlines.
1041cache_file=/dev/null
1042exec_prefix=NONE
1043no_create=
1044no_recursion=
1045prefix=NONE
1046program_prefix=NONE
1047program_suffix=NONE
1048program_transform_name=s,x,x,
1049silent=
1050site=
1051srcdir=
1052verbose=
1053x_includes=NONE
1054x_libraries=NONE
1055
1056# Installation directory options.
1057# These are left unexpanded so users can "make install exec_prefix=/foo"
1058# and all the variables that are supposed to be based on exec_prefix
1059# by default will actually change.
1060# Use braces instead of parens because sh, perl, etc. also accept them.
1061# (The list follows the same order as the GNU Coding Standards.)
1062bindir='${exec_prefix}/bin'
1063sbindir='${exec_prefix}/sbin'
1064libexecdir='${exec_prefix}/libexec'
1065datarootdir='${prefix}/share'
1066datadir='${datarootdir}'
1067sysconfdir='${prefix}/etc'
1068sharedstatedir='${prefix}/com'
1069localstatedir='${prefix}/var'
1070includedir='${prefix}/include'
1071oldincludedir='/usr/include'
1072docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1073infodir='${datarootdir}/info'
1074htmldir='${docdir}'
1075dvidir='${docdir}'
1076pdfdir='${docdir}'
1077psdir='${docdir}'
1078libdir='${exec_prefix}/lib'
1079localedir='${datarootdir}/locale'
1080mandir='${datarootdir}/man'
1081
1082ac_prev=
1083ac_dashdash=
1084for ac_option
1085do
1086  # If the previous option needs an argument, assign it.
1087  if test -n "$ac_prev"; then
1088    eval $ac_prev=\$ac_option
1089    ac_prev=
1090    continue
1091  fi
1092
1093  case $ac_option in
1094  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1095  *=)   ac_optarg= ;;
1096  *)    ac_optarg=yes ;;
1097  esac
1098
1099  # Accept the important Cygnus configure options, so we can diagnose typos.
1100
1101  case $ac_dashdash$ac_option in
1102  --)
1103    ac_dashdash=yes ;;
1104
1105  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1106    ac_prev=bindir ;;
1107  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1108    bindir=$ac_optarg ;;
1109
1110  -build | --build | --buil | --bui | --bu)
1111    ac_prev=build_alias ;;
1112  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1113    build_alias=$ac_optarg ;;
1114
1115  -cache-file | --cache-file | --cache-fil | --cache-fi \
1116  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1117    ac_prev=cache_file ;;
1118  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1119  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1120    cache_file=$ac_optarg ;;
1121
1122  --config-cache | -C)
1123    cache_file=config.cache ;;
1124
1125  -datadir | --datadir | --datadi | --datad)
1126    ac_prev=datadir ;;
1127  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1128    datadir=$ac_optarg ;;
1129
1130  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1131  | --dataroo | --dataro | --datar)
1132    ac_prev=datarootdir ;;
1133  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1134  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1135    datarootdir=$ac_optarg ;;
1136
1137  -disable-* | --disable-*)
1138    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1139    # Reject names that are not valid shell variable names.
1140    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1141      as_fn_error $? "invalid feature name: $ac_useropt"
1142    ac_useropt_orig=$ac_useropt
1143    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1144    case $ac_user_opts in
1145      *"
1146"enable_$ac_useropt"
1147"*) ;;
1148      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1149	 ac_unrecognized_sep=', ';;
1150    esac
1151    eval enable_$ac_useropt=no ;;
1152
1153  -docdir | --docdir | --docdi | --doc | --do)
1154    ac_prev=docdir ;;
1155  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1156    docdir=$ac_optarg ;;
1157
1158  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1159    ac_prev=dvidir ;;
1160  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1161    dvidir=$ac_optarg ;;
1162
1163  -enable-* | --enable-*)
1164    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1165    # Reject names that are not valid shell variable names.
1166    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1167      as_fn_error $? "invalid feature name: $ac_useropt"
1168    ac_useropt_orig=$ac_useropt
1169    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1170    case $ac_user_opts in
1171      *"
1172"enable_$ac_useropt"
1173"*) ;;
1174      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1175	 ac_unrecognized_sep=', ';;
1176    esac
1177    eval enable_$ac_useropt=\$ac_optarg ;;
1178
1179  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1180  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1181  | --exec | --exe | --ex)
1182    ac_prev=exec_prefix ;;
1183  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1184  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1185  | --exec=* | --exe=* | --ex=*)
1186    exec_prefix=$ac_optarg ;;
1187
1188  -gas | --gas | --ga | --g)
1189    # Obsolete; use --with-gas.
1190    with_gas=yes ;;
1191
1192  -help | --help | --hel | --he | -h)
1193    ac_init_help=long ;;
1194  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1195    ac_init_help=recursive ;;
1196  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1197    ac_init_help=short ;;
1198
1199  -host | --host | --hos | --ho)
1200    ac_prev=host_alias ;;
1201  -host=* | --host=* | --hos=* | --ho=*)
1202    host_alias=$ac_optarg ;;
1203
1204  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1205    ac_prev=htmldir ;;
1206  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1207  | --ht=*)
1208    htmldir=$ac_optarg ;;
1209
1210  -includedir | --includedir | --includedi | --included | --include \
1211  | --includ | --inclu | --incl | --inc)
1212    ac_prev=includedir ;;
1213  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1214  | --includ=* | --inclu=* | --incl=* | --inc=*)
1215    includedir=$ac_optarg ;;
1216
1217  -infodir | --infodir | --infodi | --infod | --info | --inf)
1218    ac_prev=infodir ;;
1219  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1220    infodir=$ac_optarg ;;
1221
1222  -libdir | --libdir | --libdi | --libd)
1223    ac_prev=libdir ;;
1224  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1225    libdir=$ac_optarg ;;
1226
1227  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1228  | --libexe | --libex | --libe)
1229    ac_prev=libexecdir ;;
1230  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1231  | --libexe=* | --libex=* | --libe=*)
1232    libexecdir=$ac_optarg ;;
1233
1234  -localedir | --localedir | --localedi | --localed | --locale)
1235    ac_prev=localedir ;;
1236  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1237    localedir=$ac_optarg ;;
1238
1239  -localstatedir | --localstatedir | --localstatedi | --localstated \
1240  | --localstate | --localstat | --localsta | --localst | --locals)
1241    ac_prev=localstatedir ;;
1242  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1243  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1244    localstatedir=$ac_optarg ;;
1245
1246  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1247    ac_prev=mandir ;;
1248  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1249    mandir=$ac_optarg ;;
1250
1251  -nfp | --nfp | --nf)
1252    # Obsolete; use --without-fp.
1253    with_fp=no ;;
1254
1255  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1256  | --no-cr | --no-c | -n)
1257    no_create=yes ;;
1258
1259  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1260  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1261    no_recursion=yes ;;
1262
1263  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1264  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1265  | --oldin | --oldi | --old | --ol | --o)
1266    ac_prev=oldincludedir ;;
1267  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1268  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1269  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1270    oldincludedir=$ac_optarg ;;
1271
1272  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1273    ac_prev=prefix ;;
1274  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1275    prefix=$ac_optarg ;;
1276
1277  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1278  | --program-pre | --program-pr | --program-p)
1279    ac_prev=program_prefix ;;
1280  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1281  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1282    program_prefix=$ac_optarg ;;
1283
1284  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1285  | --program-suf | --program-su | --program-s)
1286    ac_prev=program_suffix ;;
1287  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1288  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1289    program_suffix=$ac_optarg ;;
1290
1291  -program-transform-name | --program-transform-name \
1292  | --program-transform-nam | --program-transform-na \
1293  | --program-transform-n | --program-transform- \
1294  | --program-transform | --program-transfor \
1295  | --program-transfo | --program-transf \
1296  | --program-trans | --program-tran \
1297  | --progr-tra | --program-tr | --program-t)
1298    ac_prev=program_transform_name ;;
1299  -program-transform-name=* | --program-transform-name=* \
1300  | --program-transform-nam=* | --program-transform-na=* \
1301  | --program-transform-n=* | --program-transform-=* \
1302  | --program-transform=* | --program-transfor=* \
1303  | --program-transfo=* | --program-transf=* \
1304  | --program-trans=* | --program-tran=* \
1305  | --progr-tra=* | --program-tr=* | --program-t=*)
1306    program_transform_name=$ac_optarg ;;
1307
1308  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1309    ac_prev=pdfdir ;;
1310  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1311    pdfdir=$ac_optarg ;;
1312
1313  -psdir | --psdir | --psdi | --psd | --ps)
1314    ac_prev=psdir ;;
1315  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1316    psdir=$ac_optarg ;;
1317
1318  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1319  | -silent | --silent | --silen | --sile | --sil)
1320    silent=yes ;;
1321
1322  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1323    ac_prev=sbindir ;;
1324  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1325  | --sbi=* | --sb=*)
1326    sbindir=$ac_optarg ;;
1327
1328  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1329  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1330  | --sharedst | --shareds | --shared | --share | --shar \
1331  | --sha | --sh)
1332    ac_prev=sharedstatedir ;;
1333  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1334  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1335  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1336  | --sha=* | --sh=*)
1337    sharedstatedir=$ac_optarg ;;
1338
1339  -site | --site | --sit)
1340    ac_prev=site ;;
1341  -site=* | --site=* | --sit=*)
1342    site=$ac_optarg ;;
1343
1344  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1345    ac_prev=srcdir ;;
1346  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1347    srcdir=$ac_optarg ;;
1348
1349  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1350  | --syscon | --sysco | --sysc | --sys | --sy)
1351    ac_prev=sysconfdir ;;
1352  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1353  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1354    sysconfdir=$ac_optarg ;;
1355
1356  -target | --target | --targe | --targ | --tar | --ta | --t)
1357    ac_prev=target_alias ;;
1358  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1359    target_alias=$ac_optarg ;;
1360
1361  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1362    verbose=yes ;;
1363
1364  -version | --version | --versio | --versi | --vers | -V)
1365    ac_init_version=: ;;
1366
1367  -with-* | --with-*)
1368    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1369    # Reject names that are not valid shell variable names.
1370    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1371      as_fn_error $? "invalid package name: $ac_useropt"
1372    ac_useropt_orig=$ac_useropt
1373    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1374    case $ac_user_opts in
1375      *"
1376"with_$ac_useropt"
1377"*) ;;
1378      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1379	 ac_unrecognized_sep=', ';;
1380    esac
1381    eval with_$ac_useropt=\$ac_optarg ;;
1382
1383  -without-* | --without-*)
1384    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1385    # Reject names that are not valid shell variable names.
1386    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1387      as_fn_error $? "invalid package name: $ac_useropt"
1388    ac_useropt_orig=$ac_useropt
1389    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1390    case $ac_user_opts in
1391      *"
1392"with_$ac_useropt"
1393"*) ;;
1394      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1395	 ac_unrecognized_sep=', ';;
1396    esac
1397    eval with_$ac_useropt=no ;;
1398
1399  --x)
1400    # Obsolete; use --with-x.
1401    with_x=yes ;;
1402
1403  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1404  | --x-incl | --x-inc | --x-in | --x-i)
1405    ac_prev=x_includes ;;
1406  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1407  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1408    x_includes=$ac_optarg ;;
1409
1410  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1411  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1412    ac_prev=x_libraries ;;
1413  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1414  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1415    x_libraries=$ac_optarg ;;
1416
1417  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1418Try \`$0 --help' for more information"
1419    ;;
1420
1421  *=*)
1422    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1423    # Reject names that are not valid shell variable names.
1424    case $ac_envvar in #(
1425      '' | [0-9]* | *[!_$as_cr_alnum]* )
1426      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1427    esac
1428    eval $ac_envvar=\$ac_optarg
1429    export $ac_envvar ;;
1430
1431  *)
1432    # FIXME: should be removed in autoconf 3.0.
1433    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1434    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1435      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1436    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1437    ;;
1438
1439  esac
1440done
1441
1442if test -n "$ac_prev"; then
1443  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1444  as_fn_error $? "missing argument to $ac_option"
1445fi
1446
1447if test -n "$ac_unrecognized_opts"; then
1448  case $enable_option_checking in
1449    no) ;;
1450    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1451    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1452  esac
1453fi
1454
1455# Check all directory arguments for consistency.
1456for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1457		datadir sysconfdir sharedstatedir localstatedir includedir \
1458		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1459		libdir localedir mandir
1460do
1461  eval ac_val=\$$ac_var
1462  # Remove trailing slashes.
1463  case $ac_val in
1464    */ )
1465      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1466      eval $ac_var=\$ac_val;;
1467  esac
1468  # Be sure to have absolute directory names.
1469  case $ac_val in
1470    [\\/$]* | ?:[\\/]* )  continue;;
1471    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1472  esac
1473  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1474done
1475
1476# There might be people who depend on the old broken behavior: `$host'
1477# used to hold the argument of --host etc.
1478# FIXME: To remove some day.
1479build=$build_alias
1480host=$host_alias
1481target=$target_alias
1482
1483# FIXME: To remove some day.
1484if test "x$host_alias" != x; then
1485  if test "x$build_alias" = x; then
1486    cross_compiling=maybe
1487    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1488    If a cross compiler is detected then cross compile mode will be used" >&2
1489  elif test "x$build_alias" != "x$host_alias"; then
1490    cross_compiling=yes
1491  fi
1492fi
1493
1494ac_tool_prefix=
1495test -n "$host_alias" && ac_tool_prefix=$host_alias-
1496
1497test "$silent" = yes && exec 6>/dev/null
1498
1499
1500ac_pwd=`pwd` && test -n "$ac_pwd" &&
1501ac_ls_di=`ls -di .` &&
1502ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1503  as_fn_error $? "working directory cannot be determined"
1504test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1505  as_fn_error $? "pwd does not report name of working directory"
1506
1507
1508# Find the source files, if location was not specified.
1509if test -z "$srcdir"; then
1510  ac_srcdir_defaulted=yes
1511  # Try the directory containing this script, then the parent directory.
1512  ac_confdir=`$as_dirname -- "$as_myself" ||
1513$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1514	 X"$as_myself" : 'X\(//\)[^/]' \| \
1515	 X"$as_myself" : 'X\(//\)$' \| \
1516	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1517$as_echo X"$as_myself" |
1518    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1519	    s//\1/
1520	    q
1521	  }
1522	  /^X\(\/\/\)[^/].*/{
1523	    s//\1/
1524	    q
1525	  }
1526	  /^X\(\/\/\)$/{
1527	    s//\1/
1528	    q
1529	  }
1530	  /^X\(\/\).*/{
1531	    s//\1/
1532	    q
1533	  }
1534	  s/.*/./; q'`
1535  srcdir=$ac_confdir
1536  if test ! -r "$srcdir/$ac_unique_file"; then
1537    srcdir=..
1538  fi
1539else
1540  ac_srcdir_defaulted=no
1541fi
1542if test ! -r "$srcdir/$ac_unique_file"; then
1543  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1544  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1545fi
1546ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1547ac_abs_confdir=`(
1548	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1549	pwd)`
1550# When building in place, set srcdir=.
1551if test "$ac_abs_confdir" = "$ac_pwd"; then
1552  srcdir=.
1553fi
1554# Remove unnecessary trailing slashes from srcdir.
1555# Double slashes in file names in object file debugging info
1556# mess up M-x gdb in Emacs.
1557case $srcdir in
1558*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1559esac
1560for ac_var in $ac_precious_vars; do
1561  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1562  eval ac_env_${ac_var}_value=\$${ac_var}
1563  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1564  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1565done
1566
1567#
1568# Report the --help message.
1569#
1570if test "$ac_init_help" = "long"; then
1571  # Omit some internal or obsolete options to make the list less imposing.
1572  # This message is too long to be a string in the A/UX 3.1 sh.
1573  cat <<_ACEOF
1574\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1575
1576Usage: $0 [OPTION]... [VAR=VALUE]...
1577
1578To assign environment variables (e.g., CC, CFLAGS...), specify them as
1579VAR=VALUE.  See below for descriptions of some of the useful variables.
1580
1581Defaults for the options are specified in brackets.
1582
1583Configuration:
1584  -h, --help              display this help and exit
1585      --help=short        display options specific to this package
1586      --help=recursive    display the short help of all the included packages
1587  -V, --version           display version information and exit
1588  -q, --quiet, --silent   do not print \`checking ...' messages
1589      --cache-file=FILE   cache test results in FILE [disabled]
1590  -C, --config-cache      alias for \`--cache-file=config.cache'
1591  -n, --no-create         do not create output files
1592      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1593
1594Installation directories:
1595  --prefix=PREFIX         install architecture-independent files in PREFIX
1596                          [$ac_default_prefix]
1597  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1598                          [PREFIX]
1599
1600By default, \`make install' will install all the files in
1601\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1602an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1603for instance \`--prefix=\$HOME'.
1604
1605For better control, use the options below.
1606
1607Fine tuning of the installation directories:
1608  --bindir=DIR            user executables [EPREFIX/bin]
1609  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1610  --libexecdir=DIR        program executables [EPREFIX/libexec]
1611  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1612  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1613  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1614  --libdir=DIR            object code libraries [EPREFIX/lib]
1615  --includedir=DIR        C header files [PREFIX/include]
1616  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1617  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1618  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1619  --infodir=DIR           info documentation [DATAROOTDIR/info]
1620  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1621  --mandir=DIR            man documentation [DATAROOTDIR/man]
1622  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1623  --htmldir=DIR           html documentation [DOCDIR]
1624  --dvidir=DIR            dvi documentation [DOCDIR]
1625  --pdfdir=DIR            pdf documentation [DOCDIR]
1626  --psdir=DIR             ps documentation [DOCDIR]
1627_ACEOF
1628
1629  cat <<\_ACEOF
1630
1631X features:
1632  --x-includes=DIR    X include files are in DIR
1633  --x-libraries=DIR   X library files are in DIR
1634
1635System types:
1636  --build=BUILD     configure for building on BUILD [guessed]
1637  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1638  --target=TARGET   configure for building compilers for TARGET [HOST]
1639_ACEOF
1640fi
1641
1642if test -n "$ac_init_help"; then
1643  case $ac_init_help in
1644     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1645   esac
1646  cat <<\_ACEOF
1647
1648Optional Features:
1649  --disable-option-checking  ignore unrecognized --enable/--with options
1650  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1651  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1652  --enable-openjdk-only   suppress building custom source even if present
1653                          [disabled]
1654  --enable-debug          set the debug level to fastdebug (shorthand for
1655                          --with-debug-level=fastdebug) [disabled]
1656  --disable-headful       disable building headful support (graphical UI
1657                          support) [enabled]
1658  --enable-hotspot-test-in-build
1659                          run the Queens test after Hotspot build [disabled]
1660  --enable-unlimited-crypto
1661                          Enable unlimited crypto policy [disabled]
1662  --disable-debug-symbols disable generation of debug symbols [enabled]
1663  --disable-zip-debug-info
1664                          disable zipping of debug-info files [enabled]
1665  --disable-macosx-runtime-support
1666                          disable the use of MacOSX Java runtime support
1667                          framework [enabled]
1668  --enable-sjavac         use sjavac to do fast incremental compiles
1669                          [disabled]
1670  --disable-precompiled-headers
1671                          disable using precompiled headers when compiling C++
1672                          [enabled]
1673  --disable-ccache        disable using ccache to speed up recompilations
1674                          [enabled]
1675
1676Optional Packages:
1677  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1678  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1679  --with-custom-make-dir  use this directory for custom build/make files
1680  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1681                          support it), e.g. --with-target-bits=32 [guessed]
1682  --with-sys-root         pass this sys-root to the compilers and tools (for
1683                          cross-compiling)
1684  --with-tools-dir        search this directory for compilers and tools (for
1685                          cross-compiling)
1686  --with-devkit           use this directory as base for tools-dir and
1687                          sys-root (for cross-compiling)
1688  --with-jdk-variant      JDK variant to build (normal) [normal]
1689  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1690                          client, minimal1, kernel, zero, zeroshark) [server]
1691  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1692                          [release]
1693  --with-conf-name        use this as the name of the configuration [generated
1694                          from important configuration options]
1695  --with-builddeps-conf   use this configuration file for the builddeps
1696  --with-builddeps-server download and use build dependencies from this server
1697                          url
1698  --with-builddeps-dir    store downloaded build dependencies here
1699                          [/localhome/builddeps]
1700  --with-builddeps-group  chgrp the downloaded build dependencies to this
1701                          group
1702  --with-cacerts-file     specify alternative cacerts file
1703  --with-milestone        Set milestone value for build [internal]
1704  --with-build-number     Set build number value for build [b00]
1705  --with-user-release-suffix
1706                          Add a custom string to the version string if build
1707                          number isn't set.[username_builddateb00]
1708  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1709  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1710                          invocations of the Boot JDK, overriding the default
1711                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1712                          -enableassertions"
1713  --with-add-source-root  for each and every source directory, look in this
1714                          additional source root for the same directory; if it
1715                          exists and have files in it, include it in the build
1716  --with-override-source-root
1717                          for each and every source directory, look in this
1718                          override source root for the same directory; if it
1719                          exists, use that directory instead and ignore the
1720                          directory in the original source root
1721  --with-adds-and-overrides
1722                          use the subdirs 'adds' and 'overrides' in the
1723                          specified directory as add-source-root and
1724                          override-source-root
1725  --with-override-langtools
1726                          use this langtools dir for the build
1727  --with-override-corba   use this corba dir for the build
1728  --with-override-jaxp    use this jaxp dir for the build
1729  --with-override-jaxws   use this jaxws dir for the build
1730  --with-override-hotspot use this hotspot dir for the build
1731  --with-override-jdk     use this jdk dir for the build
1732  --with-import-hotspot   import hotspot binaries from this jdk image or
1733                          hotspot build dist dir instead of building from
1734                          source
1735  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1736                          only) [probed]
1737  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1738  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1739  --with-extra-ldflags    extra flags to be used when linking jdk
1740  --with-x                use the X Window System
1741  --with-cups             specify prefix directory for the cups package
1742                          (expecting the headers under PATH/include)
1743  --with-cups-include     specify directory for the cups include files
1744  --with-freetype         specify prefix directory for the freetype2 package
1745                          (expecting the libraries under PATH/lib and the
1746                          headers under PATH/include)
1747  --with-alsa             specify prefix directory for the alsa package
1748                          (expecting the libraries under PATH/lib and the
1749                          headers under PATH/include)
1750  --with-alsa-include     specify directory for the alsa include files
1751  --with-alsa-lib         specify directory for the alsa library
1752  --with-zlib             use zlib from build system or OpenJDK source
1753                          (system, bundled) [bundled]
1754  --with-stdc++lib=<static>,<dynamic>,<default>
1755                          force linking of the C++ runtime on Linux to either
1756                          static or dynamic, default is static with dynamic as
1757                          fallback
1758  --with-num-cores        number of cores in the build system, e.g.
1759                          --with-num-cores=8 [probed]
1760  --with-memory-size      memory (in MB) available in the build system, e.g.
1761                          --with-memory-size=1024 [probed]
1762  --with-sjavac-server-java
1763                          use this java binary for running the sjavac
1764                          background server [Boot JDK java]
1765  --with-sjavac-server-cores
1766                          use at most this number of concurrent threads on the
1767                          sjavac server [probed]
1768  --with-ccache-dir       where to store ccache files [~/.ccache]
1769
1770Some influential environment variables:
1771  PKG_CONFIG  path to pkg-config utility
1772  CC          C compiler command
1773  CFLAGS      C compiler flags
1774  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1775              nonstandard directory <lib dir>
1776  LIBS        libraries to pass to the linker, e.g. -l<library>
1777  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1778              you have headers in a nonstandard directory <include dir>
1779  CXX         C++ compiler command
1780  CXXFLAGS    C++ compiler flags
1781  OBJC        Objective C compiler command
1782  OBJCFLAGS   Objective C compiler flags
1783  CPP         C preprocessor
1784  CXXCPP      C++ preprocessor
1785  XMKMF       Path to xmkmf, Makefile generator for X Window System
1786  FREETYPE2_CFLAGS
1787              C compiler flags for FREETYPE2, overriding pkg-config
1788  FREETYPE2_LIBS
1789              linker flags for FREETYPE2, overriding pkg-config
1790  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1791  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1792
1793Use these variables to override the choices made by `configure' or to help
1794it to find libraries and programs with nonstandard names/locations.
1795
1796Report bugs to <build-dev@openjdk.java.net>.
1797OpenJDK home page: <http://openjdk.java.net>.
1798_ACEOF
1799ac_status=$?
1800fi
1801
1802if test "$ac_init_help" = "recursive"; then
1803  # If there are subdirs, report their specific --help.
1804  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1805    test -d "$ac_dir" ||
1806      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1807      continue
1808    ac_builddir=.
1809
1810case "$ac_dir" in
1811.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1812*)
1813  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1814  # A ".." for each directory in $ac_dir_suffix.
1815  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1816  case $ac_top_builddir_sub in
1817  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1818  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1819  esac ;;
1820esac
1821ac_abs_top_builddir=$ac_pwd
1822ac_abs_builddir=$ac_pwd$ac_dir_suffix
1823# for backward compatibility:
1824ac_top_builddir=$ac_top_build_prefix
1825
1826case $srcdir in
1827  .)  # We are building in place.
1828    ac_srcdir=.
1829    ac_top_srcdir=$ac_top_builddir_sub
1830    ac_abs_top_srcdir=$ac_pwd ;;
1831  [\\/]* | ?:[\\/]* )  # Absolute name.
1832    ac_srcdir=$srcdir$ac_dir_suffix;
1833    ac_top_srcdir=$srcdir
1834    ac_abs_top_srcdir=$srcdir ;;
1835  *) # Relative name.
1836    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1837    ac_top_srcdir=$ac_top_build_prefix$srcdir
1838    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1839esac
1840ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1841
1842    cd "$ac_dir" || { ac_status=$?; continue; }
1843    # Check for guested configure.
1844    if test -f "$ac_srcdir/configure.gnu"; then
1845      echo &&
1846      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1847    elif test -f "$ac_srcdir/configure"; then
1848      echo &&
1849      $SHELL "$ac_srcdir/configure" --help=recursive
1850    else
1851      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1852    fi || ac_status=$?
1853    cd "$ac_pwd" || { ac_status=$?; break; }
1854  done
1855fi
1856
1857test -n "$ac_init_help" && exit $ac_status
1858if $ac_init_version; then
1859  cat <<\_ACEOF
1860OpenJDK configure jdk8
1861generated by GNU Autoconf 2.67
1862
1863Copyright (C) 2010 Free Software Foundation, Inc.
1864This configure script is free software; the Free Software Foundation
1865gives unlimited permission to copy, distribute and modify it.
1866_ACEOF
1867  exit
1868fi
1869
1870## ------------------------ ##
1871## Autoconf initialization. ##
1872## ------------------------ ##
1873
1874# ac_fn_c_try_compile LINENO
1875# --------------------------
1876# Try to compile conftest.$ac_ext, and return whether this succeeded.
1877ac_fn_c_try_compile ()
1878{
1879  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1880  rm -f conftest.$ac_objext
1881  if { { ac_try="$ac_compile"
1882case "(($ac_try" in
1883  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1884  *) ac_try_echo=$ac_try;;
1885esac
1886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1887$as_echo "$ac_try_echo"; } >&5
1888  (eval "$ac_compile") 2>conftest.err
1889  ac_status=$?
1890  if test -s conftest.err; then
1891    grep -v '^ *+' conftest.err >conftest.er1
1892    cat conftest.er1 >&5
1893    mv -f conftest.er1 conftest.err
1894  fi
1895  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1896  test $ac_status = 0; } && {
1897	 test -z "$ac_c_werror_flag" ||
1898	 test ! -s conftest.err
1899       } && test -s conftest.$ac_objext; then :
1900  ac_retval=0
1901else
1902  $as_echo "$as_me: failed program was:" >&5
1903sed 's/^/| /' conftest.$ac_ext >&5
1904
1905	ac_retval=1
1906fi
1907  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1908  as_fn_set_status $ac_retval
1909
1910} # ac_fn_c_try_compile
1911
1912# ac_fn_cxx_try_compile LINENO
1913# ----------------------------
1914# Try to compile conftest.$ac_ext, and return whether this succeeded.
1915ac_fn_cxx_try_compile ()
1916{
1917  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918  rm -f conftest.$ac_objext
1919  if { { ac_try="$ac_compile"
1920case "(($ac_try" in
1921  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1922  *) ac_try_echo=$ac_try;;
1923esac
1924eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1925$as_echo "$ac_try_echo"; } >&5
1926  (eval "$ac_compile") 2>conftest.err
1927  ac_status=$?
1928  if test -s conftest.err; then
1929    grep -v '^ *+' conftest.err >conftest.er1
1930    cat conftest.er1 >&5
1931    mv -f conftest.er1 conftest.err
1932  fi
1933  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1934  test $ac_status = 0; } && {
1935	 test -z "$ac_cxx_werror_flag" ||
1936	 test ! -s conftest.err
1937       } && test -s conftest.$ac_objext; then :
1938  ac_retval=0
1939else
1940  $as_echo "$as_me: failed program was:" >&5
1941sed 's/^/| /' conftest.$ac_ext >&5
1942
1943	ac_retval=1
1944fi
1945  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1946  as_fn_set_status $ac_retval
1947
1948} # ac_fn_cxx_try_compile
1949
1950# ac_fn_objc_try_compile LINENO
1951# -----------------------------
1952# Try to compile conftest.$ac_ext, and return whether this succeeded.
1953ac_fn_objc_try_compile ()
1954{
1955  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1956  rm -f conftest.$ac_objext
1957  if { { ac_try="$ac_compile"
1958case "(($ac_try" in
1959  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1960  *) ac_try_echo=$ac_try;;
1961esac
1962eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1963$as_echo "$ac_try_echo"; } >&5
1964  (eval "$ac_compile") 2>conftest.err
1965  ac_status=$?
1966  if test -s conftest.err; then
1967    grep -v '^ *+' conftest.err >conftest.er1
1968    cat conftest.er1 >&5
1969    mv -f conftest.er1 conftest.err
1970  fi
1971  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1972  test $ac_status = 0; } && {
1973	 test -z "$ac_objc_werror_flag" ||
1974	 test ! -s conftest.err
1975       } && test -s conftest.$ac_objext; then :
1976  ac_retval=0
1977else
1978  $as_echo "$as_me: failed program was:" >&5
1979sed 's/^/| /' conftest.$ac_ext >&5
1980
1981	ac_retval=1
1982fi
1983  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1984  as_fn_set_status $ac_retval
1985
1986} # ac_fn_objc_try_compile
1987
1988# ac_fn_c_try_cpp LINENO
1989# ----------------------
1990# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1991ac_fn_c_try_cpp ()
1992{
1993  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1994  if { { ac_try="$ac_cpp conftest.$ac_ext"
1995case "(($ac_try" in
1996  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1997  *) ac_try_echo=$ac_try;;
1998esac
1999eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2000$as_echo "$ac_try_echo"; } >&5
2001  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2002  ac_status=$?
2003  if test -s conftest.err; then
2004    grep -v '^ *+' conftest.err >conftest.er1
2005    cat conftest.er1 >&5
2006    mv -f conftest.er1 conftest.err
2007  fi
2008  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2009  test $ac_status = 0; } > conftest.i && {
2010	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2011	 test ! -s conftest.err
2012       }; then :
2013  ac_retval=0
2014else
2015  $as_echo "$as_me: failed program was:" >&5
2016sed 's/^/| /' conftest.$ac_ext >&5
2017
2018    ac_retval=1
2019fi
2020  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2021  as_fn_set_status $ac_retval
2022
2023} # ac_fn_c_try_cpp
2024
2025# ac_fn_cxx_try_cpp LINENO
2026# ------------------------
2027# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2028ac_fn_cxx_try_cpp ()
2029{
2030  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2031  if { { ac_try="$ac_cpp conftest.$ac_ext"
2032case "(($ac_try" in
2033  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2034  *) ac_try_echo=$ac_try;;
2035esac
2036eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2037$as_echo "$ac_try_echo"; } >&5
2038  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2039  ac_status=$?
2040  if test -s conftest.err; then
2041    grep -v '^ *+' conftest.err >conftest.er1
2042    cat conftest.er1 >&5
2043    mv -f conftest.er1 conftest.err
2044  fi
2045  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2046  test $ac_status = 0; } > conftest.i && {
2047	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2048	 test ! -s conftest.err
2049       }; then :
2050  ac_retval=0
2051else
2052  $as_echo "$as_me: failed program was:" >&5
2053sed 's/^/| /' conftest.$ac_ext >&5
2054
2055    ac_retval=1
2056fi
2057  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2058  as_fn_set_status $ac_retval
2059
2060} # ac_fn_cxx_try_cpp
2061
2062# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2063# ---------------------------------------------------------
2064# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2065# the include files in INCLUDES and setting the cache variable VAR
2066# accordingly.
2067ac_fn_cxx_check_header_mongrel ()
2068{
2069  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2070  if eval "test \"\${$3+set}\"" = set; then :
2071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2072$as_echo_n "checking for $2... " >&6; }
2073if eval "test \"\${$3+set}\"" = set; then :
2074  $as_echo_n "(cached) " >&6
2075fi
2076eval ac_res=\$$3
2077	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2078$as_echo "$ac_res" >&6; }
2079else
2080  # Is the header compilable?
2081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2082$as_echo_n "checking $2 usability... " >&6; }
2083cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h.  */
2085$4
2086#include <$2>
2087_ACEOF
2088if ac_fn_cxx_try_compile "$LINENO"; then :
2089  ac_header_compiler=yes
2090else
2091  ac_header_compiler=no
2092fi
2093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2095$as_echo "$ac_header_compiler" >&6; }
2096
2097# Is the header present?
2098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2099$as_echo_n "checking $2 presence... " >&6; }
2100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h.  */
2102#include <$2>
2103_ACEOF
2104if ac_fn_cxx_try_cpp "$LINENO"; then :
2105  ac_header_preproc=yes
2106else
2107  ac_header_preproc=no
2108fi
2109rm -f conftest.err conftest.i conftest.$ac_ext
2110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2111$as_echo "$ac_header_preproc" >&6; }
2112
2113# So?  What about this header?
2114case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2115  yes:no: )
2116    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2117$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2118    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2119$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2120    ;;
2121  no:yes:* )
2122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2123$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2124    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2125$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2126    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2127$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2128    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2129$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2130    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2131$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2132( $as_echo "## ----------------------------------------- ##
2133## Report this to build-dev@openjdk.java.net ##
2134## ----------------------------------------- ##"
2135     ) | sed "s/^/$as_me: WARNING:     /" >&2
2136    ;;
2137esac
2138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2139$as_echo_n "checking for $2... " >&6; }
2140if eval "test \"\${$3+set}\"" = set; then :
2141  $as_echo_n "(cached) " >&6
2142else
2143  eval "$3=\$ac_header_compiler"
2144fi
2145eval ac_res=\$$3
2146	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2147$as_echo "$ac_res" >&6; }
2148fi
2149  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2150
2151} # ac_fn_cxx_check_header_mongrel
2152
2153# ac_fn_cxx_try_run LINENO
2154# ------------------------
2155# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2156# that executables *can* be run.
2157ac_fn_cxx_try_run ()
2158{
2159  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2160  if { { ac_try="$ac_link"
2161case "(($ac_try" in
2162  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2163  *) ac_try_echo=$ac_try;;
2164esac
2165eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2166$as_echo "$ac_try_echo"; } >&5
2167  (eval "$ac_link") 2>&5
2168  ac_status=$?
2169  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2170  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2171  { { case "(($ac_try" in
2172  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2173  *) ac_try_echo=$ac_try;;
2174esac
2175eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2176$as_echo "$ac_try_echo"; } >&5
2177  (eval "$ac_try") 2>&5
2178  ac_status=$?
2179  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2180  test $ac_status = 0; }; }; then :
2181  ac_retval=0
2182else
2183  $as_echo "$as_me: program exited with status $ac_status" >&5
2184       $as_echo "$as_me: failed program was:" >&5
2185sed 's/^/| /' conftest.$ac_ext >&5
2186
2187       ac_retval=$ac_status
2188fi
2189  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2190  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2191  as_fn_set_status $ac_retval
2192
2193} # ac_fn_cxx_try_run
2194
2195# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2196# ---------------------------------------------------------
2197# Tests whether HEADER exists and can be compiled using the include files in
2198# INCLUDES, setting the cache variable VAR accordingly.
2199ac_fn_cxx_check_header_compile ()
2200{
2201  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2202  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2203$as_echo_n "checking for $2... " >&6; }
2204if eval "test \"\${$3+set}\"" = set; then :
2205  $as_echo_n "(cached) " >&6
2206else
2207  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2208/* end confdefs.h.  */
2209$4
2210#include <$2>
2211_ACEOF
2212if ac_fn_cxx_try_compile "$LINENO"; then :
2213  eval "$3=yes"
2214else
2215  eval "$3=no"
2216fi
2217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2218fi
2219eval ac_res=\$$3
2220	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2221$as_echo "$ac_res" >&6; }
2222  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2223
2224} # ac_fn_cxx_check_header_compile
2225
2226# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2227# ----------------------------------------------
2228# Tries to find the compile-time value of EXPR in a program that includes
2229# INCLUDES, setting VAR accordingly. Returns whether the value could be
2230# computed
2231ac_fn_cxx_compute_int ()
2232{
2233  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234  if test "$cross_compiling" = yes; then
2235    # Depending upon the size, compute the lo and hi bounds.
2236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2237/* end confdefs.h.  */
2238$4
2239int
2240main ()
2241{
2242static int test_array [1 - 2 * !(($2) >= 0)];
2243test_array [0] = 0
2244
2245  ;
2246  return 0;
2247}
2248_ACEOF
2249if ac_fn_cxx_try_compile "$LINENO"; then :
2250  ac_lo=0 ac_mid=0
2251  while :; do
2252    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h.  */
2254$4
2255int
2256main ()
2257{
2258static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2259test_array [0] = 0
2260
2261  ;
2262  return 0;
2263}
2264_ACEOF
2265if ac_fn_cxx_try_compile "$LINENO"; then :
2266  ac_hi=$ac_mid; break
2267else
2268  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2269			if test $ac_lo -le $ac_mid; then
2270			  ac_lo= ac_hi=
2271			  break
2272			fi
2273			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276  done
2277else
2278  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279/* end confdefs.h.  */
2280$4
2281int
2282main ()
2283{
2284static int test_array [1 - 2 * !(($2) < 0)];
2285test_array [0] = 0
2286
2287  ;
2288  return 0;
2289}
2290_ACEOF
2291if ac_fn_cxx_try_compile "$LINENO"; then :
2292  ac_hi=-1 ac_mid=-1
2293  while :; do
2294    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h.  */
2296$4
2297int
2298main ()
2299{
2300static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2301test_array [0] = 0
2302
2303  ;
2304  return 0;
2305}
2306_ACEOF
2307if ac_fn_cxx_try_compile "$LINENO"; then :
2308  ac_lo=$ac_mid; break
2309else
2310  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2311			if test $ac_mid -le $ac_hi; then
2312			  ac_lo= ac_hi=
2313			  break
2314			fi
2315			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2316fi
2317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2318  done
2319else
2320  ac_lo= ac_hi=
2321fi
2322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325# Binary search between lo and hi bounds.
2326while test "x$ac_lo" != "x$ac_hi"; do
2327  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2328  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2329/* end confdefs.h.  */
2330$4
2331int
2332main ()
2333{
2334static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2335test_array [0] = 0
2336
2337  ;
2338  return 0;
2339}
2340_ACEOF
2341if ac_fn_cxx_try_compile "$LINENO"; then :
2342  ac_hi=$ac_mid
2343else
2344  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2345fi
2346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347done
2348case $ac_lo in #((
2349?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2350'') ac_retval=1 ;;
2351esac
2352  else
2353    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h.  */
2355$4
2356static long int longval () { return $2; }
2357static unsigned long int ulongval () { return $2; }
2358#include <stdio.h>
2359#include <stdlib.h>
2360int
2361main ()
2362{
2363
2364  FILE *f = fopen ("conftest.val", "w");
2365  if (! f)
2366    return 1;
2367  if (($2) < 0)
2368    {
2369      long int i = longval ();
2370      if (i != ($2))
2371	return 1;
2372      fprintf (f, "%ld", i);
2373    }
2374  else
2375    {
2376      unsigned long int i = ulongval ();
2377      if (i != ($2))
2378	return 1;
2379      fprintf (f, "%lu", i);
2380    }
2381  /* Do not output a trailing newline, as this causes \r\n confusion
2382     on some platforms.  */
2383  return ferror (f) || fclose (f) != 0;
2384
2385  ;
2386  return 0;
2387}
2388_ACEOF
2389if ac_fn_cxx_try_run "$LINENO"; then :
2390  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2391else
2392  ac_retval=1
2393fi
2394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2395  conftest.$ac_objext conftest.beam conftest.$ac_ext
2396rm -f conftest.val
2397
2398  fi
2399  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2400  as_fn_set_status $ac_retval
2401
2402} # ac_fn_cxx_compute_int
2403
2404# ac_fn_cxx_try_link LINENO
2405# -------------------------
2406# Try to link conftest.$ac_ext, and return whether this succeeded.
2407ac_fn_cxx_try_link ()
2408{
2409  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410  rm -f conftest.$ac_objext conftest$ac_exeext
2411  if { { ac_try="$ac_link"
2412case "(($ac_try" in
2413  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2414  *) ac_try_echo=$ac_try;;
2415esac
2416eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2417$as_echo "$ac_try_echo"; } >&5
2418  (eval "$ac_link") 2>conftest.err
2419  ac_status=$?
2420  if test -s conftest.err; then
2421    grep -v '^ *+' conftest.err >conftest.er1
2422    cat conftest.er1 >&5
2423    mv -f conftest.er1 conftest.err
2424  fi
2425  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2426  test $ac_status = 0; } && {
2427	 test -z "$ac_cxx_werror_flag" ||
2428	 test ! -s conftest.err
2429       } && test -s conftest$ac_exeext && {
2430	 test "$cross_compiling" = yes ||
2431	 $as_test_x conftest$ac_exeext
2432       }; then :
2433  ac_retval=0
2434else
2435  $as_echo "$as_me: failed program was:" >&5
2436sed 's/^/| /' conftest.$ac_ext >&5
2437
2438	ac_retval=1
2439fi
2440  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2441  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2442  # interfere with the next link command; also delete a directory that is
2443  # left behind by Apple's compiler.  We do this before executing the actions.
2444  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2445  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2446  as_fn_set_status $ac_retval
2447
2448} # ac_fn_cxx_try_link
2449
2450# ac_fn_cxx_check_func LINENO FUNC VAR
2451# ------------------------------------
2452# Tests whether FUNC exists, setting the cache variable VAR accordingly
2453ac_fn_cxx_check_func ()
2454{
2455  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2457$as_echo_n "checking for $2... " >&6; }
2458if eval "test \"\${$3+set}\"" = set; then :
2459  $as_echo_n "(cached) " >&6
2460else
2461  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2462/* end confdefs.h.  */
2463/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2464   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2465#define $2 innocuous_$2
2466
2467/* System header to define __stub macros and hopefully few prototypes,
2468    which can conflict with char $2 (); below.
2469    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2470    <limits.h> exists even on freestanding compilers.  */
2471
2472#ifdef __STDC__
2473# include <limits.h>
2474#else
2475# include <assert.h>
2476#endif
2477
2478#undef $2
2479
2480/* Override any GCC internal prototype to avoid an error.
2481   Use char because int might match the return type of a GCC
2482   builtin and then its argument prototype would still apply.  */
2483#ifdef __cplusplus
2484extern "C"
2485#endif
2486char $2 ();
2487/* The GNU C library defines this for functions which it implements
2488    to always fail with ENOSYS.  Some functions are actually named
2489    something starting with __ and the normal name is an alias.  */
2490#if defined __stub_$2 || defined __stub___$2
2491choke me
2492#endif
2493
2494int
2495main ()
2496{
2497return $2 ();
2498  ;
2499  return 0;
2500}
2501_ACEOF
2502if ac_fn_cxx_try_link "$LINENO"; then :
2503  eval "$3=yes"
2504else
2505  eval "$3=no"
2506fi
2507rm -f core conftest.err conftest.$ac_objext \
2508    conftest$ac_exeext conftest.$ac_ext
2509fi
2510eval ac_res=\$$3
2511	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2512$as_echo "$ac_res" >&6; }
2513  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2514
2515} # ac_fn_cxx_check_func
2516
2517# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2518# -------------------------------------------------------
2519# Tests whether HEADER exists and can be compiled using the include files in
2520# INCLUDES, setting the cache variable VAR accordingly.
2521ac_fn_c_check_header_compile ()
2522{
2523  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2525$as_echo_n "checking for $2... " >&6; }
2526if eval "test \"\${$3+set}\"" = set; then :
2527  $as_echo_n "(cached) " >&6
2528else
2529  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2530/* end confdefs.h.  */
2531$4
2532#include <$2>
2533_ACEOF
2534if ac_fn_c_try_compile "$LINENO"; then :
2535  eval "$3=yes"
2536else
2537  eval "$3=no"
2538fi
2539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2540fi
2541eval ac_res=\$$3
2542	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2543$as_echo "$ac_res" >&6; }
2544  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2545
2546} # ac_fn_c_check_header_compile
2547cat >config.log <<_ACEOF
2548This file contains any messages produced by compilers while
2549running configure, to aid debugging if configure makes a mistake.
2550
2551It was created by OpenJDK $as_me jdk8, which was
2552generated by GNU Autoconf 2.67.  Invocation command line was
2553
2554  $ $0 $@
2555
2556_ACEOF
2557exec 5>>config.log
2558{
2559cat <<_ASUNAME
2560## --------- ##
2561## Platform. ##
2562## --------- ##
2563
2564hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2565uname -m = `(uname -m) 2>/dev/null || echo unknown`
2566uname -r = `(uname -r) 2>/dev/null || echo unknown`
2567uname -s = `(uname -s) 2>/dev/null || echo unknown`
2568uname -v = `(uname -v) 2>/dev/null || echo unknown`
2569
2570/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2571/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2572
2573/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2574/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2575/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2576/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2577/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2578/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2579/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2580
2581_ASUNAME
2582
2583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2584for as_dir in $PATH
2585do
2586  IFS=$as_save_IFS
2587  test -z "$as_dir" && as_dir=.
2588    $as_echo "PATH: $as_dir"
2589  done
2590IFS=$as_save_IFS
2591
2592} >&5
2593
2594cat >&5 <<_ACEOF
2595
2596
2597## ----------- ##
2598## Core tests. ##
2599## ----------- ##
2600
2601_ACEOF
2602
2603
2604# Keep a trace of the command line.
2605# Strip out --no-create and --no-recursion so they do not pile up.
2606# Strip out --silent because we don't want to record it for future runs.
2607# Also quote any args containing shell meta-characters.
2608# Make two passes to allow for proper duplicate-argument suppression.
2609ac_configure_args=
2610ac_configure_args0=
2611ac_configure_args1=
2612ac_must_keep_next=false
2613for ac_pass in 1 2
2614do
2615  for ac_arg
2616  do
2617    case $ac_arg in
2618    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2619    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2620    | -silent | --silent | --silen | --sile | --sil)
2621      continue ;;
2622    *\'*)
2623      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2624    esac
2625    case $ac_pass in
2626    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2627    2)
2628      as_fn_append ac_configure_args1 " '$ac_arg'"
2629      if test $ac_must_keep_next = true; then
2630	ac_must_keep_next=false # Got value, back to normal.
2631      else
2632	case $ac_arg in
2633	  *=* | --config-cache | -C | -disable-* | --disable-* \
2634	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2635	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2636	  | -with-* | --with-* | -without-* | --without-* | --x)
2637	    case "$ac_configure_args0 " in
2638	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2639	    esac
2640	    ;;
2641	  -* ) ac_must_keep_next=true ;;
2642	esac
2643      fi
2644      as_fn_append ac_configure_args " '$ac_arg'"
2645      ;;
2646    esac
2647  done
2648done
2649{ ac_configure_args0=; unset ac_configure_args0;}
2650{ ac_configure_args1=; unset ac_configure_args1;}
2651
2652# When interrupted or exit'd, cleanup temporary files, and complete
2653# config.log.  We remove comments because anyway the quotes in there
2654# would cause problems or look ugly.
2655# WARNING: Use '\'' to represent an apostrophe within the trap.
2656# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2657trap 'exit_status=$?
2658  # Save into config.log some information that might help in debugging.
2659  {
2660    echo
2661
2662    $as_echo "## ---------------- ##
2663## Cache variables. ##
2664## ---------------- ##"
2665    echo
2666    # The following way of writing the cache mishandles newlines in values,
2667(
2668  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2669    eval ac_val=\$$ac_var
2670    case $ac_val in #(
2671    *${as_nl}*)
2672      case $ac_var in #(
2673      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2674$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2675      esac
2676      case $ac_var in #(
2677      _ | IFS | as_nl) ;; #(
2678      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2679      *) { eval $ac_var=; unset $ac_var;} ;;
2680      esac ;;
2681    esac
2682  done
2683  (set) 2>&1 |
2684    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2685    *${as_nl}ac_space=\ *)
2686      sed -n \
2687	"s/'\''/'\''\\\\'\'''\''/g;
2688	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2689      ;; #(
2690    *)
2691      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2692      ;;
2693    esac |
2694    sort
2695)
2696    echo
2697
2698    $as_echo "## ----------------- ##
2699## Output variables. ##
2700## ----------------- ##"
2701    echo
2702    for ac_var in $ac_subst_vars
2703    do
2704      eval ac_val=\$$ac_var
2705      case $ac_val in
2706      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2707      esac
2708      $as_echo "$ac_var='\''$ac_val'\''"
2709    done | sort
2710    echo
2711
2712    if test -n "$ac_subst_files"; then
2713      $as_echo "## ------------------- ##
2714## File substitutions. ##
2715## ------------------- ##"
2716      echo
2717      for ac_var in $ac_subst_files
2718      do
2719	eval ac_val=\$$ac_var
2720	case $ac_val in
2721	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2722	esac
2723	$as_echo "$ac_var='\''$ac_val'\''"
2724      done | sort
2725      echo
2726    fi
2727
2728    if test -s confdefs.h; then
2729      $as_echo "## ----------- ##
2730## confdefs.h. ##
2731## ----------- ##"
2732      echo
2733      cat confdefs.h
2734      echo
2735    fi
2736    test "$ac_signal" != 0 &&
2737      $as_echo "$as_me: caught signal $ac_signal"
2738    $as_echo "$as_me: exit $exit_status"
2739  } >&5
2740  rm -f core *.core core.conftest.* &&
2741    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2742    exit $exit_status
2743' 0
2744for ac_signal in 1 2 13 15; do
2745  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2746done
2747ac_signal=0
2748
2749# confdefs.h avoids OS command line length limits that DEFS can exceed.
2750rm -f -r conftest* confdefs.h
2751
2752$as_echo "/* confdefs.h */" > confdefs.h
2753
2754# Predefined preprocessor variables.
2755
2756cat >>confdefs.h <<_ACEOF
2757#define PACKAGE_NAME "$PACKAGE_NAME"
2758_ACEOF
2759
2760cat >>confdefs.h <<_ACEOF
2761#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2762_ACEOF
2763
2764cat >>confdefs.h <<_ACEOF
2765#define PACKAGE_VERSION "$PACKAGE_VERSION"
2766_ACEOF
2767
2768cat >>confdefs.h <<_ACEOF
2769#define PACKAGE_STRING "$PACKAGE_STRING"
2770_ACEOF
2771
2772cat >>confdefs.h <<_ACEOF
2773#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2774_ACEOF
2775
2776cat >>confdefs.h <<_ACEOF
2777#define PACKAGE_URL "$PACKAGE_URL"
2778_ACEOF
2779
2780
2781# Let the site file select an alternate cache file if it wants to.
2782# Prefer an explicitly selected file to automatically selected ones.
2783ac_site_file1=NONE
2784ac_site_file2=NONE
2785if test -n "$CONFIG_SITE"; then
2786  # We do not want a PATH search for config.site.
2787  case $CONFIG_SITE in #((
2788    -*)  ac_site_file1=./$CONFIG_SITE;;
2789    */*) ac_site_file1=$CONFIG_SITE;;
2790    *)   ac_site_file1=./$CONFIG_SITE;;
2791  esac
2792elif test "x$prefix" != xNONE; then
2793  ac_site_file1=$prefix/share/config.site
2794  ac_site_file2=$prefix/etc/config.site
2795else
2796  ac_site_file1=$ac_default_prefix/share/config.site
2797  ac_site_file2=$ac_default_prefix/etc/config.site
2798fi
2799for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2800do
2801  test "x$ac_site_file" = xNONE && continue
2802  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2803    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2804$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2805    sed 's/^/| /' "$ac_site_file" >&5
2806    . "$ac_site_file" \
2807      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2808$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2809as_fn_error $? "failed to load site script $ac_site_file
2810See \`config.log' for more details" "$LINENO" 5 ; }
2811  fi
2812done
2813
2814if test -r "$cache_file"; then
2815  # Some versions of bash will fail to source /dev/null (special files
2816  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2817  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2818    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2819$as_echo "$as_me: loading cache $cache_file" >&6;}
2820    case $cache_file in
2821      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2822      *)                      . "./$cache_file";;
2823    esac
2824  fi
2825else
2826  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2827$as_echo "$as_me: creating cache $cache_file" >&6;}
2828  >$cache_file
2829fi
2830
2831# Check that the precious variables saved in the cache have kept the same
2832# value.
2833ac_cache_corrupted=false
2834for ac_var in $ac_precious_vars; do
2835  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2836  eval ac_new_set=\$ac_env_${ac_var}_set
2837  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2838  eval ac_new_val=\$ac_env_${ac_var}_value
2839  case $ac_old_set,$ac_new_set in
2840    set,)
2841      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2842$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2843      ac_cache_corrupted=: ;;
2844    ,set)
2845      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2846$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2847      ac_cache_corrupted=: ;;
2848    ,);;
2849    *)
2850      if test "x$ac_old_val" != "x$ac_new_val"; then
2851	# differences in whitespace do not lead to failure.
2852	ac_old_val_w=`echo x $ac_old_val`
2853	ac_new_val_w=`echo x $ac_new_val`
2854	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2855	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2856$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2857	  ac_cache_corrupted=:
2858	else
2859	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2860$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2861	  eval $ac_var=\$ac_old_val
2862	fi
2863	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2864$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2865	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2866$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2867      fi;;
2868  esac
2869  # Pass precious variables to config.status.
2870  if test "$ac_new_set" = set; then
2871    case $ac_new_val in
2872    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2873    *) ac_arg=$ac_var=$ac_new_val ;;
2874    esac
2875    case " $ac_configure_args " in
2876      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2877      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2878    esac
2879  fi
2880done
2881if $ac_cache_corrupted; then
2882  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2883$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2884  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2885$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2886  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2887fi
2888## -------------------- ##
2889## Main body of script. ##
2890## -------------------- ##
2891
2892ac_ext=c
2893ac_cpp='$CPP $CPPFLAGS'
2894ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2895ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2896ac_compiler_gnu=$ac_cv_c_compiler_gnu
2897
2898
2899
2900ac_aux_dir=
2901for ac_dir in build-aux "$srcdir"/build-aux; do
2902  if test -f "$ac_dir/install-sh"; then
2903    ac_aux_dir=$ac_dir
2904    ac_install_sh="$ac_aux_dir/install-sh -c"
2905    break
2906  elif test -f "$ac_dir/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/shtool"; then
2911    ac_aux_dir=$ac_dir
2912    ac_install_sh="$ac_aux_dir/shtool install -c"
2913    break
2914  fi
2915done
2916if test -z "$ac_aux_dir"; then
2917  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2918fi
2919
2920# These three variables are undocumented and unsupported,
2921# and are intended to be withdrawn in a future Autoconf release.
2922# They can cause serious problems if a builder's source tree is in a directory
2923# whose full name contains unusual characters.
2924ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2925ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2926ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2927
2928
2929# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2930#
2931# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2932#
2933# This program is free software; you can redistribute it and/or modify
2934# it under the terms of the GNU General Public License as published by
2935# the Free Software Foundation; either version 2 of the License, or
2936# (at your option) any later version.
2937#
2938# This program is distributed in the hope that it will be useful, but
2939# WITHOUT ANY WARRANTY; without even the implied warranty of
2940# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2941# General Public License for more details.
2942#
2943# You should have received a copy of the GNU General Public License
2944# along with this program; if not, write to the Free Software
2945# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2946#
2947# As a special exception to the GNU General Public License, if you
2948# distribute this file as part of a program that contains a
2949# configuration script generated by Autoconf, you may include it under
2950# the same distribution terms that you use for the rest of that program.
2951
2952# PKG_PROG_PKG_CONFIG([MIN-VERSION])
2953# ----------------------------------
2954# PKG_PROG_PKG_CONFIG
2955
2956# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
2957#
2958# Check to see whether a particular set of modules exists.  Similar
2959# to PKG_CHECK_MODULES(), but does not set variables or print errors.
2960#
2961#
2962# Similar to PKG_CHECK_MODULES, make sure that the first instance of
2963# this or PKG_CHECK_MODULES is called, or make sure to call
2964# PKG_CHECK_EXISTS manually
2965# --------------------------------------------------------------
2966
2967
2968
2969# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
2970# ---------------------------------------------
2971# _PKG_CONFIG
2972
2973# _PKG_SHORT_ERRORS_SUPPORTED
2974# -----------------------------
2975# _PKG_SHORT_ERRORS_SUPPORTED
2976
2977
2978# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
2979# [ACTION-IF-NOT-FOUND])
2980#
2981#
2982# Note that if there is a possibility the first call to
2983# PKG_CHECK_MODULES might not happen, you should be sure to include an
2984# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
2985#
2986#
2987# --------------------------------------------------------------
2988# PKG_CHECK_MODULES
2989
2990
2991# Include these first...
2992#
2993# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
2994# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2995#
2996# This code is free software; you can redistribute it and/or modify it
2997# under the terms of the GNU General Public License version 2 only, as
2998# published by the Free Software Foundation.  Oracle designates this
2999# particular file as subject to the "Classpath" exception as provided
3000# by Oracle in the LICENSE file that accompanied this code.
3001#
3002# This code is distributed in the hope that it will be useful, but WITHOUT
3003# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3004# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3005# version 2 for more details (a copy is included in the LICENSE file that
3006# accompanied this code).
3007#
3008# You should have received a copy of the GNU General Public License version
3009# 2 along with this work; if not, write to the Free Software Foundation,
3010# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3011#
3012# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3013# or visit www.oracle.com if you need additional information or have any
3014# questions.
3015#
3016
3017
3018
3019# This will make sure the given variable points to a full and proper
3020# path. This means:
3021# 1) There will be no spaces in the path. On posix platforms,
3022#    spaces in the path will result in an error. On Windows,
3023#    the path will be rewritten using short-style to be space-free.
3024# 2) The path will be absolute, and it will be in unix-style (on
3025#     cygwin).
3026# $1: The name of the variable to fix
3027
3028
3029# This will make sure the given variable points to a executable
3030# with a full and proper path. This means:
3031# 1) There will be no spaces in the path. On posix platforms,
3032#    spaces in the path will result in an error. On Windows,
3033#    the path will be rewritten using short-style to be space-free.
3034# 2) The path will be absolute, and it will be in unix-style (on
3035#     cygwin).
3036# Any arguments given to the executable is preserved.
3037# If the input variable does not have a directory specification, then
3038# it need to be in the PATH.
3039# $1: The name of the variable to fix
3040
3041
3042
3043
3044
3045
3046# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3047# $1: variable to check
3048# $2: executable name to print in warning (optional)
3049
3050
3051# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3052# Arguments as AC_PATH_PROG:
3053# $1: variable to set
3054# $2: executable name to look for
3055
3056
3057# Setup the most fundamental tools that relies on not much else to set up,
3058# but is used by much of the early bootstrap code.
3059
3060
3061# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3062
3063
3064
3065
3066
3067
3068
3069#%%% Simple tools %%%
3070
3071# Check if we have found a usable version of make
3072# $1: the path to a potential make binary (or empty)
3073# $2: the description on how we found this
3074
3075
3076# Goes looking for a usable version of GNU make.
3077
3078
3079
3080
3081
3082
3083# Check if build directory is on local disk. If not possible to determine,
3084# we prefer to claim it's local.
3085# Argument 1: directory to test
3086# Argument 2: what to do if it is on local disk
3087# Argument 3: what to do otherwise (remote disk or failure)
3088
3089
3090# Check that source files have basic read permissions set. This might
3091# not be the case in cygwin in certain conditions.
3092
3093
3094
3095
3096#
3097# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3098# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3099#
3100# This code is free software; you can redistribute it and/or modify it
3101# under the terms of the GNU General Public License version 2 only, as
3102# published by the Free Software Foundation.  Oracle designates this
3103# particular file as subject to the "Classpath" exception as provided
3104# by Oracle in the LICENSE file that accompanied this code.
3105#
3106# This code is distributed in the hope that it will be useful, but WITHOUT
3107# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3108# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3109# version 2 for more details (a copy is included in the LICENSE file that
3110# accompanied this code).
3111#
3112# You should have received a copy of the GNU General Public License version
3113# 2 along with this work; if not, write to the Free Software Foundation,
3114# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3115#
3116# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3117# or visit www.oracle.com if you need additional information or have any
3118# questions.
3119#
3120
3121
3122
3123
3124
3125# Helper function which possibly converts a path using DOS-style short mode.
3126# If so, the updated path is stored in $new_path.
3127# $1: The path to check
3128
3129
3130# Helper function which possibly converts a path using DOS-style short mode.
3131# If so, the updated path is stored in $new_path.
3132# $1: The path to check
3133
3134
3135# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3136# and could probably be heavily simplified. However, all changes in this
3137# area tend to need lot of testing in different scenarios, and in lack of
3138# proper unit testing, cleaning this up has not been deemed worth the effort
3139# at the moment.
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3150
3151
3152
3153
3154#
3155# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3156# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3157#
3158# This code is free software; you can redistribute it and/or modify it
3159# under the terms of the GNU General Public License version 2 only, as
3160# published by the Free Software Foundation.  Oracle designates this
3161# particular file as subject to the "Classpath" exception as provided
3162# by Oracle in the LICENSE file that accompanied this code.
3163#
3164# This code is distributed in the hope that it will be useful, but WITHOUT
3165# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3166# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3167# version 2 for more details (a copy is included in the LICENSE file that
3168# accompanied this code).
3169#
3170# You should have received a copy of the GNU General Public License version
3171# 2 along with this work; if not, write to the Free Software Foundation,
3172# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3173#
3174# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3175# or visit www.oracle.com if you need additional information or have any
3176# questions.
3177#
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189# ... then the rest
3190#
3191# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3192# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3193#
3194# This code is free software; you can redistribute it and/or modify it
3195# under the terms of the GNU General Public License version 2 only, as
3196# published by the Free Software Foundation.  Oracle designates this
3197# particular file as subject to the "Classpath" exception as provided
3198# by Oracle in the LICENSE file that accompanied this code.
3199#
3200# This code is distributed in the hope that it will be useful, but WITHOUT
3201# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3202# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3203# version 2 for more details (a copy is included in the LICENSE file that
3204# accompanied this code).
3205#
3206# You should have received a copy of the GNU General Public License version
3207# 2 along with this work; if not, write to the Free Software Foundation,
3208# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3209#
3210# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3211# or visit www.oracle.com if you need additional information or have any
3212# questions.
3213#
3214
3215# Execute the check given as argument, and verify the result
3216# If the Boot JDK was previously found, do nothing
3217# $1 A command line (typically autoconf macro) to execute
3218
3219
3220# Test: Is bootjdk explicitely set by command line arguments?
3221
3222
3223# Test: Is bootjdk available from builddeps?
3224
3225
3226# Test: Is $JAVA_HOME set?
3227
3228
3229# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3230
3231
3232# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3233
3234
3235# Look for a jdk in the given path. If there are multiple, try to select the newest.
3236# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3237# $1 = Path to directory containing jdk installations.
3238# $2 = String to append to the found JDK directory to get the proper JDK home
3239
3240
3241# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3242# environmental variable as base for where to look.
3243# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3244
3245
3246# Test: Is there a JDK installed in default, well-known locations?
3247
3248
3249# Check that a command-line tool in the Boot JDK is correct
3250# $1 = name of variable to assign
3251# $2 = name of binary
3252
3253
3254###############################################################################
3255#
3256# We need a Boot JDK to bootstrap the build.
3257#
3258
3259
3260
3261
3262
3263#
3264# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3265# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3266#
3267# This code is free software; you can redistribute it and/or modify it
3268# under the terms of the GNU General Public License version 2 only, as
3269# published by the Free Software Foundation.  Oracle designates this
3270# particular file as subject to the "Classpath" exception as provided
3271# by Oracle in the LICENSE file that accompanied this code.
3272#
3273# This code is distributed in the hope that it will be useful, but WITHOUT
3274# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3275# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3276# version 2 for more details (a copy is included in the LICENSE file that
3277# accompanied this code).
3278#
3279# You should have received a copy of the GNU General Public License version
3280# 2 along with this work; if not, write to the Free Software Foundation,
3281# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3282#
3283# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3284# or visit www.oracle.com if you need additional information or have any
3285# questions.
3286#
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305#
3306# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3307# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3308#
3309# This code is free software; you can redistribute it and/or modify it
3310# under the terms of the GNU General Public License version 2 only, as
3311# published by the Free Software Foundation.  Oracle designates this
3312# particular file as subject to the "Classpath" exception as provided
3313# by Oracle in the LICENSE file that accompanied this code.
3314#
3315# This code is distributed in the hope that it will be useful, but WITHOUT
3316# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3317# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3318# version 2 for more details (a copy is included in the LICENSE file that
3319# accompanied this code).
3320#
3321# You should have received a copy of the GNU General Public License version
3322# 2 along with this work; if not, write to the Free Software Foundation,
3323# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3324#
3325# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3326# or visit www.oracle.com if you need additional information or have any
3327# questions.
3328#
3329
3330
3331
3332
3333
3334cygwin_help() {
3335    case $1 in
3336    unzip)
3337        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3338    zip)
3339        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3340    make)
3341        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3342    * )
3343       break ;;
3344    esac
3345}
3346
3347apt_help() {
3348    case $1 in
3349    devkit)
3350        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3351    openjdk)
3352        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3353    alsa)
3354        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3355    cups)
3356        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3357    freetype2)
3358        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3359    pulse)
3360        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3361    x11)
3362        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3363    ccache)
3364        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3365    * )
3366       break ;;
3367    esac
3368}
3369
3370yum_help() {
3371    case $1 in
3372    devkit)
3373        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3374    openjdk)
3375        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3376    alsa)
3377        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3378    cups)
3379        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3380    freetype2)
3381        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3382    pulse)
3383        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3384    x11)
3385        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3386    ccache)
3387        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3388    * )
3389       break ;;
3390    esac
3391}
3392
3393port_help() {
3394    PKGHANDLER_COMMAND=""
3395}
3396
3397pkgutil_help() {
3398    PKGHANDLER_COMMAND=""
3399}
3400
3401pkgadd_help() {
3402    PKGHANDLER_COMMAND=""
3403}
3404
3405
3406
3407#
3408# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3409# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3410#
3411# This code is free software; you can redistribute it and/or modify it
3412# under the terms of the GNU General Public License version 2 only, as
3413# published by the Free Software Foundation.  Oracle designates this
3414# particular file as subject to the "Classpath" exception as provided
3415# by Oracle in the LICENSE file that accompanied this code.
3416#
3417# This code is distributed in the hope that it will be useful, but WITHOUT
3418# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3419# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3420# version 2 for more details (a copy is included in the LICENSE file that
3421# accompanied this code).
3422#
3423# You should have received a copy of the GNU General Public License version
3424# 2 along with this work; if not, write to the Free Software Foundation,
3425# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3426#
3427# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3428# or visit www.oracle.com if you need additional information or have any
3429# questions.
3430#
3431
3432
3433
3434
3435
3436
3437
3438
3439###############################################################################
3440#
3441# Should we build only OpenJDK even if closed sources are present?
3442#
3443
3444
3445
3446
3447###############################################################################
3448#
3449# Setup version numbers
3450#
3451
3452
3453
3454
3455
3456
3457# Support for customization of the build process. Some build files
3458# will include counterparts from this location, if they exist. This allows
3459# for a degree of customization of the build targets and the rules/recipes
3460# to create them
3461
3462# Check whether --with-custom-make-dir was given.
3463if test "${with_custom_make_dir+set}" = set; then :
3464  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3465fi
3466
3467
3468
3469#
3470# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3471# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3472#
3473# This code is free software; you can redistribute it and/or modify it
3474# under the terms of the GNU General Public License version 2 only, as
3475# published by the Free Software Foundation.  Oracle designates this
3476# particular file as subject to the "Classpath" exception as provided
3477# by Oracle in the LICENSE file that accompanied this code.
3478#
3479# This code is distributed in the hope that it will be useful, but WITHOUT
3480# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3481# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3482# version 2 for more details (a copy is included in the LICENSE file that
3483# accompanied this code).
3484#
3485# You should have received a copy of the GNU General Public License version
3486# 2 along with this work; if not, write to the Free Software Foundation,
3487# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3488#
3489# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3490# or visit www.oracle.com if you need additional information or have any
3491# questions.
3492#
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508#
3509# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3510# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3511#
3512# This code is free software; you can redistribute it and/or modify it
3513# under the terms of the GNU General Public License version 2 only, as
3514# published by the Free Software Foundation.  Oracle designates this
3515# particular file as subject to the "Classpath" exception as provided
3516# by Oracle in the LICENSE file that accompanied this code.
3517#
3518# This code is distributed in the hope that it will be useful, but WITHOUT
3519# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3520# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3521# version 2 for more details (a copy is included in the LICENSE file that
3522# accompanied this code).
3523#
3524# You should have received a copy of the GNU General Public License version
3525# 2 along with this work; if not, write to the Free Software Foundation,
3526# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3527#
3528# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3529# or visit www.oracle.com if you need additional information or have any
3530# questions.
3531#
3532
3533# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3534# Converts autoconf style CPU name to OpenJDK style, into
3535# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3536
3537
3538# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3539# Converts autoconf style OS name to OpenJDK style, into
3540# VAR_OS and VAR_OS_API.
3541
3542
3543# Expects $host_os $host_cpu $build_os and $build_cpu
3544# and $with_target_bits to have been setup!
3545#
3546# Translate the standard triplet(quadruplet) definition
3547# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3548# OPENJDK_BUILD_OS, etc.
3549
3550
3551# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3552# accordingly. Must be done after setting up build and target system, but before
3553# doing anything else with these values.
3554
3555
3556    # Setup the legacy variables, for controlling the old makefiles.
3557    #
3558
3559
3560
3561
3562#%%% Build and target systems %%%
3563
3564
3565
3566
3567# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3568# Add -mX to various FLAGS variables.
3569
3570
3571
3572
3573
3574
3575#
3576# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3577# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3578#
3579# This code is free software; you can redistribute it and/or modify it
3580# under the terms of the GNU General Public License version 2 only, as
3581# published by the Free Software Foundation.  Oracle designates this
3582# particular file as subject to the "Classpath" exception as provided
3583# by Oracle in the LICENSE file that accompanied this code.
3584#
3585# This code is distributed in the hope that it will be useful, but WITHOUT
3586# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3587# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3588# version 2 for more details (a copy is included in the LICENSE file that
3589# accompanied this code).
3590#
3591# You should have received a copy of the GNU General Public License version
3592# 2 along with this work; if not, write to the Free Software Foundation,
3593# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3594#
3595# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3596# or visit www.oracle.com if you need additional information or have any
3597# questions.
3598#
3599
3600
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# $1 = compiler to test (CC or CXX)
3633# $2 = human readable name of compiler (C or C++)
3634
3635
3636
3637
3638
3639# $1 = compiler to test (CC or CXX)
3640# $2 = human readable name of compiler (C or C++)
3641# $3 = list of compiler names to search for
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654#
3655# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3656# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3657#
3658# This code is free software; you can redistribute it and/or modify it
3659# under the terms of the GNU General Public License version 2 only, as
3660# published by the Free Software Foundation.  Oracle designates this
3661# particular file as subject to the "Classpath" exception as provided
3662# by Oracle in the LICENSE file that accompanied this code.
3663#
3664# This code is distributed in the hope that it will be useful, but WITHOUT
3665# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3666# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3667# version 2 for more details (a copy is included in the LICENSE file that
3668# accompanied this code).
3669#
3670# You should have received a copy of the GNU General Public License version
3671# 2 along with this work; if not, write to the Free Software Foundation,
3672# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3673#
3674# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3675# or visit www.oracle.com if you need additional information or have any
3676# questions.
3677#
3678
3679
3680
3681
3682
3683
3684
3685# Check if the VS env variables were setup prior to running configure.
3686# If not, then find vcvarsall.bat and run it automatically, and integrate
3687# the set env variables into the spec file.
3688
3689
3690
3691
3692
3693
3694# This line needs to be here, verbatim, after all includes and the dummy hook
3695# definitions. It is replaced with custom functionality when building
3696# custom sources.
3697#CUSTOM_AUTOCONF_INCLUDE
3698
3699# Do not change or remove the following line, it is needed for consistency checks:
3700DATE_WHEN_GENERATED=1358165331
3701
3702###############################################################################
3703#
3704# Initialization / Boot-strapping
3705#
3706# The bootstrapping process needs to solve the "chicken or the egg" problem,
3707# thus it jumps back and forth, each time gaining something needed later on.
3708#
3709###############################################################################
3710
3711# Basic initialization that must happen first of all
3712
3713# Save the original command line. This is passed to us by the wrapper configure script.
3714
3715DATE_WHEN_CONFIGURED=`LANG=C date`
3716
3717{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3718$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3719{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3720$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3721
3722
3723
3724# Start with tools that do not need have cross compilation support
3725# and can be expected to be found in the default PATH. These tools are
3726# used by configure. Nor are these tools expected to be found in the
3727# devkit from the builddeps server either, since they are
3728# needed to download the devkit.
3729
3730# First are all the simple required tools.
3731
3732    for ac_prog in basename
3733do
3734  # Extract the first word of "$ac_prog", so it can be a program name with args.
3735set dummy $ac_prog; ac_word=$2
3736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3737$as_echo_n "checking for $ac_word... " >&6; }
3738if test "${ac_cv_path_BASENAME+set}" = set; then :
3739  $as_echo_n "(cached) " >&6
3740else
3741  case $BASENAME in
3742  [\\/]* | ?:[\\/]*)
3743  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3744  ;;
3745  *)
3746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3747for as_dir in $PATH
3748do
3749  IFS=$as_save_IFS
3750  test -z "$as_dir" && as_dir=.
3751    for ac_exec_ext in '' $ac_executable_extensions; do
3752  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3753    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3755    break 2
3756  fi
3757done
3758  done
3759IFS=$as_save_IFS
3760
3761  ;;
3762esac
3763fi
3764BASENAME=$ac_cv_path_BASENAME
3765if test -n "$BASENAME"; then
3766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3767$as_echo "$BASENAME" >&6; }
3768else
3769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3770$as_echo "no" >&6; }
3771fi
3772
3773
3774  test -n "$BASENAME" && break
3775done
3776
3777
3778    if test "x$BASENAME" = x; then
3779        if test "xbasename" = x; then
3780          PROG_NAME=basename
3781        else
3782          PROG_NAME=basename
3783        fi
3784        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3785$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3786        as_fn_error $? "Cannot continue" "$LINENO" 5
3787    fi
3788
3789
3790
3791    for ac_prog in bash
3792do
3793  # Extract the first word of "$ac_prog", so it can be a program name with args.
3794set dummy $ac_prog; ac_word=$2
3795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796$as_echo_n "checking for $ac_word... " >&6; }
3797if test "${ac_cv_path_BASH+set}" = set; then :
3798  $as_echo_n "(cached) " >&6
3799else
3800  case $BASH in
3801  [\\/]* | ?:[\\/]*)
3802  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3803  ;;
3804  *)
3805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3806for as_dir in $PATH
3807do
3808  IFS=$as_save_IFS
3809  test -z "$as_dir" && as_dir=.
3810    for ac_exec_ext in '' $ac_executable_extensions; do
3811  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3812    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3814    break 2
3815  fi
3816done
3817  done
3818IFS=$as_save_IFS
3819
3820  ;;
3821esac
3822fi
3823BASH=$ac_cv_path_BASH
3824if test -n "$BASH"; then
3825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3826$as_echo "$BASH" >&6; }
3827else
3828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3829$as_echo "no" >&6; }
3830fi
3831
3832
3833  test -n "$BASH" && break
3834done
3835
3836
3837    if test "x$BASH" = x; then
3838        if test "xbash" = x; then
3839          PROG_NAME=bash
3840        else
3841          PROG_NAME=bash
3842        fi
3843        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3844$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3845        as_fn_error $? "Cannot continue" "$LINENO" 5
3846    fi
3847
3848
3849
3850    for ac_prog in cat
3851do
3852  # Extract the first word of "$ac_prog", so it can be a program name with args.
3853set dummy $ac_prog; ac_word=$2
3854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3855$as_echo_n "checking for $ac_word... " >&6; }
3856if test "${ac_cv_path_CAT+set}" = set; then :
3857  $as_echo_n "(cached) " >&6
3858else
3859  case $CAT in
3860  [\\/]* | ?:[\\/]*)
3861  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3862  ;;
3863  *)
3864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3865for as_dir in $PATH
3866do
3867  IFS=$as_save_IFS
3868  test -z "$as_dir" && as_dir=.
3869    for ac_exec_ext in '' $ac_executable_extensions; do
3870  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3871    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3873    break 2
3874  fi
3875done
3876  done
3877IFS=$as_save_IFS
3878
3879  ;;
3880esac
3881fi
3882CAT=$ac_cv_path_CAT
3883if test -n "$CAT"; then
3884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3885$as_echo "$CAT" >&6; }
3886else
3887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3888$as_echo "no" >&6; }
3889fi
3890
3891
3892  test -n "$CAT" && break
3893done
3894
3895
3896    if test "x$CAT" = x; then
3897        if test "xcat" = x; then
3898          PROG_NAME=cat
3899        else
3900          PROG_NAME=cat
3901        fi
3902        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3903$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3904        as_fn_error $? "Cannot continue" "$LINENO" 5
3905    fi
3906
3907
3908
3909    for ac_prog in chmod
3910do
3911  # Extract the first word of "$ac_prog", so it can be a program name with args.
3912set dummy $ac_prog; ac_word=$2
3913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3914$as_echo_n "checking for $ac_word... " >&6; }
3915if test "${ac_cv_path_CHMOD+set}" = set; then :
3916  $as_echo_n "(cached) " >&6
3917else
3918  case $CHMOD in
3919  [\\/]* | ?:[\\/]*)
3920  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
3921  ;;
3922  *)
3923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3924for as_dir in $PATH
3925do
3926  IFS=$as_save_IFS
3927  test -z "$as_dir" && as_dir=.
3928    for ac_exec_ext in '' $ac_executable_extensions; do
3929  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3930    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
3931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3932    break 2
3933  fi
3934done
3935  done
3936IFS=$as_save_IFS
3937
3938  ;;
3939esac
3940fi
3941CHMOD=$ac_cv_path_CHMOD
3942if test -n "$CHMOD"; then
3943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
3944$as_echo "$CHMOD" >&6; }
3945else
3946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3947$as_echo "no" >&6; }
3948fi
3949
3950
3951  test -n "$CHMOD" && break
3952done
3953
3954
3955    if test "x$CHMOD" = x; then
3956        if test "xchmod" = x; then
3957          PROG_NAME=chmod
3958        else
3959          PROG_NAME=chmod
3960        fi
3961        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3962$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3963        as_fn_error $? "Cannot continue" "$LINENO" 5
3964    fi
3965
3966
3967
3968    for ac_prog in cmp
3969do
3970  # Extract the first word of "$ac_prog", so it can be a program name with args.
3971set dummy $ac_prog; ac_word=$2
3972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3973$as_echo_n "checking for $ac_word... " >&6; }
3974if test "${ac_cv_path_CMP+set}" = set; then :
3975  $as_echo_n "(cached) " >&6
3976else
3977  case $CMP in
3978  [\\/]* | ?:[\\/]*)
3979  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
3980  ;;
3981  *)
3982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3983for as_dir in $PATH
3984do
3985  IFS=$as_save_IFS
3986  test -z "$as_dir" && as_dir=.
3987    for ac_exec_ext in '' $ac_executable_extensions; do
3988  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3989    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
3990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3991    break 2
3992  fi
3993done
3994  done
3995IFS=$as_save_IFS
3996
3997  ;;
3998esac
3999fi
4000CMP=$ac_cv_path_CMP
4001if test -n "$CMP"; then
4002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4003$as_echo "$CMP" >&6; }
4004else
4005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4006$as_echo "no" >&6; }
4007fi
4008
4009
4010  test -n "$CMP" && break
4011done
4012
4013
4014    if test "x$CMP" = x; then
4015        if test "xcmp" = x; then
4016          PROG_NAME=cmp
4017        else
4018          PROG_NAME=cmp
4019        fi
4020        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4021$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4022        as_fn_error $? "Cannot continue" "$LINENO" 5
4023    fi
4024
4025
4026
4027    for ac_prog in comm
4028do
4029  # Extract the first word of "$ac_prog", so it can be a program name with args.
4030set dummy $ac_prog; ac_word=$2
4031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4032$as_echo_n "checking for $ac_word... " >&6; }
4033if test "${ac_cv_path_COMM+set}" = set; then :
4034  $as_echo_n "(cached) " >&6
4035else
4036  case $COMM in
4037  [\\/]* | ?:[\\/]*)
4038  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4039  ;;
4040  *)
4041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4042for as_dir in $PATH
4043do
4044  IFS=$as_save_IFS
4045  test -z "$as_dir" && as_dir=.
4046    for ac_exec_ext in '' $ac_executable_extensions; do
4047  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4048    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4050    break 2
4051  fi
4052done
4053  done
4054IFS=$as_save_IFS
4055
4056  ;;
4057esac
4058fi
4059COMM=$ac_cv_path_COMM
4060if test -n "$COMM"; then
4061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4062$as_echo "$COMM" >&6; }
4063else
4064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4065$as_echo "no" >&6; }
4066fi
4067
4068
4069  test -n "$COMM" && break
4070done
4071
4072
4073    if test "x$COMM" = x; then
4074        if test "xcomm" = x; then
4075          PROG_NAME=comm
4076        else
4077          PROG_NAME=comm
4078        fi
4079        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4080$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4081        as_fn_error $? "Cannot continue" "$LINENO" 5
4082    fi
4083
4084
4085
4086    for ac_prog in cp
4087do
4088  # Extract the first word of "$ac_prog", so it can be a program name with args.
4089set dummy $ac_prog; ac_word=$2
4090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4091$as_echo_n "checking for $ac_word... " >&6; }
4092if test "${ac_cv_path_CP+set}" = set; then :
4093  $as_echo_n "(cached) " >&6
4094else
4095  case $CP in
4096  [\\/]* | ?:[\\/]*)
4097  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4098  ;;
4099  *)
4100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4101for as_dir in $PATH
4102do
4103  IFS=$as_save_IFS
4104  test -z "$as_dir" && as_dir=.
4105    for ac_exec_ext in '' $ac_executable_extensions; do
4106  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4107    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4109    break 2
4110  fi
4111done
4112  done
4113IFS=$as_save_IFS
4114
4115  ;;
4116esac
4117fi
4118CP=$ac_cv_path_CP
4119if test -n "$CP"; then
4120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4121$as_echo "$CP" >&6; }
4122else
4123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4124$as_echo "no" >&6; }
4125fi
4126
4127
4128  test -n "$CP" && break
4129done
4130
4131
4132    if test "x$CP" = x; then
4133        if test "xcp" = x; then
4134          PROG_NAME=cp
4135        else
4136          PROG_NAME=cp
4137        fi
4138        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4139$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4140        as_fn_error $? "Cannot continue" "$LINENO" 5
4141    fi
4142
4143
4144
4145    for ac_prog in cpio
4146do
4147  # Extract the first word of "$ac_prog", so it can be a program name with args.
4148set dummy $ac_prog; ac_word=$2
4149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4150$as_echo_n "checking for $ac_word... " >&6; }
4151if test "${ac_cv_path_CPIO+set}" = set; then :
4152  $as_echo_n "(cached) " >&6
4153else
4154  case $CPIO in
4155  [\\/]* | ?:[\\/]*)
4156  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4157  ;;
4158  *)
4159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4160for as_dir in $PATH
4161do
4162  IFS=$as_save_IFS
4163  test -z "$as_dir" && as_dir=.
4164    for ac_exec_ext in '' $ac_executable_extensions; do
4165  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4166    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4168    break 2
4169  fi
4170done
4171  done
4172IFS=$as_save_IFS
4173
4174  ;;
4175esac
4176fi
4177CPIO=$ac_cv_path_CPIO
4178if test -n "$CPIO"; then
4179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4180$as_echo "$CPIO" >&6; }
4181else
4182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4183$as_echo "no" >&6; }
4184fi
4185
4186
4187  test -n "$CPIO" && break
4188done
4189
4190
4191    if test "x$CPIO" = x; then
4192        if test "xcpio" = x; then
4193          PROG_NAME=cpio
4194        else
4195          PROG_NAME=cpio
4196        fi
4197        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4198$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4199        as_fn_error $? "Cannot continue" "$LINENO" 5
4200    fi
4201
4202
4203
4204    for ac_prog in cut
4205do
4206  # Extract the first word of "$ac_prog", so it can be a program name with args.
4207set dummy $ac_prog; ac_word=$2
4208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4209$as_echo_n "checking for $ac_word... " >&6; }
4210if test "${ac_cv_path_CUT+set}" = set; then :
4211  $as_echo_n "(cached) " >&6
4212else
4213  case $CUT in
4214  [\\/]* | ?:[\\/]*)
4215  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4216  ;;
4217  *)
4218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4219for as_dir in $PATH
4220do
4221  IFS=$as_save_IFS
4222  test -z "$as_dir" && as_dir=.
4223    for ac_exec_ext in '' $ac_executable_extensions; do
4224  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4225    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4227    break 2
4228  fi
4229done
4230  done
4231IFS=$as_save_IFS
4232
4233  ;;
4234esac
4235fi
4236CUT=$ac_cv_path_CUT
4237if test -n "$CUT"; then
4238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4239$as_echo "$CUT" >&6; }
4240else
4241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4242$as_echo "no" >&6; }
4243fi
4244
4245
4246  test -n "$CUT" && break
4247done
4248
4249
4250    if test "x$CUT" = x; then
4251        if test "xcut" = x; then
4252          PROG_NAME=cut
4253        else
4254          PROG_NAME=cut
4255        fi
4256        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4257$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4258        as_fn_error $? "Cannot continue" "$LINENO" 5
4259    fi
4260
4261
4262
4263    for ac_prog in date
4264do
4265  # Extract the first word of "$ac_prog", so it can be a program name with args.
4266set dummy $ac_prog; ac_word=$2
4267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4268$as_echo_n "checking for $ac_word... " >&6; }
4269if test "${ac_cv_path_DATE+set}" = set; then :
4270  $as_echo_n "(cached) " >&6
4271else
4272  case $DATE in
4273  [\\/]* | ?:[\\/]*)
4274  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4275  ;;
4276  *)
4277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4278for as_dir in $PATH
4279do
4280  IFS=$as_save_IFS
4281  test -z "$as_dir" && as_dir=.
4282    for ac_exec_ext in '' $ac_executable_extensions; do
4283  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4284    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4286    break 2
4287  fi
4288done
4289  done
4290IFS=$as_save_IFS
4291
4292  ;;
4293esac
4294fi
4295DATE=$ac_cv_path_DATE
4296if test -n "$DATE"; then
4297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4298$as_echo "$DATE" >&6; }
4299else
4300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4301$as_echo "no" >&6; }
4302fi
4303
4304
4305  test -n "$DATE" && break
4306done
4307
4308
4309    if test "x$DATE" = x; then
4310        if test "xdate" = x; then
4311          PROG_NAME=date
4312        else
4313          PROG_NAME=date
4314        fi
4315        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4316$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4317        as_fn_error $? "Cannot continue" "$LINENO" 5
4318    fi
4319
4320
4321
4322    for ac_prog in gdiff diff
4323do
4324  # Extract the first word of "$ac_prog", so it can be a program name with args.
4325set dummy $ac_prog; ac_word=$2
4326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4327$as_echo_n "checking for $ac_word... " >&6; }
4328if test "${ac_cv_path_DIFF+set}" = set; then :
4329  $as_echo_n "(cached) " >&6
4330else
4331  case $DIFF in
4332  [\\/]* | ?:[\\/]*)
4333  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4334  ;;
4335  *)
4336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4337for as_dir in $PATH
4338do
4339  IFS=$as_save_IFS
4340  test -z "$as_dir" && as_dir=.
4341    for ac_exec_ext in '' $ac_executable_extensions; do
4342  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4343    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4345    break 2
4346  fi
4347done
4348  done
4349IFS=$as_save_IFS
4350
4351  ;;
4352esac
4353fi
4354DIFF=$ac_cv_path_DIFF
4355if test -n "$DIFF"; then
4356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4357$as_echo "$DIFF" >&6; }
4358else
4359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4360$as_echo "no" >&6; }
4361fi
4362
4363
4364  test -n "$DIFF" && break
4365done
4366
4367
4368    if test "x$DIFF" = x; then
4369        if test "xgdiff diff" = x; then
4370          PROG_NAME=diff
4371        else
4372          PROG_NAME=gdiff diff
4373        fi
4374        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4375$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4376        as_fn_error $? "Cannot continue" "$LINENO" 5
4377    fi
4378
4379
4380
4381    for ac_prog in dirname
4382do
4383  # Extract the first word of "$ac_prog", so it can be a program name with args.
4384set dummy $ac_prog; ac_word=$2
4385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4386$as_echo_n "checking for $ac_word... " >&6; }
4387if test "${ac_cv_path_DIRNAME+set}" = set; then :
4388  $as_echo_n "(cached) " >&6
4389else
4390  case $DIRNAME in
4391  [\\/]* | ?:[\\/]*)
4392  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4393  ;;
4394  *)
4395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4396for as_dir in $PATH
4397do
4398  IFS=$as_save_IFS
4399  test -z "$as_dir" && as_dir=.
4400    for ac_exec_ext in '' $ac_executable_extensions; do
4401  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4402    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4404    break 2
4405  fi
4406done
4407  done
4408IFS=$as_save_IFS
4409
4410  ;;
4411esac
4412fi
4413DIRNAME=$ac_cv_path_DIRNAME
4414if test -n "$DIRNAME"; then
4415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4416$as_echo "$DIRNAME" >&6; }
4417else
4418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4419$as_echo "no" >&6; }
4420fi
4421
4422
4423  test -n "$DIRNAME" && break
4424done
4425
4426
4427    if test "x$DIRNAME" = x; then
4428        if test "xdirname" = x; then
4429          PROG_NAME=dirname
4430        else
4431          PROG_NAME=dirname
4432        fi
4433        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4434$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4435        as_fn_error $? "Cannot continue" "$LINENO" 5
4436    fi
4437
4438
4439
4440    for ac_prog in echo
4441do
4442  # Extract the first word of "$ac_prog", so it can be a program name with args.
4443set dummy $ac_prog; ac_word=$2
4444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4445$as_echo_n "checking for $ac_word... " >&6; }
4446if test "${ac_cv_path_ECHO+set}" = set; then :
4447  $as_echo_n "(cached) " >&6
4448else
4449  case $ECHO in
4450  [\\/]* | ?:[\\/]*)
4451  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4452  ;;
4453  *)
4454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4455for as_dir in $PATH
4456do
4457  IFS=$as_save_IFS
4458  test -z "$as_dir" && as_dir=.
4459    for ac_exec_ext in '' $ac_executable_extensions; do
4460  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4461    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4463    break 2
4464  fi
4465done
4466  done
4467IFS=$as_save_IFS
4468
4469  ;;
4470esac
4471fi
4472ECHO=$ac_cv_path_ECHO
4473if test -n "$ECHO"; then
4474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4475$as_echo "$ECHO" >&6; }
4476else
4477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4478$as_echo "no" >&6; }
4479fi
4480
4481
4482  test -n "$ECHO" && break
4483done
4484
4485
4486    if test "x$ECHO" = x; then
4487        if test "xecho" = x; then
4488          PROG_NAME=echo
4489        else
4490          PROG_NAME=echo
4491        fi
4492        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4493$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4494        as_fn_error $? "Cannot continue" "$LINENO" 5
4495    fi
4496
4497
4498
4499    for ac_prog in expr
4500do
4501  # Extract the first word of "$ac_prog", so it can be a program name with args.
4502set dummy $ac_prog; ac_word=$2
4503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4504$as_echo_n "checking for $ac_word... " >&6; }
4505if test "${ac_cv_path_EXPR+set}" = set; then :
4506  $as_echo_n "(cached) " >&6
4507else
4508  case $EXPR in
4509  [\\/]* | ?:[\\/]*)
4510  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4511  ;;
4512  *)
4513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4514for as_dir in $PATH
4515do
4516  IFS=$as_save_IFS
4517  test -z "$as_dir" && as_dir=.
4518    for ac_exec_ext in '' $ac_executable_extensions; do
4519  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4520    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4522    break 2
4523  fi
4524done
4525  done
4526IFS=$as_save_IFS
4527
4528  ;;
4529esac
4530fi
4531EXPR=$ac_cv_path_EXPR
4532if test -n "$EXPR"; then
4533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4534$as_echo "$EXPR" >&6; }
4535else
4536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4537$as_echo "no" >&6; }
4538fi
4539
4540
4541  test -n "$EXPR" && break
4542done
4543
4544
4545    if test "x$EXPR" = x; then
4546        if test "xexpr" = x; then
4547          PROG_NAME=expr
4548        else
4549          PROG_NAME=expr
4550        fi
4551        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4552$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4553        as_fn_error $? "Cannot continue" "$LINENO" 5
4554    fi
4555
4556
4557
4558    for ac_prog in file
4559do
4560  # Extract the first word of "$ac_prog", so it can be a program name with args.
4561set dummy $ac_prog; ac_word=$2
4562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4563$as_echo_n "checking for $ac_word... " >&6; }
4564if test "${ac_cv_path_FILE+set}" = set; then :
4565  $as_echo_n "(cached) " >&6
4566else
4567  case $FILE in
4568  [\\/]* | ?:[\\/]*)
4569  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4570  ;;
4571  *)
4572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4573for as_dir in $PATH
4574do
4575  IFS=$as_save_IFS
4576  test -z "$as_dir" && as_dir=.
4577    for ac_exec_ext in '' $ac_executable_extensions; do
4578  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4579    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4581    break 2
4582  fi
4583done
4584  done
4585IFS=$as_save_IFS
4586
4587  ;;
4588esac
4589fi
4590FILE=$ac_cv_path_FILE
4591if test -n "$FILE"; then
4592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4593$as_echo "$FILE" >&6; }
4594else
4595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4596$as_echo "no" >&6; }
4597fi
4598
4599
4600  test -n "$FILE" && break
4601done
4602
4603
4604    if test "x$FILE" = x; then
4605        if test "xfile" = x; then
4606          PROG_NAME=file
4607        else
4608          PROG_NAME=file
4609        fi
4610        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4611$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4612        as_fn_error $? "Cannot continue" "$LINENO" 5
4613    fi
4614
4615
4616
4617    for ac_prog in find
4618do
4619  # Extract the first word of "$ac_prog", so it can be a program name with args.
4620set dummy $ac_prog; ac_word=$2
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4622$as_echo_n "checking for $ac_word... " >&6; }
4623if test "${ac_cv_path_FIND+set}" = set; then :
4624  $as_echo_n "(cached) " >&6
4625else
4626  case $FIND in
4627  [\\/]* | ?:[\\/]*)
4628  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4629  ;;
4630  *)
4631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4632for as_dir in $PATH
4633do
4634  IFS=$as_save_IFS
4635  test -z "$as_dir" && as_dir=.
4636    for ac_exec_ext in '' $ac_executable_extensions; do
4637  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4638    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4640    break 2
4641  fi
4642done
4643  done
4644IFS=$as_save_IFS
4645
4646  ;;
4647esac
4648fi
4649FIND=$ac_cv_path_FIND
4650if test -n "$FIND"; then
4651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4652$as_echo "$FIND" >&6; }
4653else
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4655$as_echo "no" >&6; }
4656fi
4657
4658
4659  test -n "$FIND" && break
4660done
4661
4662
4663    if test "x$FIND" = x; then
4664        if test "xfind" = x; then
4665          PROG_NAME=find
4666        else
4667          PROG_NAME=find
4668        fi
4669        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4670$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4671        as_fn_error $? "Cannot continue" "$LINENO" 5
4672    fi
4673
4674
4675
4676    for ac_prog in head
4677do
4678  # Extract the first word of "$ac_prog", so it can be a program name with args.
4679set dummy $ac_prog; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if test "${ac_cv_path_HEAD+set}" = set; then :
4683  $as_echo_n "(cached) " >&6
4684else
4685  case $HEAD in
4686  [\\/]* | ?:[\\/]*)
4687  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4688  ;;
4689  *)
4690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in $PATH
4692do
4693  IFS=$as_save_IFS
4694  test -z "$as_dir" && as_dir=.
4695    for ac_exec_ext in '' $ac_executable_extensions; do
4696  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4697    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699    break 2
4700  fi
4701done
4702  done
4703IFS=$as_save_IFS
4704
4705  ;;
4706esac
4707fi
4708HEAD=$ac_cv_path_HEAD
4709if test -n "$HEAD"; then
4710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4711$as_echo "$HEAD" >&6; }
4712else
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717
4718  test -n "$HEAD" && break
4719done
4720
4721
4722    if test "x$HEAD" = x; then
4723        if test "xhead" = x; then
4724          PROG_NAME=head
4725        else
4726          PROG_NAME=head
4727        fi
4728        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4729$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4730        as_fn_error $? "Cannot continue" "$LINENO" 5
4731    fi
4732
4733
4734
4735    for ac_prog in ln
4736do
4737  # Extract the first word of "$ac_prog", so it can be a program name with args.
4738set dummy $ac_prog; ac_word=$2
4739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4740$as_echo_n "checking for $ac_word... " >&6; }
4741if test "${ac_cv_path_LN+set}" = set; then :
4742  $as_echo_n "(cached) " >&6
4743else
4744  case $LN in
4745  [\\/]* | ?:[\\/]*)
4746  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4747  ;;
4748  *)
4749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4750for as_dir in $PATH
4751do
4752  IFS=$as_save_IFS
4753  test -z "$as_dir" && as_dir=.
4754    for ac_exec_ext in '' $ac_executable_extensions; do
4755  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4756    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4758    break 2
4759  fi
4760done
4761  done
4762IFS=$as_save_IFS
4763
4764  ;;
4765esac
4766fi
4767LN=$ac_cv_path_LN
4768if test -n "$LN"; then
4769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4770$as_echo "$LN" >&6; }
4771else
4772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4773$as_echo "no" >&6; }
4774fi
4775
4776
4777  test -n "$LN" && break
4778done
4779
4780
4781    if test "x$LN" = x; then
4782        if test "xln" = x; then
4783          PROG_NAME=ln
4784        else
4785          PROG_NAME=ln
4786        fi
4787        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4788$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4789        as_fn_error $? "Cannot continue" "$LINENO" 5
4790    fi
4791
4792
4793
4794    for ac_prog in ls
4795do
4796  # Extract the first word of "$ac_prog", so it can be a program name with args.
4797set dummy $ac_prog; ac_word=$2
4798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4799$as_echo_n "checking for $ac_word... " >&6; }
4800if test "${ac_cv_path_LS+set}" = set; then :
4801  $as_echo_n "(cached) " >&6
4802else
4803  case $LS in
4804  [\\/]* | ?:[\\/]*)
4805  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4806  ;;
4807  *)
4808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4809for as_dir in $PATH
4810do
4811  IFS=$as_save_IFS
4812  test -z "$as_dir" && as_dir=.
4813    for ac_exec_ext in '' $ac_executable_extensions; do
4814  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4815    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4817    break 2
4818  fi
4819done
4820  done
4821IFS=$as_save_IFS
4822
4823  ;;
4824esac
4825fi
4826LS=$ac_cv_path_LS
4827if test -n "$LS"; then
4828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4829$as_echo "$LS" >&6; }
4830else
4831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
4833fi
4834
4835
4836  test -n "$LS" && break
4837done
4838
4839
4840    if test "x$LS" = x; then
4841        if test "xls" = x; then
4842          PROG_NAME=ls
4843        else
4844          PROG_NAME=ls
4845        fi
4846        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4847$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4848        as_fn_error $? "Cannot continue" "$LINENO" 5
4849    fi
4850
4851
4852
4853    for ac_prog in mkdir
4854do
4855  # Extract the first word of "$ac_prog", so it can be a program name with args.
4856set dummy $ac_prog; ac_word=$2
4857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4858$as_echo_n "checking for $ac_word... " >&6; }
4859if test "${ac_cv_path_MKDIR+set}" = set; then :
4860  $as_echo_n "(cached) " >&6
4861else
4862  case $MKDIR in
4863  [\\/]* | ?:[\\/]*)
4864  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4865  ;;
4866  *)
4867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4868for as_dir in $PATH
4869do
4870  IFS=$as_save_IFS
4871  test -z "$as_dir" && as_dir=.
4872    for ac_exec_ext in '' $ac_executable_extensions; do
4873  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4874    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4876    break 2
4877  fi
4878done
4879  done
4880IFS=$as_save_IFS
4881
4882  ;;
4883esac
4884fi
4885MKDIR=$ac_cv_path_MKDIR
4886if test -n "$MKDIR"; then
4887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4888$as_echo "$MKDIR" >&6; }
4889else
4890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4891$as_echo "no" >&6; }
4892fi
4893
4894
4895  test -n "$MKDIR" && break
4896done
4897
4898
4899    if test "x$MKDIR" = x; then
4900        if test "xmkdir" = x; then
4901          PROG_NAME=mkdir
4902        else
4903          PROG_NAME=mkdir
4904        fi
4905        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4906$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4907        as_fn_error $? "Cannot continue" "$LINENO" 5
4908    fi
4909
4910
4911
4912    for ac_prog in mktemp
4913do
4914  # Extract the first word of "$ac_prog", so it can be a program name with args.
4915set dummy $ac_prog; ac_word=$2
4916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4917$as_echo_n "checking for $ac_word... " >&6; }
4918if test "${ac_cv_path_MKTEMP+set}" = set; then :
4919  $as_echo_n "(cached) " >&6
4920else
4921  case $MKTEMP in
4922  [\\/]* | ?:[\\/]*)
4923  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
4924  ;;
4925  *)
4926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4927for as_dir in $PATH
4928do
4929  IFS=$as_save_IFS
4930  test -z "$as_dir" && as_dir=.
4931    for ac_exec_ext in '' $ac_executable_extensions; do
4932  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4933    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
4934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4935    break 2
4936  fi
4937done
4938  done
4939IFS=$as_save_IFS
4940
4941  ;;
4942esac
4943fi
4944MKTEMP=$ac_cv_path_MKTEMP
4945if test -n "$MKTEMP"; then
4946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
4947$as_echo "$MKTEMP" >&6; }
4948else
4949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4950$as_echo "no" >&6; }
4951fi
4952
4953
4954  test -n "$MKTEMP" && break
4955done
4956
4957
4958    if test "x$MKTEMP" = x; then
4959        if test "xmktemp" = x; then
4960          PROG_NAME=mktemp
4961        else
4962          PROG_NAME=mktemp
4963        fi
4964        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4965$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4966        as_fn_error $? "Cannot continue" "$LINENO" 5
4967    fi
4968
4969
4970
4971    for ac_prog in mv
4972do
4973  # Extract the first word of "$ac_prog", so it can be a program name with args.
4974set dummy $ac_prog; ac_word=$2
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4976$as_echo_n "checking for $ac_word... " >&6; }
4977if test "${ac_cv_path_MV+set}" = set; then :
4978  $as_echo_n "(cached) " >&6
4979else
4980  case $MV in
4981  [\\/]* | ?:[\\/]*)
4982  ac_cv_path_MV="$MV" # Let the user override the test with a path.
4983  ;;
4984  *)
4985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4986for as_dir in $PATH
4987do
4988  IFS=$as_save_IFS
4989  test -z "$as_dir" && as_dir=.
4990    for ac_exec_ext in '' $ac_executable_extensions; do
4991  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4992    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
4993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4994    break 2
4995  fi
4996done
4997  done
4998IFS=$as_save_IFS
4999
5000  ;;
5001esac
5002fi
5003MV=$ac_cv_path_MV
5004if test -n "$MV"; then
5005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5006$as_echo "$MV" >&6; }
5007else
5008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5009$as_echo "no" >&6; }
5010fi
5011
5012
5013  test -n "$MV" && break
5014done
5015
5016
5017    if test "x$MV" = x; then
5018        if test "xmv" = x; then
5019          PROG_NAME=mv
5020        else
5021          PROG_NAME=mv
5022        fi
5023        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5024$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5025        as_fn_error $? "Cannot continue" "$LINENO" 5
5026    fi
5027
5028
5029
5030    for ac_prog in printf
5031do
5032  # Extract the first word of "$ac_prog", so it can be a program name with args.
5033set dummy $ac_prog; ac_word=$2
5034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5035$as_echo_n "checking for $ac_word... " >&6; }
5036if test "${ac_cv_path_PRINTF+set}" = set; then :
5037  $as_echo_n "(cached) " >&6
5038else
5039  case $PRINTF in
5040  [\\/]* | ?:[\\/]*)
5041  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5042  ;;
5043  *)
5044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5045for as_dir in $PATH
5046do
5047  IFS=$as_save_IFS
5048  test -z "$as_dir" && as_dir=.
5049    for ac_exec_ext in '' $ac_executable_extensions; do
5050  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5051    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5053    break 2
5054  fi
5055done
5056  done
5057IFS=$as_save_IFS
5058
5059  ;;
5060esac
5061fi
5062PRINTF=$ac_cv_path_PRINTF
5063if test -n "$PRINTF"; then
5064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5065$as_echo "$PRINTF" >&6; }
5066else
5067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5068$as_echo "no" >&6; }
5069fi
5070
5071
5072  test -n "$PRINTF" && break
5073done
5074
5075
5076    if test "x$PRINTF" = x; then
5077        if test "xprintf" = x; then
5078          PROG_NAME=printf
5079        else
5080          PROG_NAME=printf
5081        fi
5082        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5083$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5084        as_fn_error $? "Cannot continue" "$LINENO" 5
5085    fi
5086
5087
5088
5089    for ac_prog in pwd
5090do
5091  # Extract the first word of "$ac_prog", so it can be a program name with args.
5092set dummy $ac_prog; ac_word=$2
5093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5094$as_echo_n "checking for $ac_word... " >&6; }
5095if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5096  $as_echo_n "(cached) " >&6
5097else
5098  case $THEPWDCMD in
5099  [\\/]* | ?:[\\/]*)
5100  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5101  ;;
5102  *)
5103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5104for as_dir in $PATH
5105do
5106  IFS=$as_save_IFS
5107  test -z "$as_dir" && as_dir=.
5108    for ac_exec_ext in '' $ac_executable_extensions; do
5109  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5110    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5112    break 2
5113  fi
5114done
5115  done
5116IFS=$as_save_IFS
5117
5118  ;;
5119esac
5120fi
5121THEPWDCMD=$ac_cv_path_THEPWDCMD
5122if test -n "$THEPWDCMD"; then
5123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5124$as_echo "$THEPWDCMD" >&6; }
5125else
5126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5127$as_echo "no" >&6; }
5128fi
5129
5130
5131  test -n "$THEPWDCMD" && break
5132done
5133
5134
5135    if test "x$THEPWDCMD" = x; then
5136        if test "xpwd" = x; then
5137          PROG_NAME=thepwdcmd
5138        else
5139          PROG_NAME=pwd
5140        fi
5141        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5142$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5143        as_fn_error $? "Cannot continue" "$LINENO" 5
5144    fi
5145
5146
5147
5148    for ac_prog in rm
5149do
5150  # Extract the first word of "$ac_prog", so it can be a program name with args.
5151set dummy $ac_prog; ac_word=$2
5152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5153$as_echo_n "checking for $ac_word... " >&6; }
5154if test "${ac_cv_path_RM+set}" = set; then :
5155  $as_echo_n "(cached) " >&6
5156else
5157  case $RM in
5158  [\\/]* | ?:[\\/]*)
5159  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5160  ;;
5161  *)
5162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5163for as_dir in $PATH
5164do
5165  IFS=$as_save_IFS
5166  test -z "$as_dir" && as_dir=.
5167    for ac_exec_ext in '' $ac_executable_extensions; do
5168  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5169    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5171    break 2
5172  fi
5173done
5174  done
5175IFS=$as_save_IFS
5176
5177  ;;
5178esac
5179fi
5180RM=$ac_cv_path_RM
5181if test -n "$RM"; then
5182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5183$as_echo "$RM" >&6; }
5184else
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5186$as_echo "no" >&6; }
5187fi
5188
5189
5190  test -n "$RM" && break
5191done
5192
5193
5194    if test "x$RM" = x; then
5195        if test "xrm" = x; then
5196          PROG_NAME=rm
5197        else
5198          PROG_NAME=rm
5199        fi
5200        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5201$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5202        as_fn_error $? "Cannot continue" "$LINENO" 5
5203    fi
5204
5205
5206
5207    for ac_prog in sh
5208do
5209  # Extract the first word of "$ac_prog", so it can be a program name with args.
5210set dummy $ac_prog; ac_word=$2
5211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5212$as_echo_n "checking for $ac_word... " >&6; }
5213if test "${ac_cv_path_SH+set}" = set; then :
5214  $as_echo_n "(cached) " >&6
5215else
5216  case $SH in
5217  [\\/]* | ?:[\\/]*)
5218  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5219  ;;
5220  *)
5221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5222for as_dir in $PATH
5223do
5224  IFS=$as_save_IFS
5225  test -z "$as_dir" && as_dir=.
5226    for ac_exec_ext in '' $ac_executable_extensions; do
5227  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5228    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5230    break 2
5231  fi
5232done
5233  done
5234IFS=$as_save_IFS
5235
5236  ;;
5237esac
5238fi
5239SH=$ac_cv_path_SH
5240if test -n "$SH"; then
5241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5242$as_echo "$SH" >&6; }
5243else
5244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5245$as_echo "no" >&6; }
5246fi
5247
5248
5249  test -n "$SH" && break
5250done
5251
5252
5253    if test "x$SH" = x; then
5254        if test "xsh" = x; then
5255          PROG_NAME=sh
5256        else
5257          PROG_NAME=sh
5258        fi
5259        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5260$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5261        as_fn_error $? "Cannot continue" "$LINENO" 5
5262    fi
5263
5264
5265
5266    for ac_prog in sort
5267do
5268  # Extract the first word of "$ac_prog", so it can be a program name with args.
5269set dummy $ac_prog; ac_word=$2
5270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5271$as_echo_n "checking for $ac_word... " >&6; }
5272if test "${ac_cv_path_SORT+set}" = set; then :
5273  $as_echo_n "(cached) " >&6
5274else
5275  case $SORT in
5276  [\\/]* | ?:[\\/]*)
5277  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5278  ;;
5279  *)
5280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5281for as_dir in $PATH
5282do
5283  IFS=$as_save_IFS
5284  test -z "$as_dir" && as_dir=.
5285    for ac_exec_ext in '' $ac_executable_extensions; do
5286  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5287    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5289    break 2
5290  fi
5291done
5292  done
5293IFS=$as_save_IFS
5294
5295  ;;
5296esac
5297fi
5298SORT=$ac_cv_path_SORT
5299if test -n "$SORT"; then
5300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5301$as_echo "$SORT" >&6; }
5302else
5303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5304$as_echo "no" >&6; }
5305fi
5306
5307
5308  test -n "$SORT" && break
5309done
5310
5311
5312    if test "x$SORT" = x; then
5313        if test "xsort" = x; then
5314          PROG_NAME=sort
5315        else
5316          PROG_NAME=sort
5317        fi
5318        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5319$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5320        as_fn_error $? "Cannot continue" "$LINENO" 5
5321    fi
5322
5323
5324
5325    for ac_prog in tail
5326do
5327  # Extract the first word of "$ac_prog", so it can be a program name with args.
5328set dummy $ac_prog; ac_word=$2
5329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5330$as_echo_n "checking for $ac_word... " >&6; }
5331if test "${ac_cv_path_TAIL+set}" = set; then :
5332  $as_echo_n "(cached) " >&6
5333else
5334  case $TAIL in
5335  [\\/]* | ?:[\\/]*)
5336  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5337  ;;
5338  *)
5339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5340for as_dir in $PATH
5341do
5342  IFS=$as_save_IFS
5343  test -z "$as_dir" && as_dir=.
5344    for ac_exec_ext in '' $ac_executable_extensions; do
5345  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5346    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5348    break 2
5349  fi
5350done
5351  done
5352IFS=$as_save_IFS
5353
5354  ;;
5355esac
5356fi
5357TAIL=$ac_cv_path_TAIL
5358if test -n "$TAIL"; then
5359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5360$as_echo "$TAIL" >&6; }
5361else
5362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5363$as_echo "no" >&6; }
5364fi
5365
5366
5367  test -n "$TAIL" && break
5368done
5369
5370
5371    if test "x$TAIL" = x; then
5372        if test "xtail" = x; then
5373          PROG_NAME=tail
5374        else
5375          PROG_NAME=tail
5376        fi
5377        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5378$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5379        as_fn_error $? "Cannot continue" "$LINENO" 5
5380    fi
5381
5382
5383
5384    for ac_prog in tar
5385do
5386  # Extract the first word of "$ac_prog", so it can be a program name with args.
5387set dummy $ac_prog; ac_word=$2
5388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5389$as_echo_n "checking for $ac_word... " >&6; }
5390if test "${ac_cv_path_TAR+set}" = set; then :
5391  $as_echo_n "(cached) " >&6
5392else
5393  case $TAR in
5394  [\\/]* | ?:[\\/]*)
5395  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5396  ;;
5397  *)
5398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5399for as_dir in $PATH
5400do
5401  IFS=$as_save_IFS
5402  test -z "$as_dir" && as_dir=.
5403    for ac_exec_ext in '' $ac_executable_extensions; do
5404  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5405    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5407    break 2
5408  fi
5409done
5410  done
5411IFS=$as_save_IFS
5412
5413  ;;
5414esac
5415fi
5416TAR=$ac_cv_path_TAR
5417if test -n "$TAR"; then
5418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5419$as_echo "$TAR" >&6; }
5420else
5421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5422$as_echo "no" >&6; }
5423fi
5424
5425
5426  test -n "$TAR" && break
5427done
5428
5429
5430    if test "x$TAR" = x; then
5431        if test "xtar" = x; then
5432          PROG_NAME=tar
5433        else
5434          PROG_NAME=tar
5435        fi
5436        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5437$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5438        as_fn_error $? "Cannot continue" "$LINENO" 5
5439    fi
5440
5441
5442
5443    for ac_prog in tee
5444do
5445  # Extract the first word of "$ac_prog", so it can be a program name with args.
5446set dummy $ac_prog; ac_word=$2
5447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5448$as_echo_n "checking for $ac_word... " >&6; }
5449if test "${ac_cv_path_TEE+set}" = set; then :
5450  $as_echo_n "(cached) " >&6
5451else
5452  case $TEE in
5453  [\\/]* | ?:[\\/]*)
5454  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5455  ;;
5456  *)
5457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458for as_dir in $PATH
5459do
5460  IFS=$as_save_IFS
5461  test -z "$as_dir" && as_dir=.
5462    for ac_exec_ext in '' $ac_executable_extensions; do
5463  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5464    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5466    break 2
5467  fi
5468done
5469  done
5470IFS=$as_save_IFS
5471
5472  ;;
5473esac
5474fi
5475TEE=$ac_cv_path_TEE
5476if test -n "$TEE"; then
5477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5478$as_echo "$TEE" >&6; }
5479else
5480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5481$as_echo "no" >&6; }
5482fi
5483
5484
5485  test -n "$TEE" && break
5486done
5487
5488
5489    if test "x$TEE" = x; then
5490        if test "xtee" = x; then
5491          PROG_NAME=tee
5492        else
5493          PROG_NAME=tee
5494        fi
5495        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5496$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5497        as_fn_error $? "Cannot continue" "$LINENO" 5
5498    fi
5499
5500
5501
5502    for ac_prog in touch
5503do
5504  # Extract the first word of "$ac_prog", so it can be a program name with args.
5505set dummy $ac_prog; ac_word=$2
5506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5507$as_echo_n "checking for $ac_word... " >&6; }
5508if test "${ac_cv_path_TOUCH+set}" = set; then :
5509  $as_echo_n "(cached) " >&6
5510else
5511  case $TOUCH in
5512  [\\/]* | ?:[\\/]*)
5513  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5514  ;;
5515  *)
5516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5517for as_dir in $PATH
5518do
5519  IFS=$as_save_IFS
5520  test -z "$as_dir" && as_dir=.
5521    for ac_exec_ext in '' $ac_executable_extensions; do
5522  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5523    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5525    break 2
5526  fi
5527done
5528  done
5529IFS=$as_save_IFS
5530
5531  ;;
5532esac
5533fi
5534TOUCH=$ac_cv_path_TOUCH
5535if test -n "$TOUCH"; then
5536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5537$as_echo "$TOUCH" >&6; }
5538else
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5540$as_echo "no" >&6; }
5541fi
5542
5543
5544  test -n "$TOUCH" && break
5545done
5546
5547
5548    if test "x$TOUCH" = x; then
5549        if test "xtouch" = x; then
5550          PROG_NAME=touch
5551        else
5552          PROG_NAME=touch
5553        fi
5554        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5555$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5556        as_fn_error $? "Cannot continue" "$LINENO" 5
5557    fi
5558
5559
5560
5561    for ac_prog in tr
5562do
5563  # Extract the first word of "$ac_prog", so it can be a program name with args.
5564set dummy $ac_prog; ac_word=$2
5565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5566$as_echo_n "checking for $ac_word... " >&6; }
5567if test "${ac_cv_path_TR+set}" = set; then :
5568  $as_echo_n "(cached) " >&6
5569else
5570  case $TR in
5571  [\\/]* | ?:[\\/]*)
5572  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5573  ;;
5574  *)
5575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5576for as_dir in $PATH
5577do
5578  IFS=$as_save_IFS
5579  test -z "$as_dir" && as_dir=.
5580    for ac_exec_ext in '' $ac_executable_extensions; do
5581  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5582    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5584    break 2
5585  fi
5586done
5587  done
5588IFS=$as_save_IFS
5589
5590  ;;
5591esac
5592fi
5593TR=$ac_cv_path_TR
5594if test -n "$TR"; then
5595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5596$as_echo "$TR" >&6; }
5597else
5598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5599$as_echo "no" >&6; }
5600fi
5601
5602
5603  test -n "$TR" && break
5604done
5605
5606
5607    if test "x$TR" = x; then
5608        if test "xtr" = x; then
5609          PROG_NAME=tr
5610        else
5611          PROG_NAME=tr
5612        fi
5613        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5614$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5615        as_fn_error $? "Cannot continue" "$LINENO" 5
5616    fi
5617
5618
5619
5620    for ac_prog in uname
5621do
5622  # Extract the first word of "$ac_prog", so it can be a program name with args.
5623set dummy $ac_prog; ac_word=$2
5624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5625$as_echo_n "checking for $ac_word... " >&6; }
5626if test "${ac_cv_path_UNAME+set}" = set; then :
5627  $as_echo_n "(cached) " >&6
5628else
5629  case $UNAME in
5630  [\\/]* | ?:[\\/]*)
5631  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5632  ;;
5633  *)
5634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5635for as_dir in $PATH
5636do
5637  IFS=$as_save_IFS
5638  test -z "$as_dir" && as_dir=.
5639    for ac_exec_ext in '' $ac_executable_extensions; do
5640  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5641    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5643    break 2
5644  fi
5645done
5646  done
5647IFS=$as_save_IFS
5648
5649  ;;
5650esac
5651fi
5652UNAME=$ac_cv_path_UNAME
5653if test -n "$UNAME"; then
5654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5655$as_echo "$UNAME" >&6; }
5656else
5657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5658$as_echo "no" >&6; }
5659fi
5660
5661
5662  test -n "$UNAME" && break
5663done
5664
5665
5666    if test "x$UNAME" = x; then
5667        if test "xuname" = x; then
5668          PROG_NAME=uname
5669        else
5670          PROG_NAME=uname
5671        fi
5672        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5673$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5674        as_fn_error $? "Cannot continue" "$LINENO" 5
5675    fi
5676
5677
5678
5679    for ac_prog in uniq
5680do
5681  # Extract the first word of "$ac_prog", so it can be a program name with args.
5682set dummy $ac_prog; ac_word=$2
5683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5684$as_echo_n "checking for $ac_word... " >&6; }
5685if test "${ac_cv_path_UNIQ+set}" = set; then :
5686  $as_echo_n "(cached) " >&6
5687else
5688  case $UNIQ in
5689  [\\/]* | ?:[\\/]*)
5690  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5691  ;;
5692  *)
5693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5694for as_dir in $PATH
5695do
5696  IFS=$as_save_IFS
5697  test -z "$as_dir" && as_dir=.
5698    for ac_exec_ext in '' $ac_executable_extensions; do
5699  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5700    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5702    break 2
5703  fi
5704done
5705  done
5706IFS=$as_save_IFS
5707
5708  ;;
5709esac
5710fi
5711UNIQ=$ac_cv_path_UNIQ
5712if test -n "$UNIQ"; then
5713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5714$as_echo "$UNIQ" >&6; }
5715else
5716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5717$as_echo "no" >&6; }
5718fi
5719
5720
5721  test -n "$UNIQ" && break
5722done
5723
5724
5725    if test "x$UNIQ" = x; then
5726        if test "xuniq" = x; then
5727          PROG_NAME=uniq
5728        else
5729          PROG_NAME=uniq
5730        fi
5731        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5732$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5733        as_fn_error $? "Cannot continue" "$LINENO" 5
5734    fi
5735
5736
5737
5738    for ac_prog in wc
5739do
5740  # Extract the first word of "$ac_prog", so it can be a program name with args.
5741set dummy $ac_prog; ac_word=$2
5742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5743$as_echo_n "checking for $ac_word... " >&6; }
5744if test "${ac_cv_path_WC+set}" = set; then :
5745  $as_echo_n "(cached) " >&6
5746else
5747  case $WC in
5748  [\\/]* | ?:[\\/]*)
5749  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5750  ;;
5751  *)
5752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5753for as_dir in $PATH
5754do
5755  IFS=$as_save_IFS
5756  test -z "$as_dir" && as_dir=.
5757    for ac_exec_ext in '' $ac_executable_extensions; do
5758  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5759    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5761    break 2
5762  fi
5763done
5764  done
5765IFS=$as_save_IFS
5766
5767  ;;
5768esac
5769fi
5770WC=$ac_cv_path_WC
5771if test -n "$WC"; then
5772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5773$as_echo "$WC" >&6; }
5774else
5775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5776$as_echo "no" >&6; }
5777fi
5778
5779
5780  test -n "$WC" && break
5781done
5782
5783
5784    if test "x$WC" = x; then
5785        if test "xwc" = x; then
5786          PROG_NAME=wc
5787        else
5788          PROG_NAME=wc
5789        fi
5790        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5791$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5792        as_fn_error $? "Cannot continue" "$LINENO" 5
5793    fi
5794
5795
5796
5797    for ac_prog in which
5798do
5799  # Extract the first word of "$ac_prog", so it can be a program name with args.
5800set dummy $ac_prog; ac_word=$2
5801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5802$as_echo_n "checking for $ac_word... " >&6; }
5803if test "${ac_cv_path_WHICH+set}" = set; then :
5804  $as_echo_n "(cached) " >&6
5805else
5806  case $WHICH in
5807  [\\/]* | ?:[\\/]*)
5808  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5809  ;;
5810  *)
5811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5812for as_dir in $PATH
5813do
5814  IFS=$as_save_IFS
5815  test -z "$as_dir" && as_dir=.
5816    for ac_exec_ext in '' $ac_executable_extensions; do
5817  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5818    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5820    break 2
5821  fi
5822done
5823  done
5824IFS=$as_save_IFS
5825
5826  ;;
5827esac
5828fi
5829WHICH=$ac_cv_path_WHICH
5830if test -n "$WHICH"; then
5831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5832$as_echo "$WHICH" >&6; }
5833else
5834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835$as_echo "no" >&6; }
5836fi
5837
5838
5839  test -n "$WHICH" && break
5840done
5841
5842
5843    if test "x$WHICH" = x; then
5844        if test "xwhich" = x; then
5845          PROG_NAME=which
5846        else
5847          PROG_NAME=which
5848        fi
5849        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5850$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5851        as_fn_error $? "Cannot continue" "$LINENO" 5
5852    fi
5853
5854
5855
5856    for ac_prog in xargs
5857do
5858  # Extract the first word of "$ac_prog", so it can be a program name with args.
5859set dummy $ac_prog; ac_word=$2
5860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5861$as_echo_n "checking for $ac_word... " >&6; }
5862if test "${ac_cv_path_XARGS+set}" = set; then :
5863  $as_echo_n "(cached) " >&6
5864else
5865  case $XARGS in
5866  [\\/]* | ?:[\\/]*)
5867  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5868  ;;
5869  *)
5870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5871for as_dir in $PATH
5872do
5873  IFS=$as_save_IFS
5874  test -z "$as_dir" && as_dir=.
5875    for ac_exec_ext in '' $ac_executable_extensions; do
5876  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5877    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5879    break 2
5880  fi
5881done
5882  done
5883IFS=$as_save_IFS
5884
5885  ;;
5886esac
5887fi
5888XARGS=$ac_cv_path_XARGS
5889if test -n "$XARGS"; then
5890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5891$as_echo "$XARGS" >&6; }
5892else
5893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5894$as_echo "no" >&6; }
5895fi
5896
5897
5898  test -n "$XARGS" && break
5899done
5900
5901
5902    if test "x$XARGS" = x; then
5903        if test "xxargs" = x; then
5904          PROG_NAME=xargs
5905        else
5906          PROG_NAME=xargs
5907        fi
5908        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5909$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5910        as_fn_error $? "Cannot continue" "$LINENO" 5
5911    fi
5912
5913
5914
5915# Then required tools that require some special treatment.
5916for ac_prog in gawk mawk nawk awk
5917do
5918  # Extract the first word of "$ac_prog", so it can be a program name with args.
5919set dummy $ac_prog; ac_word=$2
5920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5921$as_echo_n "checking for $ac_word... " >&6; }
5922if test "${ac_cv_prog_AWK+set}" = set; then :
5923  $as_echo_n "(cached) " >&6
5924else
5925  if test -n "$AWK"; then
5926  ac_cv_prog_AWK="$AWK" # Let the user override the test.
5927else
5928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929for as_dir in $PATH
5930do
5931  IFS=$as_save_IFS
5932  test -z "$as_dir" && as_dir=.
5933    for ac_exec_ext in '' $ac_executable_extensions; do
5934  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5935    ac_cv_prog_AWK="$ac_prog"
5936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5937    break 2
5938  fi
5939done
5940  done
5941IFS=$as_save_IFS
5942
5943fi
5944fi
5945AWK=$ac_cv_prog_AWK
5946if test -n "$AWK"; then
5947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5948$as_echo "$AWK" >&6; }
5949else
5950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5951$as_echo "no" >&6; }
5952fi
5953
5954
5955  test -n "$AWK" && break
5956done
5957
5958
5959    if test "x$AWK" = x; then
5960        if test "x" = x; then
5961          PROG_NAME=awk
5962        else
5963          PROG_NAME=
5964        fi
5965        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5966$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5967        as_fn_error $? "Cannot continue" "$LINENO" 5
5968    fi
5969
5970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5971$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5972if test "${ac_cv_path_GREP+set}" = set; then :
5973  $as_echo_n "(cached) " >&6
5974else
5975  if test -z "$GREP"; then
5976  ac_path_GREP_found=false
5977  # Loop through the user's path and test for each of PROGNAME-LIST
5978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5979for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5980do
5981  IFS=$as_save_IFS
5982  test -z "$as_dir" && as_dir=.
5983    for ac_prog in grep ggrep; do
5984    for ac_exec_ext in '' $ac_executable_extensions; do
5985      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5986      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5987# Check for GNU ac_path_GREP and select it if it is found.
5988  # Check for GNU $ac_path_GREP
5989case `"$ac_path_GREP" --version 2>&1` in
5990*GNU*)
5991  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5992*)
5993  ac_count=0
5994  $as_echo_n 0123456789 >"conftest.in"
5995  while :
5996  do
5997    cat "conftest.in" "conftest.in" >"conftest.tmp"
5998    mv "conftest.tmp" "conftest.in"
5999    cp "conftest.in" "conftest.nl"
6000    $as_echo 'GREP' >> "conftest.nl"
6001    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6002    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6003    as_fn_arith $ac_count + 1 && ac_count=$as_val
6004    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6005      # Best one so far, save it but keep looking for a better one
6006      ac_cv_path_GREP="$ac_path_GREP"
6007      ac_path_GREP_max=$ac_count
6008    fi
6009    # 10*(2^10) chars as input seems more than enough
6010    test $ac_count -gt 10 && break
6011  done
6012  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6013esac
6014
6015      $ac_path_GREP_found && break 3
6016    done
6017  done
6018  done
6019IFS=$as_save_IFS
6020  if test -z "$ac_cv_path_GREP"; then
6021    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6022  fi
6023else
6024  ac_cv_path_GREP=$GREP
6025fi
6026
6027fi
6028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6029$as_echo "$ac_cv_path_GREP" >&6; }
6030 GREP="$ac_cv_path_GREP"
6031
6032
6033
6034    if test "x$GREP" = x; then
6035        if test "x" = x; then
6036          PROG_NAME=grep
6037        else
6038          PROG_NAME=
6039        fi
6040        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6041$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6042        as_fn_error $? "Cannot continue" "$LINENO" 5
6043    fi
6044
6045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6046$as_echo_n "checking for egrep... " >&6; }
6047if test "${ac_cv_path_EGREP+set}" = set; then :
6048  $as_echo_n "(cached) " >&6
6049else
6050  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6051   then ac_cv_path_EGREP="$GREP -E"
6052   else
6053     if test -z "$EGREP"; then
6054  ac_path_EGREP_found=false
6055  # Loop through the user's path and test for each of PROGNAME-LIST
6056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6057for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6058do
6059  IFS=$as_save_IFS
6060  test -z "$as_dir" && as_dir=.
6061    for ac_prog in egrep; do
6062    for ac_exec_ext in '' $ac_executable_extensions; do
6063      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6064      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6065# Check for GNU ac_path_EGREP and select it if it is found.
6066  # Check for GNU $ac_path_EGREP
6067case `"$ac_path_EGREP" --version 2>&1` in
6068*GNU*)
6069  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6070*)
6071  ac_count=0
6072  $as_echo_n 0123456789 >"conftest.in"
6073  while :
6074  do
6075    cat "conftest.in" "conftest.in" >"conftest.tmp"
6076    mv "conftest.tmp" "conftest.in"
6077    cp "conftest.in" "conftest.nl"
6078    $as_echo 'EGREP' >> "conftest.nl"
6079    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6080    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6081    as_fn_arith $ac_count + 1 && ac_count=$as_val
6082    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6083      # Best one so far, save it but keep looking for a better one
6084      ac_cv_path_EGREP="$ac_path_EGREP"
6085      ac_path_EGREP_max=$ac_count
6086    fi
6087    # 10*(2^10) chars as input seems more than enough
6088    test $ac_count -gt 10 && break
6089  done
6090  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6091esac
6092
6093      $ac_path_EGREP_found && break 3
6094    done
6095  done
6096  done
6097IFS=$as_save_IFS
6098  if test -z "$ac_cv_path_EGREP"; then
6099    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6100  fi
6101else
6102  ac_cv_path_EGREP=$EGREP
6103fi
6104
6105   fi
6106fi
6107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6108$as_echo "$ac_cv_path_EGREP" >&6; }
6109 EGREP="$ac_cv_path_EGREP"
6110
6111
6112
6113    if test "x$EGREP" = x; then
6114        if test "x" = x; then
6115          PROG_NAME=egrep
6116        else
6117          PROG_NAME=
6118        fi
6119        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6120$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6121        as_fn_error $? "Cannot continue" "$LINENO" 5
6122    fi
6123
6124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6125$as_echo_n "checking for fgrep... " >&6; }
6126if test "${ac_cv_path_FGREP+set}" = set; then :
6127  $as_echo_n "(cached) " >&6
6128else
6129  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6130   then ac_cv_path_FGREP="$GREP -F"
6131   else
6132     if test -z "$FGREP"; then
6133  ac_path_FGREP_found=false
6134  # Loop through the user's path and test for each of PROGNAME-LIST
6135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6136for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6137do
6138  IFS=$as_save_IFS
6139  test -z "$as_dir" && as_dir=.
6140    for ac_prog in fgrep; do
6141    for ac_exec_ext in '' $ac_executable_extensions; do
6142      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6143      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6144# Check for GNU ac_path_FGREP and select it if it is found.
6145  # Check for GNU $ac_path_FGREP
6146case `"$ac_path_FGREP" --version 2>&1` in
6147*GNU*)
6148  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6149*)
6150  ac_count=0
6151  $as_echo_n 0123456789 >"conftest.in"
6152  while :
6153  do
6154    cat "conftest.in" "conftest.in" >"conftest.tmp"
6155    mv "conftest.tmp" "conftest.in"
6156    cp "conftest.in" "conftest.nl"
6157    $as_echo 'FGREP' >> "conftest.nl"
6158    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6159    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6160    as_fn_arith $ac_count + 1 && ac_count=$as_val
6161    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6162      # Best one so far, save it but keep looking for a better one
6163      ac_cv_path_FGREP="$ac_path_FGREP"
6164      ac_path_FGREP_max=$ac_count
6165    fi
6166    # 10*(2^10) chars as input seems more than enough
6167    test $ac_count -gt 10 && break
6168  done
6169  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6170esac
6171
6172      $ac_path_FGREP_found && break 3
6173    done
6174  done
6175  done
6176IFS=$as_save_IFS
6177  if test -z "$ac_cv_path_FGREP"; then
6178    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6179  fi
6180else
6181  ac_cv_path_FGREP=$FGREP
6182fi
6183
6184   fi
6185fi
6186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6187$as_echo "$ac_cv_path_FGREP" >&6; }
6188 FGREP="$ac_cv_path_FGREP"
6189
6190
6191
6192    if test "x$FGREP" = x; then
6193        if test "x" = x; then
6194          PROG_NAME=fgrep
6195        else
6196          PROG_NAME=
6197        fi
6198        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6199$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6200        as_fn_error $? "Cannot continue" "$LINENO" 5
6201    fi
6202
6203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6204$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6205if test "${ac_cv_path_SED+set}" = set; then :
6206  $as_echo_n "(cached) " >&6
6207else
6208            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6209     for ac_i in 1 2 3 4 5 6 7; do
6210       ac_script="$ac_script$as_nl$ac_script"
6211     done
6212     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6213     { ac_script=; unset ac_script;}
6214     if test -z "$SED"; then
6215  ac_path_SED_found=false
6216  # Loop through the user's path and test for each of PROGNAME-LIST
6217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6218for as_dir in $PATH
6219do
6220  IFS=$as_save_IFS
6221  test -z "$as_dir" && as_dir=.
6222    for ac_prog in sed gsed; do
6223    for ac_exec_ext in '' $ac_executable_extensions; do
6224      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6225      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6226# Check for GNU ac_path_SED and select it if it is found.
6227  # Check for GNU $ac_path_SED
6228case `"$ac_path_SED" --version 2>&1` in
6229*GNU*)
6230  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6231*)
6232  ac_count=0
6233  $as_echo_n 0123456789 >"conftest.in"
6234  while :
6235  do
6236    cat "conftest.in" "conftest.in" >"conftest.tmp"
6237    mv "conftest.tmp" "conftest.in"
6238    cp "conftest.in" "conftest.nl"
6239    $as_echo '' >> "conftest.nl"
6240    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6241    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6242    as_fn_arith $ac_count + 1 && ac_count=$as_val
6243    if test $ac_count -gt ${ac_path_SED_max-0}; then
6244      # Best one so far, save it but keep looking for a better one
6245      ac_cv_path_SED="$ac_path_SED"
6246      ac_path_SED_max=$ac_count
6247    fi
6248    # 10*(2^10) chars as input seems more than enough
6249    test $ac_count -gt 10 && break
6250  done
6251  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6252esac
6253
6254      $ac_path_SED_found && break 3
6255    done
6256  done
6257  done
6258IFS=$as_save_IFS
6259  if test -z "$ac_cv_path_SED"; then
6260    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6261  fi
6262else
6263  ac_cv_path_SED=$SED
6264fi
6265
6266fi
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6268$as_echo "$ac_cv_path_SED" >&6; }
6269 SED="$ac_cv_path_SED"
6270  rm -f conftest.sed
6271
6272
6273    if test "x$SED" = x; then
6274        if test "x" = x; then
6275          PROG_NAME=sed
6276        else
6277          PROG_NAME=
6278        fi
6279        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6280$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6281        as_fn_error $? "Cannot continue" "$LINENO" 5
6282    fi
6283
6284
6285for ac_prog in nawk gawk awk
6286do
6287  # Extract the first word of "$ac_prog", so it can be a program name with args.
6288set dummy $ac_prog; ac_word=$2
6289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6290$as_echo_n "checking for $ac_word... " >&6; }
6291if test "${ac_cv_path_NAWK+set}" = set; then :
6292  $as_echo_n "(cached) " >&6
6293else
6294  case $NAWK in
6295  [\\/]* | ?:[\\/]*)
6296  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6297  ;;
6298  *)
6299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6300for as_dir in $PATH
6301do
6302  IFS=$as_save_IFS
6303  test -z "$as_dir" && as_dir=.
6304    for ac_exec_ext in '' $ac_executable_extensions; do
6305  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6306    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6308    break 2
6309  fi
6310done
6311  done
6312IFS=$as_save_IFS
6313
6314  ;;
6315esac
6316fi
6317NAWK=$ac_cv_path_NAWK
6318if test -n "$NAWK"; then
6319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6320$as_echo "$NAWK" >&6; }
6321else
6322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6323$as_echo "no" >&6; }
6324fi
6325
6326
6327  test -n "$NAWK" && break
6328done
6329
6330
6331    if test "x$NAWK" = x; then
6332        if test "x" = x; then
6333          PROG_NAME=nawk
6334        else
6335          PROG_NAME=
6336        fi
6337        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6338$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6339        as_fn_error $? "Cannot continue" "$LINENO" 5
6340    fi
6341
6342
6343# Always force rm.
6344RM="$RM -f"
6345
6346# These are not required on all platforms
6347# Extract the first word of "cygpath", so it can be a program name with args.
6348set dummy cygpath; ac_word=$2
6349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6350$as_echo_n "checking for $ac_word... " >&6; }
6351if test "${ac_cv_path_CYGPATH+set}" = set; then :
6352  $as_echo_n "(cached) " >&6
6353else
6354  case $CYGPATH in
6355  [\\/]* | ?:[\\/]*)
6356  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6357  ;;
6358  *)
6359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6360for as_dir in $PATH
6361do
6362  IFS=$as_save_IFS
6363  test -z "$as_dir" && as_dir=.
6364    for ac_exec_ext in '' $ac_executable_extensions; do
6365  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6366    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6368    break 2
6369  fi
6370done
6371  done
6372IFS=$as_save_IFS
6373
6374  ;;
6375esac
6376fi
6377CYGPATH=$ac_cv_path_CYGPATH
6378if test -n "$CYGPATH"; then
6379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6380$as_echo "$CYGPATH" >&6; }
6381else
6382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6383$as_echo "no" >&6; }
6384fi
6385
6386
6387# Extract the first word of "readlink", so it can be a program name with args.
6388set dummy readlink; ac_word=$2
6389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6390$as_echo_n "checking for $ac_word... " >&6; }
6391if test "${ac_cv_path_READLINK+set}" = set; then :
6392  $as_echo_n "(cached) " >&6
6393else
6394  case $READLINK in
6395  [\\/]* | ?:[\\/]*)
6396  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6397  ;;
6398  *)
6399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6400for as_dir in $PATH
6401do
6402  IFS=$as_save_IFS
6403  test -z "$as_dir" && as_dir=.
6404    for ac_exec_ext in '' $ac_executable_extensions; do
6405  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6406    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6408    break 2
6409  fi
6410done
6411  done
6412IFS=$as_save_IFS
6413
6414  ;;
6415esac
6416fi
6417READLINK=$ac_cv_path_READLINK
6418if test -n "$READLINK"; then
6419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6420$as_echo "$READLINK" >&6; }
6421else
6422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6423$as_echo "no" >&6; }
6424fi
6425
6426
6427# Extract the first word of "df", so it can be a program name with args.
6428set dummy df; ac_word=$2
6429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6430$as_echo_n "checking for $ac_word... " >&6; }
6431if test "${ac_cv_path_DF+set}" = set; then :
6432  $as_echo_n "(cached) " >&6
6433else
6434  case $DF in
6435  [\\/]* | ?:[\\/]*)
6436  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6437  ;;
6438  *)
6439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6440for as_dir in $PATH
6441do
6442  IFS=$as_save_IFS
6443  test -z "$as_dir" && as_dir=.
6444    for ac_exec_ext in '' $ac_executable_extensions; do
6445  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6446    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6448    break 2
6449  fi
6450done
6451  done
6452IFS=$as_save_IFS
6453
6454  ;;
6455esac
6456fi
6457DF=$ac_cv_path_DF
6458if test -n "$DF"; then
6459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6460$as_echo "$DF" >&6; }
6461else
6462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463$as_echo "no" >&6; }
6464fi
6465
6466
6467# Extract the first word of "SetFile", so it can be a program name with args.
6468set dummy SetFile; ac_word=$2
6469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6470$as_echo_n "checking for $ac_word... " >&6; }
6471if test "${ac_cv_path_SETFILE+set}" = set; then :
6472  $as_echo_n "(cached) " >&6
6473else
6474  case $SETFILE in
6475  [\\/]* | ?:[\\/]*)
6476  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6477  ;;
6478  *)
6479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6480for as_dir in $PATH
6481do
6482  IFS=$as_save_IFS
6483  test -z "$as_dir" && as_dir=.
6484    for ac_exec_ext in '' $ac_executable_extensions; do
6485  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6486    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6488    break 2
6489  fi
6490done
6491  done
6492IFS=$as_save_IFS
6493
6494  ;;
6495esac
6496fi
6497SETFILE=$ac_cv_path_SETFILE
6498if test -n "$SETFILE"; then
6499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6500$as_echo "$SETFILE" >&6; }
6501else
6502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6503$as_echo "no" >&6; }
6504fi
6505
6506
6507
6508
6509# Now we can determine OpenJDK build and target platforms. This is required to
6510# have early on.
6511# Make sure we can run config.sub.
6512$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6513  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6514
6515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6516$as_echo_n "checking build system type... " >&6; }
6517if test "${ac_cv_build+set}" = set; then :
6518  $as_echo_n "(cached) " >&6
6519else
6520  ac_build_alias=$build_alias
6521test "x$ac_build_alias" = x &&
6522  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6523test "x$ac_build_alias" = x &&
6524  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6525ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6526  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6527
6528fi
6529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6530$as_echo "$ac_cv_build" >&6; }
6531case $ac_cv_build in
6532*-*-*) ;;
6533*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
6534esac
6535build=$ac_cv_build
6536ac_save_IFS=$IFS; IFS='-'
6537set x $ac_cv_build
6538shift
6539build_cpu=$1
6540build_vendor=$2
6541shift; shift
6542# Remember, the first character of IFS is used to create $*,
6543# except with old shells:
6544build_os=$*
6545IFS=$ac_save_IFS
6546case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6547
6548
6549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6550$as_echo_n "checking host system type... " >&6; }
6551if test "${ac_cv_host+set}" = set; then :
6552  $as_echo_n "(cached) " >&6
6553else
6554  if test "x$host_alias" = x; then
6555  ac_cv_host=$ac_cv_build
6556else
6557  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6558    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6559fi
6560
6561fi
6562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6563$as_echo "$ac_cv_host" >&6; }
6564case $ac_cv_host in
6565*-*-*) ;;
6566*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
6567esac
6568host=$ac_cv_host
6569ac_save_IFS=$IFS; IFS='-'
6570set x $ac_cv_host
6571shift
6572host_cpu=$1
6573host_vendor=$2
6574shift; shift
6575# Remember, the first character of IFS is used to create $*,
6576# except with old shells:
6577host_os=$*
6578IFS=$ac_save_IFS
6579case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6580
6581
6582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6583$as_echo_n "checking target system type... " >&6; }
6584if test "${ac_cv_target+set}" = set; then :
6585  $as_echo_n "(cached) " >&6
6586else
6587  if test "x$target_alias" = x; then
6588  ac_cv_target=$ac_cv_host
6589else
6590  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6591    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6592fi
6593
6594fi
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6596$as_echo "$ac_cv_target" >&6; }
6597case $ac_cv_target in
6598*-*-*) ;;
6599*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
6600esac
6601target=$ac_cv_target
6602ac_save_IFS=$IFS; IFS='-'
6603set x $ac_cv_target
6604shift
6605target_cpu=$1
6606target_vendor=$2
6607shift; shift
6608# Remember, the first character of IFS is used to create $*,
6609# except with old shells:
6610target_os=$*
6611IFS=$ac_save_IFS
6612case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6613
6614
6615# The aliases save the names the user supplied, while $host etc.
6616# will get canonicalized.
6617test -n "$target_alias" &&
6618  test "$program_prefix$program_suffix$program_transform_name" = \
6619    NONENONEs,x,x, &&
6620  program_prefix=${target_alias}-
6621
6622# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6623# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6624# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6625# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6626# to use the configure naming style.
6627
6628
6629
6630
6631
6632    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6633    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6634    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6635    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6636    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6637    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6638
6639
6640
6641    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6642
6643  case "$build_os" in
6644    *linux*)
6645      VAR_OS=linux
6646      VAR_OS_API=posix
6647      VAR_OS_ENV=linux
6648      ;;
6649    *solaris*)
6650      VAR_OS=solaris
6651      VAR_OS_API=posix
6652      VAR_OS_ENV=solaris
6653      ;;
6654    *darwin*)
6655      VAR_OS=macosx
6656      VAR_OS_API=posix
6657      VAR_OS_ENV=macosx
6658      ;;
6659    *bsd*)
6660      VAR_OS=bsd
6661      VAR_OS_API=posix
6662      VAR_OS_ENV=bsd
6663      ;;
6664    *cygwin*)
6665      VAR_OS=windows
6666      VAR_OS_API=winapi
6667      VAR_OS_ENV=windows.cygwin
6668      ;;
6669    *mingw*)
6670      VAR_OS=windows
6671      VAR_OS_API=winapi
6672      VAR_OS_ENV=windows.msys
6673      ;;
6674    *)
6675      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6676      ;;
6677  esac
6678
6679
6680  # First argument is the cpu name from the trip/quad
6681  case "$build_cpu" in
6682    x86_64)
6683      VAR_CPU=x86_64
6684      VAR_CPU_ARCH=x86
6685      VAR_CPU_BITS=64
6686      VAR_CPU_ENDIAN=little
6687      ;;
6688    i?86)
6689      VAR_CPU=x86
6690      VAR_CPU_ARCH=x86
6691      VAR_CPU_BITS=32
6692      VAR_CPU_ENDIAN=little
6693      ;;
6694    arm*)
6695      VAR_CPU=arm
6696      VAR_CPU_ARCH=arm
6697      VAR_CPU_BITS=32
6698      VAR_CPU_ENDIAN=little
6699      ;;
6700    powerpc)
6701      VAR_CPU=ppc
6702      VAR_CPU_ARCH=ppc
6703      VAR_CPU_BITS=32
6704      VAR_CPU_ENDIAN=big
6705       ;;
6706    powerpc64)
6707      VAR_CPU=ppc64
6708      VAR_CPU_ARCH=ppc
6709      VAR_CPU_BITS=64
6710      VAR_CPU_ENDIAN=big
6711       ;;
6712    sparc)
6713      VAR_CPU=sparc
6714      VAR_CPU_ARCH=sparc
6715      VAR_CPU_BITS=32
6716      VAR_CPU_ENDIAN=big
6717       ;;
6718    sparcv9)
6719      VAR_CPU=sparcv9
6720      VAR_CPU_ARCH=sparc
6721      VAR_CPU_BITS=64
6722      VAR_CPU_ENDIAN=big
6723       ;;
6724    *)
6725      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6726      ;;
6727  esac
6728
6729    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6730    OPENJDK_BUILD_OS="$VAR_OS"
6731    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6732    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6733    OPENJDK_BUILD_CPU="$VAR_CPU"
6734    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6735    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6736    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6737
6738
6739
6740
6741
6742
6743
6744    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6745$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6747$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6748
6749    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6750
6751  case "$host_os" in
6752    *linux*)
6753      VAR_OS=linux
6754      VAR_OS_API=posix
6755      VAR_OS_ENV=linux
6756      ;;
6757    *solaris*)
6758      VAR_OS=solaris
6759      VAR_OS_API=posix
6760      VAR_OS_ENV=solaris
6761      ;;
6762    *darwin*)
6763      VAR_OS=macosx
6764      VAR_OS_API=posix
6765      VAR_OS_ENV=macosx
6766      ;;
6767    *bsd*)
6768      VAR_OS=bsd
6769      VAR_OS_API=posix
6770      VAR_OS_ENV=bsd
6771      ;;
6772    *cygwin*)
6773      VAR_OS=windows
6774      VAR_OS_API=winapi
6775      VAR_OS_ENV=windows.cygwin
6776      ;;
6777    *mingw*)
6778      VAR_OS=windows
6779      VAR_OS_API=winapi
6780      VAR_OS_ENV=windows.msys
6781      ;;
6782    *)
6783      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6784      ;;
6785  esac
6786
6787
6788  # First argument is the cpu name from the trip/quad
6789  case "$host_cpu" in
6790    x86_64)
6791      VAR_CPU=x86_64
6792      VAR_CPU_ARCH=x86
6793      VAR_CPU_BITS=64
6794      VAR_CPU_ENDIAN=little
6795      ;;
6796    i?86)
6797      VAR_CPU=x86
6798      VAR_CPU_ARCH=x86
6799      VAR_CPU_BITS=32
6800      VAR_CPU_ENDIAN=little
6801      ;;
6802    arm*)
6803      VAR_CPU=arm
6804      VAR_CPU_ARCH=arm
6805      VAR_CPU_BITS=32
6806      VAR_CPU_ENDIAN=little
6807      ;;
6808    powerpc)
6809      VAR_CPU=ppc
6810      VAR_CPU_ARCH=ppc
6811      VAR_CPU_BITS=32
6812      VAR_CPU_ENDIAN=big
6813       ;;
6814    powerpc64)
6815      VAR_CPU=ppc64
6816      VAR_CPU_ARCH=ppc
6817      VAR_CPU_BITS=64
6818      VAR_CPU_ENDIAN=big
6819       ;;
6820    sparc)
6821      VAR_CPU=sparc
6822      VAR_CPU_ARCH=sparc
6823      VAR_CPU_BITS=32
6824      VAR_CPU_ENDIAN=big
6825       ;;
6826    sparcv9)
6827      VAR_CPU=sparcv9
6828      VAR_CPU_ARCH=sparc
6829      VAR_CPU_BITS=64
6830      VAR_CPU_ENDIAN=big
6831       ;;
6832    *)
6833      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6834      ;;
6835  esac
6836
6837    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6838    OPENJDK_TARGET_OS="$VAR_OS"
6839    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6840    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6841    OPENJDK_TARGET_CPU="$VAR_CPU"
6842    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6843    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6844    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6845
6846
6847
6848
6849
6850
6851
6852    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6853$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6854    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6855$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6856
6857
6858
6859# Check whether --with-target-bits was given.
6860if test "${with_target_bits+set}" = set; then :
6861  withval=$with_target_bits;
6862fi
6863
6864
6865  # We have three types of compiles:
6866  # native  == normal compilation, target system == build system
6867  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6868  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6869  #
6870  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6871    # We're doing a proper cross-compilation
6872    COMPILE_TYPE="cross"
6873  else
6874    COMPILE_TYPE="native"
6875  fi
6876
6877  if test "x$with_target_bits" != x; then
6878    if test "x$COMPILE_TYPE" = "xcross"; then
6879      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6880    fi
6881
6882    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6883      # A reduced build is requested
6884      COMPILE_TYPE="reduced"
6885      OPENJDK_TARGET_CPU_BITS=32
6886      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6887        OPENJDK_TARGET_CPU=x86
6888      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6889        OPENJDK_TARGET_CPU=sparc
6890      else
6891        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6892      fi
6893    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6894      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
6895    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6896      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6897$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6898    else
6899      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6900    fi
6901  fi
6902
6903
6904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6905$as_echo_n "checking compilation type... " >&6; }
6906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6907$as_echo "$COMPILE_TYPE" >&6; }
6908
6909
6910    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6911       REQUIRED_OS_NAME=SunOS
6912       REQUIRED_OS_VERSION=5.10
6913    fi
6914    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6915       REQUIRED_OS_NAME=Linux
6916       REQUIRED_OS_VERSION=2.6
6917    fi
6918    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
6919        REQUIRED_OS_NAME=Windows
6920        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
6921            REQUIRED_OS_VERSION=5.2
6922        else
6923            REQUIRED_OS_VERSION=5.1
6924        fi
6925    fi
6926    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
6927        REQUIRED_OS_NAME=Darwin
6928        REQUIRED_OS_VERSION=11.2
6929    fi
6930
6931
6932
6933
6934
6935    # Also store the legacy naming of the cpu.
6936    # Ie i586 and amd64 instead of x86 and x86_64
6937    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
6938    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6939      OPENJDK_TARGET_CPU_LEGACY="i586"
6940    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6941      # On all platforms except MacOSX replace x86_64 with amd64.
6942      OPENJDK_TARGET_CPU_LEGACY="amd64"
6943    fi
6944
6945
6946    # And the second legacy naming of the cpu.
6947    # Ie i386 and amd64 instead of x86 and x86_64.
6948    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
6949    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6950      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
6951    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6952      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
6953    fi
6954
6955
6956    # This is the name of the cpu (but using i386 and amd64 instead of
6957    # x86 and x86_64, respectively), preceeded by a /, to be used when
6958    # locating libraries. On macosx, it's empty, though.
6959    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
6960    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
6961        OPENJDK_TARGET_CPU_LIBDIR=""
6962    fi
6963
6964
6965    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
6966    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
6967    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
6968    OPENJDK_TARGET_CPU_ISADIR=""
6969    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6970      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6971          OPENJDK_TARGET_CPU_ISADIR="/amd64"
6972      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
6973          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
6974      fi
6975    fi
6976
6977
6978    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
6979    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
6980    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
6981      # On linux only, we replace x86 with i386.
6982      OPENJDK_TARGET_CPU_OSARCH="i386"
6983    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6984      # On all platforms except macosx, we replace x86_64 with amd64.
6985      OPENJDK_TARGET_CPU_OSARCH="amd64"
6986    fi
6987
6988
6989    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
6990    if test "x$OPENJDK_TARGET_CPU" = xx86; then
6991      OPENJDK_TARGET_CPU_JLI="i386"
6992    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
6993      # On all platforms except macosx, we replace x86_64 with amd64.
6994      OPENJDK_TARGET_CPU_JLI="amd64"
6995    fi
6996    # Now setup the -D flags for building libjli.
6997    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
6998    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
6999      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7000        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7001      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7002        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7003      fi
7004    fi
7005
7006
7007    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7008    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7009        OPENJDK_TARGET_OS_API_DIR="solaris"
7010    fi
7011    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7012        OPENJDK_TARGET_OS_API_DIR="windows"
7013    fi
7014
7015
7016    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7017        A_LP64="LP64:="
7018        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7019        # unpack200.exe
7020        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7021            ADD_LP64="-D_LP64=1"
7022        fi
7023    fi
7024    LP64=$A_LP64
7025
7026
7027    if test "x$COMPILE_TYPE" = "xcross"; then
7028      # FIXME: ... or should this include reduced builds..?
7029      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7030    else
7031      DEFINE_CROSS_COMPILE_ARCH=""
7032    fi
7033
7034
7035
7036
7037# Continue setting up basic stuff. Most remaining code require fundamental tools.
7038
7039# Locate the directory of this script.
7040SCRIPT="$0"
7041
7042    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7043        # Follow a chain of symbolic links. Use readlink
7044        # where it exists, else fall back to horribly
7045        # complicated shell code.
7046        if test "x$READLINK_TESTED" != yes; then
7047            # On MacOSX there is a readlink tool with a different
7048            # purpose than the GNU readlink tool. Check the found readlink.
7049            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7050            if test "x$ISGNU" = x; then
7051                 # A readlink that we do not know how to use.
7052                 # Are there other non-GNU readlinks out there?
7053                 READLINK_TESTED=yes
7054                 READLINK=
7055            fi
7056        fi
7057
7058        if test "x$READLINK" != x; then
7059            SCRIPT=`$READLINK -f $SCRIPT`
7060        else
7061            # Save the current directory for restoring afterwards
7062            STARTDIR=$PWD
7063            COUNTER=0
7064            sym_link_dir=`$DIRNAME $SCRIPT`
7065            sym_link_file=`$BASENAME $SCRIPT`
7066            # Use the system pwd and not the shell builtin to resolve directory symlinks
7067            cd $sym_link_dir
7068            cd `$THEPWDCMD`
7069            sym_link_dir=`$THEPWDCMD`
7070            # Resolve file symlinks
7071            while test $COUNTER -lt 20; do
7072                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7073                if test "x$ISLINK" == x; then
7074                    # This is not a symbolic link! We are done!
7075                    break
7076                fi
7077                # Again resolve directory symlinks since the target of the just found
7078                # link could be in a different directory
7079                cd `$DIRNAME $ISLINK`
7080                sym_link_dir=`$THEPWDCMD`
7081                sym_link_file=`$BASENAME $ISLINK`
7082                let COUNTER=COUNTER+1
7083            done
7084            cd $STARTDIR
7085            SCRIPT=$sym_link_dir/$sym_link_file
7086        fi
7087    fi
7088
7089AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7090
7091# Where is the source? It is located two levels above the configure script.
7092CURDIR="$PWD"
7093cd "$AUTOCONF_DIR/../.."
7094SRC_ROOT="`$THEPWDCMD`"
7095
7096if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7097  PATH_SEP=";"
7098
7099  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7100  if test $SRC_ROOT_LENGTH -gt 100; then
7101      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7102  fi
7103
7104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7105    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7106$as_echo_n "checking cygwin release... " >&6; }
7107    CYGWIN_VERSION=`$UNAME -r`
7108    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7109$as_echo "$CYGWIN_VERSION" >&6; }
7110    WINDOWS_ENV_VENDOR='cygwin'
7111    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7112
7113    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7114    if test "x$CYGWIN_VERSION_OK" = x; then
7115      { $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
7116$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;}
7117      as_fn_error $? "Cannot continue" "$LINENO" 5
7118    fi
7119    if test "x$CYGPATH" = x; then
7120        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7121    fi
7122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7123$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7124    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7125    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7126    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7127    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7129$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7130    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7131    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7132    if test "x$test_cygdrive_prefix" = x; then
7133        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7134    fi
7135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7136    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7137$as_echo_n "checking msys release... " >&6; }
7138    MSYS_VERSION=`$UNAME -r`
7139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7140$as_echo "$MSYS_VERSION" >&6; }
7141
7142    WINDOWS_ENV_VENDOR='msys'
7143    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7144
7145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7146$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7147    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7148    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7149
7150  windows_path="$MSYS_ROOT_PATH"
7151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7152    unix_path=`$CYGPATH -u "$windows_path"`
7153    MSYS_ROOT_PATH="$unix_path"
7154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7156    MSYS_ROOT_PATH="$unix_path"
7157  fi
7158
7159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7160$as_echo "$MSYS_ROOT_PATH" >&6; }
7161    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7162  else
7163    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7164  fi
7165
7166  # Test if windows or unix (cygwin/msys) find is first in path.
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7168$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7169  FIND_BINARY_OUTPUT=`find --version 2>&1`
7170  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7172$as_echo "unix style" >&6; }
7173  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7175$as_echo "Windows" >&6; }
7176    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7177$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7178    { $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
7179$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7180    as_fn_error $? "Cannot continue" "$LINENO" 5
7181  else
7182    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7183$as_echo "unknown" >&6; }
7184    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7185$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7186  fi
7187
7188else
7189  PATH_SEP=":"
7190fi
7191
7192
7193
7194cd "$CURDIR"
7195
7196
7197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7198
7199  # Input might be given as Windows format, start by converting to
7200  # unix format.
7201  path="$SRC_ROOT"
7202  new_path=`$CYGPATH -u "$path"`
7203
7204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7207  # "foo.exe" is OK but "foo" is an error.
7208  #
7209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7210  # It is also a way to make sure we got the proper file name for the real test later on.
7211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7212  if test "x$test_shortpath" = x; then
7213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7214$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7215    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7216  fi
7217
7218  # Call helper function which possibly converts this using DOS-style short mode.
7219  # If so, the updated path is stored in $new_path.
7220
7221  input_path="$new_path"
7222  # Check if we need to convert this using DOS-style short mode. If the path
7223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7224  # take no chances and rewrite it.
7225  # Note: m4 eats our [], so we need to use [ and ] instead.
7226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7227  if test "x$has_forbidden_chars" != x; then
7228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7232      # Going to short mode and back again did indeed matter. Since short mode is
7233      # case insensitive, let's make it lowercase to improve readability.
7234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7235      # Now convert it back to Unix-stile (cygpath)
7236      input_path=`$CYGPATH -u "$shortmode_path"`
7237      new_path="$input_path"
7238    fi
7239  fi
7240
7241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7242  if test "x$test_cygdrive_prefix" = x; then
7243    # As a simple fix, exclude /usr/bin since it's not a real path.
7244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7246      # a path prefixed by /cygdrive for fixpath to work.
7247      new_path="$CYGWIN_ROOT_PATH$input_path"
7248    fi
7249  fi
7250
7251
7252  if test "x$path" != "x$new_path"; then
7253    SRC_ROOT="$new_path"
7254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7255$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7256  fi
7257
7258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7259
7260  path="$SRC_ROOT"
7261  has_colon=`$ECHO $path | $GREP ^.:`
7262  new_path="$path"
7263  if test "x$has_colon" = x; then
7264    # Not in mixed or Windows style, start by that.
7265    new_path=`cmd //c echo $path`
7266  fi
7267
7268
7269  input_path="$new_path"
7270  # Check if we need to convert this using DOS-style short mode. If the path
7271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7272  # take no chances and rewrite it.
7273  # Note: m4 eats our [], so we need to use [ and ] instead.
7274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7275  if test "x$has_forbidden_chars" != x; then
7276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7278  fi
7279
7280
7281  windows_path="$new_path"
7282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7283    unix_path=`$CYGPATH -u "$windows_path"`
7284    new_path="$unix_path"
7285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7287    new_path="$unix_path"
7288  fi
7289
7290  if test "x$path" != "x$new_path"; then
7291    SRC_ROOT="$new_path"
7292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7293$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7294  fi
7295
7296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7298
7299  else
7300    # We're on a posix platform. Hooray! :)
7301    path="$SRC_ROOT"
7302
7303    if test ! -f "$path" && test ! -d "$path"; then
7304      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7305    fi
7306
7307    has_space=`$ECHO "$path" | $GREP " "`
7308    if test "x$has_space" != x; then
7309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7310$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7311      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7312    fi
7313  fi
7314
7315
7316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7317
7318  # Input might be given as Windows format, start by converting to
7319  # unix format.
7320  path="$CURDIR"
7321  new_path=`$CYGPATH -u "$path"`
7322
7323  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7324  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7325  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7326  # "foo.exe" is OK but "foo" is an error.
7327  #
7328  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7329  # It is also a way to make sure we got the proper file name for the real test later on.
7330  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7331  if test "x$test_shortpath" = x; then
7332    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7333$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7334    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7335  fi
7336
7337  # Call helper function which possibly converts this using DOS-style short mode.
7338  # If so, the updated path is stored in $new_path.
7339
7340  input_path="$new_path"
7341  # Check if we need to convert this using DOS-style short mode. If the path
7342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7343  # take no chances and rewrite it.
7344  # Note: m4 eats our [], so we need to use [ and ] instead.
7345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7346  if test "x$has_forbidden_chars" != x; then
7347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7351      # Going to short mode and back again did indeed matter. Since short mode is
7352      # case insensitive, let's make it lowercase to improve readability.
7353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7354      # Now convert it back to Unix-stile (cygpath)
7355      input_path=`$CYGPATH -u "$shortmode_path"`
7356      new_path="$input_path"
7357    fi
7358  fi
7359
7360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7361  if test "x$test_cygdrive_prefix" = x; then
7362    # As a simple fix, exclude /usr/bin since it's not a real path.
7363    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7365      # a path prefixed by /cygdrive for fixpath to work.
7366      new_path="$CYGWIN_ROOT_PATH$input_path"
7367    fi
7368  fi
7369
7370
7371  if test "x$path" != "x$new_path"; then
7372    CURDIR="$new_path"
7373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7374$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7375  fi
7376
7377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7378
7379  path="$CURDIR"
7380  has_colon=`$ECHO $path | $GREP ^.:`
7381  new_path="$path"
7382  if test "x$has_colon" = x; then
7383    # Not in mixed or Windows style, start by that.
7384    new_path=`cmd //c echo $path`
7385  fi
7386
7387
7388  input_path="$new_path"
7389  # Check if we need to convert this using DOS-style short mode. If the path
7390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7391  # take no chances and rewrite it.
7392  # Note: m4 eats our [], so we need to use [ and ] instead.
7393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7394  if test "x$has_forbidden_chars" != x; then
7395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7396    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7397  fi
7398
7399
7400  windows_path="$new_path"
7401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7402    unix_path=`$CYGPATH -u "$windows_path"`
7403    new_path="$unix_path"
7404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7406    new_path="$unix_path"
7407  fi
7408
7409  if test "x$path" != "x$new_path"; then
7410    CURDIR="$new_path"
7411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7412$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7413  fi
7414
7415  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7416  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7417
7418  else
7419    # We're on a posix platform. Hooray! :)
7420    path="$CURDIR"
7421
7422    if test ! -f "$path" && test ! -d "$path"; then
7423      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7424    fi
7425
7426    has_space=`$ECHO "$path" | $GREP " "`
7427    if test "x$has_space" != x; then
7428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7429$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7430      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7431    fi
7432  fi
7433
7434
7435if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7436    # Add extra search paths on solaris for utilities like ar and as etc...
7437    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7438fi
7439
7440# You can force the sys-root if the sys-root encoded into the cross compiler tools
7441# is not correct.
7442
7443# Check whether --with-sys-root was given.
7444if test "${with_sys_root+set}" = set; then :
7445  withval=$with_sys_root;
7446fi
7447
7448
7449if test "x$with_sys_root" != x; then
7450  SYS_ROOT=$with_sys_root
7451else
7452  SYS_ROOT=/
7453fi
7454
7455
7456
7457# Check whether --with-tools-dir was given.
7458if test "${with_tools_dir+set}" = set; then :
7459  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7460fi
7461
7462
7463
7464# Check whether --with-devkit was given.
7465if test "${with_devkit+set}" = set; then :
7466  withval=$with_devkit;
7467    if test "x$with_sys_root" != x; then
7468      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7469    fi
7470    if test "x$with_tools_dir" != x; then
7471      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7472    fi
7473    TOOLS_DIR=$with_devkit/bin
7474    SYS_ROOT=$with_devkit/$host_alias/libc
7475
7476fi
7477
7478
7479
7480
7481# Setup default logging of stdout and stderr to build.log in the output root.
7482BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7483BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7484BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7485
7486
7487
7488
7489
7490# Check if it's a pure open build or if custom sources are to be used.
7491
7492  # Check whether --enable-openjdk-only was given.
7493if test "${enable_openjdk_only+set}" = set; then :
7494  enableval=$enable_openjdk_only;
7495else
7496  enable_openjdk_only="no"
7497fi
7498
7499
7500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7501$as_echo_n "checking for presence of closed sources... " >&6; }
7502  if test -d "$SRC_ROOT/jdk/src/closed"; then
7503    CLOSED_SOURCE_PRESENT=yes
7504  else
7505    CLOSED_SOURCE_PRESENT=no
7506  fi
7507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7508$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7509
7510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7511$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7512  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7514$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7515
7516  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7517    OPENJDK=true
7518    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7519      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7520$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7521    fi
7522  else
7523    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7524      OPENJDK=true
7525    else
7526      OPENJDK=false
7527    fi
7528  fi
7529
7530  if test "x$OPENJDK" = "xtrue"; then
7531    SET_OPENJDK="OPENJDK=true"
7532  fi
7533
7534
7535
7536
7537# These are needed to be able to create a configuration name (and thus the output directory)
7538
7539###############################################################################
7540#
7541# Check which variant of the JDK that we want to build.
7542# Currently we have:
7543#    normal:   standard edition
7544# but the custom make system may add other variants
7545#
7546# Effectively the JDK variant gives a name to a specific set of
7547# modules to compile into the JDK. In the future, these modules
7548# might even be Jigsaw modules.
7549#
7550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7551$as_echo_n "checking which variant of the JDK to build... " >&6; }
7552
7553# Check whether --with-jdk-variant was given.
7554if test "${with_jdk_variant+set}" = set; then :
7555  withval=$with_jdk_variant;
7556fi
7557
7558
7559if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7560    JDK_VARIANT="normal"
7561else
7562    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7563fi
7564
7565
7566
7567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7568$as_echo "$JDK_VARIANT" >&6; }
7569
7570
7571
7572###############################################################################
7573#
7574# Check which variants of the JVM that we want to build.
7575# Currently we have:
7576#    server: normal interpreter and a tiered C1/C2 compiler
7577#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7578#    minimal1: reduced form of client with optional VM services and features stripped out
7579#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7580#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7581#    zero: no machine code interpreter, no compiler
7582#    zeroshark: zero interpreter and shark/llvm compiler backend
7583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7584$as_echo_n "checking which variants of the JVM to build... " >&6; }
7585
7586# Check whether --with-jvm-variants was given.
7587if test "${with_jvm_variants+set}" = set; then :
7588  withval=$with_jvm_variants;
7589fi
7590
7591
7592if test "x$with_jvm_variants" = x; then
7593     with_jvm_variants="server"
7594fi
7595
7596JVM_VARIANTS=",$with_jvm_variants,"
7597TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7598
7599if test "x$TEST_VARIANTS" != "x,"; then
7600   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7601fi
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7603$as_echo "$with_jvm_variants" >&6; }
7604
7605JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7606JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7607JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7608JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7609JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7610JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7611
7612if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7613    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7614        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7615    fi
7616fi
7617if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7618    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7619        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7620    fi
7621fi
7622if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7623    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7624        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7625    fi
7626fi
7627
7628# Replace the commas with AND for use in the build directory name.
7629ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7630COUNT_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/'`
7631if test "x$COUNT_VARIANTS" != "x,1"; then
7632    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7633else
7634    BUILDING_MULTIPLE_JVM_VARIANTS=no
7635fi
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7646   MACOSX_UNIVERSAL="true"
7647fi
7648
7649
7650
7651
7652
7653###############################################################################
7654#
7655# Set the debug level
7656#    release: no debug information, all optimizations, no asserts.
7657#    fastdebug: debug information (-g), all optimizations, all asserts
7658#    slowdebug: debug information (-g), no optimizations, all asserts
7659#
7660DEBUG_LEVEL="release"
7661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7662$as_echo_n "checking which debug level to use... " >&6; }
7663# Check whether --enable-debug was given.
7664if test "${enable_debug+set}" = set; then :
7665  enableval=$enable_debug;
7666        ENABLE_DEBUG="${enableval}"
7667        DEBUG_LEVEL="fastdebug"
7668
7669else
7670  ENABLE_DEBUG="no"
7671fi
7672
7673
7674
7675# Check whether --with-debug-level was given.
7676if test "${with_debug_level+set}" = set; then :
7677  withval=$with_debug_level;
7678        DEBUG_LEVEL="${withval}"
7679        if test "x$ENABLE_DEBUG" = xyes; then
7680			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7681        fi
7682
7683fi
7684
7685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7686$as_echo "$DEBUG_LEVEL" >&6; }
7687
7688if test "x$DEBUG_LEVEL" != xrelease && \
7689   test "x$DEBUG_LEVEL" != xfastdebug && \
7690   test "x$DEBUG_LEVEL" != xslowdebug; then
7691   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7692fi
7693
7694
7695###############################################################################
7696#
7697# Setup legacy vars/targets and new vars to deal with different debug levels.
7698#
7699
7700case $DEBUG_LEVEL in
7701      release )
7702          VARIANT="OPT"
7703          FASTDEBUG="false"
7704          DEBUG_CLASSFILES="false"
7705          BUILD_VARIANT_RELEASE=""
7706          HOTSPOT_DEBUG_LEVEL="product"
7707          HOTSPOT_EXPORT="product"
7708           ;;
7709      fastdebug )
7710          VARIANT="DBG"
7711          FASTDEBUG="true"
7712          DEBUG_CLASSFILES="true"
7713          BUILD_VARIANT_RELEASE="-fastdebug"
7714          HOTSPOT_DEBUG_LEVEL="fastdebug"
7715          HOTSPOT_EXPORT="fastdebug"
7716           ;;
7717      slowdebug )
7718          VARIANT="DBG"
7719          FASTDEBUG="false"
7720          DEBUG_CLASSFILES="true"
7721          BUILD_VARIANT_RELEASE="-debug"
7722          HOTSPOT_DEBUG_LEVEL="jvmg"
7723          HOTSPOT_EXPORT="debug"
7724           ;;
7725esac
7726
7727#####
7728# Generate the legacy makefile targets for hotspot.
7729# The hotspot api for selecting the build artifacts, really, needs to be improved.
7730# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7731# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7732# But until then ...
7733HOTSPOT_TARGET=""
7734
7735if test "x$JVM_VARIANT_SERVER" = xtrue; then
7736    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7737fi
7738
7739if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7740    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7741fi
7742
7743if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7744    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7745fi
7746
7747if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7748    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7749fi
7750
7751if test "x$JVM_VARIANT_ZERO" = xtrue; then
7752    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7753fi
7754
7755if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7756    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7757fi
7758
7759HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7760
7761# On Macosx universal binaries are produced, but they only contain
7762# 64 bit intel. This invalidates control of which jvms are built
7763# from configure, but only server is valid anyway. Fix this
7764# when hotspot makefiles are rewritten.
7765if test "x$MACOSX_UNIVERSAL" = xtrue; then
7766    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7767fi
7768
7769#####
7770
7771
7772
7773
7774
7775
7776
7777
7778# With basic setup done, call the custom early hook.
7779
7780
7781# To properly create a configuration name, we need to have the OpenJDK target
7782# and options (variants and debug level) parsed.
7783
7784
7785
7786# Check whether --with-conf-name was given.
7787if test "${with_conf_name+set}" = set; then :
7788  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7789fi
7790
7791
7792# Test from where we are running configure, in or outside of src root.
7793# To enable comparison of directories, CURDIR needs to be symlink free
7794# just like SRC_ROOT already is
7795NOSYM_CURDIR="$CURDIR"
7796
7797    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7798        # Follow a chain of symbolic links. Use readlink
7799        # where it exists, else fall back to horribly
7800        # complicated shell code.
7801        if test "x$READLINK_TESTED" != yes; then
7802            # On MacOSX there is a readlink tool with a different
7803            # purpose than the GNU readlink tool. Check the found readlink.
7804            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7805            if test "x$ISGNU" = x; then
7806                 # A readlink that we do not know how to use.
7807                 # Are there other non-GNU readlinks out there?
7808                 READLINK_TESTED=yes
7809                 READLINK=
7810            fi
7811        fi
7812
7813        if test "x$READLINK" != x; then
7814            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7815        else
7816            # Save the current directory for restoring afterwards
7817            STARTDIR=$PWD
7818            COUNTER=0
7819            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7820            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7821            # Use the system pwd and not the shell builtin to resolve directory symlinks
7822            cd $sym_link_dir
7823            cd `$THEPWDCMD`
7824            sym_link_dir=`$THEPWDCMD`
7825            # Resolve file symlinks
7826            while test $COUNTER -lt 20; do
7827                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7828                if test "x$ISLINK" == x; then
7829                    # This is not a symbolic link! We are done!
7830                    break
7831                fi
7832                # Again resolve directory symlinks since the target of the just found
7833                # link could be in a different directory
7834                cd `$DIRNAME $ISLINK`
7835                sym_link_dir=`$THEPWDCMD`
7836                sym_link_file=`$BASENAME $ISLINK`
7837                let COUNTER=COUNTER+1
7838            done
7839            cd $STARTDIR
7840            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7841        fi
7842    fi
7843
7844if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7845        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7846        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7847    # We are running configure from the src root.
7848    # Create a default ./build/target-variant-debuglevel output root.
7849    if test "x${CONF_NAME}" = x; then
7850        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7851    fi
7852    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7853    $MKDIR -p "$OUTPUT_ROOT"
7854    if test ! -d "$OUTPUT_ROOT"; then
7855        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7856    fi
7857else
7858    # We are running configure from outside of the src dir.
7859    # Then use the current directory as output dir!
7860    # If configuration is situated in normal build directory, just use the build
7861    # directory name as configuration name, otherwise use the complete path.
7862    if test "x${CONF_NAME}" = x; then
7863        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7864    fi
7865    OUTPUT_ROOT="$CURDIR"
7866
7867    # WARNING: This might be a bad thing to do. You need to be sure you want to
7868    # have a configuration in this directory. Do some sanity checks!
7869
7870    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7871      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7872      # other files
7873      files_present=`$LS $OUTPUT_ROOT`
7874      # Configure has already touched config.log and confdefs.h in the current dir when this check
7875      # is performed.
7876      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7877                                             | $TR -d '\n'`
7878      if test "x$filtered_files" != x; then
7879        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7880$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7881        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7882$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7883        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7884$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7885        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7886$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7887        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7888$as_echo "$as_me: seriously mess up just about everything." >&6;}
7889        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
7890$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
7891        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
7892$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
7893        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
7894      fi
7895    fi
7896fi
7897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
7898$as_echo_n "checking what configuration name to use... " >&6; }
7899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
7900$as_echo "$CONF_NAME" >&6; }
7901
7902
7903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7904
7905  # Input might be given as Windows format, start by converting to
7906  # unix format.
7907  path="$OUTPUT_ROOT"
7908  new_path=`$CYGPATH -u "$path"`
7909
7910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7913  # "foo.exe" is OK but "foo" is an error.
7914  #
7915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7916  # It is also a way to make sure we got the proper file name for the real test later on.
7917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7918  if test "x$test_shortpath" = x; then
7919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
7920$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
7921    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
7922  fi
7923
7924  # Call helper function which possibly converts this using DOS-style short mode.
7925  # If so, the updated path is stored in $new_path.
7926
7927  input_path="$new_path"
7928  # Check if we need to convert this using DOS-style short mode. If the path
7929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7930  # take no chances and rewrite it.
7931  # Note: m4 eats our [], so we need to use [ and ] instead.
7932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7933  if test "x$has_forbidden_chars" != x; then
7934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7938      # Going to short mode and back again did indeed matter. Since short mode is
7939      # case insensitive, let's make it lowercase to improve readability.
7940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7941      # Now convert it back to Unix-stile (cygpath)
7942      input_path=`$CYGPATH -u "$shortmode_path"`
7943      new_path="$input_path"
7944    fi
7945  fi
7946
7947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7948  if test "x$test_cygdrive_prefix" = x; then
7949    # As a simple fix, exclude /usr/bin since it's not a real path.
7950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7952      # a path prefixed by /cygdrive for fixpath to work.
7953      new_path="$CYGWIN_ROOT_PATH$input_path"
7954    fi
7955  fi
7956
7957
7958  if test "x$path" != "x$new_path"; then
7959    OUTPUT_ROOT="$new_path"
7960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7961$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
7962  fi
7963
7964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7965
7966  path="$OUTPUT_ROOT"
7967  has_colon=`$ECHO $path | $GREP ^.:`
7968  new_path="$path"
7969  if test "x$has_colon" = x; then
7970    # Not in mixed or Windows style, start by that.
7971    new_path=`cmd //c echo $path`
7972  fi
7973
7974
7975  input_path="$new_path"
7976  # Check if we need to convert this using DOS-style short mode. If the path
7977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7978  # take no chances and rewrite it.
7979  # Note: m4 eats our [], so we need to use [ and ] instead.
7980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7981  if test "x$has_forbidden_chars" != x; then
7982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7984  fi
7985
7986
7987  windows_path="$new_path"
7988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7989    unix_path=`$CYGPATH -u "$windows_path"`
7990    new_path="$unix_path"
7991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7993    new_path="$unix_path"
7994  fi
7995
7996  if test "x$path" != "x$new_path"; then
7997    OUTPUT_ROOT="$new_path"
7998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
7999$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8000  fi
8001
8002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8004
8005  else
8006    # We're on a posix platform. Hooray! :)
8007    path="$OUTPUT_ROOT"
8008
8009    if test ! -f "$path" && test ! -d "$path"; then
8010      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8011    fi
8012
8013    has_space=`$ECHO "$path" | $GREP " "`
8014    if test "x$has_space" != x; then
8015      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8016$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8017      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8018    fi
8019  fi
8020
8021
8022SPEC=$OUTPUT_ROOT/spec.gmk
8023
8024CONF_NAME=$CONF_NAME
8025
8026OUTPUT_ROOT=$OUTPUT_ROOT
8027
8028
8029# Most of the probed defines are put into config.h
8030ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8031
8032# The spec.gmk file contains all variables for the make system.
8033ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8034
8035# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8036ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8037
8038# The bootcycle-spec.gmk file contains support for boot cycle builds.
8039ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8040
8041# The compare.sh is used to compare the build output to other builds.
8042ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8043
8044# Spec.sh is currently used by compare-objects.sh
8045ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8046
8047# The generated Makefile knows where the spec.gmk is and where the source is.
8048# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8049# which will look for generated configurations
8050ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8051
8052
8053# Save the arguments given to us
8054echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8055
8056
8057# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8058
8059    for ac_prog in apt-get yum port pkgutil pkgadd
8060do
8061  # Extract the first word of "$ac_prog", so it can be a program name with args.
8062set dummy $ac_prog; ac_word=$2
8063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8064$as_echo_n "checking for $ac_word... " >&6; }
8065if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8066  $as_echo_n "(cached) " >&6
8067else
8068  if test -n "$PKGHANDLER"; then
8069  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8070else
8071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8072for as_dir in $PATH
8073do
8074  IFS=$as_save_IFS
8075  test -z "$as_dir" && as_dir=.
8076    for ac_exec_ext in '' $ac_executable_extensions; do
8077  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8078    ac_cv_prog_PKGHANDLER="$ac_prog"
8079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8080    break 2
8081  fi
8082done
8083  done
8084IFS=$as_save_IFS
8085
8086fi
8087fi
8088PKGHANDLER=$ac_cv_prog_PKGHANDLER
8089if test -n "$PKGHANDLER"; then
8090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8091$as_echo "$PKGHANDLER" >&6; }
8092else
8093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8094$as_echo "no" >&6; }
8095fi
8096
8097
8098  test -n "$PKGHANDLER" && break
8099done
8100
8101
8102
8103# Setup tools that requires more complex handling, or that is not needed by the configure script.
8104
8105
8106  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8107  if test "x$MAKE" != x; then
8108    # User has supplied a make, test it.
8109    if test ! -f "$MAKE"; then
8110      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8111    fi
8112
8113  MAKE_CANDIDATE=""$MAKE""
8114  DESCRIPTION="user supplied MAKE=$MAKE"
8115  if test "x$MAKE_CANDIDATE" != x; then
8116    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8117$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8118    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8119    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8120    if test "x$IS_GNU_MAKE" = x; then
8121      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8122$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8123    else
8124      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8125      if test "x$IS_MODERN_MAKE" = x; then
8126        { $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
8127$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;}
8128      else
8129        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8130          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8131            MAKE_EXPECTED_ENV='cygwin'
8132          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8133            MAKE_EXPECTED_ENV='msys'
8134          else
8135            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8136          fi
8137          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8138          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8139        else
8140          # Not relevant for non-Windows
8141          IS_MAKE_CORRECT_ENV=true
8142        fi
8143        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8144          { $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
8145$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;}
8146        else
8147          FOUND_MAKE=$MAKE_CANDIDATE
8148
8149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8150
8151  # First separate the path from the arguments. This will split at the first
8152  # space.
8153  complete="$FOUND_MAKE"
8154  path="${complete%% *}"
8155  tmp="$complete EOL"
8156  arguments="${tmp#* }"
8157
8158  # Input might be given as Windows format, start by converting to
8159  # unix format.
8160  new_path=`$CYGPATH -u "$path"`
8161
8162  # Now try to locate executable using which
8163  new_path=`$WHICH "$new_path" 2> /dev/null`
8164  # bat and cmd files are not always considered executable in cygwin causing which
8165  # to not find them
8166  if test "x$new_path" = x \
8167           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8168           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8169    new_path=`$CYGPATH -u "$path"`
8170  fi
8171  if test "x$new_path" = x; then
8172    # Oops. Which didn't find the executable.
8173    # The splitting of arguments from the executable at a space might have been incorrect,
8174    # since paths with space are more likely in Windows. Give it another try with the whole
8175    # argument.
8176    path="$complete"
8177    arguments="EOL"
8178    new_path=`$CYGPATH -u "$path"`
8179    new_path=`$WHICH "$new_path" 2> /dev/null`
8180    # bat and cmd files are not always considered executable in cygwin causing which
8181    # to not find them
8182    if test "x$new_path" = x \
8183             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8184             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8185      new_path=`$CYGPATH -u "$path"`
8186    fi
8187    if test "x$new_path" = x; then
8188      # It's still not found. Now this is an unrecoverable error.
8189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8190$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8191      has_space=`$ECHO "$complete" | $GREP " "`
8192      if test "x$has_space" != x; then
8193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8195      fi
8196      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8197    fi
8198  fi
8199
8200  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8201  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8202  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8203  # "foo.exe" is OK but "foo" is an error.
8204  #
8205  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8206  # It is also a way to make sure we got the proper file name for the real test later on.
8207  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8208  if test "x$test_shortpath" = x; then
8209    # Short path failed, file does not exist as specified.
8210    # Try adding .exe or .cmd
8211    if test -f "${new_path}.exe"; then
8212       input_to_shortpath="${new_path}.exe"
8213    elif test -f "${new_path}.cmd"; then
8214       input_to_shortpath="${new_path}.cmd"
8215    else
8216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8217$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8218      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8219$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8220      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8221    fi
8222  else
8223    input_to_shortpath="$new_path"
8224  fi
8225
8226  # Call helper function which possibly converts this using DOS-style short mode.
8227  # If so, the updated path is stored in $new_path.
8228  new_path="$input_to_shortpath"
8229
8230  input_path="$input_to_shortpath"
8231  # Check if we need to convert this using DOS-style short mode. If the path
8232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8233  # take no chances and rewrite it.
8234  # Note: m4 eats our [], so we need to use [ and ] instead.
8235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8236  if test "x$has_forbidden_chars" != x; then
8237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8241      # Going to short mode and back again did indeed matter. Since short mode is
8242      # case insensitive, let's make it lowercase to improve readability.
8243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8244      # Now convert it back to Unix-stile (cygpath)
8245      input_path=`$CYGPATH -u "$shortmode_path"`
8246      new_path="$input_path"
8247    fi
8248  fi
8249
8250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8251  if test "x$test_cygdrive_prefix" = x; then
8252    # As a simple fix, exclude /usr/bin since it's not a real path.
8253    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8255      # a path prefixed by /cygdrive for fixpath to work.
8256      new_path="$CYGWIN_ROOT_PATH$input_path"
8257    fi
8258  fi
8259
8260  # remove trailing .exe if any
8261  new_path="${new_path/%.exe/}"
8262
8263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8264
8265  # First separate the path from the arguments. This will split at the first
8266  # space.
8267  complete="$FOUND_MAKE"
8268  path="${complete%% *}"
8269  tmp="$complete EOL"
8270  arguments="${tmp#* }"
8271
8272  # Input might be given as Windows format, start by converting to
8273  # unix format.
8274  new_path="$path"
8275
8276  windows_path="$new_path"
8277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8278    unix_path=`$CYGPATH -u "$windows_path"`
8279    new_path="$unix_path"
8280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8282    new_path="$unix_path"
8283  fi
8284
8285
8286  # Now try to locate executable using which
8287  new_path=`$WHICH "$new_path" 2> /dev/null`
8288
8289  if test "x$new_path" = x; then
8290    # Oops. Which didn't find the executable.
8291    # The splitting of arguments from the executable at a space might have been incorrect,
8292    # since paths with space are more likely in Windows. Give it another try with the whole
8293    # argument.
8294    path="$complete"
8295    arguments="EOL"
8296    new_path="$path"
8297
8298  windows_path="$new_path"
8299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8300    unix_path=`$CYGPATH -u "$windows_path"`
8301    new_path="$unix_path"
8302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8304    new_path="$unix_path"
8305  fi
8306
8307
8308    new_path=`$WHICH "$new_path" 2> /dev/null`
8309
8310    if test "x$new_path" = x; then
8311      # It's still not found. Now this is an unrecoverable error.
8312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8313$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8314      has_space=`$ECHO "$complete" | $GREP " "`
8315      if test "x$has_space" != x; then
8316        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8317$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8318      fi
8319      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8320    fi
8321  fi
8322
8323  # Now new_path has a complete unix path to the binary
8324  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8325    # Keep paths in /bin as-is, but remove trailing .exe if any
8326    new_path="${new_path/%.exe/}"
8327    # Do not save /bin paths to all_fixpath_prefixes!
8328  else
8329    # Not in mixed or Windows style, start by that.
8330    new_path=`cmd //c echo $new_path`
8331
8332  input_path="$new_path"
8333  # Check if we need to convert this using DOS-style short mode. If the path
8334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8335  # take no chances and rewrite it.
8336  # Note: m4 eats our [], so we need to use [ and ] instead.
8337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8338  if test "x$has_forbidden_chars" != x; then
8339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8341  fi
8342
8343    # Output is in $new_path
8344
8345  windows_path="$new_path"
8346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8347    unix_path=`$CYGPATH -u "$windows_path"`
8348    new_path="$unix_path"
8349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8351    new_path="$unix_path"
8352  fi
8353
8354    # remove trailing .exe if any
8355    new_path="${new_path/%.exe/}"
8356
8357    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8358    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8359  fi
8360
8361  else
8362    # We're on a posix platform. Hooray! :)
8363    # First separate the path from the arguments. This will split at the first
8364    # space.
8365    complete="$FOUND_MAKE"
8366    path="${complete%% *}"
8367    tmp="$complete EOL"
8368    arguments="${tmp#* }"
8369
8370    # Cannot rely on the command "which" here since it doesn't always work.
8371    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8372    if test -z "$is_absolute_path"; then
8373      # Path to executable is not absolute. Find it.
8374      IFS_save="$IFS"
8375      IFS=:
8376      for p in $PATH; do
8377        if test -f "$p/$path" && test -x "$p/$path"; then
8378          new_path="$p/$path"
8379          break
8380        fi
8381      done
8382      IFS="$IFS_save"
8383    else
8384      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8385$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8386      new_path="$path"
8387    fi
8388
8389    if test "x$new_path" = x; then
8390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8391$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8392        has_space=`$ECHO "$complete" | $GREP " "`
8393        if test "x$has_space" != x; then
8394          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8395$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8396        fi
8397        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8398      fi
8399  fi
8400
8401      # Now join together the path and the arguments once again
8402      if test "x$arguments" != xEOL; then
8403        new_complete="$new_path ${arguments% *}"
8404      else
8405        new_complete="$new_path"
8406      fi
8407
8408  if test "x$complete" != "x$new_complete"; then
8409      FOUND_MAKE="$new_complete"
8410      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8411$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8412    fi
8413
8414        fi
8415      fi
8416    fi
8417  fi
8418
8419    if test "x$FOUND_MAKE" = x; then
8420      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8421    fi
8422  else
8423    # Try our hardest to locate a correct version of GNU make
8424    for ac_prog in gmake
8425do
8426  # Extract the first word of "$ac_prog", so it can be a program name with args.
8427set dummy $ac_prog; ac_word=$2
8428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8429$as_echo_n "checking for $ac_word... " >&6; }
8430if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8431  $as_echo_n "(cached) " >&6
8432else
8433  case $CHECK_GMAKE in
8434  [\\/]* | ?:[\\/]*)
8435  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8436  ;;
8437  *)
8438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8439for as_dir in $PATH
8440do
8441  IFS=$as_save_IFS
8442  test -z "$as_dir" && as_dir=.
8443    for ac_exec_ext in '' $ac_executable_extensions; do
8444  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8445    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8447    break 2
8448  fi
8449done
8450  done
8451IFS=$as_save_IFS
8452
8453  ;;
8454esac
8455fi
8456CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8457if test -n "$CHECK_GMAKE"; then
8458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8459$as_echo "$CHECK_GMAKE" >&6; }
8460else
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8462$as_echo "no" >&6; }
8463fi
8464
8465
8466  test -n "$CHECK_GMAKE" && break
8467done
8468
8469
8470  MAKE_CANDIDATE=""$CHECK_GMAKE""
8471  DESCRIPTION="gmake in PATH"
8472  if test "x$MAKE_CANDIDATE" != x; then
8473    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8474$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8475    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8476    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8477    if test "x$IS_GNU_MAKE" = x; then
8478      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8479$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8480    else
8481      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8482      if test "x$IS_MODERN_MAKE" = x; then
8483        { $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
8484$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;}
8485      else
8486        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8487          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8488            MAKE_EXPECTED_ENV='cygwin'
8489          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8490            MAKE_EXPECTED_ENV='msys'
8491          else
8492            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8493          fi
8494          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8495          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8496        else
8497          # Not relevant for non-Windows
8498          IS_MAKE_CORRECT_ENV=true
8499        fi
8500        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8501          { $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
8502$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;}
8503        else
8504          FOUND_MAKE=$MAKE_CANDIDATE
8505
8506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8507
8508  # First separate the path from the arguments. This will split at the first
8509  # space.
8510  complete="$FOUND_MAKE"
8511  path="${complete%% *}"
8512  tmp="$complete EOL"
8513  arguments="${tmp#* }"
8514
8515  # Input might be given as Windows format, start by converting to
8516  # unix format.
8517  new_path=`$CYGPATH -u "$path"`
8518
8519  # Now try to locate executable using which
8520  new_path=`$WHICH "$new_path" 2> /dev/null`
8521  # bat and cmd files are not always considered executable in cygwin causing which
8522  # to not find them
8523  if test "x$new_path" = x \
8524           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8525           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8526    new_path=`$CYGPATH -u "$path"`
8527  fi
8528  if test "x$new_path" = x; then
8529    # Oops. Which didn't find the executable.
8530    # The splitting of arguments from the executable at a space might have been incorrect,
8531    # since paths with space are more likely in Windows. Give it another try with the whole
8532    # argument.
8533    path="$complete"
8534    arguments="EOL"
8535    new_path=`$CYGPATH -u "$path"`
8536    new_path=`$WHICH "$new_path" 2> /dev/null`
8537    # bat and cmd files are not always considered executable in cygwin causing which
8538    # to not find them
8539    if test "x$new_path" = x \
8540             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8541             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8542      new_path=`$CYGPATH -u "$path"`
8543    fi
8544    if test "x$new_path" = x; then
8545      # It's still not found. Now this is an unrecoverable error.
8546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8547$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8548      has_space=`$ECHO "$complete" | $GREP " "`
8549      if test "x$has_space" != x; then
8550        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8551$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8552      fi
8553      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8554    fi
8555  fi
8556
8557  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8558  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8559  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8560  # "foo.exe" is OK but "foo" is an error.
8561  #
8562  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8563  # It is also a way to make sure we got the proper file name for the real test later on.
8564  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8565  if test "x$test_shortpath" = x; then
8566    # Short path failed, file does not exist as specified.
8567    # Try adding .exe or .cmd
8568    if test -f "${new_path}.exe"; then
8569       input_to_shortpath="${new_path}.exe"
8570    elif test -f "${new_path}.cmd"; then
8571       input_to_shortpath="${new_path}.cmd"
8572    else
8573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8574$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8575      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8576$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8577      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8578    fi
8579  else
8580    input_to_shortpath="$new_path"
8581  fi
8582
8583  # Call helper function which possibly converts this using DOS-style short mode.
8584  # If so, the updated path is stored in $new_path.
8585  new_path="$input_to_shortpath"
8586
8587  input_path="$input_to_shortpath"
8588  # Check if we need to convert this using DOS-style short mode. If the path
8589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8590  # take no chances and rewrite it.
8591  # Note: m4 eats our [], so we need to use [ and ] instead.
8592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8593  if test "x$has_forbidden_chars" != x; then
8594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8595    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8596    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8597    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8598      # Going to short mode and back again did indeed matter. Since short mode is
8599      # case insensitive, let's make it lowercase to improve readability.
8600      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8601      # Now convert it back to Unix-stile (cygpath)
8602      input_path=`$CYGPATH -u "$shortmode_path"`
8603      new_path="$input_path"
8604    fi
8605  fi
8606
8607  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8608  if test "x$test_cygdrive_prefix" = x; then
8609    # As a simple fix, exclude /usr/bin since it's not a real path.
8610    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8611      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8612      # a path prefixed by /cygdrive for fixpath to work.
8613      new_path="$CYGWIN_ROOT_PATH$input_path"
8614    fi
8615  fi
8616
8617  # remove trailing .exe if any
8618  new_path="${new_path/%.exe/}"
8619
8620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8621
8622  # First separate the path from the arguments. This will split at the first
8623  # space.
8624  complete="$FOUND_MAKE"
8625  path="${complete%% *}"
8626  tmp="$complete EOL"
8627  arguments="${tmp#* }"
8628
8629  # Input might be given as Windows format, start by converting to
8630  # unix format.
8631  new_path="$path"
8632
8633  windows_path="$new_path"
8634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8635    unix_path=`$CYGPATH -u "$windows_path"`
8636    new_path="$unix_path"
8637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8639    new_path="$unix_path"
8640  fi
8641
8642
8643  # Now try to locate executable using which
8644  new_path=`$WHICH "$new_path" 2> /dev/null`
8645
8646  if test "x$new_path" = x; then
8647    # Oops. Which didn't find the executable.
8648    # The splitting of arguments from the executable at a space might have been incorrect,
8649    # since paths with space are more likely in Windows. Give it another try with the whole
8650    # argument.
8651    path="$complete"
8652    arguments="EOL"
8653    new_path="$path"
8654
8655  windows_path="$new_path"
8656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8657    unix_path=`$CYGPATH -u "$windows_path"`
8658    new_path="$unix_path"
8659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8661    new_path="$unix_path"
8662  fi
8663
8664
8665    new_path=`$WHICH "$new_path" 2> /dev/null`
8666
8667    if test "x$new_path" = x; then
8668      # It's still not found. Now this is an unrecoverable error.
8669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8670$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8671      has_space=`$ECHO "$complete" | $GREP " "`
8672      if test "x$has_space" != x; then
8673        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8674$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8675      fi
8676      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8677    fi
8678  fi
8679
8680  # Now new_path has a complete unix path to the binary
8681  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8682    # Keep paths in /bin as-is, but remove trailing .exe if any
8683    new_path="${new_path/%.exe/}"
8684    # Do not save /bin paths to all_fixpath_prefixes!
8685  else
8686    # Not in mixed or Windows style, start by that.
8687    new_path=`cmd //c echo $new_path`
8688
8689  input_path="$new_path"
8690  # Check if we need to convert this using DOS-style short mode. If the path
8691  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8692  # take no chances and rewrite it.
8693  # Note: m4 eats our [], so we need to use [ and ] instead.
8694  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8695  if test "x$has_forbidden_chars" != x; then
8696    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8697    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8698  fi
8699
8700    # Output is in $new_path
8701
8702  windows_path="$new_path"
8703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8704    unix_path=`$CYGPATH -u "$windows_path"`
8705    new_path="$unix_path"
8706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8708    new_path="$unix_path"
8709  fi
8710
8711    # remove trailing .exe if any
8712    new_path="${new_path/%.exe/}"
8713
8714    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8715    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8716  fi
8717
8718  else
8719    # We're on a posix platform. Hooray! :)
8720    # First separate the path from the arguments. This will split at the first
8721    # space.
8722    complete="$FOUND_MAKE"
8723    path="${complete%% *}"
8724    tmp="$complete EOL"
8725    arguments="${tmp#* }"
8726
8727    # Cannot rely on the command "which" here since it doesn't always work.
8728    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8729    if test -z "$is_absolute_path"; then
8730      # Path to executable is not absolute. Find it.
8731      IFS_save="$IFS"
8732      IFS=:
8733      for p in $PATH; do
8734        if test -f "$p/$path" && test -x "$p/$path"; then
8735          new_path="$p/$path"
8736          break
8737        fi
8738      done
8739      IFS="$IFS_save"
8740    else
8741      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8742$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8743      new_path="$path"
8744    fi
8745
8746    if test "x$new_path" = x; then
8747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8748$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8749        has_space=`$ECHO "$complete" | $GREP " "`
8750        if test "x$has_space" != x; then
8751          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8752$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8753        fi
8754        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8755      fi
8756  fi
8757
8758      # Now join together the path and the arguments once again
8759      if test "x$arguments" != xEOL; then
8760        new_complete="$new_path ${arguments% *}"
8761      else
8762        new_complete="$new_path"
8763      fi
8764
8765  if test "x$complete" != "x$new_complete"; then
8766      FOUND_MAKE="$new_complete"
8767      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8768$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8769    fi
8770
8771        fi
8772      fi
8773    fi
8774  fi
8775
8776
8777    if test "x$FOUND_MAKE" = x; then
8778      for ac_prog in make
8779do
8780  # Extract the first word of "$ac_prog", so it can be a program name with args.
8781set dummy $ac_prog; ac_word=$2
8782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8783$as_echo_n "checking for $ac_word... " >&6; }
8784if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8785  $as_echo_n "(cached) " >&6
8786else
8787  case $CHECK_MAKE in
8788  [\\/]* | ?:[\\/]*)
8789  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8790  ;;
8791  *)
8792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8793for as_dir in $PATH
8794do
8795  IFS=$as_save_IFS
8796  test -z "$as_dir" && as_dir=.
8797    for ac_exec_ext in '' $ac_executable_extensions; do
8798  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8799    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8801    break 2
8802  fi
8803done
8804  done
8805IFS=$as_save_IFS
8806
8807  ;;
8808esac
8809fi
8810CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8811if test -n "$CHECK_MAKE"; then
8812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8813$as_echo "$CHECK_MAKE" >&6; }
8814else
8815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8816$as_echo "no" >&6; }
8817fi
8818
8819
8820  test -n "$CHECK_MAKE" && break
8821done
8822
8823
8824  MAKE_CANDIDATE=""$CHECK_MAKE""
8825  DESCRIPTION="make in PATH"
8826  if test "x$MAKE_CANDIDATE" != x; then
8827    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8828$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8829    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8830    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8831    if test "x$IS_GNU_MAKE" = x; then
8832      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8833$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8834    else
8835      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8836      if test "x$IS_MODERN_MAKE" = x; then
8837        { $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
8838$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;}
8839      else
8840        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8841          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8842            MAKE_EXPECTED_ENV='cygwin'
8843          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8844            MAKE_EXPECTED_ENV='msys'
8845          else
8846            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8847          fi
8848          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8849          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8850        else
8851          # Not relevant for non-Windows
8852          IS_MAKE_CORRECT_ENV=true
8853        fi
8854        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8855          { $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
8856$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;}
8857        else
8858          FOUND_MAKE=$MAKE_CANDIDATE
8859
8860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8861
8862  # First separate the path from the arguments. This will split at the first
8863  # space.
8864  complete="$FOUND_MAKE"
8865  path="${complete%% *}"
8866  tmp="$complete EOL"
8867  arguments="${tmp#* }"
8868
8869  # Input might be given as Windows format, start by converting to
8870  # unix format.
8871  new_path=`$CYGPATH -u "$path"`
8872
8873  # Now try to locate executable using which
8874  new_path=`$WHICH "$new_path" 2> /dev/null`
8875  # bat and cmd files are not always considered executable in cygwin causing which
8876  # to not find them
8877  if test "x$new_path" = x \
8878           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8879           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8880    new_path=`$CYGPATH -u "$path"`
8881  fi
8882  if test "x$new_path" = x; then
8883    # Oops. Which didn't find the executable.
8884    # The splitting of arguments from the executable at a space might have been incorrect,
8885    # since paths with space are more likely in Windows. Give it another try with the whole
8886    # argument.
8887    path="$complete"
8888    arguments="EOL"
8889    new_path=`$CYGPATH -u "$path"`
8890    new_path=`$WHICH "$new_path" 2> /dev/null`
8891    # bat and cmd files are not always considered executable in cygwin causing which
8892    # to not find them
8893    if test "x$new_path" = x \
8894             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8895             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8896      new_path=`$CYGPATH -u "$path"`
8897    fi
8898    if test "x$new_path" = x; then
8899      # It's still not found. Now this is an unrecoverable error.
8900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8901$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8902      has_space=`$ECHO "$complete" | $GREP " "`
8903      if test "x$has_space" != x; then
8904        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8905$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8906      fi
8907      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8908    fi
8909  fi
8910
8911  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8912  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8913  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8914  # "foo.exe" is OK but "foo" is an error.
8915  #
8916  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8917  # It is also a way to make sure we got the proper file name for the real test later on.
8918  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8919  if test "x$test_shortpath" = x; then
8920    # Short path failed, file does not exist as specified.
8921    # Try adding .exe or .cmd
8922    if test -f "${new_path}.exe"; then
8923       input_to_shortpath="${new_path}.exe"
8924    elif test -f "${new_path}.cmd"; then
8925       input_to_shortpath="${new_path}.cmd"
8926    else
8927      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8928$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8929      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8930$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8931      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8932    fi
8933  else
8934    input_to_shortpath="$new_path"
8935  fi
8936
8937  # Call helper function which possibly converts this using DOS-style short mode.
8938  # If so, the updated path is stored in $new_path.
8939  new_path="$input_to_shortpath"
8940
8941  input_path="$input_to_shortpath"
8942  # Check if we need to convert this using DOS-style short mode. If the path
8943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8944  # take no chances and rewrite it.
8945  # Note: m4 eats our [], so we need to use [ and ] instead.
8946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8947  if test "x$has_forbidden_chars" != x; then
8948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8949    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8950    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8951    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8952      # Going to short mode and back again did indeed matter. Since short mode is
8953      # case insensitive, let's make it lowercase to improve readability.
8954      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8955      # Now convert it back to Unix-stile (cygpath)
8956      input_path=`$CYGPATH -u "$shortmode_path"`
8957      new_path="$input_path"
8958    fi
8959  fi
8960
8961  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8962  if test "x$test_cygdrive_prefix" = x; then
8963    # As a simple fix, exclude /usr/bin since it's not a real path.
8964    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8965      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8966      # a path prefixed by /cygdrive for fixpath to work.
8967      new_path="$CYGWIN_ROOT_PATH$input_path"
8968    fi
8969  fi
8970
8971  # remove trailing .exe if any
8972  new_path="${new_path/%.exe/}"
8973
8974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8975
8976  # First separate the path from the arguments. This will split at the first
8977  # space.
8978  complete="$FOUND_MAKE"
8979  path="${complete%% *}"
8980  tmp="$complete EOL"
8981  arguments="${tmp#* }"
8982
8983  # Input might be given as Windows format, start by converting to
8984  # unix format.
8985  new_path="$path"
8986
8987  windows_path="$new_path"
8988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8989    unix_path=`$CYGPATH -u "$windows_path"`
8990    new_path="$unix_path"
8991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8993    new_path="$unix_path"
8994  fi
8995
8996
8997  # Now try to locate executable using which
8998  new_path=`$WHICH "$new_path" 2> /dev/null`
8999
9000  if test "x$new_path" = x; then
9001    # Oops. Which didn't find the executable.
9002    # The splitting of arguments from the executable at a space might have been incorrect,
9003    # since paths with space are more likely in Windows. Give it another try with the whole
9004    # argument.
9005    path="$complete"
9006    arguments="EOL"
9007    new_path="$path"
9008
9009  windows_path="$new_path"
9010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9011    unix_path=`$CYGPATH -u "$windows_path"`
9012    new_path="$unix_path"
9013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9015    new_path="$unix_path"
9016  fi
9017
9018
9019    new_path=`$WHICH "$new_path" 2> /dev/null`
9020
9021    if test "x$new_path" = x; then
9022      # It's still not found. Now this is an unrecoverable error.
9023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9024$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9025      has_space=`$ECHO "$complete" | $GREP " "`
9026      if test "x$has_space" != x; then
9027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9029      fi
9030      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9031    fi
9032  fi
9033
9034  # Now new_path has a complete unix path to the binary
9035  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9036    # Keep paths in /bin as-is, but remove trailing .exe if any
9037    new_path="${new_path/%.exe/}"
9038    # Do not save /bin paths to all_fixpath_prefixes!
9039  else
9040    # Not in mixed or Windows style, start by that.
9041    new_path=`cmd //c echo $new_path`
9042
9043  input_path="$new_path"
9044  # Check if we need to convert this using DOS-style short mode. If the path
9045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9046  # take no chances and rewrite it.
9047  # Note: m4 eats our [], so we need to use [ and ] instead.
9048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9049  if test "x$has_forbidden_chars" != x; then
9050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9052  fi
9053
9054    # Output is in $new_path
9055
9056  windows_path="$new_path"
9057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9058    unix_path=`$CYGPATH -u "$windows_path"`
9059    new_path="$unix_path"
9060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9062    new_path="$unix_path"
9063  fi
9064
9065    # remove trailing .exe if any
9066    new_path="${new_path/%.exe/}"
9067
9068    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9069    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9070  fi
9071
9072  else
9073    # We're on a posix platform. Hooray! :)
9074    # First separate the path from the arguments. This will split at the first
9075    # space.
9076    complete="$FOUND_MAKE"
9077    path="${complete%% *}"
9078    tmp="$complete EOL"
9079    arguments="${tmp#* }"
9080
9081    # Cannot rely on the command "which" here since it doesn't always work.
9082    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9083    if test -z "$is_absolute_path"; then
9084      # Path to executable is not absolute. Find it.
9085      IFS_save="$IFS"
9086      IFS=:
9087      for p in $PATH; do
9088        if test -f "$p/$path" && test -x "$p/$path"; then
9089          new_path="$p/$path"
9090          break
9091        fi
9092      done
9093      IFS="$IFS_save"
9094    else
9095      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9096$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9097      new_path="$path"
9098    fi
9099
9100    if test "x$new_path" = x; then
9101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9102$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9103        has_space=`$ECHO "$complete" | $GREP " "`
9104        if test "x$has_space" != x; then
9105          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9106$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9107        fi
9108        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9109      fi
9110  fi
9111
9112      # Now join together the path and the arguments once again
9113      if test "x$arguments" != xEOL; then
9114        new_complete="$new_path ${arguments% *}"
9115      else
9116        new_complete="$new_path"
9117      fi
9118
9119  if test "x$complete" != "x$new_complete"; then
9120      FOUND_MAKE="$new_complete"
9121      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9122$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9123    fi
9124
9125        fi
9126      fi
9127    fi
9128  fi
9129
9130    fi
9131
9132    if test "x$FOUND_MAKE" = x; then
9133      if test "x$TOOLS_DIR" != x; then
9134        # We have a tools-dir, check that as well before giving up.
9135        OLD_PATH=$PATH
9136        PATH=$TOOLS_DIR:$PATH
9137        for ac_prog in gmake
9138do
9139  # Extract the first word of "$ac_prog", so it can be a program name with args.
9140set dummy $ac_prog; ac_word=$2
9141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9142$as_echo_n "checking for $ac_word... " >&6; }
9143if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9144  $as_echo_n "(cached) " >&6
9145else
9146  case $CHECK_TOOLSDIR_GMAKE in
9147  [\\/]* | ?:[\\/]*)
9148  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9149  ;;
9150  *)
9151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9152for as_dir in $PATH
9153do
9154  IFS=$as_save_IFS
9155  test -z "$as_dir" && as_dir=.
9156    for ac_exec_ext in '' $ac_executable_extensions; do
9157  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9158    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9160    break 2
9161  fi
9162done
9163  done
9164IFS=$as_save_IFS
9165
9166  ;;
9167esac
9168fi
9169CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9170if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9172$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9173else
9174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9175$as_echo "no" >&6; }
9176fi
9177
9178
9179  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9180done
9181
9182
9183  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9184  DESCRIPTION="gmake in tools-dir"
9185  if test "x$MAKE_CANDIDATE" != x; then
9186    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9187$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9188    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9189    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9190    if test "x$IS_GNU_MAKE" = x; then
9191      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9192$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9193    else
9194      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9195      if test "x$IS_MODERN_MAKE" = x; then
9196        { $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
9197$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;}
9198      else
9199        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9200          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9201            MAKE_EXPECTED_ENV='cygwin'
9202          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9203            MAKE_EXPECTED_ENV='msys'
9204          else
9205            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9206          fi
9207          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9208          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9209        else
9210          # Not relevant for non-Windows
9211          IS_MAKE_CORRECT_ENV=true
9212        fi
9213        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9214          { $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
9215$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;}
9216        else
9217          FOUND_MAKE=$MAKE_CANDIDATE
9218
9219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9220
9221  # First separate the path from the arguments. This will split at the first
9222  # space.
9223  complete="$FOUND_MAKE"
9224  path="${complete%% *}"
9225  tmp="$complete EOL"
9226  arguments="${tmp#* }"
9227
9228  # Input might be given as Windows format, start by converting to
9229  # unix format.
9230  new_path=`$CYGPATH -u "$path"`
9231
9232  # Now try to locate executable using which
9233  new_path=`$WHICH "$new_path" 2> /dev/null`
9234  # bat and cmd files are not always considered executable in cygwin causing which
9235  # to not find them
9236  if test "x$new_path" = x \
9237           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9238           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9239    new_path=`$CYGPATH -u "$path"`
9240  fi
9241  if test "x$new_path" = x; then
9242    # Oops. Which didn't find the executable.
9243    # The splitting of arguments from the executable at a space might have been incorrect,
9244    # since paths with space are more likely in Windows. Give it another try with the whole
9245    # argument.
9246    path="$complete"
9247    arguments="EOL"
9248    new_path=`$CYGPATH -u "$path"`
9249    new_path=`$WHICH "$new_path" 2> /dev/null`
9250    # bat and cmd files are not always considered executable in cygwin causing which
9251    # to not find them
9252    if test "x$new_path" = x \
9253             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9254             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9255      new_path=`$CYGPATH -u "$path"`
9256    fi
9257    if test "x$new_path" = x; then
9258      # It's still not found. Now this is an unrecoverable error.
9259      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9260$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9261      has_space=`$ECHO "$complete" | $GREP " "`
9262      if test "x$has_space" != x; then
9263        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9264$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9265      fi
9266      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9267    fi
9268  fi
9269
9270  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9271  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9272  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9273  # "foo.exe" is OK but "foo" is an error.
9274  #
9275  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9276  # It is also a way to make sure we got the proper file name for the real test later on.
9277  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9278  if test "x$test_shortpath" = x; then
9279    # Short path failed, file does not exist as specified.
9280    # Try adding .exe or .cmd
9281    if test -f "${new_path}.exe"; then
9282       input_to_shortpath="${new_path}.exe"
9283    elif test -f "${new_path}.cmd"; then
9284       input_to_shortpath="${new_path}.cmd"
9285    else
9286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9287$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9288      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9289$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9290      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9291    fi
9292  else
9293    input_to_shortpath="$new_path"
9294  fi
9295
9296  # Call helper function which possibly converts this using DOS-style short mode.
9297  # If so, the updated path is stored in $new_path.
9298  new_path="$input_to_shortpath"
9299
9300  input_path="$input_to_shortpath"
9301  # Check if we need to convert this using DOS-style short mode. If the path
9302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9303  # take no chances and rewrite it.
9304  # Note: m4 eats our [], so we need to use [ and ] instead.
9305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9306  if test "x$has_forbidden_chars" != x; then
9307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9311      # Going to short mode and back again did indeed matter. Since short mode is
9312      # case insensitive, let's make it lowercase to improve readability.
9313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9314      # Now convert it back to Unix-stile (cygpath)
9315      input_path=`$CYGPATH -u "$shortmode_path"`
9316      new_path="$input_path"
9317    fi
9318  fi
9319
9320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9321  if test "x$test_cygdrive_prefix" = x; then
9322    # As a simple fix, exclude /usr/bin since it's not a real path.
9323    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9325      # a path prefixed by /cygdrive for fixpath to work.
9326      new_path="$CYGWIN_ROOT_PATH$input_path"
9327    fi
9328  fi
9329
9330  # remove trailing .exe if any
9331  new_path="${new_path/%.exe/}"
9332
9333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9334
9335  # First separate the path from the arguments. This will split at the first
9336  # space.
9337  complete="$FOUND_MAKE"
9338  path="${complete%% *}"
9339  tmp="$complete EOL"
9340  arguments="${tmp#* }"
9341
9342  # Input might be given as Windows format, start by converting to
9343  # unix format.
9344  new_path="$path"
9345
9346  windows_path="$new_path"
9347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9348    unix_path=`$CYGPATH -u "$windows_path"`
9349    new_path="$unix_path"
9350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9352    new_path="$unix_path"
9353  fi
9354
9355
9356  # Now try to locate executable using which
9357  new_path=`$WHICH "$new_path" 2> /dev/null`
9358
9359  if test "x$new_path" = x; then
9360    # Oops. Which didn't find the executable.
9361    # The splitting of arguments from the executable at a space might have been incorrect,
9362    # since paths with space are more likely in Windows. Give it another try with the whole
9363    # argument.
9364    path="$complete"
9365    arguments="EOL"
9366    new_path="$path"
9367
9368  windows_path="$new_path"
9369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9370    unix_path=`$CYGPATH -u "$windows_path"`
9371    new_path="$unix_path"
9372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9374    new_path="$unix_path"
9375  fi
9376
9377
9378    new_path=`$WHICH "$new_path" 2> /dev/null`
9379
9380    if test "x$new_path" = x; then
9381      # It's still not found. Now this is an unrecoverable error.
9382      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9383$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9384      has_space=`$ECHO "$complete" | $GREP " "`
9385      if test "x$has_space" != x; then
9386        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9387$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9388      fi
9389      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9390    fi
9391  fi
9392
9393  # Now new_path has a complete unix path to the binary
9394  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9395    # Keep paths in /bin as-is, but remove trailing .exe if any
9396    new_path="${new_path/%.exe/}"
9397    # Do not save /bin paths to all_fixpath_prefixes!
9398  else
9399    # Not in mixed or Windows style, start by that.
9400    new_path=`cmd //c echo $new_path`
9401
9402  input_path="$new_path"
9403  # Check if we need to convert this using DOS-style short mode. If the path
9404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9405  # take no chances and rewrite it.
9406  # Note: m4 eats our [], so we need to use [ and ] instead.
9407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9408  if test "x$has_forbidden_chars" != x; then
9409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9411  fi
9412
9413    # Output is in $new_path
9414
9415  windows_path="$new_path"
9416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9417    unix_path=`$CYGPATH -u "$windows_path"`
9418    new_path="$unix_path"
9419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9421    new_path="$unix_path"
9422  fi
9423
9424    # remove trailing .exe if any
9425    new_path="${new_path/%.exe/}"
9426
9427    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9428    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9429  fi
9430
9431  else
9432    # We're on a posix platform. Hooray! :)
9433    # First separate the path from the arguments. This will split at the first
9434    # space.
9435    complete="$FOUND_MAKE"
9436    path="${complete%% *}"
9437    tmp="$complete EOL"
9438    arguments="${tmp#* }"
9439
9440    # Cannot rely on the command "which" here since it doesn't always work.
9441    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9442    if test -z "$is_absolute_path"; then
9443      # Path to executable is not absolute. Find it.
9444      IFS_save="$IFS"
9445      IFS=:
9446      for p in $PATH; do
9447        if test -f "$p/$path" && test -x "$p/$path"; then
9448          new_path="$p/$path"
9449          break
9450        fi
9451      done
9452      IFS="$IFS_save"
9453    else
9454      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9455$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9456      new_path="$path"
9457    fi
9458
9459    if test "x$new_path" = x; then
9460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9461$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9462        has_space=`$ECHO "$complete" | $GREP " "`
9463        if test "x$has_space" != x; then
9464          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9465$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9466        fi
9467        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9468      fi
9469  fi
9470
9471      # Now join together the path and the arguments once again
9472      if test "x$arguments" != xEOL; then
9473        new_complete="$new_path ${arguments% *}"
9474      else
9475        new_complete="$new_path"
9476      fi
9477
9478  if test "x$complete" != "x$new_complete"; then
9479      FOUND_MAKE="$new_complete"
9480      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9481$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9482    fi
9483
9484        fi
9485      fi
9486    fi
9487  fi
9488
9489        if test "x$FOUND_MAKE" = x; then
9490          for ac_prog in make
9491do
9492  # Extract the first word of "$ac_prog", so it can be a program name with args.
9493set dummy $ac_prog; ac_word=$2
9494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9495$as_echo_n "checking for $ac_word... " >&6; }
9496if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9497  $as_echo_n "(cached) " >&6
9498else
9499  case $CHECK_TOOLSDIR_MAKE in
9500  [\\/]* | ?:[\\/]*)
9501  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9502  ;;
9503  *)
9504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9505for as_dir in $PATH
9506do
9507  IFS=$as_save_IFS
9508  test -z "$as_dir" && as_dir=.
9509    for ac_exec_ext in '' $ac_executable_extensions; do
9510  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9511    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9513    break 2
9514  fi
9515done
9516  done
9517IFS=$as_save_IFS
9518
9519  ;;
9520esac
9521fi
9522CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9523if test -n "$CHECK_TOOLSDIR_MAKE"; then
9524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9525$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9526else
9527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9528$as_echo "no" >&6; }
9529fi
9530
9531
9532  test -n "$CHECK_TOOLSDIR_MAKE" && break
9533done
9534
9535
9536  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9537  DESCRIPTION="make in tools-dir"
9538  if test "x$MAKE_CANDIDATE" != x; then
9539    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9540$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9541    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9542    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9543    if test "x$IS_GNU_MAKE" = x; then
9544      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9545$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9546    else
9547      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9548      if test "x$IS_MODERN_MAKE" = x; then
9549        { $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
9550$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;}
9551      else
9552        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9553          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9554            MAKE_EXPECTED_ENV='cygwin'
9555          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9556            MAKE_EXPECTED_ENV='msys'
9557          else
9558            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9559          fi
9560          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9561          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9562        else
9563          # Not relevant for non-Windows
9564          IS_MAKE_CORRECT_ENV=true
9565        fi
9566        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9567          { $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
9568$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;}
9569        else
9570          FOUND_MAKE=$MAKE_CANDIDATE
9571
9572  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9573
9574  # First separate the path from the arguments. This will split at the first
9575  # space.
9576  complete="$FOUND_MAKE"
9577  path="${complete%% *}"
9578  tmp="$complete EOL"
9579  arguments="${tmp#* }"
9580
9581  # Input might be given as Windows format, start by converting to
9582  # unix format.
9583  new_path=`$CYGPATH -u "$path"`
9584
9585  # Now try to locate executable using which
9586  new_path=`$WHICH "$new_path" 2> /dev/null`
9587  # bat and cmd files are not always considered executable in cygwin causing which
9588  # to not find them
9589  if test "x$new_path" = x \
9590           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9591           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9592    new_path=`$CYGPATH -u "$path"`
9593  fi
9594  if test "x$new_path" = x; then
9595    # Oops. Which didn't find the executable.
9596    # The splitting of arguments from the executable at a space might have been incorrect,
9597    # since paths with space are more likely in Windows. Give it another try with the whole
9598    # argument.
9599    path="$complete"
9600    arguments="EOL"
9601    new_path=`$CYGPATH -u "$path"`
9602    new_path=`$WHICH "$new_path" 2> /dev/null`
9603    # bat and cmd files are not always considered executable in cygwin causing which
9604    # to not find them
9605    if test "x$new_path" = x \
9606             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9607             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9608      new_path=`$CYGPATH -u "$path"`
9609    fi
9610    if test "x$new_path" = x; then
9611      # It's still not found. Now this is an unrecoverable error.
9612      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9613$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9614      has_space=`$ECHO "$complete" | $GREP " "`
9615      if test "x$has_space" != x; then
9616        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9617$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9618      fi
9619      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9620    fi
9621  fi
9622
9623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9626  # "foo.exe" is OK but "foo" is an error.
9627  #
9628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9629  # It is also a way to make sure we got the proper file name for the real test later on.
9630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9631  if test "x$test_shortpath" = x; then
9632    # Short path failed, file does not exist as specified.
9633    # Try adding .exe or .cmd
9634    if test -f "${new_path}.exe"; then
9635       input_to_shortpath="${new_path}.exe"
9636    elif test -f "${new_path}.cmd"; then
9637       input_to_shortpath="${new_path}.cmd"
9638    else
9639      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9640$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9641      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9642$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9643      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9644    fi
9645  else
9646    input_to_shortpath="$new_path"
9647  fi
9648
9649  # Call helper function which possibly converts this using DOS-style short mode.
9650  # If so, the updated path is stored in $new_path.
9651  new_path="$input_to_shortpath"
9652
9653  input_path="$input_to_shortpath"
9654  # Check if we need to convert this using DOS-style short mode. If the path
9655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9656  # take no chances and rewrite it.
9657  # Note: m4 eats our [], so we need to use [ and ] instead.
9658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9659  if test "x$has_forbidden_chars" != x; then
9660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9661    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9662    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9663    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9664      # Going to short mode and back again did indeed matter. Since short mode is
9665      # case insensitive, let's make it lowercase to improve readability.
9666      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9667      # Now convert it back to Unix-stile (cygpath)
9668      input_path=`$CYGPATH -u "$shortmode_path"`
9669      new_path="$input_path"
9670    fi
9671  fi
9672
9673  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9674  if test "x$test_cygdrive_prefix" = x; then
9675    # As a simple fix, exclude /usr/bin since it's not a real path.
9676    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9677      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9678      # a path prefixed by /cygdrive for fixpath to work.
9679      new_path="$CYGWIN_ROOT_PATH$input_path"
9680    fi
9681  fi
9682
9683  # remove trailing .exe if any
9684  new_path="${new_path/%.exe/}"
9685
9686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9687
9688  # First separate the path from the arguments. This will split at the first
9689  # space.
9690  complete="$FOUND_MAKE"
9691  path="${complete%% *}"
9692  tmp="$complete EOL"
9693  arguments="${tmp#* }"
9694
9695  # Input might be given as Windows format, start by converting to
9696  # unix format.
9697  new_path="$path"
9698
9699  windows_path="$new_path"
9700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9701    unix_path=`$CYGPATH -u "$windows_path"`
9702    new_path="$unix_path"
9703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9705    new_path="$unix_path"
9706  fi
9707
9708
9709  # Now try to locate executable using which
9710  new_path=`$WHICH "$new_path" 2> /dev/null`
9711
9712  if test "x$new_path" = x; then
9713    # Oops. Which didn't find the executable.
9714    # The splitting of arguments from the executable at a space might have been incorrect,
9715    # since paths with space are more likely in Windows. Give it another try with the whole
9716    # argument.
9717    path="$complete"
9718    arguments="EOL"
9719    new_path="$path"
9720
9721  windows_path="$new_path"
9722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9723    unix_path=`$CYGPATH -u "$windows_path"`
9724    new_path="$unix_path"
9725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9727    new_path="$unix_path"
9728  fi
9729
9730
9731    new_path=`$WHICH "$new_path" 2> /dev/null`
9732
9733    if test "x$new_path" = x; then
9734      # It's still not found. Now this is an unrecoverable error.
9735      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9736$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9737      has_space=`$ECHO "$complete" | $GREP " "`
9738      if test "x$has_space" != x; then
9739        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9740$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9741      fi
9742      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9743    fi
9744  fi
9745
9746  # Now new_path has a complete unix path to the binary
9747  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9748    # Keep paths in /bin as-is, but remove trailing .exe if any
9749    new_path="${new_path/%.exe/}"
9750    # Do not save /bin paths to all_fixpath_prefixes!
9751  else
9752    # Not in mixed or Windows style, start by that.
9753    new_path=`cmd //c echo $new_path`
9754
9755  input_path="$new_path"
9756  # Check if we need to convert this using DOS-style short mode. If the path
9757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9758  # take no chances and rewrite it.
9759  # Note: m4 eats our [], so we need to use [ and ] instead.
9760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9761  if test "x$has_forbidden_chars" != x; then
9762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9763    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9764  fi
9765
9766    # Output is in $new_path
9767
9768  windows_path="$new_path"
9769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9770    unix_path=`$CYGPATH -u "$windows_path"`
9771    new_path="$unix_path"
9772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9774    new_path="$unix_path"
9775  fi
9776
9777    # remove trailing .exe if any
9778    new_path="${new_path/%.exe/}"
9779
9780    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9781    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9782  fi
9783
9784  else
9785    # We're on a posix platform. Hooray! :)
9786    # First separate the path from the arguments. This will split at the first
9787    # space.
9788    complete="$FOUND_MAKE"
9789    path="${complete%% *}"
9790    tmp="$complete EOL"
9791    arguments="${tmp#* }"
9792
9793    # Cannot rely on the command "which" here since it doesn't always work.
9794    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9795    if test -z "$is_absolute_path"; then
9796      # Path to executable is not absolute. Find it.
9797      IFS_save="$IFS"
9798      IFS=:
9799      for p in $PATH; do
9800        if test -f "$p/$path" && test -x "$p/$path"; then
9801          new_path="$p/$path"
9802          break
9803        fi
9804      done
9805      IFS="$IFS_save"
9806    else
9807      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9808$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9809      new_path="$path"
9810    fi
9811
9812    if test "x$new_path" = x; then
9813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9815        has_space=`$ECHO "$complete" | $GREP " "`
9816        if test "x$has_space" != x; then
9817          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9818$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9819        fi
9820        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9821      fi
9822  fi
9823
9824      # Now join together the path and the arguments once again
9825      if test "x$arguments" != xEOL; then
9826        new_complete="$new_path ${arguments% *}"
9827      else
9828        new_complete="$new_path"
9829      fi
9830
9831  if test "x$complete" != "x$new_complete"; then
9832      FOUND_MAKE="$new_complete"
9833      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9834$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9835    fi
9836
9837        fi
9838      fi
9839    fi
9840  fi
9841
9842        fi
9843        PATH=$OLD_PATH
9844      fi
9845    fi
9846
9847    if test "x$FOUND_MAKE" = x; then
9848      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
9849    fi
9850  fi
9851
9852  MAKE=$FOUND_MAKE
9853
9854  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9855$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9856
9857
9858
9859    # Test if find supports -delete
9860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9861$as_echo_n "checking if find supports -delete... " >&6; }
9862    FIND_DELETE="-delete"
9863
9864    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9865
9866    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9867
9868    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9869    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9870        # No, it does not.
9871        rm $DELETEDIR/TestIfFindSupportsDelete
9872        FIND_DELETE="-exec rm \{\} \+"
9873        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9874$as_echo "no" >&6; }
9875    else
9876        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9877$as_echo "yes" >&6; }
9878    fi
9879    rmdir $DELETEDIR
9880
9881
9882
9883# These tools might not be installed by default,
9884# need hint on how to install them.
9885
9886    for ac_prog in unzip
9887do
9888  # Extract the first word of "$ac_prog", so it can be a program name with args.
9889set dummy $ac_prog; ac_word=$2
9890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9891$as_echo_n "checking for $ac_word... " >&6; }
9892if test "${ac_cv_path_UNZIP+set}" = set; then :
9893  $as_echo_n "(cached) " >&6
9894else
9895  case $UNZIP in
9896  [\\/]* | ?:[\\/]*)
9897  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
9898  ;;
9899  *)
9900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9901for as_dir in $PATH
9902do
9903  IFS=$as_save_IFS
9904  test -z "$as_dir" && as_dir=.
9905    for ac_exec_ext in '' $ac_executable_extensions; do
9906  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9907    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
9908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9909    break 2
9910  fi
9911done
9912  done
9913IFS=$as_save_IFS
9914
9915  ;;
9916esac
9917fi
9918UNZIP=$ac_cv_path_UNZIP
9919if test -n "$UNZIP"; then
9920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
9921$as_echo "$UNZIP" >&6; }
9922else
9923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9924$as_echo "no" >&6; }
9925fi
9926
9927
9928  test -n "$UNZIP" && break
9929done
9930
9931
9932    if test "x$UNZIP" = x; then
9933        if test "xunzip" = x; then
9934          PROG_NAME=unzip
9935        else
9936          PROG_NAME=unzip
9937        fi
9938        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9939$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9940        as_fn_error $? "Cannot continue" "$LINENO" 5
9941    fi
9942
9943
9944
9945    for ac_prog in zip
9946do
9947  # Extract the first word of "$ac_prog", so it can be a program name with args.
9948set dummy $ac_prog; ac_word=$2
9949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9950$as_echo_n "checking for $ac_word... " >&6; }
9951if test "${ac_cv_path_ZIP+set}" = set; then :
9952  $as_echo_n "(cached) " >&6
9953else
9954  case $ZIP in
9955  [\\/]* | ?:[\\/]*)
9956  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
9957  ;;
9958  *)
9959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9960for as_dir in $PATH
9961do
9962  IFS=$as_save_IFS
9963  test -z "$as_dir" && as_dir=.
9964    for ac_exec_ext in '' $ac_executable_extensions; do
9965  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9966    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
9967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9968    break 2
9969  fi
9970done
9971  done
9972IFS=$as_save_IFS
9973
9974  ;;
9975esac
9976fi
9977ZIP=$ac_cv_path_ZIP
9978if test -n "$ZIP"; then
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
9980$as_echo "$ZIP" >&6; }
9981else
9982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
9984fi
9985
9986
9987  test -n "$ZIP" && break
9988done
9989
9990
9991    if test "x$ZIP" = x; then
9992        if test "xzip" = x; then
9993          PROG_NAME=zip
9994        else
9995          PROG_NAME=zip
9996        fi
9997        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
9998$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
9999        as_fn_error $? "Cannot continue" "$LINENO" 5
10000    fi
10001
10002
10003
10004# Non-required basic tools
10005
10006# Extract the first word of "ldd", so it can be a program name with args.
10007set dummy ldd; ac_word=$2
10008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10009$as_echo_n "checking for $ac_word... " >&6; }
10010if test "${ac_cv_path_LDD+set}" = set; then :
10011  $as_echo_n "(cached) " >&6
10012else
10013  case $LDD in
10014  [\\/]* | ?:[\\/]*)
10015  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10016  ;;
10017  *)
10018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10019for as_dir in $PATH
10020do
10021  IFS=$as_save_IFS
10022  test -z "$as_dir" && as_dir=.
10023    for ac_exec_ext in '' $ac_executable_extensions; do
10024  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10025    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10027    break 2
10028  fi
10029done
10030  done
10031IFS=$as_save_IFS
10032
10033  ;;
10034esac
10035fi
10036LDD=$ac_cv_path_LDD
10037if test -n "$LDD"; then
10038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10039$as_echo "$LDD" >&6; }
10040else
10041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10042$as_echo "no" >&6; }
10043fi
10044
10045
10046if test "x$LDD" = "x"; then
10047    # List shared lib dependencies is used for
10048    # debug output and checking for forbidden dependencies.
10049    # We can build without it.
10050    LDD="true"
10051fi
10052# Extract the first word of "otool", so it can be a program name with args.
10053set dummy otool; ac_word=$2
10054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10055$as_echo_n "checking for $ac_word... " >&6; }
10056if test "${ac_cv_path_OTOOL+set}" = set; then :
10057  $as_echo_n "(cached) " >&6
10058else
10059  case $OTOOL in
10060  [\\/]* | ?:[\\/]*)
10061  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10062  ;;
10063  *)
10064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10065for as_dir in $PATH
10066do
10067  IFS=$as_save_IFS
10068  test -z "$as_dir" && as_dir=.
10069    for ac_exec_ext in '' $ac_executable_extensions; do
10070  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10071    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10073    break 2
10074  fi
10075done
10076  done
10077IFS=$as_save_IFS
10078
10079  ;;
10080esac
10081fi
10082OTOOL=$ac_cv_path_OTOOL
10083if test -n "$OTOOL"; then
10084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10085$as_echo "$OTOOL" >&6; }
10086else
10087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10088$as_echo "no" >&6; }
10089fi
10090
10091
10092if test "x$OTOOL" = "x"; then
10093   OTOOL="true"
10094fi
10095for ac_prog in readelf greadelf
10096do
10097  # Extract the first word of "$ac_prog", so it can be a program name with args.
10098set dummy $ac_prog; ac_word=$2
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10100$as_echo_n "checking for $ac_word... " >&6; }
10101if test "${ac_cv_path_READELF+set}" = set; then :
10102  $as_echo_n "(cached) " >&6
10103else
10104  case $READELF in
10105  [\\/]* | ?:[\\/]*)
10106  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10107  ;;
10108  *)
10109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10110for as_dir in $PATH
10111do
10112  IFS=$as_save_IFS
10113  test -z "$as_dir" && as_dir=.
10114    for ac_exec_ext in '' $ac_executable_extensions; do
10115  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10116    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10118    break 2
10119  fi
10120done
10121  done
10122IFS=$as_save_IFS
10123
10124  ;;
10125esac
10126fi
10127READELF=$ac_cv_path_READELF
10128if test -n "$READELF"; then
10129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10130$as_echo "$READELF" >&6; }
10131else
10132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
10134fi
10135
10136
10137  test -n "$READELF" && break
10138done
10139
10140# Extract the first word of "hg", so it can be a program name with args.
10141set dummy hg; ac_word=$2
10142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10143$as_echo_n "checking for $ac_word... " >&6; }
10144if test "${ac_cv_path_HG+set}" = set; then :
10145  $as_echo_n "(cached) " >&6
10146else
10147  case $HG in
10148  [\\/]* | ?:[\\/]*)
10149  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10150  ;;
10151  *)
10152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10153for as_dir in $PATH
10154do
10155  IFS=$as_save_IFS
10156  test -z "$as_dir" && as_dir=.
10157    for ac_exec_ext in '' $ac_executable_extensions; do
10158  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10159    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10161    break 2
10162  fi
10163done
10164  done
10165IFS=$as_save_IFS
10166
10167  ;;
10168esac
10169fi
10170HG=$ac_cv_path_HG
10171if test -n "$HG"; then
10172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10173$as_echo "$HG" >&6; }
10174else
10175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10176$as_echo "no" >&6; }
10177fi
10178
10179
10180# Extract the first word of "stat", so it can be a program name with args.
10181set dummy stat; ac_word=$2
10182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10183$as_echo_n "checking for $ac_word... " >&6; }
10184if test "${ac_cv_path_STAT+set}" = set; then :
10185  $as_echo_n "(cached) " >&6
10186else
10187  case $STAT in
10188  [\\/]* | ?:[\\/]*)
10189  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10190  ;;
10191  *)
10192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10193for as_dir in $PATH
10194do
10195  IFS=$as_save_IFS
10196  test -z "$as_dir" && as_dir=.
10197    for ac_exec_ext in '' $ac_executable_extensions; do
10198  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10199    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10201    break 2
10202  fi
10203done
10204  done
10205IFS=$as_save_IFS
10206
10207  ;;
10208esac
10209fi
10210STAT=$ac_cv_path_STAT
10211if test -n "$STAT"; then
10212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10213$as_echo "$STAT" >&6; }
10214else
10215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10216$as_echo "no" >&6; }
10217fi
10218
10219
10220# Extract the first word of "time", so it can be a program name with args.
10221set dummy time; ac_word=$2
10222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10223$as_echo_n "checking for $ac_word... " >&6; }
10224if test "${ac_cv_path_TIME+set}" = set; then :
10225  $as_echo_n "(cached) " >&6
10226else
10227  case $TIME in
10228  [\\/]* | ?:[\\/]*)
10229  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10230  ;;
10231  *)
10232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10233for as_dir in $PATH
10234do
10235  IFS=$as_save_IFS
10236  test -z "$as_dir" && as_dir=.
10237    for ac_exec_ext in '' $ac_executable_extensions; do
10238  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10239    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10241    break 2
10242  fi
10243done
10244  done
10245IFS=$as_save_IFS
10246
10247  ;;
10248esac
10249fi
10250TIME=$ac_cv_path_TIME
10251if test -n "$TIME"; then
10252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10253$as_echo "$TIME" >&6; }
10254else
10255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10256$as_echo "no" >&6; }
10257fi
10258
10259
10260
10261if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10262
10263    for ac_prog in comm
10264do
10265  # Extract the first word of "$ac_prog", so it can be a program name with args.
10266set dummy $ac_prog; ac_word=$2
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10268$as_echo_n "checking for $ac_word... " >&6; }
10269if test "${ac_cv_path_COMM+set}" = set; then :
10270  $as_echo_n "(cached) " >&6
10271else
10272  case $COMM in
10273  [\\/]* | ?:[\\/]*)
10274  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10275  ;;
10276  *)
10277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10278for as_dir in $PATH
10279do
10280  IFS=$as_save_IFS
10281  test -z "$as_dir" && as_dir=.
10282    for ac_exec_ext in '' $ac_executable_extensions; do
10283  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10284    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10286    break 2
10287  fi
10288done
10289  done
10290IFS=$as_save_IFS
10291
10292  ;;
10293esac
10294fi
10295COMM=$ac_cv_path_COMM
10296if test -n "$COMM"; then
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10298$as_echo "$COMM" >&6; }
10299else
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
10302fi
10303
10304
10305  test -n "$COMM" && break
10306done
10307
10308
10309    if test "x$COMM" = x; then
10310        if test "xcomm" = x; then
10311          PROG_NAME=comm
10312        else
10313          PROG_NAME=comm
10314        fi
10315        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10316$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10317        as_fn_error $? "Cannot continue" "$LINENO" 5
10318    fi
10319
10320
10321fi
10322
10323
10324# Check if pkg-config is available.
10325
10326
10327if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10328	if test -n "$ac_tool_prefix"; then
10329  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10330set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10332$as_echo_n "checking for $ac_word... " >&6; }
10333if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10334  $as_echo_n "(cached) " >&6
10335else
10336  case $PKG_CONFIG in
10337  [\\/]* | ?:[\\/]*)
10338  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10339  ;;
10340  *)
10341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10342for as_dir in $PATH
10343do
10344  IFS=$as_save_IFS
10345  test -z "$as_dir" && as_dir=.
10346    for ac_exec_ext in '' $ac_executable_extensions; do
10347  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10348    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10350    break 2
10351  fi
10352done
10353  done
10354IFS=$as_save_IFS
10355
10356  ;;
10357esac
10358fi
10359PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10360if test -n "$PKG_CONFIG"; then
10361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10362$as_echo "$PKG_CONFIG" >&6; }
10363else
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10365$as_echo "no" >&6; }
10366fi
10367
10368
10369fi
10370if test -z "$ac_cv_path_PKG_CONFIG"; then
10371  ac_pt_PKG_CONFIG=$PKG_CONFIG
10372  # Extract the first word of "pkg-config", so it can be a program name with args.
10373set dummy pkg-config; ac_word=$2
10374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10375$as_echo_n "checking for $ac_word... " >&6; }
10376if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10377  $as_echo_n "(cached) " >&6
10378else
10379  case $ac_pt_PKG_CONFIG in
10380  [\\/]* | ?:[\\/]*)
10381  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10382  ;;
10383  *)
10384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10385for as_dir in $PATH
10386do
10387  IFS=$as_save_IFS
10388  test -z "$as_dir" && as_dir=.
10389    for ac_exec_ext in '' $ac_executable_extensions; do
10390  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10391    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10393    break 2
10394  fi
10395done
10396  done
10397IFS=$as_save_IFS
10398
10399  ;;
10400esac
10401fi
10402ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10403if test -n "$ac_pt_PKG_CONFIG"; then
10404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10405$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10406else
10407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10408$as_echo "no" >&6; }
10409fi
10410
10411  if test "x$ac_pt_PKG_CONFIG" = x; then
10412    PKG_CONFIG=""
10413  else
10414    case $cross_compiling:$ac_tool_warned in
10415yes:)
10416{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10417$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10418ac_tool_warned=yes ;;
10419esac
10420    PKG_CONFIG=$ac_pt_PKG_CONFIG
10421  fi
10422else
10423  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10424fi
10425
10426fi
10427if test -n "$PKG_CONFIG"; then
10428	_pkg_min_version=0.9.0
10429	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10430$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10431	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10432		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10433$as_echo "yes" >&6; }
10434	else
10435		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10436$as_echo "no" >&6; }
10437		PKG_CONFIG=""
10438	fi
10439
10440fi
10441
10442# After basic tools have been setup, we can check build os specific details.
10443
10444###############################################################################
10445
10446# Note that this is the build platform OS version!
10447
10448OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10449OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10450OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10451OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10452
10453
10454
10455
10456
10457# Setup builddeps, for automatic downloading of tools we need.
10458# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10459# boot-jdk setup, but we need to have basic tools setup first.
10460
10461
10462# Check whether --with-builddeps-conf was given.
10463if test "${with_builddeps_conf+set}" = set; then :
10464  withval=$with_builddeps_conf;
10465fi
10466
10467
10468
10469# Check whether --with-builddeps-server was given.
10470if test "${with_builddeps_server+set}" = set; then :
10471  withval=$with_builddeps_server;
10472fi
10473
10474
10475
10476# Check whether --with-builddeps-dir was given.
10477if test "${with_builddeps_dir+set}" = set; then :
10478  withval=$with_builddeps_dir;
10479else
10480  with_builddeps_dir=/localhome/builddeps
10481fi
10482
10483
10484
10485# Check whether --with-builddeps-group was given.
10486if test "${with_builddeps_group+set}" = set; then :
10487  withval=$with_builddeps_group;
10488fi
10489
10490
10491
10492
10493    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10494        if test "x$with_builddeps_conf" != x; then
10495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10496$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10497            builddepsfile=$with_builddeps_conf
10498            if test -s $builddepsfile; then
10499                . $builddepsfile
10500                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10501$as_echo "loaded!" >&6; }
10502            else
10503               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10504           fi
10505        else
10506            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10507$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10508            builddepsfile=`mktemp`
10509            touch $builddepsfile
10510            # Put all found confs into a single file.
10511            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10512            # Source the file to acquire the variables
10513            if test -s $builddepsfile; then
10514                . $builddepsfile
10515                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10516$as_echo "found at least one!" >&6; }
10517            else
10518               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10519           fi
10520        fi
10521        # Create build and target names that use _ instead of "-" and ".".
10522        # This is necessary to use them in variable names.
10523        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10524        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10525        # Extract rewrite information for build and target
10526        eval rewritten_build=\${REWRITE_${build_var}}
10527        if test "x$rewritten_build" = x; then
10528            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10529            echo Build stays the same $rewritten_build
10530        else
10531            echo Rewriting build for builddeps into $rewritten_build
10532        fi
10533        eval rewritten_target=\${REWRITE_${target_var}}
10534        if test "x$rewritten_target" = x; then
10535            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10536            echo Target stays the same $rewritten_target
10537        else
10538            echo Rewriting target for builddeps into $rewritten_target
10539        fi
10540        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10541        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10542    fi
10543    for ac_prog in 7z unzip
10544do
10545  # Extract the first word of "$ac_prog", so it can be a program name with args.
10546set dummy $ac_prog; ac_word=$2
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548$as_echo_n "checking for $ac_word... " >&6; }
10549if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10550  $as_echo_n "(cached) " >&6
10551else
10552  if test -n "$BDEPS_UNZIP"; then
10553  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10554else
10555as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10556for as_dir in $PATH
10557do
10558  IFS=$as_save_IFS
10559  test -z "$as_dir" && as_dir=.
10560    for ac_exec_ext in '' $ac_executable_extensions; do
10561  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10562    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10564    break 2
10565  fi
10566done
10567  done
10568IFS=$as_save_IFS
10569
10570fi
10571fi
10572BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10573if test -n "$BDEPS_UNZIP"; then
10574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10575$as_echo "$BDEPS_UNZIP" >&6; }
10576else
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10578$as_echo "no" >&6; }
10579fi
10580
10581
10582  test -n "$BDEPS_UNZIP" && break
10583done
10584
10585    if test "x$BDEPS_UNZIP" = x7z; then
10586        BDEPS_UNZIP="7z x"
10587    fi
10588
10589    for ac_prog in wget lftp ftp
10590do
10591  # Extract the first word of "$ac_prog", so it can be a program name with args.
10592set dummy $ac_prog; ac_word=$2
10593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10594$as_echo_n "checking for $ac_word... " >&6; }
10595if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10596  $as_echo_n "(cached) " >&6
10597else
10598  if test -n "$BDEPS_FTP"; then
10599  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10600else
10601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10602for as_dir in $PATH
10603do
10604  IFS=$as_save_IFS
10605  test -z "$as_dir" && as_dir=.
10606    for ac_exec_ext in '' $ac_executable_extensions; do
10607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10608    ac_cv_prog_BDEPS_FTP="$ac_prog"
10609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10610    break 2
10611  fi
10612done
10613  done
10614IFS=$as_save_IFS
10615
10616fi
10617fi
10618BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10619if test -n "$BDEPS_FTP"; then
10620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10621$as_echo "$BDEPS_FTP" >&6; }
10622else
10623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624$as_echo "no" >&6; }
10625fi
10626
10627
10628  test -n "$BDEPS_FTP" && break
10629done
10630
10631
10632
10633###############################################################################
10634#
10635# Determine OpenJDK variants, options and version numbers.
10636#
10637###############################################################################
10638
10639# We need build & target for this.
10640
10641
10642###############################################################################
10643#
10644# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10645# We always build headless support.
10646#
10647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10648$as_echo_n "checking headful support... " >&6; }
10649# Check whether --enable-headful was given.
10650if test "${enable_headful+set}" = set; then :
10651  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10652else
10653  SUPPORT_HEADFUL=yes
10654fi
10655
10656
10657SUPPORT_HEADLESS=yes
10658BUILD_HEADLESS="BUILD_HEADLESS:=true"
10659
10660if test "x$SUPPORT_HEADFUL" = xyes; then
10661    # We are building both headful and headless.
10662    headful_msg="inlude support for both headful and headless"
10663fi
10664
10665if test "x$SUPPORT_HEADFUL" = xno; then
10666    # Thus we are building headless only.
10667    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10668    headful_msg="headless only"
10669fi
10670
10671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10672$as_echo "$headful_msg" >&6; }
10673
10674
10675
10676
10677
10678# Control wether Hotspot runs Queens test after build.
10679# Check whether --enable-hotspot-test-in-build was given.
10680if test "${enable_hotspot_test_in_build+set}" = set; then :
10681  enableval=$enable_hotspot_test_in_build;
10682else
10683  enable_hotspot_test_in_build=no
10684fi
10685
10686if test "x$enable_hotspot_test_in_build" = "xyes"; then
10687    TEST_IN_BUILD=true
10688else
10689    TEST_IN_BUILD=false
10690fi
10691
10692
10693###############################################################################
10694#
10695# Choose cacerts source file
10696#
10697
10698# Check whether --with-cacerts-file was given.
10699if test "${with_cacerts_file+set}" = set; then :
10700  withval=$with_cacerts_file;
10701fi
10702
10703if test "x$with_cacerts_file" != x; then
10704    CACERTS_FILE=$with_cacerts_file
10705else
10706    if test "x$OPENJDK" = "xtrue"; then
10707        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10708    else
10709        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10710    fi
10711fi
10712
10713
10714###############################################################################
10715#
10716# Enable or disable unlimited crypto
10717#
10718# Check whether --enable-unlimited-crypto was given.
10719if test "${enable_unlimited_crypto+set}" = set; then :
10720  enableval=$enable_unlimited_crypto;
10721else
10722  enable_unlimited_crypto=no
10723fi
10724
10725if test "x$enable_unlimited_crypto" = "xyes"; then
10726    UNLIMITED_CRYPTO=true
10727else
10728    UNLIMITED_CRYPTO=false
10729fi
10730
10731
10732###############################################################################
10733#
10734# Compress jars
10735#
10736COMPRESS_JARS=false
10737
10738
10739
10740
10741# Source the version numbers
10742. $AUTOCONF_DIR/version-numbers
10743
10744# Get the settings from parameters
10745
10746# Check whether --with-milestone was given.
10747if test "${with_milestone+set}" = set; then :
10748  withval=$with_milestone;
10749fi
10750
10751if test "x$with_milestone" = xyes; then
10752  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10753elif test "x$with_milestone" != x; then
10754    MILESTONE="$with_milestone"
10755else
10756  MILESTONE=internal
10757fi
10758
10759
10760# Check whether --with-build-number was given.
10761if test "${with_build_number+set}" = set; then :
10762  withval=$with_build_number;
10763fi
10764
10765if test "x$with_build_number" = xyes; then
10766  as_fn_error $? "Build number must have a value" "$LINENO" 5
10767elif test "x$with_build_number" != x; then
10768  JDK_BUILD_NUMBER="$with_build_number"
10769fi
10770if test "x$JDK_BUILD_NUMBER" = x; then
10771  JDK_BUILD_NUMBER=b00
10772fi
10773
10774
10775# Check whether --with-user-release-suffix was given.
10776if test "${with_user_release_suffix+set}" = set; then :
10777  withval=$with_user_release_suffix;
10778fi
10779
10780if test "x$with_user_release_suffix" = xyes; then
10781  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10782elif test "x$with_user_release_suffix" != x; then
10783  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10784else
10785  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10786  # Avoid [:alnum:] since it depends on the locale.
10787  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10788  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10789fi
10790
10791
10792# Now set the JDK version, milestone, build number etc.
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807COPYRIGHT_YEAR=`date +'%Y'`
10808
10809
10810if test "x$JDK_UPDATE_VERSION" != x; then
10811  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10812else
10813  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10814fi
10815
10816
10817COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
10818
10819
10820
10821###############################################################################
10822#
10823# Setup BootJDK, used to bootstrap the build.
10824#
10825###############################################################################
10826
10827
10828BOOT_JDK_FOUND=no
10829
10830# Check whether --with-boot-jdk was given.
10831if test "${with_boot_jdk+set}" = set; then :
10832  withval=$with_boot_jdk;
10833fi
10834
10835
10836# We look for the Boot JDK through various means, going from more certain to
10837# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
10838# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
10839# must check if this is indeed valid; otherwise we'll continue looking.
10840
10841# Test: Is bootjdk explicitely set by command line arguments?
10842
10843  if test "x$BOOT_JDK_FOUND" = xno; then
10844    # Now execute the test
10845
10846if test "x$with_boot_jdk" != x; then
10847    BOOT_JDK=$with_boot_jdk
10848    BOOT_JDK_FOUND=maybe
10849    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
10850$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
10851fi
10852
10853
10854    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
10855    if test "x$BOOT_JDK_FOUND" = xmaybe; then
10856      # Do we have a bin/java?
10857      if test ! -x "$BOOT_JDK/bin/java"; then
10858        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
10859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
10860        BOOT_JDK_FOUND=no
10861      else
10862        # Do we have a bin/javac?
10863        if test ! -x "$BOOT_JDK/bin/javac"; then
10864          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
10865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
10866          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
10867$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
10868          BOOT_JDK_FOUND=no
10869        else
10870          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
10871          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
10872            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
10873$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
10874            BOOT_JDK_FOUND=no
10875          else
10876            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
10877            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
10878
10879            # Extra M4 quote needed to protect [] in grep expression.
10880            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
10881            if test "x$FOUND_VERSION_78" = x; then
10882              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
10883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
10884              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
10885$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
10886              BOOT_JDK_FOUND=no
10887            else
10888              # We're done! :-)
10889              BOOT_JDK_FOUND=yes
10890
10891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10892
10893  # Input might be given as Windows format, start by converting to
10894  # unix format.
10895  path="$BOOT_JDK"
10896  new_path=`$CYGPATH -u "$path"`
10897
10898  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
10899  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
10900  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
10901  # "foo.exe" is OK but "foo" is an error.
10902  #
10903  # This test is therefore slightly more accurate than "test -f" to check for file precense.
10904  # It is also a way to make sure we got the proper file name for the real test later on.
10905  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
10906  if test "x$test_shortpath" = x; then
10907    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
10908$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
10909    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
10910  fi
10911
10912  # Call helper function which possibly converts this using DOS-style short mode.
10913  # If so, the updated path is stored in $new_path.
10914
10915  input_path="$new_path"
10916  # Check if we need to convert this using DOS-style short mode. If the path
10917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10918  # take no chances and rewrite it.
10919  # Note: m4 eats our [], so we need to use [ and ] instead.
10920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
10921  if test "x$has_forbidden_chars" != x; then
10922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10923    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
10924    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
10925    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
10926      # Going to short mode and back again did indeed matter. Since short mode is
10927      # case insensitive, let's make it lowercase to improve readability.
10928      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10929      # Now convert it back to Unix-stile (cygpath)
10930      input_path=`$CYGPATH -u "$shortmode_path"`
10931      new_path="$input_path"
10932    fi
10933  fi
10934
10935  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
10936  if test "x$test_cygdrive_prefix" = x; then
10937    # As a simple fix, exclude /usr/bin since it's not a real path.
10938    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
10939      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
10940      # a path prefixed by /cygdrive for fixpath to work.
10941      new_path="$CYGWIN_ROOT_PATH$input_path"
10942    fi
10943  fi
10944
10945
10946  if test "x$path" != "x$new_path"; then
10947    BOOT_JDK="$new_path"
10948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10949$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10950  fi
10951
10952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10953
10954  path="$BOOT_JDK"
10955  has_colon=`$ECHO $path | $GREP ^.:`
10956  new_path="$path"
10957  if test "x$has_colon" = x; then
10958    # Not in mixed or Windows style, start by that.
10959    new_path=`cmd //c echo $path`
10960  fi
10961
10962
10963  input_path="$new_path"
10964  # Check if we need to convert this using DOS-style short mode. If the path
10965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
10966  # take no chances and rewrite it.
10967  # Note: m4 eats our [], so we need to use [ and ] instead.
10968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
10969  if test "x$has_forbidden_chars" != x; then
10970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
10971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10972  fi
10973
10974
10975  windows_path="$new_path"
10976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
10977    unix_path=`$CYGPATH -u "$windows_path"`
10978    new_path="$unix_path"
10979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
10980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
10981    new_path="$unix_path"
10982  fi
10983
10984  if test "x$path" != "x$new_path"; then
10985    BOOT_JDK="$new_path"
10986    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
10987$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
10988  fi
10989
10990  # Save the first 10 bytes of this path to the storage, so fixpath can work.
10991  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
10992
10993  else
10994    # We're on a posix platform. Hooray! :)
10995    path="$BOOT_JDK"
10996
10997    if test ! -f "$path" && test ! -d "$path"; then
10998      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
10999    fi
11000
11001    has_space=`$ECHO "$path" | $GREP " "`
11002    if test "x$has_space" != x; then
11003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11005      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11006    fi
11007  fi
11008
11009              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11010$as_echo_n "checking for Boot JDK... " >&6; }
11011              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11012$as_echo "$BOOT_JDK" >&6; }
11013              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11014$as_echo_n "checking Boot JDK version... " >&6; }
11015              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11016              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11017$as_echo "$BOOT_JDK_VERSION" >&6; }
11018            fi # end check jdk version
11019          fi # end check rt.jar
11020        fi # end check javac
11021      fi # end check java
11022    fi # end check boot jdk found
11023  fi
11024
11025if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11026  # Having specified an argument which is incorrect will produce an instant failure;
11027  # we should not go on looking
11028  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11029fi
11030
11031# Test: Is bootjdk available from builddeps?
11032
11033  if test "x$BOOT_JDK_FOUND" = xno; then
11034    # Now execute the test
11035
11036
11037
11038    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11039        # Source the builddeps file again, to make sure it uses the latest variables!
11040        . $builddepsfile
11041        # Look for a target and build machine specific resource!
11042        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11043        if test "x$resource" = x; then
11044            # Ok, lets instead look for a target specific resource
11045            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11046        fi
11047        if test "x$resource" = x; then
11048            # Ok, lets instead look for a build specific resource
11049            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11050        fi
11051        if test "x$resource" = x; then
11052            # Ok, lets instead look for a generic resource
11053            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11054            resource=${builddep_bootjdk}
11055        fi
11056        if test "x$resource" != x; then
11057            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11058$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11059	    # If the resource in the builddeps.conf file is an existing directory,
11060	    # for example /java/linux/cups
11061	    if test -d ${resource}; then
11062	       depdir=${resource}
11063	    else
11064
11065# bootjdk is for example mymodule
11066# $resource is for example libs/general/libmymod_1_2_3.zip
11067# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11068# $with_builddeps_dir is for example /localhome/builddeps
11069# depdir is the name of the variable into which we store the depdir, eg MYMOD
11070# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11071# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11072    filename=`basename $resource`
11073    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11074    filebase=${filename%%.*}
11075    extension=${filename#*.}
11076    installdir=$with_builddeps_dir/$filebase
11077    if test ! -f $installdir/$filename.unpacked; then
11078        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11079$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11080        if test ! -d $installdir; then
11081            mkdir -p $installdir
11082        fi
11083        if test ! -d $installdir; then
11084            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11085        fi
11086        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11087        touch $tmpfile
11088        if test ! -f $tmpfile; then
11089            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11090        fi
11091
11092    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11093    # $tmpfile is the local file name for the downloaded file.
11094    VALID_TOOL=no
11095    if test "x$BDEPS_FTP" = xwget; then
11096       VALID_TOOL=yes
11097       wget -O $tmpfile $with_builddeps_server/$resource
11098    fi
11099    if test "x$BDEPS_FTP" = xlftp; then
11100       VALID_TOOL=yes
11101       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11102    fi
11103    if test "x$BDEPS_FTP" = xftp; then
11104        VALID_TOOL=yes
11105        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11106        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11107        FTPUSERPWD=${FTPSERVER%%@*}
11108        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11109            FTPUSER=${userpwd%%:*}
11110            FTPPWD=${userpwd#*@}
11111            FTPSERVER=${FTPSERVER#*@}
11112        else
11113            FTPUSER=ftp
11114            FTPPWD=ftp
11115        fi
11116        # the "pass" command does not work on some
11117        # ftp clients (read ftp.exe) but if it works,
11118        # passive mode is better!
11119        (\
11120            echo "user $FTPUSER $FTPPWD"        ;\
11121            echo "pass"                         ;\
11122            echo "bin"                          ;\
11123            echo "get $FTPPATH $tmpfile"              ;\
11124        ) | ftp -in $FTPSERVER
11125    fi
11126    if test "x$VALID_TOOL" != xyes; then
11127       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11128    fi
11129
11130        mv $tmpfile $installdir/$filename
11131        if test ! -s $installdir/$filename; then
11132            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11133        fi
11134        case "$extension" in
11135            zip)  echo "Unzipping $installdir/$filename..."
11136               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11137            ;;
11138            tar.gz) echo "Untaring $installdir/$filename..."
11139               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11140            ;;
11141            tgz) echo "Untaring $installdir/$filename..."
11142               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11143            ;;
11144            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11145            ;;
11146        esac
11147    fi
11148    if test -f $installdir/$filename.unpacked; then
11149        depdir=$installdir
11150    fi
11151
11152	    fi
11153            # Source the builddeps file again, because in the previous command, the depdir
11154            # was updated to point at the current build dependency install directory.
11155            . $builddepsfile
11156            # Now extract variables from the builddeps.conf files.
11157            theroot=${builddep_bootjdk_ROOT}
11158            thecflags=${builddep_bootjdk_CFLAGS}
11159            thelibs=${builddep_bootjdk_LIBS}
11160            if test "x$depdir" = x; then
11161                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11162            fi
11163            BOOT_JDK=$depdir
11164            if test "x$theroot" != x; then
11165               BOOT_JDK="$theroot"
11166            fi
11167            if test "x$thecflags" != x; then
11168               BOOT_JDK_CFLAGS="$thecflags"
11169            fi
11170            if test "x$thelibs" != x; then
11171               BOOT_JDK_LIBS="$thelibs"
11172            fi
11173            BOOT_JDK_FOUND=maybe
11174            else BOOT_JDK_FOUND=no
11175
11176        fi
11177        else BOOT_JDK_FOUND=no
11178
11179    fi
11180
11181
11182
11183    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11184    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11185      # Do we have a bin/java?
11186      if test ! -x "$BOOT_JDK/bin/java"; then
11187        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11188$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11189        BOOT_JDK_FOUND=no
11190      else
11191        # Do we have a bin/javac?
11192        if test ! -x "$BOOT_JDK/bin/javac"; then
11193          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11194$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11195          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11196$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11197          BOOT_JDK_FOUND=no
11198        else
11199          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11200          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11201            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11203            BOOT_JDK_FOUND=no
11204          else
11205            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11206            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11207
11208            # Extra M4 quote needed to protect [] in grep expression.
11209            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11210            if test "x$FOUND_VERSION_78" = x; then
11211              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11213              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11214$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11215              BOOT_JDK_FOUND=no
11216            else
11217              # We're done! :-)
11218              BOOT_JDK_FOUND=yes
11219
11220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11221
11222  # Input might be given as Windows format, start by converting to
11223  # unix format.
11224  path="$BOOT_JDK"
11225  new_path=`$CYGPATH -u "$path"`
11226
11227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11230  # "foo.exe" is OK but "foo" is an error.
11231  #
11232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11233  # It is also a way to make sure we got the proper file name for the real test later on.
11234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11235  if test "x$test_shortpath" = x; then
11236    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11237$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11238    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11239  fi
11240
11241  # Call helper function which possibly converts this using DOS-style short mode.
11242  # If so, the updated path is stored in $new_path.
11243
11244  input_path="$new_path"
11245  # Check if we need to convert this using DOS-style short mode. If the path
11246  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11247  # take no chances and rewrite it.
11248  # Note: m4 eats our [], so we need to use [ and ] instead.
11249  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11250  if test "x$has_forbidden_chars" != x; then
11251    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11252    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11253    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11254    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11255      # Going to short mode and back again did indeed matter. Since short mode is
11256      # case insensitive, let's make it lowercase to improve readability.
11257      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11258      # Now convert it back to Unix-stile (cygpath)
11259      input_path=`$CYGPATH -u "$shortmode_path"`
11260      new_path="$input_path"
11261    fi
11262  fi
11263
11264  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11265  if test "x$test_cygdrive_prefix" = x; then
11266    # As a simple fix, exclude /usr/bin since it's not a real path.
11267    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11268      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11269      # a path prefixed by /cygdrive for fixpath to work.
11270      new_path="$CYGWIN_ROOT_PATH$input_path"
11271    fi
11272  fi
11273
11274
11275  if test "x$path" != "x$new_path"; then
11276    BOOT_JDK="$new_path"
11277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11278$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11279  fi
11280
11281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11282
11283  path="$BOOT_JDK"
11284  has_colon=`$ECHO $path | $GREP ^.:`
11285  new_path="$path"
11286  if test "x$has_colon" = x; then
11287    # Not in mixed or Windows style, start by that.
11288    new_path=`cmd //c echo $path`
11289  fi
11290
11291
11292  input_path="$new_path"
11293  # Check if we need to convert this using DOS-style short mode. If the path
11294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11295  # take no chances and rewrite it.
11296  # Note: m4 eats our [], so we need to use [ and ] instead.
11297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11298  if test "x$has_forbidden_chars" != x; then
11299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11301  fi
11302
11303
11304  windows_path="$new_path"
11305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11306    unix_path=`$CYGPATH -u "$windows_path"`
11307    new_path="$unix_path"
11308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11310    new_path="$unix_path"
11311  fi
11312
11313  if test "x$path" != "x$new_path"; then
11314    BOOT_JDK="$new_path"
11315    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11316$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11317  fi
11318
11319  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11320  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11321
11322  else
11323    # We're on a posix platform. Hooray! :)
11324    path="$BOOT_JDK"
11325
11326    if test ! -f "$path" && test ! -d "$path"; then
11327      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11328    fi
11329
11330    has_space=`$ECHO "$path" | $GREP " "`
11331    if test "x$has_space" != x; then
11332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11333$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11334      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11335    fi
11336  fi
11337
11338              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11339$as_echo_n "checking for Boot JDK... " >&6; }
11340              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11341$as_echo "$BOOT_JDK" >&6; }
11342              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11343$as_echo_n "checking Boot JDK version... " >&6; }
11344              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11345              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11346$as_echo "$BOOT_JDK_VERSION" >&6; }
11347            fi # end check jdk version
11348          fi # end check rt.jar
11349        fi # end check javac
11350      fi # end check java
11351    fi # end check boot jdk found
11352  fi
11353
11354
11355# Test: Is $JAVA_HOME set?
11356
11357  if test "x$BOOT_JDK_FOUND" = xno; then
11358    # Now execute the test
11359
11360    if test "x$JAVA_HOME" != x; then
11361        JAVA_HOME_PROCESSED="$JAVA_HOME"
11362
11363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11364
11365  # Input might be given as Windows format, start by converting to
11366  # unix format.
11367  path="$JAVA_HOME_PROCESSED"
11368  new_path=`$CYGPATH -u "$path"`
11369
11370  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11371  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11372  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11373  # "foo.exe" is OK but "foo" is an error.
11374  #
11375  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11376  # It is also a way to make sure we got the proper file name for the real test later on.
11377  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11378  if test "x$test_shortpath" = x; then
11379    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11380$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11381    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11382  fi
11383
11384  # Call helper function which possibly converts this using DOS-style short mode.
11385  # If so, the updated path is stored in $new_path.
11386
11387  input_path="$new_path"
11388  # Check if we need to convert this using DOS-style short mode. If the path
11389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11390  # take no chances and rewrite it.
11391  # Note: m4 eats our [], so we need to use [ and ] instead.
11392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11393  if test "x$has_forbidden_chars" != x; then
11394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11395    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11396    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11397    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11398      # Going to short mode and back again did indeed matter. Since short mode is
11399      # case insensitive, let's make it lowercase to improve readability.
11400      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11401      # Now convert it back to Unix-stile (cygpath)
11402      input_path=`$CYGPATH -u "$shortmode_path"`
11403      new_path="$input_path"
11404    fi
11405  fi
11406
11407  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11408  if test "x$test_cygdrive_prefix" = x; then
11409    # As a simple fix, exclude /usr/bin since it's not a real path.
11410    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11411      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11412      # a path prefixed by /cygdrive for fixpath to work.
11413      new_path="$CYGWIN_ROOT_PATH$input_path"
11414    fi
11415  fi
11416
11417
11418  if test "x$path" != "x$new_path"; then
11419    JAVA_HOME_PROCESSED="$new_path"
11420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11421$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11422  fi
11423
11424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11425
11426  path="$JAVA_HOME_PROCESSED"
11427  has_colon=`$ECHO $path | $GREP ^.:`
11428  new_path="$path"
11429  if test "x$has_colon" = x; then
11430    # Not in mixed or Windows style, start by that.
11431    new_path=`cmd //c echo $path`
11432  fi
11433
11434
11435  input_path="$new_path"
11436  # Check if we need to convert this using DOS-style short mode. If the path
11437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11438  # take no chances and rewrite it.
11439  # Note: m4 eats our [], so we need to use [ and ] instead.
11440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11441  if test "x$has_forbidden_chars" != x; then
11442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11444  fi
11445
11446
11447  windows_path="$new_path"
11448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11449    unix_path=`$CYGPATH -u "$windows_path"`
11450    new_path="$unix_path"
11451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11453    new_path="$unix_path"
11454  fi
11455
11456  if test "x$path" != "x$new_path"; then
11457    JAVA_HOME_PROCESSED="$new_path"
11458    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11459$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11460  fi
11461
11462  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11463  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11464
11465  else
11466    # We're on a posix platform. Hooray! :)
11467    path="$JAVA_HOME_PROCESSED"
11468
11469    if test ! -f "$path" && test ! -d "$path"; then
11470      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11471    fi
11472
11473    has_space=`$ECHO "$path" | $GREP " "`
11474    if test "x$has_space" != x; then
11475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11476$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11477      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11478    fi
11479  fi
11480
11481        if test ! -d "$JAVA_HOME_PROCESSED"; then
11482            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11483$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11484        else
11485          # Aha, the user has set a JAVA_HOME
11486          # let us use that as the Boot JDK.
11487          BOOT_JDK="$JAVA_HOME_PROCESSED"
11488          BOOT_JDK_FOUND=maybe
11489          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11490$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11491        fi
11492    fi
11493
11494
11495    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11496    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11497      # Do we have a bin/java?
11498      if test ! -x "$BOOT_JDK/bin/java"; then
11499        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11500$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11501        BOOT_JDK_FOUND=no
11502      else
11503        # Do we have a bin/javac?
11504        if test ! -x "$BOOT_JDK/bin/javac"; then
11505          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11506$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11507          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11508$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11509          BOOT_JDK_FOUND=no
11510        else
11511          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11512          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11513            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11515            BOOT_JDK_FOUND=no
11516          else
11517            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11518            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11519
11520            # Extra M4 quote needed to protect [] in grep expression.
11521            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11522            if test "x$FOUND_VERSION_78" = x; then
11523              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11524$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11525              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11526$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11527              BOOT_JDK_FOUND=no
11528            else
11529              # We're done! :-)
11530              BOOT_JDK_FOUND=yes
11531
11532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11533
11534  # Input might be given as Windows format, start by converting to
11535  # unix format.
11536  path="$BOOT_JDK"
11537  new_path=`$CYGPATH -u "$path"`
11538
11539  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11540  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11541  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11542  # "foo.exe" is OK but "foo" is an error.
11543  #
11544  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11545  # It is also a way to make sure we got the proper file name for the real test later on.
11546  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11547  if test "x$test_shortpath" = x; then
11548    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11550    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11551  fi
11552
11553  # Call helper function which possibly converts this using DOS-style short mode.
11554  # If so, the updated path is stored in $new_path.
11555
11556  input_path="$new_path"
11557  # Check if we need to convert this using DOS-style short mode. If the path
11558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11559  # take no chances and rewrite it.
11560  # Note: m4 eats our [], so we need to use [ and ] instead.
11561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11562  if test "x$has_forbidden_chars" != x; then
11563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11564    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11565    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11566    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11567      # Going to short mode and back again did indeed matter. Since short mode is
11568      # case insensitive, let's make it lowercase to improve readability.
11569      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11570      # Now convert it back to Unix-stile (cygpath)
11571      input_path=`$CYGPATH -u "$shortmode_path"`
11572      new_path="$input_path"
11573    fi
11574  fi
11575
11576  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11577  if test "x$test_cygdrive_prefix" = x; then
11578    # As a simple fix, exclude /usr/bin since it's not a real path.
11579    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11580      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11581      # a path prefixed by /cygdrive for fixpath to work.
11582      new_path="$CYGWIN_ROOT_PATH$input_path"
11583    fi
11584  fi
11585
11586
11587  if test "x$path" != "x$new_path"; then
11588    BOOT_JDK="$new_path"
11589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11590$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11591  fi
11592
11593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11594
11595  path="$BOOT_JDK"
11596  has_colon=`$ECHO $path | $GREP ^.:`
11597  new_path="$path"
11598  if test "x$has_colon" = x; then
11599    # Not in mixed or Windows style, start by that.
11600    new_path=`cmd //c echo $path`
11601  fi
11602
11603
11604  input_path="$new_path"
11605  # Check if we need to convert this using DOS-style short mode. If the path
11606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11607  # take no chances and rewrite it.
11608  # Note: m4 eats our [], so we need to use [ and ] instead.
11609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11610  if test "x$has_forbidden_chars" != x; then
11611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11612    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11613  fi
11614
11615
11616  windows_path="$new_path"
11617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11618    unix_path=`$CYGPATH -u "$windows_path"`
11619    new_path="$unix_path"
11620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11622    new_path="$unix_path"
11623  fi
11624
11625  if test "x$path" != "x$new_path"; then
11626    BOOT_JDK="$new_path"
11627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11628$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11629  fi
11630
11631  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11632  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11633
11634  else
11635    # We're on a posix platform. Hooray! :)
11636    path="$BOOT_JDK"
11637
11638    if test ! -f "$path" && test ! -d "$path"; then
11639      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11640    fi
11641
11642    has_space=`$ECHO "$path" | $GREP " "`
11643    if test "x$has_space" != x; then
11644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11645$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11646      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11647    fi
11648  fi
11649
11650              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11651$as_echo_n "checking for Boot JDK... " >&6; }
11652              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11653$as_echo "$BOOT_JDK" >&6; }
11654              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11655$as_echo_n "checking Boot JDK version... " >&6; }
11656              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11657              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11658$as_echo "$BOOT_JDK_VERSION" >&6; }
11659            fi # end check jdk version
11660          fi # end check rt.jar
11661        fi # end check javac
11662      fi # end check java
11663    fi # end check boot jdk found
11664  fi
11665
11666
11667# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11668
11669  if test "x$BOOT_JDK_FOUND" = xno; then
11670    # Now execute the test
11671
11672    if test -x /usr/libexec/java_home; then
11673        BOOT_JDK=`/usr/libexec/java_home`
11674        BOOT_JDK_FOUND=maybe
11675        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11676$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11677    fi
11678
11679
11680    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11681    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11682      # Do we have a bin/java?
11683      if test ! -x "$BOOT_JDK/bin/java"; then
11684        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11686        BOOT_JDK_FOUND=no
11687      else
11688        # Do we have a bin/javac?
11689        if test ! -x "$BOOT_JDK/bin/javac"; then
11690          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11692          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11693$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11694          BOOT_JDK_FOUND=no
11695        else
11696          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11697          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11698            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11699$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11700            BOOT_JDK_FOUND=no
11701          else
11702            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11703            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11704
11705            # Extra M4 quote needed to protect [] in grep expression.
11706            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11707            if test "x$FOUND_VERSION_78" = x; then
11708              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11710              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11711$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11712              BOOT_JDK_FOUND=no
11713            else
11714              # We're done! :-)
11715              BOOT_JDK_FOUND=yes
11716
11717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11718
11719  # Input might be given as Windows format, start by converting to
11720  # unix format.
11721  path="$BOOT_JDK"
11722  new_path=`$CYGPATH -u "$path"`
11723
11724  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11725  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11726  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11727  # "foo.exe" is OK but "foo" is an error.
11728  #
11729  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11730  # It is also a way to make sure we got the proper file name for the real test later on.
11731  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11732  if test "x$test_shortpath" = x; then
11733    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11734$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11735    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11736  fi
11737
11738  # Call helper function which possibly converts this using DOS-style short mode.
11739  # If so, the updated path is stored in $new_path.
11740
11741  input_path="$new_path"
11742  # Check if we need to convert this using DOS-style short mode. If the path
11743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11744  # take no chances and rewrite it.
11745  # Note: m4 eats our [], so we need to use [ and ] instead.
11746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11747  if test "x$has_forbidden_chars" != x; then
11748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11749    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11750    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11751    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11752      # Going to short mode and back again did indeed matter. Since short mode is
11753      # case insensitive, let's make it lowercase to improve readability.
11754      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11755      # Now convert it back to Unix-stile (cygpath)
11756      input_path=`$CYGPATH -u "$shortmode_path"`
11757      new_path="$input_path"
11758    fi
11759  fi
11760
11761  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11762  if test "x$test_cygdrive_prefix" = x; then
11763    # As a simple fix, exclude /usr/bin since it's not a real path.
11764    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11765      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11766      # a path prefixed by /cygdrive for fixpath to work.
11767      new_path="$CYGWIN_ROOT_PATH$input_path"
11768    fi
11769  fi
11770
11771
11772  if test "x$path" != "x$new_path"; then
11773    BOOT_JDK="$new_path"
11774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11775$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11776  fi
11777
11778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11779
11780  path="$BOOT_JDK"
11781  has_colon=`$ECHO $path | $GREP ^.:`
11782  new_path="$path"
11783  if test "x$has_colon" = x; then
11784    # Not in mixed or Windows style, start by that.
11785    new_path=`cmd //c echo $path`
11786  fi
11787
11788
11789  input_path="$new_path"
11790  # Check if we need to convert this using DOS-style short mode. If the path
11791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11792  # take no chances and rewrite it.
11793  # Note: m4 eats our [], so we need to use [ and ] instead.
11794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11795  if test "x$has_forbidden_chars" != x; then
11796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11798  fi
11799
11800
11801  windows_path="$new_path"
11802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11803    unix_path=`$CYGPATH -u "$windows_path"`
11804    new_path="$unix_path"
11805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11807    new_path="$unix_path"
11808  fi
11809
11810  if test "x$path" != "x$new_path"; then
11811    BOOT_JDK="$new_path"
11812    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11813$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11814  fi
11815
11816  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11817  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11818
11819  else
11820    # We're on a posix platform. Hooray! :)
11821    path="$BOOT_JDK"
11822
11823    if test ! -f "$path" && test ! -d "$path"; then
11824      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11825    fi
11826
11827    has_space=`$ECHO "$path" | $GREP " "`
11828    if test "x$has_space" != x; then
11829      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11831      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11832    fi
11833  fi
11834
11835              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11836$as_echo_n "checking for Boot JDK... " >&6; }
11837              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11838$as_echo "$BOOT_JDK" >&6; }
11839              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11840$as_echo_n "checking Boot JDK version... " >&6; }
11841              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11842              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11843$as_echo "$BOOT_JDK_VERSION" >&6; }
11844            fi # end check jdk version
11845          fi # end check rt.jar
11846        fi # end check javac
11847      fi # end check java
11848    fi # end check boot jdk found
11849  fi
11850
11851
11852# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
11853
11854  if test "x$BOOT_JDK_FOUND" = xno; then
11855    # Now execute the test
11856
11857    # Extract the first word of "javac", so it can be a program name with args.
11858set dummy javac; ac_word=$2
11859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11860$as_echo_n "checking for $ac_word... " >&6; }
11861if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
11862  $as_echo_n "(cached) " >&6
11863else
11864  case $JAVAC_CHECK in
11865  [\\/]* | ?:[\\/]*)
11866  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
11867  ;;
11868  *)
11869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11870for as_dir in $PATH
11871do
11872  IFS=$as_save_IFS
11873  test -z "$as_dir" && as_dir=.
11874    for ac_exec_ext in '' $ac_executable_extensions; do
11875  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11876    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
11877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11878    break 2
11879  fi
11880done
11881  done
11882IFS=$as_save_IFS
11883
11884  ;;
11885esac
11886fi
11887JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
11888if test -n "$JAVAC_CHECK"; then
11889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
11890$as_echo "$JAVAC_CHECK" >&6; }
11891else
11892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11893$as_echo "no" >&6; }
11894fi
11895
11896
11897    # Extract the first word of "java", so it can be a program name with args.
11898set dummy java; ac_word=$2
11899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11900$as_echo_n "checking for $ac_word... " >&6; }
11901if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
11902  $as_echo_n "(cached) " >&6
11903else
11904  case $JAVA_CHECK in
11905  [\\/]* | ?:[\\/]*)
11906  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
11907  ;;
11908  *)
11909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11910for as_dir in $PATH
11911do
11912  IFS=$as_save_IFS
11913  test -z "$as_dir" && as_dir=.
11914    for ac_exec_ext in '' $ac_executable_extensions; do
11915  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11916    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
11917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11918    break 2
11919  fi
11920done
11921  done
11922IFS=$as_save_IFS
11923
11924  ;;
11925esac
11926fi
11927JAVA_CHECK=$ac_cv_path_JAVA_CHECK
11928if test -n "$JAVA_CHECK"; then
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
11930$as_echo "$JAVA_CHECK" >&6; }
11931else
11932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11933$as_echo "no" >&6; }
11934fi
11935
11936
11937    BINARY="$JAVAC_CHECK"
11938    if test "x$JAVAC_CHECK" = x; then
11939        BINARY="$JAVA_CHECK"
11940    fi
11941    if test "x$BINARY" != x; then
11942        # So there is a java(c) binary, it might be part of a JDK.
11943        # Lets find the JDK/JRE directory by following symbolic links.
11944        # Linux/GNU systems often have links from /usr/bin/java to
11945        # /etc/alternatives/java to the real JDK binary.
11946
11947    if test "x$OPENJDK_BUILD_OS" != xwindows; then
11948        # Follow a chain of symbolic links. Use readlink
11949        # where it exists, else fall back to horribly
11950        # complicated shell code.
11951        if test "x$READLINK_TESTED" != yes; then
11952            # On MacOSX there is a readlink tool with a different
11953            # purpose than the GNU readlink tool. Check the found readlink.
11954            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
11955            if test "x$ISGNU" = x; then
11956                 # A readlink that we do not know how to use.
11957                 # Are there other non-GNU readlinks out there?
11958                 READLINK_TESTED=yes
11959                 READLINK=
11960            fi
11961        fi
11962
11963        if test "x$READLINK" != x; then
11964            BINARY=`$READLINK -f $BINARY`
11965        else
11966            # Save the current directory for restoring afterwards
11967            STARTDIR=$PWD
11968            COUNTER=0
11969            sym_link_dir=`$DIRNAME $BINARY`
11970            sym_link_file=`$BASENAME $BINARY`
11971            # Use the system pwd and not the shell builtin to resolve directory symlinks
11972            cd $sym_link_dir
11973            cd `$THEPWDCMD`
11974            sym_link_dir=`$THEPWDCMD`
11975            # Resolve file symlinks
11976            while test $COUNTER -lt 20; do
11977                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
11978                if test "x$ISLINK" == x; then
11979                    # This is not a symbolic link! We are done!
11980                    break
11981                fi
11982                # Again resolve directory symlinks since the target of the just found
11983                # link could be in a different directory
11984                cd `$DIRNAME $ISLINK`
11985                sym_link_dir=`$THEPWDCMD`
11986                sym_link_file=`$BASENAME $ISLINK`
11987                let COUNTER=COUNTER+1
11988            done
11989            cd $STARTDIR
11990            BINARY=$sym_link_dir/$sym_link_file
11991        fi
11992    fi
11993
11994        BOOT_JDK=`dirname "$BINARY"`
11995        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
11996        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
11997            # Looks like we found ourselves an JDK
11998            BOOT_JDK_FOUND=maybe
11999            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12000$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12001        fi
12002    fi
12003
12004
12005    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12006    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12007      # Do we have a bin/java?
12008      if test ! -x "$BOOT_JDK/bin/java"; then
12009        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12011        BOOT_JDK_FOUND=no
12012      else
12013        # Do we have a bin/javac?
12014        if test ! -x "$BOOT_JDK/bin/javac"; then
12015          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12017          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12018$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12019          BOOT_JDK_FOUND=no
12020        else
12021          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12022          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12023            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12025            BOOT_JDK_FOUND=no
12026          else
12027            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12028            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12029
12030            # Extra M4 quote needed to protect [] in grep expression.
12031            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12032            if test "x$FOUND_VERSION_78" = x; then
12033              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12035              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12036$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12037              BOOT_JDK_FOUND=no
12038            else
12039              # We're done! :-)
12040              BOOT_JDK_FOUND=yes
12041
12042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12043
12044  # Input might be given as Windows format, start by converting to
12045  # unix format.
12046  path="$BOOT_JDK"
12047  new_path=`$CYGPATH -u "$path"`
12048
12049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12052  # "foo.exe" is OK but "foo" is an error.
12053  #
12054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12055  # It is also a way to make sure we got the proper file name for the real test later on.
12056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12057  if test "x$test_shortpath" = x; then
12058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12060    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12061  fi
12062
12063  # Call helper function which possibly converts this using DOS-style short mode.
12064  # If so, the updated path is stored in $new_path.
12065
12066  input_path="$new_path"
12067  # Check if we need to convert this using DOS-style short mode. If the path
12068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12069  # take no chances and rewrite it.
12070  # Note: m4 eats our [], so we need to use [ and ] instead.
12071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12072  if test "x$has_forbidden_chars" != x; then
12073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12077      # Going to short mode and back again did indeed matter. Since short mode is
12078      # case insensitive, let's make it lowercase to improve readability.
12079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12080      # Now convert it back to Unix-stile (cygpath)
12081      input_path=`$CYGPATH -u "$shortmode_path"`
12082      new_path="$input_path"
12083    fi
12084  fi
12085
12086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12087  if test "x$test_cygdrive_prefix" = x; then
12088    # As a simple fix, exclude /usr/bin since it's not a real path.
12089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12091      # a path prefixed by /cygdrive for fixpath to work.
12092      new_path="$CYGWIN_ROOT_PATH$input_path"
12093    fi
12094  fi
12095
12096
12097  if test "x$path" != "x$new_path"; then
12098    BOOT_JDK="$new_path"
12099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12100$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12101  fi
12102
12103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12104
12105  path="$BOOT_JDK"
12106  has_colon=`$ECHO $path | $GREP ^.:`
12107  new_path="$path"
12108  if test "x$has_colon" = x; then
12109    # Not in mixed or Windows style, start by that.
12110    new_path=`cmd //c echo $path`
12111  fi
12112
12113
12114  input_path="$new_path"
12115  # Check if we need to convert this using DOS-style short mode. If the path
12116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12117  # take no chances and rewrite it.
12118  # Note: m4 eats our [], so we need to use [ and ] instead.
12119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12120  if test "x$has_forbidden_chars" != x; then
12121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12123  fi
12124
12125
12126  windows_path="$new_path"
12127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12128    unix_path=`$CYGPATH -u "$windows_path"`
12129    new_path="$unix_path"
12130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12132    new_path="$unix_path"
12133  fi
12134
12135  if test "x$path" != "x$new_path"; then
12136    BOOT_JDK="$new_path"
12137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12138$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12139  fi
12140
12141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12143
12144  else
12145    # We're on a posix platform. Hooray! :)
12146    path="$BOOT_JDK"
12147
12148    if test ! -f "$path" && test ! -d "$path"; then
12149      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12150    fi
12151
12152    has_space=`$ECHO "$path" | $GREP " "`
12153    if test "x$has_space" != x; then
12154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12156      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12157    fi
12158  fi
12159
12160              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12161$as_echo_n "checking for Boot JDK... " >&6; }
12162              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12163$as_echo "$BOOT_JDK" >&6; }
12164              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12165$as_echo_n "checking Boot JDK version... " >&6; }
12166              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12167              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12168$as_echo "$BOOT_JDK_VERSION" >&6; }
12169            fi # end check jdk version
12170          fi # end check rt.jar
12171        fi # end check javac
12172      fi # end check java
12173    fi # end check boot jdk found
12174  fi
12175
12176
12177# Test: Is there a JDK installed in default, well-known locations?
12178
12179  if test "x$BOOT_JDK_FOUND" = xno; then
12180    # Now execute the test
12181
12182  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12183
12184  if test "x$BOOT_JDK_FOUND" = xno; then
12185    # Now execute the test
12186
12187  if test "x$ProgramW6432" != x; then
12188    VIRTUAL_DIR="$ProgramW6432/Java"
12189
12190  windows_path="$VIRTUAL_DIR"
12191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12192    unix_path=`$CYGPATH -u "$windows_path"`
12193    VIRTUAL_DIR="$unix_path"
12194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12196    VIRTUAL_DIR="$unix_path"
12197  fi
12198
12199
12200  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12201  BOOT_JDK_SUFFIX=""
12202  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12203  if test "x$ALL_JDKS_FOUND" != x; then
12204    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12205
12206  if test "x$BOOT_JDK_FOUND" = xno; then
12207    # Now execute the test
12208
12209        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12210        if test -d "$BOOT_JDK"; then
12211          BOOT_JDK_FOUND=maybe
12212          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12213$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12214        fi
12215
12216
12217    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12218    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12219      # Do we have a bin/java?
12220      if test ! -x "$BOOT_JDK/bin/java"; then
12221        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12223        BOOT_JDK_FOUND=no
12224      else
12225        # Do we have a bin/javac?
12226        if test ! -x "$BOOT_JDK/bin/javac"; then
12227          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12228$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12229          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12230$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12231          BOOT_JDK_FOUND=no
12232        else
12233          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12234          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12235            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12237            BOOT_JDK_FOUND=no
12238          else
12239            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12240            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12241
12242            # Extra M4 quote needed to protect [] in grep expression.
12243            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12244            if test "x$FOUND_VERSION_78" = x; then
12245              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12247              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12248$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12249              BOOT_JDK_FOUND=no
12250            else
12251              # We're done! :-)
12252              BOOT_JDK_FOUND=yes
12253
12254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12255
12256  # Input might be given as Windows format, start by converting to
12257  # unix format.
12258  path="$BOOT_JDK"
12259  new_path=`$CYGPATH -u "$path"`
12260
12261  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12262  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12263  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12264  # "foo.exe" is OK but "foo" is an error.
12265  #
12266  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12267  # It is also a way to make sure we got the proper file name for the real test later on.
12268  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12269  if test "x$test_shortpath" = x; then
12270    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12271$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12272    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12273  fi
12274
12275  # Call helper function which possibly converts this using DOS-style short mode.
12276  # If so, the updated path is stored in $new_path.
12277
12278  input_path="$new_path"
12279  # Check if we need to convert this using DOS-style short mode. If the path
12280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12281  # take no chances and rewrite it.
12282  # Note: m4 eats our [], so we need to use [ and ] instead.
12283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12284  if test "x$has_forbidden_chars" != x; then
12285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12289      # Going to short mode and back again did indeed matter. Since short mode is
12290      # case insensitive, let's make it lowercase to improve readability.
12291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12292      # Now convert it back to Unix-stile (cygpath)
12293      input_path=`$CYGPATH -u "$shortmode_path"`
12294      new_path="$input_path"
12295    fi
12296  fi
12297
12298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12299  if test "x$test_cygdrive_prefix" = x; then
12300    # As a simple fix, exclude /usr/bin since it's not a real path.
12301    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12303      # a path prefixed by /cygdrive for fixpath to work.
12304      new_path="$CYGWIN_ROOT_PATH$input_path"
12305    fi
12306  fi
12307
12308
12309  if test "x$path" != "x$new_path"; then
12310    BOOT_JDK="$new_path"
12311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12312$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12313  fi
12314
12315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12316
12317  path="$BOOT_JDK"
12318  has_colon=`$ECHO $path | $GREP ^.:`
12319  new_path="$path"
12320  if test "x$has_colon" = x; then
12321    # Not in mixed or Windows style, start by that.
12322    new_path=`cmd //c echo $path`
12323  fi
12324
12325
12326  input_path="$new_path"
12327  # Check if we need to convert this using DOS-style short mode. If the path
12328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12329  # take no chances and rewrite it.
12330  # Note: m4 eats our [], so we need to use [ and ] instead.
12331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12332  if test "x$has_forbidden_chars" != x; then
12333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12334    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12335  fi
12336
12337
12338  windows_path="$new_path"
12339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12340    unix_path=`$CYGPATH -u "$windows_path"`
12341    new_path="$unix_path"
12342  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12343    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12344    new_path="$unix_path"
12345  fi
12346
12347  if test "x$path" != "x$new_path"; then
12348    BOOT_JDK="$new_path"
12349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12350$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12351  fi
12352
12353  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12354  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12355
12356  else
12357    # We're on a posix platform. Hooray! :)
12358    path="$BOOT_JDK"
12359
12360    if test ! -f "$path" && test ! -d "$path"; then
12361      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12362    fi
12363
12364    has_space=`$ECHO "$path" | $GREP " "`
12365    if test "x$has_space" != x; then
12366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12367$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12368      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12369    fi
12370  fi
12371
12372              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12373$as_echo_n "checking for Boot JDK... " >&6; }
12374              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12375$as_echo "$BOOT_JDK" >&6; }
12376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12377$as_echo_n "checking Boot JDK version... " >&6; }
12378              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12379              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12380$as_echo "$BOOT_JDK_VERSION" >&6; }
12381            fi # end check jdk version
12382          fi # end check rt.jar
12383        fi # end check javac
12384      fi # end check java
12385    fi # end check boot jdk found
12386  fi
12387
12388    done
12389  fi
12390
12391  fi
12392
12393
12394    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12395    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12396      # Do we have a bin/java?
12397      if test ! -x "$BOOT_JDK/bin/java"; then
12398        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12400        BOOT_JDK_FOUND=no
12401      else
12402        # Do we have a bin/javac?
12403        if test ! -x "$BOOT_JDK/bin/javac"; then
12404          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12406          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12407$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12408          BOOT_JDK_FOUND=no
12409        else
12410          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12411          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12412            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12414            BOOT_JDK_FOUND=no
12415          else
12416            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12417            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12418
12419            # Extra M4 quote needed to protect [] in grep expression.
12420            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12421            if test "x$FOUND_VERSION_78" = x; then
12422              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12424              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12425$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12426              BOOT_JDK_FOUND=no
12427            else
12428              # We're done! :-)
12429              BOOT_JDK_FOUND=yes
12430
12431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12432
12433  # Input might be given as Windows format, start by converting to
12434  # unix format.
12435  path="$BOOT_JDK"
12436  new_path=`$CYGPATH -u "$path"`
12437
12438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12441  # "foo.exe" is OK but "foo" is an error.
12442  #
12443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12444  # It is also a way to make sure we got the proper file name for the real test later on.
12445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12446  if test "x$test_shortpath" = x; then
12447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12450  fi
12451
12452  # Call helper function which possibly converts this using DOS-style short mode.
12453  # If so, the updated path is stored in $new_path.
12454
12455  input_path="$new_path"
12456  # Check if we need to convert this using DOS-style short mode. If the path
12457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12458  # take no chances and rewrite it.
12459  # Note: m4 eats our [], so we need to use [ and ] instead.
12460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12461  if test "x$has_forbidden_chars" != x; then
12462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12466      # Going to short mode and back again did indeed matter. Since short mode is
12467      # case insensitive, let's make it lowercase to improve readability.
12468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12469      # Now convert it back to Unix-stile (cygpath)
12470      input_path=`$CYGPATH -u "$shortmode_path"`
12471      new_path="$input_path"
12472    fi
12473  fi
12474
12475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12476  if test "x$test_cygdrive_prefix" = x; then
12477    # As a simple fix, exclude /usr/bin since it's not a real path.
12478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12480      # a path prefixed by /cygdrive for fixpath to work.
12481      new_path="$CYGWIN_ROOT_PATH$input_path"
12482    fi
12483  fi
12484
12485
12486  if test "x$path" != "x$new_path"; then
12487    BOOT_JDK="$new_path"
12488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12490  fi
12491
12492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12493
12494  path="$BOOT_JDK"
12495  has_colon=`$ECHO $path | $GREP ^.:`
12496  new_path="$path"
12497  if test "x$has_colon" = x; then
12498    # Not in mixed or Windows style, start by that.
12499    new_path=`cmd //c echo $path`
12500  fi
12501
12502
12503  input_path="$new_path"
12504  # Check if we need to convert this using DOS-style short mode. If the path
12505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12506  # take no chances and rewrite it.
12507  # Note: m4 eats our [], so we need to use [ and ] instead.
12508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12509  if test "x$has_forbidden_chars" != x; then
12510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12512  fi
12513
12514
12515  windows_path="$new_path"
12516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12517    unix_path=`$CYGPATH -u "$windows_path"`
12518    new_path="$unix_path"
12519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12521    new_path="$unix_path"
12522  fi
12523
12524  if test "x$path" != "x$new_path"; then
12525    BOOT_JDK="$new_path"
12526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12528  fi
12529
12530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12532
12533  else
12534    # We're on a posix platform. Hooray! :)
12535    path="$BOOT_JDK"
12536
12537    if test ! -f "$path" && test ! -d "$path"; then
12538      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12539    fi
12540
12541    has_space=`$ECHO "$path" | $GREP " "`
12542    if test "x$has_space" != x; then
12543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12544$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12545      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12546    fi
12547  fi
12548
12549              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12550$as_echo_n "checking for Boot JDK... " >&6; }
12551              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12552$as_echo "$BOOT_JDK" >&6; }
12553              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12554$as_echo_n "checking Boot JDK version... " >&6; }
12555              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12556              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12557$as_echo "$BOOT_JDK_VERSION" >&6; }
12558            fi # end check jdk version
12559          fi # end check rt.jar
12560        fi # end check javac
12561      fi # end check java
12562    fi # end check boot jdk found
12563  fi
12564
12565
12566  if test "x$BOOT_JDK_FOUND" = xno; then
12567    # Now execute the test
12568
12569  if test "x$PROGRAMW6432" != x; then
12570    VIRTUAL_DIR="$PROGRAMW6432/Java"
12571
12572  windows_path="$VIRTUAL_DIR"
12573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12574    unix_path=`$CYGPATH -u "$windows_path"`
12575    VIRTUAL_DIR="$unix_path"
12576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12578    VIRTUAL_DIR="$unix_path"
12579  fi
12580
12581
12582  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12583  BOOT_JDK_SUFFIX=""
12584  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12585  if test "x$ALL_JDKS_FOUND" != x; then
12586    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12587
12588  if test "x$BOOT_JDK_FOUND" = xno; then
12589    # Now execute the test
12590
12591        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12592        if test -d "$BOOT_JDK"; then
12593          BOOT_JDK_FOUND=maybe
12594          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12595$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12596        fi
12597
12598
12599    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12600    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12601      # Do we have a bin/java?
12602      if test ! -x "$BOOT_JDK/bin/java"; then
12603        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12605        BOOT_JDK_FOUND=no
12606      else
12607        # Do we have a bin/javac?
12608        if test ! -x "$BOOT_JDK/bin/javac"; then
12609          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12611          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12612$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12613          BOOT_JDK_FOUND=no
12614        else
12615          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12616          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12617            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12619            BOOT_JDK_FOUND=no
12620          else
12621            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12622            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12623
12624            # Extra M4 quote needed to protect [] in grep expression.
12625            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12626            if test "x$FOUND_VERSION_78" = x; then
12627              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12629              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12630$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12631              BOOT_JDK_FOUND=no
12632            else
12633              # We're done! :-)
12634              BOOT_JDK_FOUND=yes
12635
12636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12637
12638  # Input might be given as Windows format, start by converting to
12639  # unix format.
12640  path="$BOOT_JDK"
12641  new_path=`$CYGPATH -u "$path"`
12642
12643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12646  # "foo.exe" is OK but "foo" is an error.
12647  #
12648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12649  # It is also a way to make sure we got the proper file name for the real test later on.
12650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12651  if test "x$test_shortpath" = x; then
12652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12654    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12655  fi
12656
12657  # Call helper function which possibly converts this using DOS-style short mode.
12658  # If so, the updated path is stored in $new_path.
12659
12660  input_path="$new_path"
12661  # Check if we need to convert this using DOS-style short mode. If the path
12662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12663  # take no chances and rewrite it.
12664  # Note: m4 eats our [], so we need to use [ and ] instead.
12665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12666  if test "x$has_forbidden_chars" != x; then
12667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12671      # Going to short mode and back again did indeed matter. Since short mode is
12672      # case insensitive, let's make it lowercase to improve readability.
12673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12674      # Now convert it back to Unix-stile (cygpath)
12675      input_path=`$CYGPATH -u "$shortmode_path"`
12676      new_path="$input_path"
12677    fi
12678  fi
12679
12680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12681  if test "x$test_cygdrive_prefix" = x; then
12682    # As a simple fix, exclude /usr/bin since it's not a real path.
12683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12685      # a path prefixed by /cygdrive for fixpath to work.
12686      new_path="$CYGWIN_ROOT_PATH$input_path"
12687    fi
12688  fi
12689
12690
12691  if test "x$path" != "x$new_path"; then
12692    BOOT_JDK="$new_path"
12693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12694$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12695  fi
12696
12697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12698
12699  path="$BOOT_JDK"
12700  has_colon=`$ECHO $path | $GREP ^.:`
12701  new_path="$path"
12702  if test "x$has_colon" = x; then
12703    # Not in mixed or Windows style, start by that.
12704    new_path=`cmd //c echo $path`
12705  fi
12706
12707
12708  input_path="$new_path"
12709  # Check if we need to convert this using DOS-style short mode. If the path
12710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12711  # take no chances and rewrite it.
12712  # Note: m4 eats our [], so we need to use [ and ] instead.
12713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12714  if test "x$has_forbidden_chars" != x; then
12715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12717  fi
12718
12719
12720  windows_path="$new_path"
12721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12722    unix_path=`$CYGPATH -u "$windows_path"`
12723    new_path="$unix_path"
12724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12726    new_path="$unix_path"
12727  fi
12728
12729  if test "x$path" != "x$new_path"; then
12730    BOOT_JDK="$new_path"
12731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12733  fi
12734
12735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12737
12738  else
12739    # We're on a posix platform. Hooray! :)
12740    path="$BOOT_JDK"
12741
12742    if test ! -f "$path" && test ! -d "$path"; then
12743      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12744    fi
12745
12746    has_space=`$ECHO "$path" | $GREP " "`
12747    if test "x$has_space" != x; then
12748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12749$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12750      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12751    fi
12752  fi
12753
12754              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12755$as_echo_n "checking for Boot JDK... " >&6; }
12756              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12757$as_echo "$BOOT_JDK" >&6; }
12758              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12759$as_echo_n "checking Boot JDK version... " >&6; }
12760              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12761              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12762$as_echo "$BOOT_JDK_VERSION" >&6; }
12763            fi # end check jdk version
12764          fi # end check rt.jar
12765        fi # end check javac
12766      fi # end check java
12767    fi # end check boot jdk found
12768  fi
12769
12770    done
12771  fi
12772
12773  fi
12774
12775
12776    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12777    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12778      # Do we have a bin/java?
12779      if test ! -x "$BOOT_JDK/bin/java"; then
12780        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12782        BOOT_JDK_FOUND=no
12783      else
12784        # Do we have a bin/javac?
12785        if test ! -x "$BOOT_JDK/bin/javac"; then
12786          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12788          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12789$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12790          BOOT_JDK_FOUND=no
12791        else
12792          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12793          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12794            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12796            BOOT_JDK_FOUND=no
12797          else
12798            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12799            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12800
12801            # Extra M4 quote needed to protect [] in grep expression.
12802            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12803            if test "x$FOUND_VERSION_78" = x; then
12804              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12806              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12807$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12808              BOOT_JDK_FOUND=no
12809            else
12810              # We're done! :-)
12811              BOOT_JDK_FOUND=yes
12812
12813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12814
12815  # Input might be given as Windows format, start by converting to
12816  # unix format.
12817  path="$BOOT_JDK"
12818  new_path=`$CYGPATH -u "$path"`
12819
12820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12823  # "foo.exe" is OK but "foo" is an error.
12824  #
12825  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12826  # It is also a way to make sure we got the proper file name for the real test later on.
12827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12828  if test "x$test_shortpath" = x; then
12829    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12830$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12831    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12832  fi
12833
12834  # Call helper function which possibly converts this using DOS-style short mode.
12835  # If so, the updated path is stored in $new_path.
12836
12837  input_path="$new_path"
12838  # Check if we need to convert this using DOS-style short mode. If the path
12839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12840  # take no chances and rewrite it.
12841  # Note: m4 eats our [], so we need to use [ and ] instead.
12842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12843  if test "x$has_forbidden_chars" != x; then
12844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12848      # Going to short mode and back again did indeed matter. Since short mode is
12849      # case insensitive, let's make it lowercase to improve readability.
12850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12851      # Now convert it back to Unix-stile (cygpath)
12852      input_path=`$CYGPATH -u "$shortmode_path"`
12853      new_path="$input_path"
12854    fi
12855  fi
12856
12857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12858  if test "x$test_cygdrive_prefix" = x; then
12859    # As a simple fix, exclude /usr/bin since it's not a real path.
12860    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12862      # a path prefixed by /cygdrive for fixpath to work.
12863      new_path="$CYGWIN_ROOT_PATH$input_path"
12864    fi
12865  fi
12866
12867
12868  if test "x$path" != "x$new_path"; then
12869    BOOT_JDK="$new_path"
12870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12872  fi
12873
12874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12875
12876  path="$BOOT_JDK"
12877  has_colon=`$ECHO $path | $GREP ^.:`
12878  new_path="$path"
12879  if test "x$has_colon" = x; then
12880    # Not in mixed or Windows style, start by that.
12881    new_path=`cmd //c echo $path`
12882  fi
12883
12884
12885  input_path="$new_path"
12886  # Check if we need to convert this using DOS-style short mode. If the path
12887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12888  # take no chances and rewrite it.
12889  # Note: m4 eats our [], so we need to use [ and ] instead.
12890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12891  if test "x$has_forbidden_chars" != x; then
12892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12894  fi
12895
12896
12897  windows_path="$new_path"
12898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12899    unix_path=`$CYGPATH -u "$windows_path"`
12900    new_path="$unix_path"
12901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12903    new_path="$unix_path"
12904  fi
12905
12906  if test "x$path" != "x$new_path"; then
12907    BOOT_JDK="$new_path"
12908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12909$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12910  fi
12911
12912  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12913  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12914
12915  else
12916    # We're on a posix platform. Hooray! :)
12917    path="$BOOT_JDK"
12918
12919    if test ! -f "$path" && test ! -d "$path"; then
12920      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12921    fi
12922
12923    has_space=`$ECHO "$path" | $GREP " "`
12924    if test "x$has_space" != x; then
12925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12926$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12927      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12928    fi
12929  fi
12930
12931              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12932$as_echo_n "checking for Boot JDK... " >&6; }
12933              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12934$as_echo "$BOOT_JDK" >&6; }
12935              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12936$as_echo_n "checking Boot JDK version... " >&6; }
12937              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12938              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12939$as_echo "$BOOT_JDK_VERSION" >&6; }
12940            fi # end check jdk version
12941          fi # end check rt.jar
12942        fi # end check javac
12943      fi # end check java
12944    fi # end check boot jdk found
12945  fi
12946
12947
12948  if test "x$BOOT_JDK_FOUND" = xno; then
12949    # Now execute the test
12950
12951  if test "x$PROGRAMFILES" != x; then
12952    VIRTUAL_DIR="$PROGRAMFILES/Java"
12953
12954  windows_path="$VIRTUAL_DIR"
12955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12956    unix_path=`$CYGPATH -u "$windows_path"`
12957    VIRTUAL_DIR="$unix_path"
12958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12960    VIRTUAL_DIR="$unix_path"
12961  fi
12962
12963
12964  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12965  BOOT_JDK_SUFFIX=""
12966  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12967  if test "x$ALL_JDKS_FOUND" != x; then
12968    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12969
12970  if test "x$BOOT_JDK_FOUND" = xno; then
12971    # Now execute the test
12972
12973        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12974        if test -d "$BOOT_JDK"; then
12975          BOOT_JDK_FOUND=maybe
12976          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12977$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12978        fi
12979
12980
12981    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12982    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12983      # Do we have a bin/java?
12984      if test ! -x "$BOOT_JDK/bin/java"; then
12985        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12987        BOOT_JDK_FOUND=no
12988      else
12989        # Do we have a bin/javac?
12990        if test ! -x "$BOOT_JDK/bin/javac"; then
12991          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12993          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12994$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12995          BOOT_JDK_FOUND=no
12996        else
12997          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12998          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12999            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13001            BOOT_JDK_FOUND=no
13002          else
13003            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13004            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13005
13006            # Extra M4 quote needed to protect [] in grep expression.
13007            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13008            if test "x$FOUND_VERSION_78" = x; then
13009              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13010$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13011              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13012$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13013              BOOT_JDK_FOUND=no
13014            else
13015              # We're done! :-)
13016              BOOT_JDK_FOUND=yes
13017
13018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13019
13020  # Input might be given as Windows format, start by converting to
13021  # unix format.
13022  path="$BOOT_JDK"
13023  new_path=`$CYGPATH -u "$path"`
13024
13025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13028  # "foo.exe" is OK but "foo" is an error.
13029  #
13030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13031  # It is also a way to make sure we got the proper file name for the real test later on.
13032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13033  if test "x$test_shortpath" = x; then
13034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13035$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13036    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13037  fi
13038
13039  # Call helper function which possibly converts this using DOS-style short mode.
13040  # If so, the updated path is stored in $new_path.
13041
13042  input_path="$new_path"
13043  # Check if we need to convert this using DOS-style short mode. If the path
13044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13045  # take no chances and rewrite it.
13046  # Note: m4 eats our [], so we need to use [ and ] instead.
13047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13048  if test "x$has_forbidden_chars" != x; then
13049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13053      # Going to short mode and back again did indeed matter. Since short mode is
13054      # case insensitive, let's make it lowercase to improve readability.
13055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13056      # Now convert it back to Unix-stile (cygpath)
13057      input_path=`$CYGPATH -u "$shortmode_path"`
13058      new_path="$input_path"
13059    fi
13060  fi
13061
13062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13063  if test "x$test_cygdrive_prefix" = x; then
13064    # As a simple fix, exclude /usr/bin since it's not a real path.
13065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13067      # a path prefixed by /cygdrive for fixpath to work.
13068      new_path="$CYGWIN_ROOT_PATH$input_path"
13069    fi
13070  fi
13071
13072
13073  if test "x$path" != "x$new_path"; then
13074    BOOT_JDK="$new_path"
13075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13076$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13077  fi
13078
13079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13080
13081  path="$BOOT_JDK"
13082  has_colon=`$ECHO $path | $GREP ^.:`
13083  new_path="$path"
13084  if test "x$has_colon" = x; then
13085    # Not in mixed or Windows style, start by that.
13086    new_path=`cmd //c echo $path`
13087  fi
13088
13089
13090  input_path="$new_path"
13091  # Check if we need to convert this using DOS-style short mode. If the path
13092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13093  # take no chances and rewrite it.
13094  # Note: m4 eats our [], so we need to use [ and ] instead.
13095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13096  if test "x$has_forbidden_chars" != x; then
13097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13099  fi
13100
13101
13102  windows_path="$new_path"
13103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13104    unix_path=`$CYGPATH -u "$windows_path"`
13105    new_path="$unix_path"
13106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13108    new_path="$unix_path"
13109  fi
13110
13111  if test "x$path" != "x$new_path"; then
13112    BOOT_JDK="$new_path"
13113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13114$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13115  fi
13116
13117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13119
13120  else
13121    # We're on a posix platform. Hooray! :)
13122    path="$BOOT_JDK"
13123
13124    if test ! -f "$path" && test ! -d "$path"; then
13125      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13126    fi
13127
13128    has_space=`$ECHO "$path" | $GREP " "`
13129    if test "x$has_space" != x; then
13130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13132      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13133    fi
13134  fi
13135
13136              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13137$as_echo_n "checking for Boot JDK... " >&6; }
13138              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13139$as_echo "$BOOT_JDK" >&6; }
13140              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13141$as_echo_n "checking Boot JDK version... " >&6; }
13142              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13143              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13144$as_echo "$BOOT_JDK_VERSION" >&6; }
13145            fi # end check jdk version
13146          fi # end check rt.jar
13147        fi # end check javac
13148      fi # end check java
13149    fi # end check boot jdk found
13150  fi
13151
13152    done
13153  fi
13154
13155  fi
13156
13157
13158    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13159    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13160      # Do we have a bin/java?
13161      if test ! -x "$BOOT_JDK/bin/java"; then
13162        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13164        BOOT_JDK_FOUND=no
13165      else
13166        # Do we have a bin/javac?
13167        if test ! -x "$BOOT_JDK/bin/javac"; then
13168          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13170          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13171$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13172          BOOT_JDK_FOUND=no
13173        else
13174          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13175          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13176            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13177$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13178            BOOT_JDK_FOUND=no
13179          else
13180            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13181            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13182
13183            # Extra M4 quote needed to protect [] in grep expression.
13184            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13185            if test "x$FOUND_VERSION_78" = x; then
13186              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13188              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13189$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13190              BOOT_JDK_FOUND=no
13191            else
13192              # We're done! :-)
13193              BOOT_JDK_FOUND=yes
13194
13195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13196
13197  # Input might be given as Windows format, start by converting to
13198  # unix format.
13199  path="$BOOT_JDK"
13200  new_path=`$CYGPATH -u "$path"`
13201
13202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13205  # "foo.exe" is OK but "foo" is an error.
13206  #
13207  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13208  # It is also a way to make sure we got the proper file name for the real test later on.
13209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13210  if test "x$test_shortpath" = x; then
13211    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13212$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13213    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13214  fi
13215
13216  # Call helper function which possibly converts this using DOS-style short mode.
13217  # If so, the updated path is stored in $new_path.
13218
13219  input_path="$new_path"
13220  # Check if we need to convert this using DOS-style short mode. If the path
13221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13222  # take no chances and rewrite it.
13223  # Note: m4 eats our [], so we need to use [ and ] instead.
13224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13225  if test "x$has_forbidden_chars" != x; then
13226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13227    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13228    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13229    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13230      # Going to short mode and back again did indeed matter. Since short mode is
13231      # case insensitive, let's make it lowercase to improve readability.
13232      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13233      # Now convert it back to Unix-stile (cygpath)
13234      input_path=`$CYGPATH -u "$shortmode_path"`
13235      new_path="$input_path"
13236    fi
13237  fi
13238
13239  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13240  if test "x$test_cygdrive_prefix" = x; then
13241    # As a simple fix, exclude /usr/bin since it's not a real path.
13242    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13243      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13244      # a path prefixed by /cygdrive for fixpath to work.
13245      new_path="$CYGWIN_ROOT_PATH$input_path"
13246    fi
13247  fi
13248
13249
13250  if test "x$path" != "x$new_path"; then
13251    BOOT_JDK="$new_path"
13252    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13253$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13254  fi
13255
13256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13257
13258  path="$BOOT_JDK"
13259  has_colon=`$ECHO $path | $GREP ^.:`
13260  new_path="$path"
13261  if test "x$has_colon" = x; then
13262    # Not in mixed or Windows style, start by that.
13263    new_path=`cmd //c echo $path`
13264  fi
13265
13266
13267  input_path="$new_path"
13268  # Check if we need to convert this using DOS-style short mode. If the path
13269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13270  # take no chances and rewrite it.
13271  # Note: m4 eats our [], so we need to use [ and ] instead.
13272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13273  if test "x$has_forbidden_chars" != x; then
13274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13275    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13276  fi
13277
13278
13279  windows_path="$new_path"
13280  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13281    unix_path=`$CYGPATH -u "$windows_path"`
13282    new_path="$unix_path"
13283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13284    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13285    new_path="$unix_path"
13286  fi
13287
13288  if test "x$path" != "x$new_path"; then
13289    BOOT_JDK="$new_path"
13290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13291$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13292  fi
13293
13294  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13295  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13296
13297  else
13298    # We're on a posix platform. Hooray! :)
13299    path="$BOOT_JDK"
13300
13301    if test ! -f "$path" && test ! -d "$path"; then
13302      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13303    fi
13304
13305    has_space=`$ECHO "$path" | $GREP " "`
13306    if test "x$has_space" != x; then
13307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13308$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13309      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13310    fi
13311  fi
13312
13313              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13314$as_echo_n "checking for Boot JDK... " >&6; }
13315              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13316$as_echo "$BOOT_JDK" >&6; }
13317              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13318$as_echo_n "checking Boot JDK version... " >&6; }
13319              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13320              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13321$as_echo "$BOOT_JDK_VERSION" >&6; }
13322            fi # end check jdk version
13323          fi # end check rt.jar
13324        fi # end check javac
13325      fi # end check java
13326    fi # end check boot jdk found
13327  fi
13328
13329
13330  if test "x$BOOT_JDK_FOUND" = xno; then
13331    # Now execute the test
13332
13333  if test "x$ProgramFiles" != x; then
13334    VIRTUAL_DIR="$ProgramFiles/Java"
13335
13336  windows_path="$VIRTUAL_DIR"
13337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13338    unix_path=`$CYGPATH -u "$windows_path"`
13339    VIRTUAL_DIR="$unix_path"
13340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13342    VIRTUAL_DIR="$unix_path"
13343  fi
13344
13345
13346  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13347  BOOT_JDK_SUFFIX=""
13348  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13349  if test "x$ALL_JDKS_FOUND" != x; then
13350    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13351
13352  if test "x$BOOT_JDK_FOUND" = xno; then
13353    # Now execute the test
13354
13355        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13356        if test -d "$BOOT_JDK"; then
13357          BOOT_JDK_FOUND=maybe
13358          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13359$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13360        fi
13361
13362
13363    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13364    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13365      # Do we have a bin/java?
13366      if test ! -x "$BOOT_JDK/bin/java"; then
13367        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13369        BOOT_JDK_FOUND=no
13370      else
13371        # Do we have a bin/javac?
13372        if test ! -x "$BOOT_JDK/bin/javac"; then
13373          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13375          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13376$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13377          BOOT_JDK_FOUND=no
13378        else
13379          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13380          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13381            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13383            BOOT_JDK_FOUND=no
13384          else
13385            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13386            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13387
13388            # Extra M4 quote needed to protect [] in grep expression.
13389            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13390            if test "x$FOUND_VERSION_78" = x; then
13391              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13393              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13394$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13395              BOOT_JDK_FOUND=no
13396            else
13397              # We're done! :-)
13398              BOOT_JDK_FOUND=yes
13399
13400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13401
13402  # Input might be given as Windows format, start by converting to
13403  # unix format.
13404  path="$BOOT_JDK"
13405  new_path=`$CYGPATH -u "$path"`
13406
13407  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13408  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13409  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13410  # "foo.exe" is OK but "foo" is an error.
13411  #
13412  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13413  # It is also a way to make sure we got the proper file name for the real test later on.
13414  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13415  if test "x$test_shortpath" = x; then
13416    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13417$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13418    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13419  fi
13420
13421  # Call helper function which possibly converts this using DOS-style short mode.
13422  # If so, the updated path is stored in $new_path.
13423
13424  input_path="$new_path"
13425  # Check if we need to convert this using DOS-style short mode. If the path
13426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13427  # take no chances and rewrite it.
13428  # Note: m4 eats our [], so we need to use [ and ] instead.
13429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13430  if test "x$has_forbidden_chars" != x; then
13431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13435      # Going to short mode and back again did indeed matter. Since short mode is
13436      # case insensitive, let's make it lowercase to improve readability.
13437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13438      # Now convert it back to Unix-stile (cygpath)
13439      input_path=`$CYGPATH -u "$shortmode_path"`
13440      new_path="$input_path"
13441    fi
13442  fi
13443
13444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13445  if test "x$test_cygdrive_prefix" = x; then
13446    # As a simple fix, exclude /usr/bin since it's not a real path.
13447    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13449      # a path prefixed by /cygdrive for fixpath to work.
13450      new_path="$CYGWIN_ROOT_PATH$input_path"
13451    fi
13452  fi
13453
13454
13455  if test "x$path" != "x$new_path"; then
13456    BOOT_JDK="$new_path"
13457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13459  fi
13460
13461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13462
13463  path="$BOOT_JDK"
13464  has_colon=`$ECHO $path | $GREP ^.:`
13465  new_path="$path"
13466  if test "x$has_colon" = x; then
13467    # Not in mixed or Windows style, start by that.
13468    new_path=`cmd //c echo $path`
13469  fi
13470
13471
13472  input_path="$new_path"
13473  # Check if we need to convert this using DOS-style short mode. If the path
13474  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13475  # take no chances and rewrite it.
13476  # Note: m4 eats our [], so we need to use [ and ] instead.
13477  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13478  if test "x$has_forbidden_chars" != x; then
13479    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13480    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13481  fi
13482
13483
13484  windows_path="$new_path"
13485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13486    unix_path=`$CYGPATH -u "$windows_path"`
13487    new_path="$unix_path"
13488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13490    new_path="$unix_path"
13491  fi
13492
13493  if test "x$path" != "x$new_path"; then
13494    BOOT_JDK="$new_path"
13495    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13496$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13497  fi
13498
13499  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13500  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13501
13502  else
13503    # We're on a posix platform. Hooray! :)
13504    path="$BOOT_JDK"
13505
13506    if test ! -f "$path" && test ! -d "$path"; then
13507      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13508    fi
13509
13510    has_space=`$ECHO "$path" | $GREP " "`
13511    if test "x$has_space" != x; then
13512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13513$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13514      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13515    fi
13516  fi
13517
13518              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13519$as_echo_n "checking for Boot JDK... " >&6; }
13520              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13521$as_echo "$BOOT_JDK" >&6; }
13522              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13523$as_echo_n "checking Boot JDK version... " >&6; }
13524              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13525              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13526$as_echo "$BOOT_JDK_VERSION" >&6; }
13527            fi # end check jdk version
13528          fi # end check rt.jar
13529        fi # end check javac
13530      fi # end check java
13531    fi # end check boot jdk found
13532  fi
13533
13534    done
13535  fi
13536
13537  fi
13538
13539
13540    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13541    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13542      # Do we have a bin/java?
13543      if test ! -x "$BOOT_JDK/bin/java"; then
13544        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13546        BOOT_JDK_FOUND=no
13547      else
13548        # Do we have a bin/javac?
13549        if test ! -x "$BOOT_JDK/bin/javac"; then
13550          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13552          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13553$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13554          BOOT_JDK_FOUND=no
13555        else
13556          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13557          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13558            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13559$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13560            BOOT_JDK_FOUND=no
13561          else
13562            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13563            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13564
13565            # Extra M4 quote needed to protect [] in grep expression.
13566            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13567            if test "x$FOUND_VERSION_78" = x; then
13568              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13569$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13570              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13571$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13572              BOOT_JDK_FOUND=no
13573            else
13574              # We're done! :-)
13575              BOOT_JDK_FOUND=yes
13576
13577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13578
13579  # Input might be given as Windows format, start by converting to
13580  # unix format.
13581  path="$BOOT_JDK"
13582  new_path=`$CYGPATH -u "$path"`
13583
13584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13587  # "foo.exe" is OK but "foo" is an error.
13588  #
13589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13590  # It is also a way to make sure we got the proper file name for the real test later on.
13591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13592  if test "x$test_shortpath" = x; then
13593    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13595    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13596  fi
13597
13598  # Call helper function which possibly converts this using DOS-style short mode.
13599  # If so, the updated path is stored in $new_path.
13600
13601  input_path="$new_path"
13602  # Check if we need to convert this using DOS-style short mode. If the path
13603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13604  # take no chances and rewrite it.
13605  # Note: m4 eats our [], so we need to use [ and ] instead.
13606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13607  if test "x$has_forbidden_chars" != x; then
13608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13609    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13610    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13611    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13612      # Going to short mode and back again did indeed matter. Since short mode is
13613      # case insensitive, let's make it lowercase to improve readability.
13614      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13615      # Now convert it back to Unix-stile (cygpath)
13616      input_path=`$CYGPATH -u "$shortmode_path"`
13617      new_path="$input_path"
13618    fi
13619  fi
13620
13621  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13622  if test "x$test_cygdrive_prefix" = x; then
13623    # As a simple fix, exclude /usr/bin since it's not a real path.
13624    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13625      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13626      # a path prefixed by /cygdrive for fixpath to work.
13627      new_path="$CYGWIN_ROOT_PATH$input_path"
13628    fi
13629  fi
13630
13631
13632  if test "x$path" != "x$new_path"; then
13633    BOOT_JDK="$new_path"
13634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13635$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13636  fi
13637
13638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13639
13640  path="$BOOT_JDK"
13641  has_colon=`$ECHO $path | $GREP ^.:`
13642  new_path="$path"
13643  if test "x$has_colon" = x; then
13644    # Not in mixed or Windows style, start by that.
13645    new_path=`cmd //c echo $path`
13646  fi
13647
13648
13649  input_path="$new_path"
13650  # Check if we need to convert this using DOS-style short mode. If the path
13651  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13652  # take no chances and rewrite it.
13653  # Note: m4 eats our [], so we need to use [ and ] instead.
13654  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13655  if test "x$has_forbidden_chars" != x; then
13656    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13657    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13658  fi
13659
13660
13661  windows_path="$new_path"
13662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13663    unix_path=`$CYGPATH -u "$windows_path"`
13664    new_path="$unix_path"
13665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13667    new_path="$unix_path"
13668  fi
13669
13670  if test "x$path" != "x$new_path"; then
13671    BOOT_JDK="$new_path"
13672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13674  fi
13675
13676  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13677  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13678
13679  else
13680    # We're on a posix platform. Hooray! :)
13681    path="$BOOT_JDK"
13682
13683    if test ! -f "$path" && test ! -d "$path"; then
13684      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13685    fi
13686
13687    has_space=`$ECHO "$path" | $GREP " "`
13688    if test "x$has_space" != x; then
13689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13690$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13691      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13692    fi
13693  fi
13694
13695              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13696$as_echo_n "checking for Boot JDK... " >&6; }
13697              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13698$as_echo "$BOOT_JDK" >&6; }
13699              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13700$as_echo_n "checking Boot JDK version... " >&6; }
13701              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13702              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13703$as_echo "$BOOT_JDK_VERSION" >&6; }
13704            fi # end check jdk version
13705          fi # end check rt.jar
13706        fi # end check javac
13707      fi # end check java
13708    fi # end check boot jdk found
13709  fi
13710
13711
13712  if test "x$BOOT_JDK_FOUND" = xno; then
13713    # Now execute the test
13714
13715  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13716  BOOT_JDK_SUFFIX=""
13717  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13718  if test "x$ALL_JDKS_FOUND" != x; then
13719    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13720
13721  if test "x$BOOT_JDK_FOUND" = xno; then
13722    # Now execute the test
13723
13724        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13725        if test -d "$BOOT_JDK"; then
13726          BOOT_JDK_FOUND=maybe
13727          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13728$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13729        fi
13730
13731
13732    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13733    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13734      # Do we have a bin/java?
13735      if test ! -x "$BOOT_JDK/bin/java"; then
13736        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13737$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13738        BOOT_JDK_FOUND=no
13739      else
13740        # Do we have a bin/javac?
13741        if test ! -x "$BOOT_JDK/bin/javac"; then
13742          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13743$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13744          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13745$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13746          BOOT_JDK_FOUND=no
13747        else
13748          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13749          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13750            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13751$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13752            BOOT_JDK_FOUND=no
13753          else
13754            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13755            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13756
13757            # Extra M4 quote needed to protect [] in grep expression.
13758            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13759            if test "x$FOUND_VERSION_78" = x; then
13760              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13762              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13763$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13764              BOOT_JDK_FOUND=no
13765            else
13766              # We're done! :-)
13767              BOOT_JDK_FOUND=yes
13768
13769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13770
13771  # Input might be given as Windows format, start by converting to
13772  # unix format.
13773  path="$BOOT_JDK"
13774  new_path=`$CYGPATH -u "$path"`
13775
13776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13779  # "foo.exe" is OK but "foo" is an error.
13780  #
13781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13782  # It is also a way to make sure we got the proper file name for the real test later on.
13783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13784  if test "x$test_shortpath" = x; then
13785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13786$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13787    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13788  fi
13789
13790  # Call helper function which possibly converts this using DOS-style short mode.
13791  # If so, the updated path is stored in $new_path.
13792
13793  input_path="$new_path"
13794  # Check if we need to convert this using DOS-style short mode. If the path
13795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13796  # take no chances and rewrite it.
13797  # Note: m4 eats our [], so we need to use [ and ] instead.
13798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13799  if test "x$has_forbidden_chars" != x; then
13800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13804      # Going to short mode and back again did indeed matter. Since short mode is
13805      # case insensitive, let's make it lowercase to improve readability.
13806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13807      # Now convert it back to Unix-stile (cygpath)
13808      input_path=`$CYGPATH -u "$shortmode_path"`
13809      new_path="$input_path"
13810    fi
13811  fi
13812
13813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13814  if test "x$test_cygdrive_prefix" = x; then
13815    # As a simple fix, exclude /usr/bin since it's not a real path.
13816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13818      # a path prefixed by /cygdrive for fixpath to work.
13819      new_path="$CYGWIN_ROOT_PATH$input_path"
13820    fi
13821  fi
13822
13823
13824  if test "x$path" != "x$new_path"; then
13825    BOOT_JDK="$new_path"
13826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13827$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13828  fi
13829
13830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13831
13832  path="$BOOT_JDK"
13833  has_colon=`$ECHO $path | $GREP ^.:`
13834  new_path="$path"
13835  if test "x$has_colon" = x; then
13836    # Not in mixed or Windows style, start by that.
13837    new_path=`cmd //c echo $path`
13838  fi
13839
13840
13841  input_path="$new_path"
13842  # Check if we need to convert this using DOS-style short mode. If the path
13843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13844  # take no chances and rewrite it.
13845  # Note: m4 eats our [], so we need to use [ and ] instead.
13846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13847  if test "x$has_forbidden_chars" != x; then
13848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13850  fi
13851
13852
13853  windows_path="$new_path"
13854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13855    unix_path=`$CYGPATH -u "$windows_path"`
13856    new_path="$unix_path"
13857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13859    new_path="$unix_path"
13860  fi
13861
13862  if test "x$path" != "x$new_path"; then
13863    BOOT_JDK="$new_path"
13864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13866  fi
13867
13868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13870
13871  else
13872    # We're on a posix platform. Hooray! :)
13873    path="$BOOT_JDK"
13874
13875    if test ! -f "$path" && test ! -d "$path"; then
13876      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13877    fi
13878
13879    has_space=`$ECHO "$path" | $GREP " "`
13880    if test "x$has_space" != x; then
13881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13882$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13883      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13884    fi
13885  fi
13886
13887              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13888$as_echo_n "checking for Boot JDK... " >&6; }
13889              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13890$as_echo "$BOOT_JDK" >&6; }
13891              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13892$as_echo_n "checking Boot JDK version... " >&6; }
13893              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13894              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13895$as_echo "$BOOT_JDK_VERSION" >&6; }
13896            fi # end check jdk version
13897          fi # end check rt.jar
13898        fi # end check javac
13899      fi # end check java
13900    fi # end check boot jdk found
13901  fi
13902
13903    done
13904  fi
13905
13906
13907    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13908    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13909      # Do we have a bin/java?
13910      if test ! -x "$BOOT_JDK/bin/java"; then
13911        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13913        BOOT_JDK_FOUND=no
13914      else
13915        # Do we have a bin/javac?
13916        if test ! -x "$BOOT_JDK/bin/javac"; then
13917          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13919          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13920$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13921          BOOT_JDK_FOUND=no
13922        else
13923          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13924          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13925            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13927            BOOT_JDK_FOUND=no
13928          else
13929            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13930            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13931
13932            # Extra M4 quote needed to protect [] in grep expression.
13933            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13934            if test "x$FOUND_VERSION_78" = x; then
13935              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13937              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13938$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13939              BOOT_JDK_FOUND=no
13940            else
13941              # We're done! :-)
13942              BOOT_JDK_FOUND=yes
13943
13944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13945
13946  # Input might be given as Windows format, start by converting to
13947  # unix format.
13948  path="$BOOT_JDK"
13949  new_path=`$CYGPATH -u "$path"`
13950
13951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13954  # "foo.exe" is OK but "foo" is an error.
13955  #
13956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13957  # It is also a way to make sure we got the proper file name for the real test later on.
13958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13959  if test "x$test_shortpath" = x; then
13960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13961$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13962    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13963  fi
13964
13965  # Call helper function which possibly converts this using DOS-style short mode.
13966  # If so, the updated path is stored in $new_path.
13967
13968  input_path="$new_path"
13969  # Check if we need to convert this using DOS-style short mode. If the path
13970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13971  # take no chances and rewrite it.
13972  # Note: m4 eats our [], so we need to use [ and ] instead.
13973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13974  if test "x$has_forbidden_chars" != x; then
13975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13979      # Going to short mode and back again did indeed matter. Since short mode is
13980      # case insensitive, let's make it lowercase to improve readability.
13981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13982      # Now convert it back to Unix-stile (cygpath)
13983      input_path=`$CYGPATH -u "$shortmode_path"`
13984      new_path="$input_path"
13985    fi
13986  fi
13987
13988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13989  if test "x$test_cygdrive_prefix" = x; then
13990    # As a simple fix, exclude /usr/bin since it's not a real path.
13991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13993      # a path prefixed by /cygdrive for fixpath to work.
13994      new_path="$CYGWIN_ROOT_PATH$input_path"
13995    fi
13996  fi
13997
13998
13999  if test "x$path" != "x$new_path"; then
14000    BOOT_JDK="$new_path"
14001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14002$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14003  fi
14004
14005  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14006
14007  path="$BOOT_JDK"
14008  has_colon=`$ECHO $path | $GREP ^.:`
14009  new_path="$path"
14010  if test "x$has_colon" = x; then
14011    # Not in mixed or Windows style, start by that.
14012    new_path=`cmd //c echo $path`
14013  fi
14014
14015
14016  input_path="$new_path"
14017  # Check if we need to convert this using DOS-style short mode. If the path
14018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14019  # take no chances and rewrite it.
14020  # Note: m4 eats our [], so we need to use [ and ] instead.
14021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14022  if test "x$has_forbidden_chars" != x; then
14023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14025  fi
14026
14027
14028  windows_path="$new_path"
14029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14030    unix_path=`$CYGPATH -u "$windows_path"`
14031    new_path="$unix_path"
14032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14034    new_path="$unix_path"
14035  fi
14036
14037  if test "x$path" != "x$new_path"; then
14038    BOOT_JDK="$new_path"
14039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14040$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14041  fi
14042
14043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14045
14046  else
14047    # We're on a posix platform. Hooray! :)
14048    path="$BOOT_JDK"
14049
14050    if test ! -f "$path" && test ! -d "$path"; then
14051      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14052    fi
14053
14054    has_space=`$ECHO "$path" | $GREP " "`
14055    if test "x$has_space" != x; then
14056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14057$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14058      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14059    fi
14060  fi
14061
14062              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14063$as_echo_n "checking for Boot JDK... " >&6; }
14064              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14065$as_echo "$BOOT_JDK" >&6; }
14066              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14067$as_echo_n "checking Boot JDK version... " >&6; }
14068              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14069              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14070$as_echo "$BOOT_JDK_VERSION" >&6; }
14071            fi # end check jdk version
14072          fi # end check rt.jar
14073        fi # end check javac
14074      fi # end check java
14075    fi # end check boot jdk found
14076  fi
14077
14078  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14079
14080  if test "x$BOOT_JDK_FOUND" = xno; then
14081    # Now execute the test
14082
14083  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14084  BOOT_JDK_SUFFIX="/Contents/Home"
14085  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14086  if test "x$ALL_JDKS_FOUND" != x; then
14087    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14088
14089  if test "x$BOOT_JDK_FOUND" = xno; then
14090    # Now execute the test
14091
14092        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14093        if test -d "$BOOT_JDK"; then
14094          BOOT_JDK_FOUND=maybe
14095          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14096$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14097        fi
14098
14099
14100    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14101    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14102      # Do we have a bin/java?
14103      if test ! -x "$BOOT_JDK/bin/java"; then
14104        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14106        BOOT_JDK_FOUND=no
14107      else
14108        # Do we have a bin/javac?
14109        if test ! -x "$BOOT_JDK/bin/javac"; then
14110          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14111$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14112          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14113$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14114          BOOT_JDK_FOUND=no
14115        else
14116          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14117          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14118            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14120            BOOT_JDK_FOUND=no
14121          else
14122            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14123            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14124
14125            # Extra M4 quote needed to protect [] in grep expression.
14126            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14127            if test "x$FOUND_VERSION_78" = x; then
14128              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14129$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14130              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14131$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14132              BOOT_JDK_FOUND=no
14133            else
14134              # We're done! :-)
14135              BOOT_JDK_FOUND=yes
14136
14137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14138
14139  # Input might be given as Windows format, start by converting to
14140  # unix format.
14141  path="$BOOT_JDK"
14142  new_path=`$CYGPATH -u "$path"`
14143
14144  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14145  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14146  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14147  # "foo.exe" is OK but "foo" is an error.
14148  #
14149  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14150  # It is also a way to make sure we got the proper file name for the real test later on.
14151  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14152  if test "x$test_shortpath" = x; then
14153    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14154$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14155    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14156  fi
14157
14158  # Call helper function which possibly converts this using DOS-style short mode.
14159  # If so, the updated path is stored in $new_path.
14160
14161  input_path="$new_path"
14162  # Check if we need to convert this using DOS-style short mode. If the path
14163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14164  # take no chances and rewrite it.
14165  # Note: m4 eats our [], so we need to use [ and ] instead.
14166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14167  if test "x$has_forbidden_chars" != x; then
14168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14172      # Going to short mode and back again did indeed matter. Since short mode is
14173      # case insensitive, let's make it lowercase to improve readability.
14174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14175      # Now convert it back to Unix-stile (cygpath)
14176      input_path=`$CYGPATH -u "$shortmode_path"`
14177      new_path="$input_path"
14178    fi
14179  fi
14180
14181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14182  if test "x$test_cygdrive_prefix" = x; then
14183    # As a simple fix, exclude /usr/bin since it's not a real path.
14184    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14186      # a path prefixed by /cygdrive for fixpath to work.
14187      new_path="$CYGWIN_ROOT_PATH$input_path"
14188    fi
14189  fi
14190
14191
14192  if test "x$path" != "x$new_path"; then
14193    BOOT_JDK="$new_path"
14194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14195$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14196  fi
14197
14198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14199
14200  path="$BOOT_JDK"
14201  has_colon=`$ECHO $path | $GREP ^.:`
14202  new_path="$path"
14203  if test "x$has_colon" = x; then
14204    # Not in mixed or Windows style, start by that.
14205    new_path=`cmd //c echo $path`
14206  fi
14207
14208
14209  input_path="$new_path"
14210  # Check if we need to convert this using DOS-style short mode. If the path
14211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14212  # take no chances and rewrite it.
14213  # Note: m4 eats our [], so we need to use [ and ] instead.
14214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14215  if test "x$has_forbidden_chars" != x; then
14216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14218  fi
14219
14220
14221  windows_path="$new_path"
14222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14223    unix_path=`$CYGPATH -u "$windows_path"`
14224    new_path="$unix_path"
14225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14226    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14227    new_path="$unix_path"
14228  fi
14229
14230  if test "x$path" != "x$new_path"; then
14231    BOOT_JDK="$new_path"
14232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14233$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14234  fi
14235
14236  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14237  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14238
14239  else
14240    # We're on a posix platform. Hooray! :)
14241    path="$BOOT_JDK"
14242
14243    if test ! -f "$path" && test ! -d "$path"; then
14244      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14245    fi
14246
14247    has_space=`$ECHO "$path" | $GREP " "`
14248    if test "x$has_space" != x; then
14249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14250$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14251      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14252    fi
14253  fi
14254
14255              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14256$as_echo_n "checking for Boot JDK... " >&6; }
14257              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14258$as_echo "$BOOT_JDK" >&6; }
14259              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14260$as_echo_n "checking Boot JDK version... " >&6; }
14261              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14262              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14263$as_echo "$BOOT_JDK_VERSION" >&6; }
14264            fi # end check jdk version
14265          fi # end check rt.jar
14266        fi # end check javac
14267      fi # end check java
14268    fi # end check boot jdk found
14269  fi
14270
14271    done
14272  fi
14273
14274
14275    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14276    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14277      # Do we have a bin/java?
14278      if test ! -x "$BOOT_JDK/bin/java"; then
14279        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14280$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14281        BOOT_JDK_FOUND=no
14282      else
14283        # Do we have a bin/javac?
14284        if test ! -x "$BOOT_JDK/bin/javac"; then
14285          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14287          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14288$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14289          BOOT_JDK_FOUND=no
14290        else
14291          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14292          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14293            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14294$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14295            BOOT_JDK_FOUND=no
14296          else
14297            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14298            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14299
14300            # Extra M4 quote needed to protect [] in grep expression.
14301            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14302            if test "x$FOUND_VERSION_78" = x; then
14303              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14304$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14305              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14306$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14307              BOOT_JDK_FOUND=no
14308            else
14309              # We're done! :-)
14310              BOOT_JDK_FOUND=yes
14311
14312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14313
14314  # Input might be given as Windows format, start by converting to
14315  # unix format.
14316  path="$BOOT_JDK"
14317  new_path=`$CYGPATH -u "$path"`
14318
14319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14322  # "foo.exe" is OK but "foo" is an error.
14323  #
14324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14325  # It is also a way to make sure we got the proper file name for the real test later on.
14326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14327  if test "x$test_shortpath" = x; then
14328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14329$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14330    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14331  fi
14332
14333  # Call helper function which possibly converts this using DOS-style short mode.
14334  # If so, the updated path is stored in $new_path.
14335
14336  input_path="$new_path"
14337  # Check if we need to convert this using DOS-style short mode. If the path
14338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14339  # take no chances and rewrite it.
14340  # Note: m4 eats our [], so we need to use [ and ] instead.
14341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14342  if test "x$has_forbidden_chars" != x; then
14343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14347      # Going to short mode and back again did indeed matter. Since short mode is
14348      # case insensitive, let's make it lowercase to improve readability.
14349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14350      # Now convert it back to Unix-stile (cygpath)
14351      input_path=`$CYGPATH -u "$shortmode_path"`
14352      new_path="$input_path"
14353    fi
14354  fi
14355
14356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14357  if test "x$test_cygdrive_prefix" = x; then
14358    # As a simple fix, exclude /usr/bin since it's not a real path.
14359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14361      # a path prefixed by /cygdrive for fixpath to work.
14362      new_path="$CYGWIN_ROOT_PATH$input_path"
14363    fi
14364  fi
14365
14366
14367  if test "x$path" != "x$new_path"; then
14368    BOOT_JDK="$new_path"
14369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14370$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14371  fi
14372
14373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14374
14375  path="$BOOT_JDK"
14376  has_colon=`$ECHO $path | $GREP ^.:`
14377  new_path="$path"
14378  if test "x$has_colon" = x; then
14379    # Not in mixed or Windows style, start by that.
14380    new_path=`cmd //c echo $path`
14381  fi
14382
14383
14384  input_path="$new_path"
14385  # Check if we need to convert this using DOS-style short mode. If the path
14386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14387  # take no chances and rewrite it.
14388  # Note: m4 eats our [], so we need to use [ and ] instead.
14389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14390  if test "x$has_forbidden_chars" != x; then
14391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14393  fi
14394
14395
14396  windows_path="$new_path"
14397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14398    unix_path=`$CYGPATH -u "$windows_path"`
14399    new_path="$unix_path"
14400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14402    new_path="$unix_path"
14403  fi
14404
14405  if test "x$path" != "x$new_path"; then
14406    BOOT_JDK="$new_path"
14407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14408$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14409  fi
14410
14411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14413
14414  else
14415    # We're on a posix platform. Hooray! :)
14416    path="$BOOT_JDK"
14417
14418    if test ! -f "$path" && test ! -d "$path"; then
14419      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14420    fi
14421
14422    has_space=`$ECHO "$path" | $GREP " "`
14423    if test "x$has_space" != x; then
14424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14425$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14426      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14427    fi
14428  fi
14429
14430              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14431$as_echo_n "checking for Boot JDK... " >&6; }
14432              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14433$as_echo "$BOOT_JDK" >&6; }
14434              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14435$as_echo_n "checking Boot JDK version... " >&6; }
14436              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14437              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14438$as_echo "$BOOT_JDK_VERSION" >&6; }
14439            fi # end check jdk version
14440          fi # end check rt.jar
14441        fi # end check javac
14442      fi # end check java
14443    fi # end check boot jdk found
14444  fi
14445
14446
14447  if test "x$BOOT_JDK_FOUND" = xno; then
14448    # Now execute the test
14449
14450  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14451  BOOT_JDK_SUFFIX="/Contents/Home"
14452  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14453  if test "x$ALL_JDKS_FOUND" != x; then
14454    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14455
14456  if test "x$BOOT_JDK_FOUND" = xno; then
14457    # Now execute the test
14458
14459        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14460        if test -d "$BOOT_JDK"; then
14461          BOOT_JDK_FOUND=maybe
14462          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14463$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14464        fi
14465
14466
14467    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14468    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14469      # Do we have a bin/java?
14470      if test ! -x "$BOOT_JDK/bin/java"; then
14471        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14472$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14473        BOOT_JDK_FOUND=no
14474      else
14475        # Do we have a bin/javac?
14476        if test ! -x "$BOOT_JDK/bin/javac"; then
14477          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14479          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14480$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14481          BOOT_JDK_FOUND=no
14482        else
14483          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14484          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14485            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14487            BOOT_JDK_FOUND=no
14488          else
14489            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14490            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14491
14492            # Extra M4 quote needed to protect [] in grep expression.
14493            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14494            if test "x$FOUND_VERSION_78" = x; then
14495              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14496$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14497              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14498$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14499              BOOT_JDK_FOUND=no
14500            else
14501              # We're done! :-)
14502              BOOT_JDK_FOUND=yes
14503
14504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14505
14506  # Input might be given as Windows format, start by converting to
14507  # unix format.
14508  path="$BOOT_JDK"
14509  new_path=`$CYGPATH -u "$path"`
14510
14511  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14512  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14513  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14514  # "foo.exe" is OK but "foo" is an error.
14515  #
14516  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14517  # It is also a way to make sure we got the proper file name for the real test later on.
14518  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14519  if test "x$test_shortpath" = x; then
14520    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14521$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14522    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14523  fi
14524
14525  # Call helper function which possibly converts this using DOS-style short mode.
14526  # If so, the updated path is stored in $new_path.
14527
14528  input_path="$new_path"
14529  # Check if we need to convert this using DOS-style short mode. If the path
14530  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14531  # take no chances and rewrite it.
14532  # Note: m4 eats our [], so we need to use [ and ] instead.
14533  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14534  if test "x$has_forbidden_chars" != x; then
14535    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14536    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14537    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14538    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14539      # Going to short mode and back again did indeed matter. Since short mode is
14540      # case insensitive, let's make it lowercase to improve readability.
14541      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14542      # Now convert it back to Unix-stile (cygpath)
14543      input_path=`$CYGPATH -u "$shortmode_path"`
14544      new_path="$input_path"
14545    fi
14546  fi
14547
14548  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14549  if test "x$test_cygdrive_prefix" = x; then
14550    # As a simple fix, exclude /usr/bin since it's not a real path.
14551    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14552      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14553      # a path prefixed by /cygdrive for fixpath to work.
14554      new_path="$CYGWIN_ROOT_PATH$input_path"
14555    fi
14556  fi
14557
14558
14559  if test "x$path" != "x$new_path"; then
14560    BOOT_JDK="$new_path"
14561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14562$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14563  fi
14564
14565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14566
14567  path="$BOOT_JDK"
14568  has_colon=`$ECHO $path | $GREP ^.:`
14569  new_path="$path"
14570  if test "x$has_colon" = x; then
14571    # Not in mixed or Windows style, start by that.
14572    new_path=`cmd //c echo $path`
14573  fi
14574
14575
14576  input_path="$new_path"
14577  # Check if we need to convert this using DOS-style short mode. If the path
14578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14579  # take no chances and rewrite it.
14580  # Note: m4 eats our [], so we need to use [ and ] instead.
14581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14582  if test "x$has_forbidden_chars" != x; then
14583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14584    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14585  fi
14586
14587
14588  windows_path="$new_path"
14589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14590    unix_path=`$CYGPATH -u "$windows_path"`
14591    new_path="$unix_path"
14592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14594    new_path="$unix_path"
14595  fi
14596
14597  if test "x$path" != "x$new_path"; then
14598    BOOT_JDK="$new_path"
14599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14600$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14601  fi
14602
14603  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14604  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14605
14606  else
14607    # We're on a posix platform. Hooray! :)
14608    path="$BOOT_JDK"
14609
14610    if test ! -f "$path" && test ! -d "$path"; then
14611      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14612    fi
14613
14614    has_space=`$ECHO "$path" | $GREP " "`
14615    if test "x$has_space" != x; then
14616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14617$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14618      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14619    fi
14620  fi
14621
14622              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14623$as_echo_n "checking for Boot JDK... " >&6; }
14624              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14625$as_echo "$BOOT_JDK" >&6; }
14626              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14627$as_echo_n "checking Boot JDK version... " >&6; }
14628              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14630$as_echo "$BOOT_JDK_VERSION" >&6; }
14631            fi # end check jdk version
14632          fi # end check rt.jar
14633        fi # end check javac
14634      fi # end check java
14635    fi # end check boot jdk found
14636  fi
14637
14638    done
14639  fi
14640
14641
14642    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14643    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14644      # Do we have a bin/java?
14645      if test ! -x "$BOOT_JDK/bin/java"; then
14646        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14647$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14648        BOOT_JDK_FOUND=no
14649      else
14650        # Do we have a bin/javac?
14651        if test ! -x "$BOOT_JDK/bin/javac"; then
14652          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14653$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14654          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14655$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14656          BOOT_JDK_FOUND=no
14657        else
14658          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14659          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14660            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14661$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14662            BOOT_JDK_FOUND=no
14663          else
14664            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14665            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14666
14667            # Extra M4 quote needed to protect [] in grep expression.
14668            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14669            if test "x$FOUND_VERSION_78" = x; then
14670              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14672              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14673$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14674              BOOT_JDK_FOUND=no
14675            else
14676              # We're done! :-)
14677              BOOT_JDK_FOUND=yes
14678
14679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14680
14681  # Input might be given as Windows format, start by converting to
14682  # unix format.
14683  path="$BOOT_JDK"
14684  new_path=`$CYGPATH -u "$path"`
14685
14686  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14687  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14688  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14689  # "foo.exe" is OK but "foo" is an error.
14690  #
14691  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14692  # It is also a way to make sure we got the proper file name for the real test later on.
14693  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14694  if test "x$test_shortpath" = x; then
14695    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14696$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14697    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14698  fi
14699
14700  # Call helper function which possibly converts this using DOS-style short mode.
14701  # If so, the updated path is stored in $new_path.
14702
14703  input_path="$new_path"
14704  # Check if we need to convert this using DOS-style short mode. If the path
14705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14706  # take no chances and rewrite it.
14707  # Note: m4 eats our [], so we need to use [ and ] instead.
14708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14709  if test "x$has_forbidden_chars" != x; then
14710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14714      # Going to short mode and back again did indeed matter. Since short mode is
14715      # case insensitive, let's make it lowercase to improve readability.
14716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14717      # Now convert it back to Unix-stile (cygpath)
14718      input_path=`$CYGPATH -u "$shortmode_path"`
14719      new_path="$input_path"
14720    fi
14721  fi
14722
14723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14724  if test "x$test_cygdrive_prefix" = x; then
14725    # As a simple fix, exclude /usr/bin since it's not a real path.
14726    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14728      # a path prefixed by /cygdrive for fixpath to work.
14729      new_path="$CYGWIN_ROOT_PATH$input_path"
14730    fi
14731  fi
14732
14733
14734  if test "x$path" != "x$new_path"; then
14735    BOOT_JDK="$new_path"
14736    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14737$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14738  fi
14739
14740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14741
14742  path="$BOOT_JDK"
14743  has_colon=`$ECHO $path | $GREP ^.:`
14744  new_path="$path"
14745  if test "x$has_colon" = x; then
14746    # Not in mixed or Windows style, start by that.
14747    new_path=`cmd //c echo $path`
14748  fi
14749
14750
14751  input_path="$new_path"
14752  # Check if we need to convert this using DOS-style short mode. If the path
14753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14754  # take no chances and rewrite it.
14755  # Note: m4 eats our [], so we need to use [ and ] instead.
14756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14757  if test "x$has_forbidden_chars" != x; then
14758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14760  fi
14761
14762
14763  windows_path="$new_path"
14764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14765    unix_path=`$CYGPATH -u "$windows_path"`
14766    new_path="$unix_path"
14767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14769    new_path="$unix_path"
14770  fi
14771
14772  if test "x$path" != "x$new_path"; then
14773    BOOT_JDK="$new_path"
14774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14775$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14776  fi
14777
14778  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14779  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14780
14781  else
14782    # We're on a posix platform. Hooray! :)
14783    path="$BOOT_JDK"
14784
14785    if test ! -f "$path" && test ! -d "$path"; then
14786      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14787    fi
14788
14789    has_space=`$ECHO "$path" | $GREP " "`
14790    if test "x$has_space" != x; then
14791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14792$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14793      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14794    fi
14795  fi
14796
14797              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14798$as_echo_n "checking for Boot JDK... " >&6; }
14799              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14800$as_echo "$BOOT_JDK" >&6; }
14801              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14802$as_echo_n "checking Boot JDK version... " >&6; }
14803              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14804              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14805$as_echo "$BOOT_JDK_VERSION" >&6; }
14806            fi # end check jdk version
14807          fi # end check rt.jar
14808        fi # end check javac
14809      fi # end check java
14810    fi # end check boot jdk found
14811  fi
14812
14813  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
14814
14815  if test "x$BOOT_JDK_FOUND" = xno; then
14816    # Now execute the test
14817
14818  BOOT_JDK_PREFIX="/usr/lib/jvm"
14819  BOOT_JDK_SUFFIX=""
14820  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14821  if test "x$ALL_JDKS_FOUND" != x; then
14822    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14823
14824  if test "x$BOOT_JDK_FOUND" = xno; then
14825    # Now execute the test
14826
14827        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14828        if test -d "$BOOT_JDK"; then
14829          BOOT_JDK_FOUND=maybe
14830          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14831$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14832        fi
14833
14834
14835    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14836    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14837      # Do we have a bin/java?
14838      if test ! -x "$BOOT_JDK/bin/java"; then
14839        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14840$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14841        BOOT_JDK_FOUND=no
14842      else
14843        # Do we have a bin/javac?
14844        if test ! -x "$BOOT_JDK/bin/javac"; then
14845          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14847          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14848$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14849          BOOT_JDK_FOUND=no
14850        else
14851          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14852          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14853            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14854$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14855            BOOT_JDK_FOUND=no
14856          else
14857            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14858            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14859
14860            # Extra M4 quote needed to protect [] in grep expression.
14861            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14862            if test "x$FOUND_VERSION_78" = x; then
14863              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14864$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14865              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14866$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14867              BOOT_JDK_FOUND=no
14868            else
14869              # We're done! :-)
14870              BOOT_JDK_FOUND=yes
14871
14872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14873
14874  # Input might be given as Windows format, start by converting to
14875  # unix format.
14876  path="$BOOT_JDK"
14877  new_path=`$CYGPATH -u "$path"`
14878
14879  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14880  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14881  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14882  # "foo.exe" is OK but "foo" is an error.
14883  #
14884  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14885  # It is also a way to make sure we got the proper file name for the real test later on.
14886  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14887  if test "x$test_shortpath" = x; then
14888    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14889$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14890    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14891  fi
14892
14893  # Call helper function which possibly converts this using DOS-style short mode.
14894  # If so, the updated path is stored in $new_path.
14895
14896  input_path="$new_path"
14897  # Check if we need to convert this using DOS-style short mode. If the path
14898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14899  # take no chances and rewrite it.
14900  # Note: m4 eats our [], so we need to use [ and ] instead.
14901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14902  if test "x$has_forbidden_chars" != x; then
14903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14904    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14905    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14906    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14907      # Going to short mode and back again did indeed matter. Since short mode is
14908      # case insensitive, let's make it lowercase to improve readability.
14909      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14910      # Now convert it back to Unix-stile (cygpath)
14911      input_path=`$CYGPATH -u "$shortmode_path"`
14912      new_path="$input_path"
14913    fi
14914  fi
14915
14916  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14917  if test "x$test_cygdrive_prefix" = x; then
14918    # As a simple fix, exclude /usr/bin since it's not a real path.
14919    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14920      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14921      # a path prefixed by /cygdrive for fixpath to work.
14922      new_path="$CYGWIN_ROOT_PATH$input_path"
14923    fi
14924  fi
14925
14926
14927  if test "x$path" != "x$new_path"; then
14928    BOOT_JDK="$new_path"
14929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14931  fi
14932
14933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14934
14935  path="$BOOT_JDK"
14936  has_colon=`$ECHO $path | $GREP ^.:`
14937  new_path="$path"
14938  if test "x$has_colon" = x; then
14939    # Not in mixed or Windows style, start by that.
14940    new_path=`cmd //c echo $path`
14941  fi
14942
14943
14944  input_path="$new_path"
14945  # Check if we need to convert this using DOS-style short mode. If the path
14946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14947  # take no chances and rewrite it.
14948  # Note: m4 eats our [], so we need to use [ and ] instead.
14949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14950  if test "x$has_forbidden_chars" != x; then
14951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14953  fi
14954
14955
14956  windows_path="$new_path"
14957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14958    unix_path=`$CYGPATH -u "$windows_path"`
14959    new_path="$unix_path"
14960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14961    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14962    new_path="$unix_path"
14963  fi
14964
14965  if test "x$path" != "x$new_path"; then
14966    BOOT_JDK="$new_path"
14967    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14968$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14969  fi
14970
14971  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14972  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14973
14974  else
14975    # We're on a posix platform. Hooray! :)
14976    path="$BOOT_JDK"
14977
14978    if test ! -f "$path" && test ! -d "$path"; then
14979      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14980    fi
14981
14982    has_space=`$ECHO "$path" | $GREP " "`
14983    if test "x$has_space" != x; then
14984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14986      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14987    fi
14988  fi
14989
14990              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14991$as_echo_n "checking for Boot JDK... " >&6; }
14992              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14993$as_echo "$BOOT_JDK" >&6; }
14994              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14995$as_echo_n "checking Boot JDK version... " >&6; }
14996              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14997              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14998$as_echo "$BOOT_JDK_VERSION" >&6; }
14999            fi # end check jdk version
15000          fi # end check rt.jar
15001        fi # end check javac
15002      fi # end check java
15003    fi # end check boot jdk found
15004  fi
15005
15006    done
15007  fi
15008
15009
15010    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15011    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15012      # Do we have a bin/java?
15013      if test ! -x "$BOOT_JDK/bin/java"; then
15014        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15015$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15016        BOOT_JDK_FOUND=no
15017      else
15018        # Do we have a bin/javac?
15019        if test ! -x "$BOOT_JDK/bin/javac"; then
15020          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15022          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15023$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15024          BOOT_JDK_FOUND=no
15025        else
15026          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15027          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15028            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15030            BOOT_JDK_FOUND=no
15031          else
15032            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15033            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15034
15035            # Extra M4 quote needed to protect [] in grep expression.
15036            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15037            if test "x$FOUND_VERSION_78" = x; then
15038              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15040              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15041$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15042              BOOT_JDK_FOUND=no
15043            else
15044              # We're done! :-)
15045              BOOT_JDK_FOUND=yes
15046
15047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15048
15049  # Input might be given as Windows format, start by converting to
15050  # unix format.
15051  path="$BOOT_JDK"
15052  new_path=`$CYGPATH -u "$path"`
15053
15054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15057  # "foo.exe" is OK but "foo" is an error.
15058  #
15059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15060  # It is also a way to make sure we got the proper file name for the real test later on.
15061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15062  if test "x$test_shortpath" = x; then
15063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15065    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15066  fi
15067
15068  # Call helper function which possibly converts this using DOS-style short mode.
15069  # If so, the updated path is stored in $new_path.
15070
15071  input_path="$new_path"
15072  # Check if we need to convert this using DOS-style short mode. If the path
15073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15074  # take no chances and rewrite it.
15075  # Note: m4 eats our [], so we need to use [ and ] instead.
15076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15077  if test "x$has_forbidden_chars" != x; then
15078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15082      # Going to short mode and back again did indeed matter. Since short mode is
15083      # case insensitive, let's make it lowercase to improve readability.
15084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15085      # Now convert it back to Unix-stile (cygpath)
15086      input_path=`$CYGPATH -u "$shortmode_path"`
15087      new_path="$input_path"
15088    fi
15089  fi
15090
15091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15092  if test "x$test_cygdrive_prefix" = x; then
15093    # As a simple fix, exclude /usr/bin since it's not a real path.
15094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15096      # a path prefixed by /cygdrive for fixpath to work.
15097      new_path="$CYGWIN_ROOT_PATH$input_path"
15098    fi
15099  fi
15100
15101
15102  if test "x$path" != "x$new_path"; then
15103    BOOT_JDK="$new_path"
15104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15106  fi
15107
15108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15109
15110  path="$BOOT_JDK"
15111  has_colon=`$ECHO $path | $GREP ^.:`
15112  new_path="$path"
15113  if test "x$has_colon" = x; then
15114    # Not in mixed or Windows style, start by that.
15115    new_path=`cmd //c echo $path`
15116  fi
15117
15118
15119  input_path="$new_path"
15120  # Check if we need to convert this using DOS-style short mode. If the path
15121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15122  # take no chances and rewrite it.
15123  # Note: m4 eats our [], so we need to use [ and ] instead.
15124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15125  if test "x$has_forbidden_chars" != x; then
15126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15128  fi
15129
15130
15131  windows_path="$new_path"
15132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15133    unix_path=`$CYGPATH -u "$windows_path"`
15134    new_path="$unix_path"
15135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15137    new_path="$unix_path"
15138  fi
15139
15140  if test "x$path" != "x$new_path"; then
15141    BOOT_JDK="$new_path"
15142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15144  fi
15145
15146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15148
15149  else
15150    # We're on a posix platform. Hooray! :)
15151    path="$BOOT_JDK"
15152
15153    if test ! -f "$path" && test ! -d "$path"; then
15154      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15155    fi
15156
15157    has_space=`$ECHO "$path" | $GREP " "`
15158    if test "x$has_space" != x; then
15159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15160$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15161      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15162    fi
15163  fi
15164
15165              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15166$as_echo_n "checking for Boot JDK... " >&6; }
15167              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15168$as_echo "$BOOT_JDK" >&6; }
15169              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15170$as_echo_n "checking Boot JDK version... " >&6; }
15171              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15172              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15173$as_echo "$BOOT_JDK_VERSION" >&6; }
15174            fi # end check jdk version
15175          fi # end check rt.jar
15176        fi # end check javac
15177      fi # end check java
15178    fi # end check boot jdk found
15179  fi
15180
15181  fi
15182
15183
15184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15186      # Do we have a bin/java?
15187      if test ! -x "$BOOT_JDK/bin/java"; then
15188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15190        BOOT_JDK_FOUND=no
15191      else
15192        # Do we have a bin/javac?
15193        if test ! -x "$BOOT_JDK/bin/javac"; then
15194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15198          BOOT_JDK_FOUND=no
15199        else
15200          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15201          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15204            BOOT_JDK_FOUND=no
15205          else
15206            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15207            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15208
15209            # Extra M4 quote needed to protect [] in grep expression.
15210            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15211            if test "x$FOUND_VERSION_78" = x; then
15212              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15214              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15215$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15216              BOOT_JDK_FOUND=no
15217            else
15218              # We're done! :-)
15219              BOOT_JDK_FOUND=yes
15220
15221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15222
15223  # Input might be given as Windows format, start by converting to
15224  # unix format.
15225  path="$BOOT_JDK"
15226  new_path=`$CYGPATH -u "$path"`
15227
15228  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15229  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15230  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15231  # "foo.exe" is OK but "foo" is an error.
15232  #
15233  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15234  # It is also a way to make sure we got the proper file name for the real test later on.
15235  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15236  if test "x$test_shortpath" = x; then
15237    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15238$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15239    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15240  fi
15241
15242  # Call helper function which possibly converts this using DOS-style short mode.
15243  # If so, the updated path is stored in $new_path.
15244
15245  input_path="$new_path"
15246  # Check if we need to convert this using DOS-style short mode. If the path
15247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15248  # take no chances and rewrite it.
15249  # Note: m4 eats our [], so we need to use [ and ] instead.
15250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15251  if test "x$has_forbidden_chars" != x; then
15252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15253    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15254    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15255    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15256      # Going to short mode and back again did indeed matter. Since short mode is
15257      # case insensitive, let's make it lowercase to improve readability.
15258      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15259      # Now convert it back to Unix-stile (cygpath)
15260      input_path=`$CYGPATH -u "$shortmode_path"`
15261      new_path="$input_path"
15262    fi
15263  fi
15264
15265  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15266  if test "x$test_cygdrive_prefix" = x; then
15267    # As a simple fix, exclude /usr/bin since it's not a real path.
15268    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15269      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15270      # a path prefixed by /cygdrive for fixpath to work.
15271      new_path="$CYGWIN_ROOT_PATH$input_path"
15272    fi
15273  fi
15274
15275
15276  if test "x$path" != "x$new_path"; then
15277    BOOT_JDK="$new_path"
15278    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15279$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15280  fi
15281
15282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15283
15284  path="$BOOT_JDK"
15285  has_colon=`$ECHO $path | $GREP ^.:`
15286  new_path="$path"
15287  if test "x$has_colon" = x; then
15288    # Not in mixed or Windows style, start by that.
15289    new_path=`cmd //c echo $path`
15290  fi
15291
15292
15293  input_path="$new_path"
15294  # Check if we need to convert this using DOS-style short mode. If the path
15295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15296  # take no chances and rewrite it.
15297  # Note: m4 eats our [], so we need to use [ and ] instead.
15298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15299  if test "x$has_forbidden_chars" != x; then
15300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15302  fi
15303
15304
15305  windows_path="$new_path"
15306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15307    unix_path=`$CYGPATH -u "$windows_path"`
15308    new_path="$unix_path"
15309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15311    new_path="$unix_path"
15312  fi
15313
15314  if test "x$path" != "x$new_path"; then
15315    BOOT_JDK="$new_path"
15316    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15317$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15318  fi
15319
15320  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15321  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15322
15323  else
15324    # We're on a posix platform. Hooray! :)
15325    path="$BOOT_JDK"
15326
15327    if test ! -f "$path" && test ! -d "$path"; then
15328      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15329    fi
15330
15331    has_space=`$ECHO "$path" | $GREP " "`
15332    if test "x$has_space" != x; then
15333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15335      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15336    fi
15337  fi
15338
15339              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15340$as_echo_n "checking for Boot JDK... " >&6; }
15341              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15342$as_echo "$BOOT_JDK" >&6; }
15343              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15344$as_echo_n "checking Boot JDK version... " >&6; }
15345              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15346              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15347$as_echo "$BOOT_JDK_VERSION" >&6; }
15348            fi # end check jdk version
15349          fi # end check rt.jar
15350        fi # end check javac
15351      fi # end check java
15352    fi # end check boot jdk found
15353  fi
15354
15355
15356# If we haven't found anything yet, we've truly lost. Give up.
15357if test "x$BOOT_JDK_FOUND" = xno; then
15358
15359    # Print a helpful message on how to acquire the necessary build dependency.
15360    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15361    MISSING_DEPENDENCY=openjdk
15362    PKGHANDLER_COMMAND=
15363
15364    case $PKGHANDLER in
15365	apt-get)
15366                apt_help     $MISSING_DEPENDENCY ;;
15367    yum)
15368                yum_help     $MISSING_DEPENDENCY ;;
15369	port)
15370                port_help    $MISSING_DEPENDENCY ;;
15371	pkgutil)
15372                pkgutil_help $MISSING_DEPENDENCY ;;
15373	pkgadd)
15374                pkgadd_help  $MISSING_DEPENDENCY ;;
15375    * )
15376      break ;;
15377    esac
15378
15379    if test "x$PKGHANDLER_COMMAND" != x; then
15380        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15381    fi
15382
15383  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15384$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15385  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15386$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15387  as_fn_error $? "Cannot continue" "$LINENO" 5
15388fi
15389
15390# Setup proper paths for what we found
15391BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15392if test ! -f "$BOOT_RTJAR"; then
15393    # On MacOSX it is called classes.jar
15394    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15395    if test -f "$BOOT_RTJAR"; then
15396      # Remove the ..
15397      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15398    fi
15399fi
15400BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15401BOOT_JDK="$BOOT_JDK"
15402
15403
15404
15405
15406# Setup tools from the Boot JDK.
15407
15408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15409$as_echo_n "checking for java in Boot JDK... " >&6; }
15410  JAVA=$BOOT_JDK/bin/java
15411  if test ! -x $JAVA; then
15412      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15413$as_echo "not found" >&6; }
15414      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15415$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15416      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15417  fi
15418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15419$as_echo "ok" >&6; }
15420
15421
15422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15423$as_echo_n "checking for javac in Boot JDK... " >&6; }
15424  JAVAC=$BOOT_JDK/bin/javac
15425  if test ! -x $JAVAC; then
15426      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15427$as_echo "not found" >&6; }
15428      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15429$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15430      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15431  fi
15432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15433$as_echo "ok" >&6; }
15434
15435
15436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15437$as_echo_n "checking for javah in Boot JDK... " >&6; }
15438  JAVAH=$BOOT_JDK/bin/javah
15439  if test ! -x $JAVAH; then
15440      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15441$as_echo "not found" >&6; }
15442      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15443$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15444      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15445  fi
15446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15447$as_echo "ok" >&6; }
15448
15449
15450  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15451$as_echo_n "checking for javap in Boot JDK... " >&6; }
15452  JAVAP=$BOOT_JDK/bin/javap
15453  if test ! -x $JAVAP; then
15454      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15455$as_echo "not found" >&6; }
15456      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15457$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15458      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15459  fi
15460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15461$as_echo "ok" >&6; }
15462
15463
15464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15465$as_echo_n "checking for jar in Boot JDK... " >&6; }
15466  JAR=$BOOT_JDK/bin/jar
15467  if test ! -x $JAR; then
15468      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15469$as_echo "not found" >&6; }
15470      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15471$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15472      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15473  fi
15474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15475$as_echo "ok" >&6; }
15476
15477
15478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15479$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15480  RMIC=$BOOT_JDK/bin/rmic
15481  if test ! -x $RMIC; then
15482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15483$as_echo "not found" >&6; }
15484      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15485$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15486      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15487  fi
15488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15489$as_echo "ok" >&6; }
15490
15491
15492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15493$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15494  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15495  if test ! -x $NATIVE2ASCII; then
15496      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15497$as_echo "not found" >&6; }
15498      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15499$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15500      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15501  fi
15502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15503$as_echo "ok" >&6; }
15504
15505
15506# Finally, set some other options...
15507
15508# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15509BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15510
15511
15512
15513
15514##############################################################################
15515#
15516# Specify options for anything that is run with the Boot JDK.
15517#
15518
15519# Check whether --with-boot-jdk-jvmargs was given.
15520if test "${with_boot_jdk_jvmargs+set}" = set; then :
15521  withval=$with_boot_jdk_jvmargs;
15522fi
15523
15524
15525if test "x$with_boot_jdk_jvmargs" = x; then
15526    # Not all JVM:s accept the same arguments on the command line.
15527    # OpenJDK specific increase in thread stack for JDK build,
15528    # well more specifically, when running javac.
15529    if test "x$BUILD_NUM_BITS" = x32; then
15530       STACK_SIZE=768
15531    else
15532       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15533       # since 64-bit pointers are pushed on the stach. Apparently, we need
15534       # to increase the stack space when javacing the JDK....
15535       STACK_SIZE=1536
15536    fi
15537
15538    # Minimum amount of heap memory.
15539
15540    # Test if -Xms64M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15541    # If so, then append -Xms64M to boot_jdk_jvmargs
15542    FOUND_WARN=`$JAVA -Xms64M -version 2>&1 | grep -i warn`
15543    FOUND_VERSION=`$JAVA -Xms64M -version 2>&1 | grep " version \""`
15544    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15545        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15546    fi
15547
15548    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15549        # Why does macosx need more heap? Its the huge JDK batch.
15550
15551    # Test if -Xmx1600M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15552    # If so, then append -Xmx1600M to boot_jdk_jvmargs
15553    FOUND_WARN=`$JAVA -Xmx1600M -version 2>&1 | grep -i warn`
15554    FOUND_VERSION=`$JAVA -Xmx1600M -version 2>&1 | grep " version \""`
15555    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15556        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15557    fi
15558
15559    else
15560
15561    # Test if -Xmx1100M is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15562    # If so, then append -Xmx1100M to boot_jdk_jvmargs
15563    FOUND_WARN=`$JAVA -Xmx1100M -version 2>&1 | grep -i warn`
15564    FOUND_VERSION=`$JAVA -Xmx1100M -version 2>&1 | grep " version \""`
15565    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15566        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15567    fi
15568
15569    fi
15570    # When is adding -client something that speeds up the JVM?
15571    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15572
15573    # Test if -XX:PermSize=32m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15574    # If so, then append -XX:PermSize=32m to boot_jdk_jvmargs
15575    FOUND_WARN=`$JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
15576    FOUND_VERSION=`$JAVA -XX:PermSize=32m -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 -XX:PermSize=32m"
15579    fi
15580
15581
15582    # Test if -XX:MaxPermSize=160m is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15583    # If so, then append -XX:MaxPermSize=160m to boot_jdk_jvmargs
15584    FOUND_WARN=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
15585    FOUND_VERSION=`$JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
15586    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15587        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15588    fi
15589
15590
15591    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15592    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to boot_jdk_jvmargs
15593    FOUND_WARN=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
15594    FOUND_VERSION=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
15595    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15596        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15597    fi
15598
15599    # Disable special log output when a debug build is used as Boot JDK...
15600
15601    # Test if -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
15602    # If so, then append -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput to boot_jdk_jvmargs
15603    FOUND_WARN=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep -i warn`
15604    FOUND_VERSION=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1 | grep " version \""`
15605    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15606        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15607    fi
15608
15609fi
15610
15611BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15612
15613
15614
15615###############################################################################
15616#
15617# Configure the sources to use. We can add or override individual directories.
15618#
15619###############################################################################
15620
15621
15622
15623# Where are the sources. Any of these can be overridden
15624# using --with-override-corba and the likes.
15625LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15626CORBA_TOPDIR="$SRC_ROOT/corba"
15627JAXP_TOPDIR="$SRC_ROOT/jaxp"
15628JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15629HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15630JDK_TOPDIR="$SRC_ROOT/jdk"
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640###############################################################################
15641#
15642# Pickup additional source for a component from outside of the source root
15643# or override source for a component.
15644#
15645
15646# Check whether --with-add-source-root was given.
15647if test "${with_add_source_root+set}" = set; then :
15648  withval=$with_add_source_root;
15649fi
15650
15651
15652
15653# Check whether --with-override-source-root was given.
15654if test "${with_override_source_root+set}" = set; then :
15655  withval=$with_override_source_root;
15656fi
15657
15658
15659
15660# Check whether --with-adds-and-overrides was given.
15661if test "${with_adds_and_overrides+set}" = set; then :
15662  withval=$with_adds_and_overrides;
15663fi
15664
15665
15666if test "x$with_adds_and_overrides" != x; then
15667    with_add_source_root="$with_adds_and_overrides/adds"
15668    with_override_source_root="$with_adds_and_overrides/overrides"
15669fi
15670
15671if test "x$with_add_source_root" != x; then
15672    if ! test -d $with_add_source_root; then
15673       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15674    fi
15675    CURDIR="$PWD"
15676    cd "$with_add_source_root"
15677    ADD_SRC_ROOT="`pwd`"
15678    cd "$CURDIR"
15679    # Verify that the addon source root does not have any root makefiles.
15680    # If it does, then it is usually an error, prevent this.
15681    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15682       test -f $with_add_source_root/langtools/make/Makefile; then
15683        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
15684    fi
15685    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15686       test -f $with_add_source_root/corba/make/Makefile; then
15687        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
15688    fi
15689    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15690       test -f $with_add_source_root/jaxp/make/Makefile; then
15691        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
15692    fi
15693    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15694       test -f $with_add_source_root/jaxws/make/Makefile; then
15695        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
15696    fi
15697    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15698       test -f $with_add_source_root/hotspot/make/Makefile; then
15699        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
15700    fi
15701    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15702       test -f $with_add_source_root/jdk/make/Makefile; then
15703        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
15704    fi
15705fi
15706
15707
15708if test "x$with_override_source_root" != x; then
15709    if ! test -d $with_override_source_root; then
15710       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
15711    fi
15712    CURDIR="$PWD"
15713    cd "$with_override_source_root"
15714    OVERRIDE_SRC_ROOT="`pwd`"
15715    cd "$CURDIR"
15716    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
15717       test -f $with_override_source_root/langtools/make/Makefile; then
15718        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
15719    fi
15720    if test -f $with_override_source_root/corba/makefiles/Makefile || \
15721       test -f $with_override_source_root/corba/make/Makefile; then
15722        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
15723    fi
15724    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
15725       test -f $with_override_source_root/jaxp/make/Makefile; then
15726        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
15727    fi
15728    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
15729       test -f $with_override_source_root/jaxws/make/Makefile; then
15730        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
15731    fi
15732    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
15733       test -f $with_override_source_root/hotspot/make/Makefile; then
15734        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
15735    fi
15736    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
15737       test -f $with_override_source_root/jdk/make/Makefile; then
15738        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
15739    fi
15740fi
15741
15742
15743###############################################################################
15744#
15745# Override a repo completely, this is used for example when you have 3 small
15746# development sandboxes of the langtools sources and want to avoid having 3 full
15747# OpenJDK sources checked out on disk.
15748#
15749# Assuming that the 3 langtools sandboxes are located here:
15750# /home/fredrik/sandbox1/langtools
15751# /home/fredrik/sandbox2/langtools
15752# /home/fredrik/sandbox3/langtools
15753#
15754# From the source root you create build subdirs manually:
15755#     mkdir -p build1 build2 build3
15756# in each build directory run:
15757#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
15758#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
15759#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
15760#
15761
15762
15763# Check whether --with-override-langtools was given.
15764if test "${with_override_langtools+set}" = set; then :
15765  withval=$with_override_langtools;
15766fi
15767
15768
15769
15770# Check whether --with-override-corba was given.
15771if test "${with_override_corba+set}" = set; then :
15772  withval=$with_override_corba;
15773fi
15774
15775
15776
15777# Check whether --with-override-jaxp was given.
15778if test "${with_override_jaxp+set}" = set; then :
15779  withval=$with_override_jaxp;
15780fi
15781
15782
15783
15784# Check whether --with-override-jaxws was given.
15785if test "${with_override_jaxws+set}" = set; then :
15786  withval=$with_override_jaxws;
15787fi
15788
15789
15790
15791# Check whether --with-override-hotspot was given.
15792if test "${with_override_hotspot+set}" = set; then :
15793  withval=$with_override_hotspot;
15794fi
15795
15796
15797
15798# Check whether --with-override-jdk was given.
15799if test "${with_override_jdk+set}" = set; then :
15800  withval=$with_override_jdk;
15801fi
15802
15803
15804if test "x$with_override_langtools" != x; then
15805    CURDIR="$PWD"
15806    cd "$with_override_langtools"
15807    LANGTOOLS_TOPDIR="`pwd`"
15808    cd "$CURDIR"
15809    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
15810        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
15811    fi
15812    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
15813$as_echo_n "checking if langtools should be overridden... " >&6; }
15814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
15815$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
15816fi
15817if test "x$with_override_corba" != x; then
15818    CURDIR="$PWD"
15819    cd "$with_override_corba"
15820    CORBA_TOPDIR="`pwd`"
15821    cd "$CURDIR"
15822    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
15823        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
15824    fi
15825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
15826$as_echo_n "checking if corba should be overridden... " >&6; }
15827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
15828$as_echo "yes with $CORBA_TOPDIR" >&6; }
15829fi
15830if test "x$with_override_jaxp" != x; then
15831    CURDIR="$PWD"
15832    cd "$with_override_jaxp"
15833    JAXP_TOPDIR="`pwd`"
15834    cd "$CURDIR"
15835    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
15836        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
15837    fi
15838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
15839$as_echo_n "checking if jaxp should be overridden... " >&6; }
15840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
15841$as_echo "yes with $JAXP_TOPDIR" >&6; }
15842fi
15843if test "x$with_override_jaxws" != x; then
15844    CURDIR="$PWD"
15845    cd "$with_override_jaxws"
15846    JAXWS_TOPDIR="`pwd`"
15847    cd "$CURDIR"
15848    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
15849        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
15850    fi
15851    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
15852$as_echo_n "checking if jaxws should be overridden... " >&6; }
15853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
15854$as_echo "yes with $JAXWS_TOPDIR" >&6; }
15855fi
15856if test "x$with_override_hotspot" != x; then
15857    CURDIR="$PWD"
15858    cd "$with_override_hotspot"
15859    HOTSPOT_TOPDIR="`pwd`"
15860    cd "$CURDIR"
15861    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
15862       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
15863        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
15864    fi
15865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
15866$as_echo_n "checking if hotspot should be overridden... " >&6; }
15867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
15868$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
15869fi
15870if test "x$with_override_jdk" != x; then
15871    CURDIR="$PWD"
15872    cd "$with_override_jdk"
15873    JDK_TOPDIR="`pwd`"
15874    cd "$CURDIR"
15875    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
15876        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
15877    fi
15878    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
15879$as_echo_n "checking if JDK should be overridden... " >&6; }
15880    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
15881$as_echo "yes with $JDK_TOPDIR" >&6; }
15882fi
15883
15884
15885
15886BUILD_OUTPUT="$OUTPUT_ROOT"
15887
15888
15889HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
15890BUILD_HOTSPOT=true
15891
15892
15893
15894# Check whether --with-import-hotspot was given.
15895if test "${with_import_hotspot+set}" = set; then :
15896  withval=$with_import_hotspot;
15897fi
15898
15899if test "x$with_import_hotspot" != x; then
15900    CURDIR="$PWD"
15901    cd "$with_import_hotspot"
15902    HOTSPOT_DIST="`pwd`"
15903    cd "$CURDIR"
15904    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
15905        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
15906    fi
15907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
15908$as_echo_n "checking if hotspot should be imported... " >&6; }
15909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
15910$as_echo "yes from $HOTSPOT_DIST" >&6; }
15911    BUILD_HOTSPOT=false
15912fi
15913
15914JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
15915
15916
15917###############################################################################
15918#
15919# Setup the toolchain (compilers etc), i.e. the tools that need to be
15920# cross-compilation aware.
15921#
15922###############################################################################
15923
15924
15925###############################################################################
15926#
15927# Configure the development tool paths and potential sysroot.
15928#
15929ac_ext=cpp
15930ac_cpp='$CXXCPP $CPPFLAGS'
15931ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15932ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15933ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15934
15935
15936# The option used to specify the target .o,.a or .so file.
15937# When compiling, how to specify the to be created object file.
15938CC_OUT_OPTION='-o$(SPACE)'
15939# When linking, how to specify the to be created executable.
15940EXE_OUT_OPTION='-o$(SPACE)'
15941# When linking, how to specify the to be created dynamically linkable library.
15942LD_OUT_OPTION='-o$(SPACE)'
15943# When archiving, how to specify the to be create static archive for object files.
15944AR_OUT_OPTION='rcs$(SPACE)'
15945
15946
15947
15948
15949
15950# Locate the actual tools
15951
15952if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15953
15954  # Store path to cygwin link.exe to help excluding it when searching for
15955  # VS linker. This must be done before changing the PATH when looking for VS.
15956  # Extract the first word of "link", so it can be a program name with args.
15957set dummy link; ac_word=$2
15958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15959$as_echo_n "checking for $ac_word... " >&6; }
15960if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
15961  $as_echo_n "(cached) " >&6
15962else
15963  case $CYGWIN_LINK in
15964  [\\/]* | ?:[\\/]*)
15965  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
15966  ;;
15967  *)
15968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15969for as_dir in $PATH
15970do
15971  IFS=$as_save_IFS
15972  test -z "$as_dir" && as_dir=.
15973    for ac_exec_ext in '' $ac_executable_extensions; do
15974  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15975    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
15976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15977    break 2
15978  fi
15979done
15980  done
15981IFS=$as_save_IFS
15982
15983  ;;
15984esac
15985fi
15986CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
15987if test -n "$CYGWIN_LINK"; then
15988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
15989$as_echo "$CYGWIN_LINK" >&6; }
15990else
15991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15992$as_echo "no" >&6; }
15993fi
15994
15995
15996  if test "x$CYGWIN_LINK" != x; then
15997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
15998$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
15999    "$CYGWIN_LINK" --version > /dev/null
16000    if test $? -eq 0 ; then
16001      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16002$as_echo "yes" >&6; }
16003    else
16004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16005$as_echo "no" >&6; }
16006      # This might be the VS linker. Don't exclude it later on.
16007      CYGWIN_LINK=""
16008    fi
16009  fi
16010
16011  # First-hand choice is to locate and run the vsvars bat file.
16012
16013  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16014    VCVARSFILE="vc/bin/vcvars32.bat"
16015  else
16016    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16017  fi
16018
16019  VS_ENV_CMD=""
16020  VS_ENV_ARGS=""
16021  if test "x$with_toolsdir" != x; then
16022
16023  if test "x$VS_ENV_CMD" = x; then
16024    VS100BASE="$with_toolsdir/../.."
16025    METHOD="--with-tools-dir"
16026
16027  windows_path="$VS100BASE"
16028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16029    unix_path=`$CYGPATH -u "$windows_path"`
16030    VS100BASE="$unix_path"
16031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16033    VS100BASE="$unix_path"
16034  fi
16035
16036    if test -d "$VS100BASE"; then
16037      if test -f "$VS100BASE/$VCVARSFILE"; then
16038        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16039$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16040        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16041      else
16042        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16043$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16044        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16045$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16046      fi
16047    fi
16048  fi
16049
16050  fi
16051
16052  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16053    # Having specified an argument which is incorrect will produce an instant failure;
16054    # we should not go on looking
16055    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16056$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16057    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16058$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16059    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16060  fi
16061
16062  if test "x$ProgramW6432" != x; then
16063
16064  if test "x$VS_ENV_CMD" = x; then
16065    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16066    METHOD="well-known name"
16067
16068  windows_path="$WIN_SDK_BASE"
16069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16070    unix_path=`$CYGPATH -u "$windows_path"`
16071    WIN_SDK_BASE="$unix_path"
16072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16074    WIN_SDK_BASE="$unix_path"
16075  fi
16076
16077    if test -d "$WIN_SDK_BASE"; then
16078      # There have been cases of partial or broken SDK installations. A missing
16079      # lib dir is not going to work.
16080      if test ! -d "$WIN_SDK_BASE/../lib"; then
16081        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16082$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16083        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16084$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16085      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16086        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16087$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16088        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16089        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16090          VS_ENV_ARGS="/x86"
16091        else
16092          VS_ENV_ARGS="/x64"
16093        fi
16094      else
16095        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16096$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16097        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16098$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16099      fi
16100    fi
16101  fi
16102
16103  fi
16104  if test "x$PROGRAMW6432" != x; then
16105
16106  if test "x$VS_ENV_CMD" = x; then
16107    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16108    METHOD="well-known name"
16109
16110  windows_path="$WIN_SDK_BASE"
16111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16112    unix_path=`$CYGPATH -u "$windows_path"`
16113    WIN_SDK_BASE="$unix_path"
16114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16116    WIN_SDK_BASE="$unix_path"
16117  fi
16118
16119    if test -d "$WIN_SDK_BASE"; then
16120      # There have been cases of partial or broken SDK installations. A missing
16121      # lib dir is not going to work.
16122      if test ! -d "$WIN_SDK_BASE/../lib"; then
16123        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16124$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16125        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16126$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16127      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16131        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16132          VS_ENV_ARGS="/x86"
16133        else
16134          VS_ENV_ARGS="/x64"
16135        fi
16136      else
16137        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16138$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16139        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16140$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16141      fi
16142    fi
16143  fi
16144
16145  fi
16146  if test "x$PROGRAMFILES" != x; then
16147
16148  if test "x$VS_ENV_CMD" = x; then
16149    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16150    METHOD="well-known name"
16151
16152  windows_path="$WIN_SDK_BASE"
16153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16154    unix_path=`$CYGPATH -u "$windows_path"`
16155    WIN_SDK_BASE="$unix_path"
16156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16158    WIN_SDK_BASE="$unix_path"
16159  fi
16160
16161    if test -d "$WIN_SDK_BASE"; then
16162      # There have been cases of partial or broken SDK installations. A missing
16163      # lib dir is not going to work.
16164      if test ! -d "$WIN_SDK_BASE/../lib"; then
16165        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16166$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16167        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16168$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16169      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
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        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16173        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16174          VS_ENV_ARGS="/x86"
16175        else
16176          VS_ENV_ARGS="/x64"
16177        fi
16178      else
16179        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16180$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16181        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16182$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16183      fi
16184    fi
16185  fi
16186
16187  fi
16188
16189  if test "x$VS_ENV_CMD" = x; then
16190    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16191    METHOD="well-known name"
16192
16193  windows_path="$WIN_SDK_BASE"
16194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16195    unix_path=`$CYGPATH -u "$windows_path"`
16196    WIN_SDK_BASE="$unix_path"
16197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16199    WIN_SDK_BASE="$unix_path"
16200  fi
16201
16202    if test -d "$WIN_SDK_BASE"; then
16203      # There have been cases of partial or broken SDK installations. A missing
16204      # lib dir is not going to work.
16205      if test ! -d "$WIN_SDK_BASE/../lib"; then
16206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16208        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16209$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16210      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16211        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16212$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16213        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16214        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16215          VS_ENV_ARGS="/x86"
16216        else
16217          VS_ENV_ARGS="/x64"
16218        fi
16219      else
16220        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16221$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16222        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16223$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16224      fi
16225    fi
16226  fi
16227
16228
16229  if test "x$VS_ENV_CMD" = x; then
16230    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16231    METHOD="well-known name"
16232
16233  windows_path="$WIN_SDK_BASE"
16234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16235    unix_path=`$CYGPATH -u "$windows_path"`
16236    WIN_SDK_BASE="$unix_path"
16237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16239    WIN_SDK_BASE="$unix_path"
16240  fi
16241
16242    if test -d "$WIN_SDK_BASE"; then
16243      # There have been cases of partial or broken SDK installations. A missing
16244      # lib dir is not going to work.
16245      if test ! -d "$WIN_SDK_BASE/../lib"; then
16246        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16247$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16248        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16249$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16250      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16251        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16252$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16253        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16254        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16255          VS_ENV_ARGS="/x86"
16256        else
16257          VS_ENV_ARGS="/x64"
16258        fi
16259      else
16260        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16261$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16262        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16263$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16264      fi
16265    fi
16266  fi
16267
16268
16269  if test "x$VS100COMNTOOLS" != x; then
16270
16271  if test "x$VS_ENV_CMD" = x; then
16272    VS100BASE="$VS100COMNTOOLS/../.."
16273    METHOD="VS100COMNTOOLS variable"
16274
16275  windows_path="$VS100BASE"
16276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16277    unix_path=`$CYGPATH -u "$windows_path"`
16278    VS100BASE="$unix_path"
16279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16280    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16281    VS100BASE="$unix_path"
16282  fi
16283
16284    if test -d "$VS100BASE"; then
16285      if test -f "$VS100BASE/$VCVARSFILE"; then
16286        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16287$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16288        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16289      else
16290        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16291$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16292        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16293$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16294      fi
16295    fi
16296  fi
16297
16298  fi
16299  if test "x$PROGRAMFILES" != x; then
16300
16301  if test "x$VS_ENV_CMD" = x; then
16302    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16303    METHOD="well-known name"
16304
16305  windows_path="$VS100BASE"
16306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16307    unix_path=`$CYGPATH -u "$windows_path"`
16308    VS100BASE="$unix_path"
16309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16311    VS100BASE="$unix_path"
16312  fi
16313
16314    if test -d "$VS100BASE"; then
16315      if test -f "$VS100BASE/$VCVARSFILE"; then
16316        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16317$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16318        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16319      else
16320        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16321$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16322        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16323$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16324      fi
16325    fi
16326  fi
16327
16328  fi
16329
16330  if test "x$VS_ENV_CMD" = x; then
16331    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16332    METHOD="well-known name"
16333
16334  windows_path="$VS100BASE"
16335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16336    unix_path=`$CYGPATH -u "$windows_path"`
16337    VS100BASE="$unix_path"
16338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16340    VS100BASE="$unix_path"
16341  fi
16342
16343    if test -d "$VS100BASE"; then
16344      if test -f "$VS100BASE/$VCVARSFILE"; then
16345        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16346$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16347        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16348      else
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        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16352$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16353      fi
16354    fi
16355  fi
16356
16357
16358  if test "x$VS_ENV_CMD" = x; then
16359    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16360    METHOD="well-known name"
16361
16362  windows_path="$VS100BASE"
16363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16364    unix_path=`$CYGPATH -u "$windows_path"`
16365    VS100BASE="$unix_path"
16366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16368    VS100BASE="$unix_path"
16369  fi
16370
16371    if test -d "$VS100BASE"; then
16372      if test -f "$VS100BASE/$VCVARSFILE"; then
16373        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16374$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16375        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16376      else
16377        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16378$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16379        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16380$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16381      fi
16382    fi
16383  fi
16384
16385
16386  if test "x$VS_ENV_CMD" != x; then
16387    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16388
16389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16390
16391  # First separate the path from the arguments. This will split at the first
16392  # space.
16393  complete="$VS_ENV_CMD"
16394  path="${complete%% *}"
16395  tmp="$complete EOL"
16396  arguments="${tmp#* }"
16397
16398  # Input might be given as Windows format, start by converting to
16399  # unix format.
16400  new_path=`$CYGPATH -u "$path"`
16401
16402  # Now try to locate executable using which
16403  new_path=`$WHICH "$new_path" 2> /dev/null`
16404  # bat and cmd files are not always considered executable in cygwin causing which
16405  # to not find them
16406  if test "x$new_path" = x \
16407           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16408           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16409    new_path=`$CYGPATH -u "$path"`
16410  fi
16411  if test "x$new_path" = x; then
16412    # Oops. Which didn't find the executable.
16413    # The splitting of arguments from the executable at a space might have been incorrect,
16414    # since paths with space are more likely in Windows. Give it another try with the whole
16415    # argument.
16416    path="$complete"
16417    arguments="EOL"
16418    new_path=`$CYGPATH -u "$path"`
16419    new_path=`$WHICH "$new_path" 2> /dev/null`
16420    # bat and cmd files are not always considered executable in cygwin causing which
16421    # to not find them
16422    if test "x$new_path" = x \
16423             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16424             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16425      new_path=`$CYGPATH -u "$path"`
16426    fi
16427    if test "x$new_path" = x; then
16428      # It's still not found. Now this is an unrecoverable error.
16429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16430$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16431      has_space=`$ECHO "$complete" | $GREP " "`
16432      if test "x$has_space" != x; then
16433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16435      fi
16436      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16437    fi
16438  fi
16439
16440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16443  # "foo.exe" is OK but "foo" is an error.
16444  #
16445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16446  # It is also a way to make sure we got the proper file name for the real test later on.
16447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16448  if test "x$test_shortpath" = x; then
16449    # Short path failed, file does not exist as specified.
16450    # Try adding .exe or .cmd
16451    if test -f "${new_path}.exe"; then
16452       input_to_shortpath="${new_path}.exe"
16453    elif test -f "${new_path}.cmd"; then
16454       input_to_shortpath="${new_path}.cmd"
16455    else
16456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16457$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16458      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16459$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16460      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16461    fi
16462  else
16463    input_to_shortpath="$new_path"
16464  fi
16465
16466  # Call helper function which possibly converts this using DOS-style short mode.
16467  # If so, the updated path is stored in $new_path.
16468  new_path="$input_to_shortpath"
16469
16470  input_path="$input_to_shortpath"
16471  # Check if we need to convert this using DOS-style short mode. If the path
16472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16473  # take no chances and rewrite it.
16474  # Note: m4 eats our [], so we need to use [ and ] instead.
16475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16476  if test "x$has_forbidden_chars" != x; then
16477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16481      # Going to short mode and back again did indeed matter. Since short mode is
16482      # case insensitive, let's make it lowercase to improve readability.
16483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16484      # Now convert it back to Unix-stile (cygpath)
16485      input_path=`$CYGPATH -u "$shortmode_path"`
16486      new_path="$input_path"
16487    fi
16488  fi
16489
16490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16491  if test "x$test_cygdrive_prefix" = x; then
16492    # As a simple fix, exclude /usr/bin since it's not a real path.
16493    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16495      # a path prefixed by /cygdrive for fixpath to work.
16496      new_path="$CYGWIN_ROOT_PATH$input_path"
16497    fi
16498  fi
16499
16500  # remove trailing .exe if any
16501  new_path="${new_path/%.exe/}"
16502
16503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16504
16505  # First separate the path from the arguments. This will split at the first
16506  # space.
16507  complete="$VS_ENV_CMD"
16508  path="${complete%% *}"
16509  tmp="$complete EOL"
16510  arguments="${tmp#* }"
16511
16512  # Input might be given as Windows format, start by converting to
16513  # unix format.
16514  new_path="$path"
16515
16516  windows_path="$new_path"
16517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16518    unix_path=`$CYGPATH -u "$windows_path"`
16519    new_path="$unix_path"
16520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16522    new_path="$unix_path"
16523  fi
16524
16525
16526  # Now try to locate executable using which
16527  new_path=`$WHICH "$new_path" 2> /dev/null`
16528
16529  if test "x$new_path" = x; then
16530    # Oops. Which didn't find the executable.
16531    # The splitting of arguments from the executable at a space might have been incorrect,
16532    # since paths with space are more likely in Windows. Give it another try with the whole
16533    # argument.
16534    path="$complete"
16535    arguments="EOL"
16536    new_path="$path"
16537
16538  windows_path="$new_path"
16539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16540    unix_path=`$CYGPATH -u "$windows_path"`
16541    new_path="$unix_path"
16542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16544    new_path="$unix_path"
16545  fi
16546
16547
16548    new_path=`$WHICH "$new_path" 2> /dev/null`
16549
16550    if test "x$new_path" = x; then
16551      # It's still not found. Now this is an unrecoverable error.
16552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16553$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16554      has_space=`$ECHO "$complete" | $GREP " "`
16555      if test "x$has_space" != x; then
16556        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16557$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16558      fi
16559      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16560    fi
16561  fi
16562
16563  # Now new_path has a complete unix path to the binary
16564  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16565    # Keep paths in /bin as-is, but remove trailing .exe if any
16566    new_path="${new_path/%.exe/}"
16567    # Do not save /bin paths to all_fixpath_prefixes!
16568  else
16569    # Not in mixed or Windows style, start by that.
16570    new_path=`cmd //c echo $new_path`
16571
16572  input_path="$new_path"
16573  # Check if we need to convert this using DOS-style short mode. If the path
16574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16575  # take no chances and rewrite it.
16576  # Note: m4 eats our [], so we need to use [ and ] instead.
16577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16578  if test "x$has_forbidden_chars" != x; then
16579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16581  fi
16582
16583    # Output is in $new_path
16584
16585  windows_path="$new_path"
16586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16587    unix_path=`$CYGPATH -u "$windows_path"`
16588    new_path="$unix_path"
16589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16591    new_path="$unix_path"
16592  fi
16593
16594    # remove trailing .exe if any
16595    new_path="${new_path/%.exe/}"
16596
16597    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16598    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16599  fi
16600
16601  else
16602    # We're on a posix platform. Hooray! :)
16603    # First separate the path from the arguments. This will split at the first
16604    # space.
16605    complete="$VS_ENV_CMD"
16606    path="${complete%% *}"
16607    tmp="$complete EOL"
16608    arguments="${tmp#* }"
16609
16610    # Cannot rely on the command "which" here since it doesn't always work.
16611    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16612    if test -z "$is_absolute_path"; then
16613      # Path to executable is not absolute. Find it.
16614      IFS_save="$IFS"
16615      IFS=:
16616      for p in $PATH; do
16617        if test -f "$p/$path" && test -x "$p/$path"; then
16618          new_path="$p/$path"
16619          break
16620        fi
16621      done
16622      IFS="$IFS_save"
16623    else
16624      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
16625$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
16626      new_path="$path"
16627    fi
16628
16629    if test "x$new_path" = x; then
16630        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16631$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16632        has_space=`$ECHO "$complete" | $GREP " "`
16633        if test "x$has_space" != x; then
16634          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16635$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16636        fi
16637        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16638      fi
16639  fi
16640
16641      # Now join together the path and the arguments once again
16642      if test "x$arguments" != xEOL; then
16643        new_complete="$new_path ${arguments% *}"
16644      else
16645        new_complete="$new_path"
16646      fi
16647
16648  if test "x$complete" != "x$new_complete"; then
16649      VS_ENV_CMD="$new_complete"
16650      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
16651$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
16652    fi
16653
16654
16655    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
16656    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
16657$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
16658    cd $OUTPUT_ROOT
16659    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
16660    # to autoconf standards.
16661
16662    #----
16663
16664    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
16665    # but calculate the difference in Cygwin environment before/after running it and then
16666    # apply the diff.
16667
16668    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
16669      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
16670      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
16671      _dosbash=`cygpath -a -w -s \`which bash\`.*`
16672    else
16673      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
16674      _dosbash=`cmd //c echo \`which bash\``
16675    fi
16676
16677    # generate the set of exported vars before/after the vs10 setup
16678    $ECHO "@echo off"                                           >  localdevenvtmp.bat
16679    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
16680    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
16681    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
16682
16683    # Now execute the newly created bat file.
16684    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
16685    cmd /c localdevenvtmp.bat | cat
16686
16687    # apply the diff (less some non-vs10 vars named by "!")
16688    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
16689    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
16690    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
16691
16692    # cleanup
16693    $RM localdevenvtmp*
16694    #----
16695    cd $CURDIR
16696    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
16697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16698$as_echo "no" >&6; }
16699      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
16700$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
16701      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16702$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16703      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16704$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16705      as_fn_error $? "Cannot continue" "$LINENO" 5
16706    fi
16707
16708    # Now set all paths and other env variables. This will allow the rest of
16709    # the configure script to find and run the compiler in the proper way.
16710    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
16711$as_echo "$as_me: Setting extracted environment variables" >&6;}
16712    . $OUTPUT_ROOT/localdevenv.sh
16713  else
16714    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
16715    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
16716$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
16717  fi
16718
16719  # At this point, we should have corrent variables in the environment, or we can't continue.
16720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
16721$as_echo_n "checking for Visual Studio variables... " >&6; }
16722
16723  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
16724    if test "x$INCLUDE" = x || test "x$LIB" = x; then
16725      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
16726$as_echo "present but broken" >&6; }
16727      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
16728    else
16729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16730$as_echo "ok" >&6; }
16731      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
16732      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
16733      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
16734      VS_PATH="$PATH"
16735
16736
16737
16738    fi
16739  else
16740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
16741$as_echo "not found" >&6; }
16742
16743    if test "x$VS_ENV_CMD" = x; then
16744      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
16745$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
16746      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
16747$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
16748    else
16749      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
16750$as_echo "$as_me: Running the extraction script failed." >&6;}
16751    fi
16752    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
16753$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
16754    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
16755$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
16756    as_fn_error $? "Cannot continue" "$LINENO" 5
16757  fi
16758
16759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
16760$as_echo_n "checking for msvcr100.dll... " >&6; }
16761
16762# Check whether --with-msvcr-dll was given.
16763if test "${with_msvcr_dll+set}" = set; then :
16764  withval=$with_msvcr_dll;
16765fi
16766
16767  if test "x$with_msvcr_dll" != x; then
16768    MSVCR_DLL="$with_msvcr_dll"
16769  else
16770    if test "x$VCINSTALLDIR" != x; then
16771      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16772        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
16773      else
16774        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
16775        if test "x$MSVCR_DLL" = x; then
16776          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
16777        fi
16778      fi
16779      if test "x$MSVCR_DLL" != x; then
16780        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16781$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16782      else
16783        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
16784$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
16785      fi
16786    fi
16787    if test "x$MSVCR_DLL" = x; then
16788      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
16789        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
16790$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
16791        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
16792      fi
16793    fi
16794  fi
16795  if test "x$MSVCR_DLL" = x; then
16796    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16797$as_echo "no" >&6; }
16798    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
16799  fi
16800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
16801$as_echo "$MSVCR_DLL" >&6; }
16802
16803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16804
16805  # Input might be given as Windows format, start by converting to
16806  # unix format.
16807  path="$MSVCR_DLL"
16808  new_path=`$CYGPATH -u "$path"`
16809
16810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16813  # "foo.exe" is OK but "foo" is an error.
16814  #
16815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16816  # It is also a way to make sure we got the proper file name for the real test later on.
16817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16818  if test "x$test_shortpath" = x; then
16819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16820$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16821    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
16822  fi
16823
16824  # Call helper function which possibly converts this using DOS-style short mode.
16825  # If so, the updated path is stored in $new_path.
16826
16827  input_path="$new_path"
16828  # Check if we need to convert this using DOS-style short mode. If the path
16829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16830  # take no chances and rewrite it.
16831  # Note: m4 eats our [], so we need to use [ and ] instead.
16832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16833  if test "x$has_forbidden_chars" != x; then
16834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16838      # Going to short mode and back again did indeed matter. Since short mode is
16839      # case insensitive, let's make it lowercase to improve readability.
16840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16841      # Now convert it back to Unix-stile (cygpath)
16842      input_path=`$CYGPATH -u "$shortmode_path"`
16843      new_path="$input_path"
16844    fi
16845  fi
16846
16847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16848  if test "x$test_cygdrive_prefix" = x; then
16849    # As a simple fix, exclude /usr/bin since it's not a real path.
16850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16852      # a path prefixed by /cygdrive for fixpath to work.
16853      new_path="$CYGWIN_ROOT_PATH$input_path"
16854    fi
16855  fi
16856
16857
16858  if test "x$path" != "x$new_path"; then
16859    MSVCR_DLL="$new_path"
16860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16861$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16862  fi
16863
16864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16865
16866  path="$MSVCR_DLL"
16867  has_colon=`$ECHO $path | $GREP ^.:`
16868  new_path="$path"
16869  if test "x$has_colon" = x; then
16870    # Not in mixed or Windows style, start by that.
16871    new_path=`cmd //c echo $path`
16872  fi
16873
16874
16875  input_path="$new_path"
16876  # Check if we need to convert this using DOS-style short mode. If the path
16877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16878  # take no chances and rewrite it.
16879  # Note: m4 eats our [], so we need to use [ and ] instead.
16880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16881  if test "x$has_forbidden_chars" != x; then
16882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16884  fi
16885
16886
16887  windows_path="$new_path"
16888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16889    unix_path=`$CYGPATH -u "$windows_path"`
16890    new_path="$unix_path"
16891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16893    new_path="$unix_path"
16894  fi
16895
16896  if test "x$path" != "x$new_path"; then
16897    MSVCR_DLL="$new_path"
16898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
16899$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
16900  fi
16901
16902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16904
16905  else
16906    # We're on a posix platform. Hooray! :)
16907    path="$MSVCR_DLL"
16908
16909    if test ! -f "$path" && test ! -d "$path"; then
16910      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
16911    fi
16912
16913    has_space=`$ECHO "$path" | $GREP " "`
16914    if test "x$has_space" != x; then
16915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
16916$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
16917      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16918    fi
16919  fi
16920
16921
16922fi
16923
16924
16925
16926# If --build AND --host is set, then the configure script will find any
16927# cross compilation tools in the PATH. Cross compilation tools
16928# follows the cross compilation standard where they are prefixed with ${host}.
16929# For example the binary i686-sun-solaris2.10-gcc
16930# will cross compile for i686-sun-solaris2.10
16931# If neither of build and host is not set, then build=host and the
16932# default compiler found in the path will be used.
16933# Setting only --host, does not seem to be really supported.
16934# Please set both --build and --host if you want to cross compile.
16935
16936if test "x$COMPILE_TYPE" = "xcross"; then
16937    # Now we to find a C/C++ compiler that can build executables for the build
16938    # platform. We can't use the AC_PROG_CC macro, since it can only be used
16939    # once. Also, we need to do this before adding a tools dir to the path,
16940    # otherwise we might pick up cross-compilers which don't use standard naming.
16941    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
16942    # to wait until they are properly discovered.
16943    for ac_prog in cl cc gcc
16944do
16945  # Extract the first word of "$ac_prog", so it can be a program name with args.
16946set dummy $ac_prog; ac_word=$2
16947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16948$as_echo_n "checking for $ac_word... " >&6; }
16949if test "${ac_cv_path_BUILD_CC+set}" = set; then :
16950  $as_echo_n "(cached) " >&6
16951else
16952  case $BUILD_CC in
16953  [\\/]* | ?:[\\/]*)
16954  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
16955  ;;
16956  *)
16957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16958for as_dir in $PATH
16959do
16960  IFS=$as_save_IFS
16961  test -z "$as_dir" && as_dir=.
16962    for ac_exec_ext in '' $ac_executable_extensions; do
16963  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16964    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
16965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16966    break 2
16967  fi
16968done
16969  done
16970IFS=$as_save_IFS
16971
16972  ;;
16973esac
16974fi
16975BUILD_CC=$ac_cv_path_BUILD_CC
16976if test -n "$BUILD_CC"; then
16977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
16978$as_echo "$BUILD_CC" >&6; }
16979else
16980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16981$as_echo "no" >&6; }
16982fi
16983
16984
16985  test -n "$BUILD_CC" && break
16986done
16987
16988
16989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16990
16991  # First separate the path from the arguments. This will split at the first
16992  # space.
16993  complete="$BUILD_CC"
16994  path="${complete%% *}"
16995  tmp="$complete EOL"
16996  arguments="${tmp#* }"
16997
16998  # Input might be given as Windows format, start by converting to
16999  # unix format.
17000  new_path=`$CYGPATH -u "$path"`
17001
17002  # Now try to locate executable using which
17003  new_path=`$WHICH "$new_path" 2> /dev/null`
17004  # bat and cmd files are not always considered executable in cygwin causing which
17005  # to not find them
17006  if test "x$new_path" = x \
17007           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17008           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17009    new_path=`$CYGPATH -u "$path"`
17010  fi
17011  if test "x$new_path" = x; then
17012    # Oops. Which didn't find the executable.
17013    # The splitting of arguments from the executable at a space might have been incorrect,
17014    # since paths with space are more likely in Windows. Give it another try with the whole
17015    # argument.
17016    path="$complete"
17017    arguments="EOL"
17018    new_path=`$CYGPATH -u "$path"`
17019    new_path=`$WHICH "$new_path" 2> /dev/null`
17020    # bat and cmd files are not always considered executable in cygwin causing which
17021    # to not find them
17022    if test "x$new_path" = x \
17023             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17024             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17025      new_path=`$CYGPATH -u "$path"`
17026    fi
17027    if test "x$new_path" = x; then
17028      # It's still not found. Now this is an unrecoverable error.
17029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17030$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17031      has_space=`$ECHO "$complete" | $GREP " "`
17032      if test "x$has_space" != x; then
17033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17035      fi
17036      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17037    fi
17038  fi
17039
17040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17043  # "foo.exe" is OK but "foo" is an error.
17044  #
17045  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17046  # It is also a way to make sure we got the proper file name for the real test later on.
17047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17048  if test "x$test_shortpath" = x; then
17049    # Short path failed, file does not exist as specified.
17050    # Try adding .exe or .cmd
17051    if test -f "${new_path}.exe"; then
17052       input_to_shortpath="${new_path}.exe"
17053    elif test -f "${new_path}.cmd"; then
17054       input_to_shortpath="${new_path}.cmd"
17055    else
17056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17057$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17058      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17059$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17060      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17061    fi
17062  else
17063    input_to_shortpath="$new_path"
17064  fi
17065
17066  # Call helper function which possibly converts this using DOS-style short mode.
17067  # If so, the updated path is stored in $new_path.
17068  new_path="$input_to_shortpath"
17069
17070  input_path="$input_to_shortpath"
17071  # Check if we need to convert this using DOS-style short mode. If the path
17072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17073  # take no chances and rewrite it.
17074  # Note: m4 eats our [], so we need to use [ and ] instead.
17075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17076  if test "x$has_forbidden_chars" != x; then
17077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17081      # Going to short mode and back again did indeed matter. Since short mode is
17082      # case insensitive, let's make it lowercase to improve readability.
17083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17084      # Now convert it back to Unix-stile (cygpath)
17085      input_path=`$CYGPATH -u "$shortmode_path"`
17086      new_path="$input_path"
17087    fi
17088  fi
17089
17090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17091  if test "x$test_cygdrive_prefix" = x; then
17092    # As a simple fix, exclude /usr/bin since it's not a real path.
17093    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17095      # a path prefixed by /cygdrive for fixpath to work.
17096      new_path="$CYGWIN_ROOT_PATH$input_path"
17097    fi
17098  fi
17099
17100  # remove trailing .exe if any
17101  new_path="${new_path/%.exe/}"
17102
17103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17104
17105  # First separate the path from the arguments. This will split at the first
17106  # space.
17107  complete="$BUILD_CC"
17108  path="${complete%% *}"
17109  tmp="$complete EOL"
17110  arguments="${tmp#* }"
17111
17112  # Input might be given as Windows format, start by converting to
17113  # unix format.
17114  new_path="$path"
17115
17116  windows_path="$new_path"
17117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17118    unix_path=`$CYGPATH -u "$windows_path"`
17119    new_path="$unix_path"
17120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17122    new_path="$unix_path"
17123  fi
17124
17125
17126  # Now try to locate executable using which
17127  new_path=`$WHICH "$new_path" 2> /dev/null`
17128
17129  if test "x$new_path" = x; then
17130    # Oops. Which didn't find the executable.
17131    # The splitting of arguments from the executable at a space might have been incorrect,
17132    # since paths with space are more likely in Windows. Give it another try with the whole
17133    # argument.
17134    path="$complete"
17135    arguments="EOL"
17136    new_path="$path"
17137
17138  windows_path="$new_path"
17139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17140    unix_path=`$CYGPATH -u "$windows_path"`
17141    new_path="$unix_path"
17142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17144    new_path="$unix_path"
17145  fi
17146
17147
17148    new_path=`$WHICH "$new_path" 2> /dev/null`
17149
17150    if test "x$new_path" = x; then
17151      # It's still not found. Now this is an unrecoverable error.
17152      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17153$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17154      has_space=`$ECHO "$complete" | $GREP " "`
17155      if test "x$has_space" != x; then
17156        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17157$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17158      fi
17159      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17160    fi
17161  fi
17162
17163  # Now new_path has a complete unix path to the binary
17164  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17165    # Keep paths in /bin as-is, but remove trailing .exe if any
17166    new_path="${new_path/%.exe/}"
17167    # Do not save /bin paths to all_fixpath_prefixes!
17168  else
17169    # Not in mixed or Windows style, start by that.
17170    new_path=`cmd //c echo $new_path`
17171
17172  input_path="$new_path"
17173  # Check if we need to convert this using DOS-style short mode. If the path
17174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17175  # take no chances and rewrite it.
17176  # Note: m4 eats our [], so we need to use [ and ] instead.
17177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17178  if test "x$has_forbidden_chars" != x; then
17179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17181  fi
17182
17183    # Output is in $new_path
17184
17185  windows_path="$new_path"
17186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17187    unix_path=`$CYGPATH -u "$windows_path"`
17188    new_path="$unix_path"
17189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17191    new_path="$unix_path"
17192  fi
17193
17194    # remove trailing .exe if any
17195    new_path="${new_path/%.exe/}"
17196
17197    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17198    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17199  fi
17200
17201  else
17202    # We're on a posix platform. Hooray! :)
17203    # First separate the path from the arguments. This will split at the first
17204    # space.
17205    complete="$BUILD_CC"
17206    path="${complete%% *}"
17207    tmp="$complete EOL"
17208    arguments="${tmp#* }"
17209
17210    # Cannot rely on the command "which" here since it doesn't always work.
17211    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17212    if test -z "$is_absolute_path"; then
17213      # Path to executable is not absolute. Find it.
17214      IFS_save="$IFS"
17215      IFS=:
17216      for p in $PATH; do
17217        if test -f "$p/$path" && test -x "$p/$path"; then
17218          new_path="$p/$path"
17219          break
17220        fi
17221      done
17222      IFS="$IFS_save"
17223    else
17224      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
17225$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
17226      new_path="$path"
17227    fi
17228
17229    if test "x$new_path" = x; then
17230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17231$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17232        has_space=`$ECHO "$complete" | $GREP " "`
17233        if test "x$has_space" != x; then
17234          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17235$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17236        fi
17237        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17238      fi
17239  fi
17240
17241      # Now join together the path and the arguments once again
17242      if test "x$arguments" != xEOL; then
17243        new_complete="$new_path ${arguments% *}"
17244      else
17245        new_complete="$new_path"
17246      fi
17247
17248  if test "x$complete" != "x$new_complete"; then
17249      BUILD_CC="$new_complete"
17250      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
17251$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
17252    fi
17253
17254    for ac_prog in cl CC g++
17255do
17256  # Extract the first word of "$ac_prog", so it can be a program name with args.
17257set dummy $ac_prog; ac_word=$2
17258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17259$as_echo_n "checking for $ac_word... " >&6; }
17260if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
17261  $as_echo_n "(cached) " >&6
17262else
17263  case $BUILD_CXX in
17264  [\\/]* | ?:[\\/]*)
17265  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
17266  ;;
17267  *)
17268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17269for as_dir in $PATH
17270do
17271  IFS=$as_save_IFS
17272  test -z "$as_dir" && as_dir=.
17273    for ac_exec_ext in '' $ac_executable_extensions; do
17274  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17275    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
17276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17277    break 2
17278  fi
17279done
17280  done
17281IFS=$as_save_IFS
17282
17283  ;;
17284esac
17285fi
17286BUILD_CXX=$ac_cv_path_BUILD_CXX
17287if test -n "$BUILD_CXX"; then
17288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
17289$as_echo "$BUILD_CXX" >&6; }
17290else
17291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17292$as_echo "no" >&6; }
17293fi
17294
17295
17296  test -n "$BUILD_CXX" && break
17297done
17298
17299
17300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17301
17302  # First separate the path from the arguments. This will split at the first
17303  # space.
17304  complete="$BUILD_CXX"
17305  path="${complete%% *}"
17306  tmp="$complete EOL"
17307  arguments="${tmp#* }"
17308
17309  # Input might be given as Windows format, start by converting to
17310  # unix format.
17311  new_path=`$CYGPATH -u "$path"`
17312
17313  # Now try to locate executable using which
17314  new_path=`$WHICH "$new_path" 2> /dev/null`
17315  # bat and cmd files are not always considered executable in cygwin causing which
17316  # to not find them
17317  if test "x$new_path" = x \
17318           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17319           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17320    new_path=`$CYGPATH -u "$path"`
17321  fi
17322  if test "x$new_path" = x; then
17323    # Oops. Which didn't find the executable.
17324    # The splitting of arguments from the executable at a space might have been incorrect,
17325    # since paths with space are more likely in Windows. Give it another try with the whole
17326    # argument.
17327    path="$complete"
17328    arguments="EOL"
17329    new_path=`$CYGPATH -u "$path"`
17330    new_path=`$WHICH "$new_path" 2> /dev/null`
17331    # bat and cmd files are not always considered executable in cygwin causing which
17332    # to not find them
17333    if test "x$new_path" = x \
17334             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17335             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17336      new_path=`$CYGPATH -u "$path"`
17337    fi
17338    if test "x$new_path" = x; then
17339      # It's still not found. Now this is an unrecoverable error.
17340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17341$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17342      has_space=`$ECHO "$complete" | $GREP " "`
17343      if test "x$has_space" != x; then
17344        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17345$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17346      fi
17347      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17348    fi
17349  fi
17350
17351  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17352  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17353  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17354  # "foo.exe" is OK but "foo" is an error.
17355  #
17356  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17357  # It is also a way to make sure we got the proper file name for the real test later on.
17358  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17359  if test "x$test_shortpath" = x; then
17360    # Short path failed, file does not exist as specified.
17361    # Try adding .exe or .cmd
17362    if test -f "${new_path}.exe"; then
17363       input_to_shortpath="${new_path}.exe"
17364    elif test -f "${new_path}.cmd"; then
17365       input_to_shortpath="${new_path}.cmd"
17366    else
17367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
17368$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
17369      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17370$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17371      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17372    fi
17373  else
17374    input_to_shortpath="$new_path"
17375  fi
17376
17377  # Call helper function which possibly converts this using DOS-style short mode.
17378  # If so, the updated path is stored in $new_path.
17379  new_path="$input_to_shortpath"
17380
17381  input_path="$input_to_shortpath"
17382  # Check if we need to convert this using DOS-style short mode. If the path
17383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17384  # take no chances and rewrite it.
17385  # Note: m4 eats our [], so we need to use [ and ] instead.
17386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17387  if test "x$has_forbidden_chars" != x; then
17388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17392      # Going to short mode and back again did indeed matter. Since short mode is
17393      # case insensitive, let's make it lowercase to improve readability.
17394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17395      # Now convert it back to Unix-stile (cygpath)
17396      input_path=`$CYGPATH -u "$shortmode_path"`
17397      new_path="$input_path"
17398    fi
17399  fi
17400
17401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17402  if test "x$test_cygdrive_prefix" = x; then
17403    # As a simple fix, exclude /usr/bin since it's not a real path.
17404    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17406      # a path prefixed by /cygdrive for fixpath to work.
17407      new_path="$CYGWIN_ROOT_PATH$input_path"
17408    fi
17409  fi
17410
17411  # remove trailing .exe if any
17412  new_path="${new_path/%.exe/}"
17413
17414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17415
17416  # First separate the path from the arguments. This will split at the first
17417  # space.
17418  complete="$BUILD_CXX"
17419  path="${complete%% *}"
17420  tmp="$complete EOL"
17421  arguments="${tmp#* }"
17422
17423  # Input might be given as Windows format, start by converting to
17424  # unix format.
17425  new_path="$path"
17426
17427  windows_path="$new_path"
17428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17429    unix_path=`$CYGPATH -u "$windows_path"`
17430    new_path="$unix_path"
17431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17433    new_path="$unix_path"
17434  fi
17435
17436
17437  # Now try to locate executable using which
17438  new_path=`$WHICH "$new_path" 2> /dev/null`
17439
17440  if test "x$new_path" = x; then
17441    # Oops. Which didn't find the executable.
17442    # The splitting of arguments from the executable at a space might have been incorrect,
17443    # since paths with space are more likely in Windows. Give it another try with the whole
17444    # argument.
17445    path="$complete"
17446    arguments="EOL"
17447    new_path="$path"
17448
17449  windows_path="$new_path"
17450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17451    unix_path=`$CYGPATH -u "$windows_path"`
17452    new_path="$unix_path"
17453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17455    new_path="$unix_path"
17456  fi
17457
17458
17459    new_path=`$WHICH "$new_path" 2> /dev/null`
17460
17461    if test "x$new_path" = x; then
17462      # It's still not found. Now this is an unrecoverable error.
17463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17464$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17465      has_space=`$ECHO "$complete" | $GREP " "`
17466      if test "x$has_space" != x; then
17467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17469      fi
17470      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17471    fi
17472  fi
17473
17474  # Now new_path has a complete unix path to the binary
17475  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17476    # Keep paths in /bin as-is, but remove trailing .exe if any
17477    new_path="${new_path/%.exe/}"
17478    # Do not save /bin paths to all_fixpath_prefixes!
17479  else
17480    # Not in mixed or Windows style, start by that.
17481    new_path=`cmd //c echo $new_path`
17482
17483  input_path="$new_path"
17484  # Check if we need to convert this using DOS-style short mode. If the path
17485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17486  # take no chances and rewrite it.
17487  # Note: m4 eats our [], so we need to use [ and ] instead.
17488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17489  if test "x$has_forbidden_chars" != x; then
17490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17492  fi
17493
17494    # Output is in $new_path
17495
17496  windows_path="$new_path"
17497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17498    unix_path=`$CYGPATH -u "$windows_path"`
17499    new_path="$unix_path"
17500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17502    new_path="$unix_path"
17503  fi
17504
17505    # remove trailing .exe if any
17506    new_path="${new_path/%.exe/}"
17507
17508    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17509    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17510  fi
17511
17512  else
17513    # We're on a posix platform. Hooray! :)
17514    # First separate the path from the arguments. This will split at the first
17515    # space.
17516    complete="$BUILD_CXX"
17517    path="${complete%% *}"
17518    tmp="$complete EOL"
17519    arguments="${tmp#* }"
17520
17521    # Cannot rely on the command "which" here since it doesn't always work.
17522    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17523    if test -z "$is_absolute_path"; then
17524      # Path to executable is not absolute. Find it.
17525      IFS_save="$IFS"
17526      IFS=:
17527      for p in $PATH; do
17528        if test -f "$p/$path" && test -x "$p/$path"; then
17529          new_path="$p/$path"
17530          break
17531        fi
17532      done
17533      IFS="$IFS_save"
17534    else
17535      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
17536$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
17537      new_path="$path"
17538    fi
17539
17540    if test "x$new_path" = x; then
17541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
17542$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
17543        has_space=`$ECHO "$complete" | $GREP " "`
17544        if test "x$has_space" != x; then
17545          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17546$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17547        fi
17548        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
17549      fi
17550  fi
17551
17552      # Now join together the path and the arguments once again
17553      if test "x$arguments" != xEOL; then
17554        new_complete="$new_path ${arguments% *}"
17555      else
17556        new_complete="$new_path"
17557      fi
17558
17559  if test "x$complete" != "x$new_complete"; then
17560      BUILD_CXX="$new_complete"
17561      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
17562$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
17563    fi
17564
17565    # Extract the first word of "ld", so it can be a program name with args.
17566set dummy ld; ac_word=$2
17567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17568$as_echo_n "checking for $ac_word... " >&6; }
17569if test "${ac_cv_path_BUILD_LD+set}" = set; then :
17570  $as_echo_n "(cached) " >&6
17571else
17572  case $BUILD_LD in
17573  [\\/]* | ?:[\\/]*)
17574  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
17575  ;;
17576  *)
17577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17578for as_dir in $PATH
17579do
17580  IFS=$as_save_IFS
17581  test -z "$as_dir" && as_dir=.
17582    for ac_exec_ext in '' $ac_executable_extensions; do
17583  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17584    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
17585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17586    break 2
17587  fi
17588done
17589  done
17590IFS=$as_save_IFS
17591
17592  ;;
17593esac
17594fi
17595BUILD_LD=$ac_cv_path_BUILD_LD
17596if test -n "$BUILD_LD"; then
17597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
17598$as_echo "$BUILD_LD" >&6; }
17599else
17600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17601$as_echo "no" >&6; }
17602fi
17603
17604
17605
17606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17607
17608  # First separate the path from the arguments. This will split at the first
17609  # space.
17610  complete="$BUILD_LD"
17611  path="${complete%% *}"
17612  tmp="$complete EOL"
17613  arguments="${tmp#* }"
17614
17615  # Input might be given as Windows format, start by converting to
17616  # unix format.
17617  new_path=`$CYGPATH -u "$path"`
17618
17619  # Now try to locate executable using which
17620  new_path=`$WHICH "$new_path" 2> /dev/null`
17621  # bat and cmd files are not always considered executable in cygwin causing which
17622  # to not find them
17623  if test "x$new_path" = x \
17624           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17625           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17626    new_path=`$CYGPATH -u "$path"`
17627  fi
17628  if test "x$new_path" = x; then
17629    # Oops. Which didn't find the executable.
17630    # The splitting of arguments from the executable at a space might have been incorrect,
17631    # since paths with space are more likely in Windows. Give it another try with the whole
17632    # argument.
17633    path="$complete"
17634    arguments="EOL"
17635    new_path=`$CYGPATH -u "$path"`
17636    new_path=`$WHICH "$new_path" 2> /dev/null`
17637    # bat and cmd files are not always considered executable in cygwin causing which
17638    # to not find them
17639    if test "x$new_path" = x \
17640             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17641             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17642      new_path=`$CYGPATH -u "$path"`
17643    fi
17644    if test "x$new_path" = x; then
17645      # It's still not found. Now this is an unrecoverable error.
17646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17647$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17648      has_space=`$ECHO "$complete" | $GREP " "`
17649      if test "x$has_space" != x; then
17650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17652      fi
17653      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17654    fi
17655  fi
17656
17657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17660  # "foo.exe" is OK but "foo" is an error.
17661  #
17662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17663  # It is also a way to make sure we got the proper file name for the real test later on.
17664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17665  if test "x$test_shortpath" = x; then
17666    # Short path failed, file does not exist as specified.
17667    # Try adding .exe or .cmd
17668    if test -f "${new_path}.exe"; then
17669       input_to_shortpath="${new_path}.exe"
17670    elif test -f "${new_path}.cmd"; then
17671       input_to_shortpath="${new_path}.cmd"
17672    else
17673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
17674$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
17675      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17676$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17677      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17678    fi
17679  else
17680    input_to_shortpath="$new_path"
17681  fi
17682
17683  # Call helper function which possibly converts this using DOS-style short mode.
17684  # If so, the updated path is stored in $new_path.
17685  new_path="$input_to_shortpath"
17686
17687  input_path="$input_to_shortpath"
17688  # Check if we need to convert this using DOS-style short mode. If the path
17689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17690  # take no chances and rewrite it.
17691  # Note: m4 eats our [], so we need to use [ and ] instead.
17692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17693  if test "x$has_forbidden_chars" != x; then
17694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17698      # Going to short mode and back again did indeed matter. Since short mode is
17699      # case insensitive, let's make it lowercase to improve readability.
17700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17701      # Now convert it back to Unix-stile (cygpath)
17702      input_path=`$CYGPATH -u "$shortmode_path"`
17703      new_path="$input_path"
17704    fi
17705  fi
17706
17707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17708  if test "x$test_cygdrive_prefix" = x; then
17709    # As a simple fix, exclude /usr/bin since it's not a real path.
17710    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17712      # a path prefixed by /cygdrive for fixpath to work.
17713      new_path="$CYGWIN_ROOT_PATH$input_path"
17714    fi
17715  fi
17716
17717  # remove trailing .exe if any
17718  new_path="${new_path/%.exe/}"
17719
17720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17721
17722  # First separate the path from the arguments. This will split at the first
17723  # space.
17724  complete="$BUILD_LD"
17725  path="${complete%% *}"
17726  tmp="$complete EOL"
17727  arguments="${tmp#* }"
17728
17729  # Input might be given as Windows format, start by converting to
17730  # unix format.
17731  new_path="$path"
17732
17733  windows_path="$new_path"
17734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17735    unix_path=`$CYGPATH -u "$windows_path"`
17736    new_path="$unix_path"
17737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17739    new_path="$unix_path"
17740  fi
17741
17742
17743  # Now try to locate executable using which
17744  new_path=`$WHICH "$new_path" 2> /dev/null`
17745
17746  if test "x$new_path" = x; then
17747    # Oops. Which didn't find the executable.
17748    # The splitting of arguments from the executable at a space might have been incorrect,
17749    # since paths with space are more likely in Windows. Give it another try with the whole
17750    # argument.
17751    path="$complete"
17752    arguments="EOL"
17753    new_path="$path"
17754
17755  windows_path="$new_path"
17756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17757    unix_path=`$CYGPATH -u "$windows_path"`
17758    new_path="$unix_path"
17759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17761    new_path="$unix_path"
17762  fi
17763
17764
17765    new_path=`$WHICH "$new_path" 2> /dev/null`
17766
17767    if test "x$new_path" = x; then
17768      # It's still not found. Now this is an unrecoverable error.
17769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17770$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17771      has_space=`$ECHO "$complete" | $GREP " "`
17772      if test "x$has_space" != x; then
17773        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17774$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17775      fi
17776      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17777    fi
17778  fi
17779
17780  # Now new_path has a complete unix path to the binary
17781  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17782    # Keep paths in /bin as-is, but remove trailing .exe if any
17783    new_path="${new_path/%.exe/}"
17784    # Do not save /bin paths to all_fixpath_prefixes!
17785  else
17786    # Not in mixed or Windows style, start by that.
17787    new_path=`cmd //c echo $new_path`
17788
17789  input_path="$new_path"
17790  # Check if we need to convert this using DOS-style short mode. If the path
17791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17792  # take no chances and rewrite it.
17793  # Note: m4 eats our [], so we need to use [ and ] instead.
17794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17795  if test "x$has_forbidden_chars" != x; then
17796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17797    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17798  fi
17799
17800    # Output is in $new_path
17801
17802  windows_path="$new_path"
17803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17804    unix_path=`$CYGPATH -u "$windows_path"`
17805    new_path="$unix_path"
17806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17808    new_path="$unix_path"
17809  fi
17810
17811    # remove trailing .exe if any
17812    new_path="${new_path/%.exe/}"
17813
17814    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17815    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17816  fi
17817
17818  else
17819    # We're on a posix platform. Hooray! :)
17820    # First separate the path from the arguments. This will split at the first
17821    # space.
17822    complete="$BUILD_LD"
17823    path="${complete%% *}"
17824    tmp="$complete EOL"
17825    arguments="${tmp#* }"
17826
17827    # Cannot rely on the command "which" here since it doesn't always work.
17828    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17829    if test -z "$is_absolute_path"; then
17830      # Path to executable is not absolute. Find it.
17831      IFS_save="$IFS"
17832      IFS=:
17833      for p in $PATH; do
17834        if test -f "$p/$path" && test -x "$p/$path"; then
17835          new_path="$p/$path"
17836          break
17837        fi
17838      done
17839      IFS="$IFS_save"
17840    else
17841      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
17842$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
17843      new_path="$path"
17844    fi
17845
17846    if test "x$new_path" = x; then
17847        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
17848$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
17849        has_space=`$ECHO "$complete" | $GREP " "`
17850        if test "x$has_space" != x; then
17851          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17852$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17853        fi
17854        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
17855      fi
17856  fi
17857
17858      # Now join together the path and the arguments once again
17859      if test "x$arguments" != xEOL; then
17860        new_complete="$new_path ${arguments% *}"
17861      else
17862        new_complete="$new_path"
17863      fi
17864
17865  if test "x$complete" != "x$new_complete"; then
17866      BUILD_LD="$new_complete"
17867      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
17868$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
17869    fi
17870
17871fi
17872
17873
17874
17875
17876# If a devkit is found on the builddeps server, then prepend its path to the
17877# PATH variable. If there are cross compilers available in the devkit, these
17878# will be found by AC_PROG_CC et al.
17879DEVKIT=
17880
17881
17882    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
17883        # Source the builddeps file again, to make sure it uses the latest variables!
17884        . $builddepsfile
17885        # Look for a target and build machine specific resource!
17886        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
17887        if test "x$resource" = x; then
17888            # Ok, lets instead look for a target specific resource
17889            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
17890        fi
17891        if test "x$resource" = x; then
17892            # Ok, lets instead look for a build specific resource
17893            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
17894        fi
17895        if test "x$resource" = x; then
17896            # Ok, lets instead look for a generic resource
17897            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
17898            resource=${builddep_devkit}
17899        fi
17900        if test "x$resource" != x; then
17901            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
17902$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
17903	    # If the resource in the builddeps.conf file is an existing directory,
17904	    # for example /java/linux/cups
17905	    if test -d ${resource}; then
17906	       depdir=${resource}
17907	    else
17908
17909# devkit is for example mymodule
17910# $resource is for example libs/general/libmymod_1_2_3.zip
17911# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
17912# $with_builddeps_dir is for example /localhome/builddeps
17913# depdir is the name of the variable into which we store the depdir, eg MYMOD
17914# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
17915# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
17916    filename=`basename $resource`
17917    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
17918    filebase=${filename%%.*}
17919    extension=${filename#*.}
17920    installdir=$with_builddeps_dir/$filebase
17921    if test ! -f $installdir/$filename.unpacked; then
17922        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
17923$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
17924        if test ! -d $installdir; then
17925            mkdir -p $installdir
17926        fi
17927        if test ! -d $installdir; then
17928            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
17929        fi
17930        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
17931        touch $tmpfile
17932        if test ! -f $tmpfile; then
17933            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
17934        fi
17935
17936    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
17937    # $tmpfile is the local file name for the downloaded file.
17938    VALID_TOOL=no
17939    if test "x$BDEPS_FTP" = xwget; then
17940       VALID_TOOL=yes
17941       wget -O $tmpfile $with_builddeps_server/$resource
17942    fi
17943    if test "x$BDEPS_FTP" = xlftp; then
17944       VALID_TOOL=yes
17945       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
17946    fi
17947    if test "x$BDEPS_FTP" = xftp; then
17948        VALID_TOOL=yes
17949        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
17950        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
17951        FTPUSERPWD=${FTPSERVER%%@*}
17952        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
17953            FTPUSER=${userpwd%%:*}
17954            FTPPWD=${userpwd#*@}
17955            FTPSERVER=${FTPSERVER#*@}
17956        else
17957            FTPUSER=ftp
17958            FTPPWD=ftp
17959        fi
17960        # the "pass" command does not work on some
17961        # ftp clients (read ftp.exe) but if it works,
17962        # passive mode is better!
17963        (\
17964            echo "user $FTPUSER $FTPPWD"        ;\
17965            echo "pass"                         ;\
17966            echo "bin"                          ;\
17967            echo "get $FTPPATH $tmpfile"              ;\
17968        ) | ftp -in $FTPSERVER
17969    fi
17970    if test "x$VALID_TOOL" != xyes; then
17971       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
17972    fi
17973
17974        mv $tmpfile $installdir/$filename
17975        if test ! -s $installdir/$filename; then
17976            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
17977        fi
17978        case "$extension" in
17979            zip)  echo "Unzipping $installdir/$filename..."
17980               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
17981            ;;
17982            tar.gz) echo "Untaring $installdir/$filename..."
17983               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17984            ;;
17985            tgz) echo "Untaring $installdir/$filename..."
17986               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
17987            ;;
17988            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
17989            ;;
17990        esac
17991    fi
17992    if test -f $installdir/$filename.unpacked; then
17993        depdir=$installdir
17994    fi
17995
17996	    fi
17997            # Source the builddeps file again, because in the previous command, the depdir
17998            # was updated to point at the current build dependency install directory.
17999            . $builddepsfile
18000            # Now extract variables from the builddeps.conf files.
18001            theroot=${builddep_devkit_ROOT}
18002            thecflags=${builddep_devkit_CFLAGS}
18003            thelibs=${builddep_devkit_LIBS}
18004            if test "x$depdir" = x; then
18005                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18006            fi
18007            DEVKIT=$depdir
18008            if test "x$theroot" != x; then
18009               DEVKIT="$theroot"
18010            fi
18011            if test "x$thecflags" != x; then
18012               DEVKIT_CFLAGS="$thecflags"
18013            fi
18014            if test "x$thelibs" != x; then
18015               DEVKIT_LIBS="$thelibs"
18016            fi
18017            # Found devkit
18018                     PATH="$DEVKIT/bin:$PATH"
18019                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18020                     if test "x$x_includes" = "xNONE"; then
18021                         x_includes="$SYS_ROOT/usr/include/X11"
18022                     fi
18023                     if test "x$x_libraries" = "xNONE"; then
18024                         x_libraries="$SYS_ROOT/usr/lib"
18025                     fi
18026
18027
18028        fi
18029
18030    fi
18031
18032
18033if test "x$SYS_ROOT" != "x/" ; then
18034    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18035    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18036    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18037    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18038    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18039    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18040fi
18041
18042# Store the CFLAGS etal passed to the configure script.
18043ORG_CFLAGS="$CFLAGS"
18044ORG_CXXFLAGS="$CXXFLAGS"
18045ORG_OBJCFLAGS="$OBJCFLAGS"
18046
18047# autoconf magic only relies on PATH, so update it if tools dir is specified
18048OLD_PATH="$PATH"
18049if test "x$TOOLS_DIR" != x; then
18050  PATH=$TOOLS_DIR:$PATH
18051fi
18052
18053
18054### Locate C compiler (CC)
18055
18056# gcc is almost always present, but on Windows we
18057# prefer cl.exe and on Solaris we prefer CC.
18058# Thus test for them in this order.
18059if test "x$OPENJDK_TARGET_OS" = xmacosx; then
18060  # Do not probe for cc on MacOSX.
18061  COMPILER_CHECK_LIST="cl gcc"
18062else
18063  COMPILER_CHECK_LIST="cl cc gcc"
18064fi
18065
18066
18067  COMPILER_NAME=C
18068
18069  CC=
18070  # If TOOLS_DIR is set, check for all compiler names in there first
18071  # before checking the rest of the PATH.
18072  if test -n "$TOOLS_DIR"; then
18073    PATH_save="$PATH"
18074    PATH="$TOOLS_DIR"
18075    for ac_prog in $COMPILER_CHECK_LIST
18076do
18077  # Extract the first word of "$ac_prog", so it can be a program name with args.
18078set dummy $ac_prog; ac_word=$2
18079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18080$as_echo_n "checking for $ac_word... " >&6; }
18081if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18082  $as_echo_n "(cached) " >&6
18083else
18084  case $TOOLS_DIR_CC in
18085  [\\/]* | ?:[\\/]*)
18086  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18087  ;;
18088  *)
18089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18090for as_dir in $PATH
18091do
18092  IFS=$as_save_IFS
18093  test -z "$as_dir" && as_dir=.
18094    for ac_exec_ext in '' $ac_executable_extensions; do
18095  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18096    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18098    break 2
18099  fi
18100done
18101  done
18102IFS=$as_save_IFS
18103
18104  ;;
18105esac
18106fi
18107TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
18108if test -n "$TOOLS_DIR_CC"; then
18109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
18110$as_echo "$TOOLS_DIR_CC" >&6; }
18111else
18112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18113$as_echo "no" >&6; }
18114fi
18115
18116
18117  test -n "$TOOLS_DIR_CC" && break
18118done
18119
18120    CC=$TOOLS_DIR_CC
18121    PATH="$PATH_save"
18122  fi
18123
18124  # AC_PATH_PROGS can't be run multiple times with the same variable,
18125  # so create a new name for this run.
18126  if test "x$CC" = x; then
18127    for ac_prog in $COMPILER_CHECK_LIST
18128do
18129  # Extract the first word of "$ac_prog", so it can be a program name with args.
18130set dummy $ac_prog; ac_word=$2
18131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18132$as_echo_n "checking for $ac_word... " >&6; }
18133if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
18134  $as_echo_n "(cached) " >&6
18135else
18136  case $POTENTIAL_CC in
18137  [\\/]* | ?:[\\/]*)
18138  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
18139  ;;
18140  *)
18141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18142for as_dir in $PATH
18143do
18144  IFS=$as_save_IFS
18145  test -z "$as_dir" && as_dir=.
18146    for ac_exec_ext in '' $ac_executable_extensions; do
18147  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18148    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
18149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18150    break 2
18151  fi
18152done
18153  done
18154IFS=$as_save_IFS
18155
18156  ;;
18157esac
18158fi
18159POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
18160if test -n "$POTENTIAL_CC"; then
18161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
18162$as_echo "$POTENTIAL_CC" >&6; }
18163else
18164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18165$as_echo "no" >&6; }
18166fi
18167
18168
18169  test -n "$POTENTIAL_CC" && break
18170done
18171
18172    CC=$POTENTIAL_CC
18173  fi
18174
18175  if test "x$CC" = x; then
18176
18177    # Print a helpful message on how to acquire the necessary build dependency.
18178    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
18179    MISSING_DEPENDENCY=devkit
18180    PKGHANDLER_COMMAND=
18181
18182    case $PKGHANDLER in
18183	apt-get)
18184                apt_help     $MISSING_DEPENDENCY ;;
18185    yum)
18186                yum_help     $MISSING_DEPENDENCY ;;
18187	port)
18188                port_help    $MISSING_DEPENDENCY ;;
18189	pkgutil)
18190                pkgutil_help $MISSING_DEPENDENCY ;;
18191	pkgadd)
18192                pkgadd_help  $MISSING_DEPENDENCY ;;
18193    * )
18194      break ;;
18195    esac
18196
18197    if test "x$PKGHANDLER_COMMAND" != x; then
18198        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
18199    fi
18200
18201      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
18202  fi
18203
18204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18205
18206  # First separate the path from the arguments. This will split at the first
18207  # space.
18208  complete="$CC"
18209  path="${complete%% *}"
18210  tmp="$complete EOL"
18211  arguments="${tmp#* }"
18212
18213  # Input might be given as Windows format, start by converting to
18214  # unix format.
18215  new_path=`$CYGPATH -u "$path"`
18216
18217  # Now try to locate executable using which
18218  new_path=`$WHICH "$new_path" 2> /dev/null`
18219  # bat and cmd files are not always considered executable in cygwin causing which
18220  # to not find them
18221  if test "x$new_path" = x \
18222           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18223           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18224    new_path=`$CYGPATH -u "$path"`
18225  fi
18226  if test "x$new_path" = x; then
18227    # Oops. Which didn't find the executable.
18228    # The splitting of arguments from the executable at a space might have been incorrect,
18229    # since paths with space are more likely in Windows. Give it another try with the whole
18230    # argument.
18231    path="$complete"
18232    arguments="EOL"
18233    new_path=`$CYGPATH -u "$path"`
18234    new_path=`$WHICH "$new_path" 2> /dev/null`
18235    # bat and cmd files are not always considered executable in cygwin causing which
18236    # to not find them
18237    if test "x$new_path" = x \
18238             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18239             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18240      new_path=`$CYGPATH -u "$path"`
18241    fi
18242    if test "x$new_path" = x; then
18243      # It's still not found. Now this is an unrecoverable error.
18244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18245$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18246      has_space=`$ECHO "$complete" | $GREP " "`
18247      if test "x$has_space" != x; then
18248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18250      fi
18251      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18252    fi
18253  fi
18254
18255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18258  # "foo.exe" is OK but "foo" is an error.
18259  #
18260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18261  # It is also a way to make sure we got the proper file name for the real test later on.
18262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18263  if test "x$test_shortpath" = x; then
18264    # Short path failed, file does not exist as specified.
18265    # Try adding .exe or .cmd
18266    if test -f "${new_path}.exe"; then
18267       input_to_shortpath="${new_path}.exe"
18268    elif test -f "${new_path}.cmd"; then
18269       input_to_shortpath="${new_path}.cmd"
18270    else
18271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
18272$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
18273      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18274$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18275      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18276    fi
18277  else
18278    input_to_shortpath="$new_path"
18279  fi
18280
18281  # Call helper function which possibly converts this using DOS-style short mode.
18282  # If so, the updated path is stored in $new_path.
18283  new_path="$input_to_shortpath"
18284
18285  input_path="$input_to_shortpath"
18286  # Check if we need to convert this using DOS-style short mode. If the path
18287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18288  # take no chances and rewrite it.
18289  # Note: m4 eats our [], so we need to use [ and ] instead.
18290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18291  if test "x$has_forbidden_chars" != x; then
18292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18296      # Going to short mode and back again did indeed matter. Since short mode is
18297      # case insensitive, let's make it lowercase to improve readability.
18298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18299      # Now convert it back to Unix-stile (cygpath)
18300      input_path=`$CYGPATH -u "$shortmode_path"`
18301      new_path="$input_path"
18302    fi
18303  fi
18304
18305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18306  if test "x$test_cygdrive_prefix" = x; then
18307    # As a simple fix, exclude /usr/bin since it's not a real path.
18308    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18310      # a path prefixed by /cygdrive for fixpath to work.
18311      new_path="$CYGWIN_ROOT_PATH$input_path"
18312    fi
18313  fi
18314
18315  # remove trailing .exe if any
18316  new_path="${new_path/%.exe/}"
18317
18318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18319
18320  # First separate the path from the arguments. This will split at the first
18321  # space.
18322  complete="$CC"
18323  path="${complete%% *}"
18324  tmp="$complete EOL"
18325  arguments="${tmp#* }"
18326
18327  # Input might be given as Windows format, start by converting to
18328  # unix format.
18329  new_path="$path"
18330
18331  windows_path="$new_path"
18332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18333    unix_path=`$CYGPATH -u "$windows_path"`
18334    new_path="$unix_path"
18335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18337    new_path="$unix_path"
18338  fi
18339
18340
18341  # Now try to locate executable using which
18342  new_path=`$WHICH "$new_path" 2> /dev/null`
18343
18344  if test "x$new_path" = x; then
18345    # Oops. Which didn't find the executable.
18346    # The splitting of arguments from the executable at a space might have been incorrect,
18347    # since paths with space are more likely in Windows. Give it another try with the whole
18348    # argument.
18349    path="$complete"
18350    arguments="EOL"
18351    new_path="$path"
18352
18353  windows_path="$new_path"
18354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18355    unix_path=`$CYGPATH -u "$windows_path"`
18356    new_path="$unix_path"
18357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18359    new_path="$unix_path"
18360  fi
18361
18362
18363    new_path=`$WHICH "$new_path" 2> /dev/null`
18364
18365    if test "x$new_path" = x; then
18366      # It's still not found. Now this is an unrecoverable error.
18367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18368$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18369      has_space=`$ECHO "$complete" | $GREP " "`
18370      if test "x$has_space" != x; then
18371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18373      fi
18374      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18375    fi
18376  fi
18377
18378  # Now new_path has a complete unix path to the binary
18379  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18380    # Keep paths in /bin as-is, but remove trailing .exe if any
18381    new_path="${new_path/%.exe/}"
18382    # Do not save /bin paths to all_fixpath_prefixes!
18383  else
18384    # Not in mixed or Windows style, start by that.
18385    new_path=`cmd //c echo $new_path`
18386
18387  input_path="$new_path"
18388  # Check if we need to convert this using DOS-style short mode. If the path
18389  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18390  # take no chances and rewrite it.
18391  # Note: m4 eats our [], so we need to use [ and ] instead.
18392  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18393  if test "x$has_forbidden_chars" != x; then
18394    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18395    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18396  fi
18397
18398    # Output is in $new_path
18399
18400  windows_path="$new_path"
18401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18402    unix_path=`$CYGPATH -u "$windows_path"`
18403    new_path="$unix_path"
18404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18406    new_path="$unix_path"
18407  fi
18408
18409    # remove trailing .exe if any
18410    new_path="${new_path/%.exe/}"
18411
18412    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18413    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18414  fi
18415
18416  else
18417    # We're on a posix platform. Hooray! :)
18418    # First separate the path from the arguments. This will split at the first
18419    # space.
18420    complete="$CC"
18421    path="${complete%% *}"
18422    tmp="$complete EOL"
18423    arguments="${tmp#* }"
18424
18425    # Cannot rely on the command "which" here since it doesn't always work.
18426    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18427    if test -z "$is_absolute_path"; then
18428      # Path to executable is not absolute. Find it.
18429      IFS_save="$IFS"
18430      IFS=:
18431      for p in $PATH; do
18432        if test -f "$p/$path" && test -x "$p/$path"; then
18433          new_path="$p/$path"
18434          break
18435        fi
18436      done
18437      IFS="$IFS_save"
18438    else
18439      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
18440$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
18441      new_path="$path"
18442    fi
18443
18444    if test "x$new_path" = x; then
18445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
18446$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
18447        has_space=`$ECHO "$complete" | $GREP " "`
18448        if test "x$has_space" != x; then
18449          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18450$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18451        fi
18452        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
18453      fi
18454  fi
18455
18456      # Now join together the path and the arguments once again
18457      if test "x$arguments" != xEOL; then
18458        new_complete="$new_path ${arguments% *}"
18459      else
18460        new_complete="$new_path"
18461      fi
18462
18463  if test "x$complete" != "x$new_complete"; then
18464      CC="$new_complete"
18465      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
18466$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
18467    fi
18468
18469  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
18470$as_echo_n "checking resolved symbolic links for CC... " >&6; }
18471  TEST_COMPILER="$CC"
18472
18473    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18474        # Follow a chain of symbolic links. Use readlink
18475        # where it exists, else fall back to horribly
18476        # complicated shell code.
18477        if test "x$READLINK_TESTED" != yes; then
18478            # On MacOSX there is a readlink tool with a different
18479            # purpose than the GNU readlink tool. Check the found readlink.
18480            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18481            if test "x$ISGNU" = x; then
18482                 # A readlink that we do not know how to use.
18483                 # Are there other non-GNU readlinks out there?
18484                 READLINK_TESTED=yes
18485                 READLINK=
18486            fi
18487        fi
18488
18489        if test "x$READLINK" != x; then
18490            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
18491        else
18492            # Save the current directory for restoring afterwards
18493            STARTDIR=$PWD
18494            COUNTER=0
18495            sym_link_dir=`$DIRNAME $TEST_COMPILER`
18496            sym_link_file=`$BASENAME $TEST_COMPILER`
18497            # Use the system pwd and not the shell builtin to resolve directory symlinks
18498            cd $sym_link_dir
18499            cd `$THEPWDCMD`
18500            sym_link_dir=`$THEPWDCMD`
18501            # Resolve file symlinks
18502            while test $COUNTER -lt 20; do
18503                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18504                if test "x$ISLINK" == x; then
18505                    # This is not a symbolic link! We are done!
18506                    break
18507                fi
18508                # Again resolve directory symlinks since the target of the just found
18509                # link could be in a different directory
18510                cd `$DIRNAME $ISLINK`
18511                sym_link_dir=`$THEPWDCMD`
18512                sym_link_file=`$BASENAME $ISLINK`
18513                let COUNTER=COUNTER+1
18514            done
18515            cd $STARTDIR
18516            TEST_COMPILER=$sym_link_dir/$sym_link_file
18517        fi
18518    fi
18519
18520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
18521$as_echo "$TEST_COMPILER" >&6; }
18522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
18523$as_echo_n "checking if CC is disguised ccache... " >&6; }
18524
18525  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
18526  if test "x$COMPILER_BASENAME" = "xccache"; then
18527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
18528$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
18529    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
18530    # We want to control ccache invocation ourselves, so ignore this cc and try
18531    # searching again.
18532
18533    # Remove the path to the fake ccache cc from the PATH
18534    RETRY_COMPILER_SAVED_PATH="$PATH"
18535    COMPILER_DIRNAME=`$DIRNAME $CC`
18536    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
18537
18538    # Try again looking for our compiler
18539    if test -n "$ac_tool_prefix"; then
18540  for ac_prog in $COMPILER_CHECK_LIST
18541  do
18542    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
18543set dummy $ac_tool_prefix$ac_prog; ac_word=$2
18544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18545$as_echo_n "checking for $ac_word... " >&6; }
18546if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
18547  $as_echo_n "(cached) " >&6
18548else
18549  if test -n "$PROPER_COMPILER_CC"; then
18550  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
18551else
18552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18553for as_dir in $PATH
18554do
18555  IFS=$as_save_IFS
18556  test -z "$as_dir" && as_dir=.
18557    for ac_exec_ext in '' $ac_executable_extensions; do
18558  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18559    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
18560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18561    break 2
18562  fi
18563done
18564  done
18565IFS=$as_save_IFS
18566
18567fi
18568fi
18569PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
18570if test -n "$PROPER_COMPILER_CC"; then
18571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18572$as_echo "$PROPER_COMPILER_CC" >&6; }
18573else
18574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18575$as_echo "no" >&6; }
18576fi
18577
18578
18579    test -n "$PROPER_COMPILER_CC" && break
18580  done
18581fi
18582if test -z "$PROPER_COMPILER_CC"; then
18583  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
18584  for ac_prog in $COMPILER_CHECK_LIST
18585do
18586  # Extract the first word of "$ac_prog", so it can be a program name with args.
18587set dummy $ac_prog; ac_word=$2
18588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18589$as_echo_n "checking for $ac_word... " >&6; }
18590if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
18591  $as_echo_n "(cached) " >&6
18592else
18593  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18594  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
18595else
18596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18597for as_dir in $PATH
18598do
18599  IFS=$as_save_IFS
18600  test -z "$as_dir" && as_dir=.
18601    for ac_exec_ext in '' $ac_executable_extensions; do
18602  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18603    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
18604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18605    break 2
18606  fi
18607done
18608  done
18609IFS=$as_save_IFS
18610
18611fi
18612fi
18613ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
18614if test -n "$ac_ct_PROPER_COMPILER_CC"; then
18615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
18616$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
18617else
18618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18619$as_echo "no" >&6; }
18620fi
18621
18622
18623  test -n "$ac_ct_PROPER_COMPILER_CC" && break
18624done
18625
18626  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
18627    PROPER_COMPILER_CC=""
18628  else
18629    case $cross_compiling:$ac_tool_warned in
18630yes:)
18631{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18632$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18633ac_tool_warned=yes ;;
18634esac
18635    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
18636  fi
18637fi
18638
18639
18640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18641
18642  # First separate the path from the arguments. This will split at the first
18643  # space.
18644  complete="$PROPER_COMPILER_CC"
18645  path="${complete%% *}"
18646  tmp="$complete EOL"
18647  arguments="${tmp#* }"
18648
18649  # Input might be given as Windows format, start by converting to
18650  # unix format.
18651  new_path=`$CYGPATH -u "$path"`
18652
18653  # Now try to locate executable using which
18654  new_path=`$WHICH "$new_path" 2> /dev/null`
18655  # bat and cmd files are not always considered executable in cygwin causing which
18656  # to not find them
18657  if test "x$new_path" = x \
18658           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18659           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18660    new_path=`$CYGPATH -u "$path"`
18661  fi
18662  if test "x$new_path" = x; then
18663    # Oops. Which didn't find the executable.
18664    # The splitting of arguments from the executable at a space might have been incorrect,
18665    # since paths with space are more likely in Windows. Give it another try with the whole
18666    # argument.
18667    path="$complete"
18668    arguments="EOL"
18669    new_path=`$CYGPATH -u "$path"`
18670    new_path=`$WHICH "$new_path" 2> /dev/null`
18671    # bat and cmd files are not always considered executable in cygwin causing which
18672    # to not find them
18673    if test "x$new_path" = x \
18674             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18675             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18676      new_path=`$CYGPATH -u "$path"`
18677    fi
18678    if test "x$new_path" = x; then
18679      # It's still not found. Now this is an unrecoverable error.
18680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18681$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18682      has_space=`$ECHO "$complete" | $GREP " "`
18683      if test "x$has_space" != x; then
18684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18686      fi
18687      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18688    fi
18689  fi
18690
18691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18694  # "foo.exe" is OK but "foo" is an error.
18695  #
18696  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18697  # It is also a way to make sure we got the proper file name for the real test later on.
18698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18699  if test "x$test_shortpath" = x; then
18700    # Short path failed, file does not exist as specified.
18701    # Try adding .exe or .cmd
18702    if test -f "${new_path}.exe"; then
18703       input_to_shortpath="${new_path}.exe"
18704    elif test -f "${new_path}.cmd"; then
18705       input_to_shortpath="${new_path}.cmd"
18706    else
18707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
18708$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
18709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18711      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18712    fi
18713  else
18714    input_to_shortpath="$new_path"
18715  fi
18716
18717  # Call helper function which possibly converts this using DOS-style short mode.
18718  # If so, the updated path is stored in $new_path.
18719  new_path="$input_to_shortpath"
18720
18721  input_path="$input_to_shortpath"
18722  # Check if we need to convert this using DOS-style short mode. If the path
18723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18724  # take no chances and rewrite it.
18725  # Note: m4 eats our [], so we need to use [ and ] instead.
18726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18727  if test "x$has_forbidden_chars" != x; then
18728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18732      # Going to short mode and back again did indeed matter. Since short mode is
18733      # case insensitive, let's make it lowercase to improve readability.
18734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18735      # Now convert it back to Unix-stile (cygpath)
18736      input_path=`$CYGPATH -u "$shortmode_path"`
18737      new_path="$input_path"
18738    fi
18739  fi
18740
18741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18742  if test "x$test_cygdrive_prefix" = x; then
18743    # As a simple fix, exclude /usr/bin since it's not a real path.
18744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18746      # a path prefixed by /cygdrive for fixpath to work.
18747      new_path="$CYGWIN_ROOT_PATH$input_path"
18748    fi
18749  fi
18750
18751  # remove trailing .exe if any
18752  new_path="${new_path/%.exe/}"
18753
18754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18755
18756  # First separate the path from the arguments. This will split at the first
18757  # space.
18758  complete="$PROPER_COMPILER_CC"
18759  path="${complete%% *}"
18760  tmp="$complete EOL"
18761  arguments="${tmp#* }"
18762
18763  # Input might be given as Windows format, start by converting to
18764  # unix format.
18765  new_path="$path"
18766
18767  windows_path="$new_path"
18768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18769    unix_path=`$CYGPATH -u "$windows_path"`
18770    new_path="$unix_path"
18771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18773    new_path="$unix_path"
18774  fi
18775
18776
18777  # Now try to locate executable using which
18778  new_path=`$WHICH "$new_path" 2> /dev/null`
18779
18780  if test "x$new_path" = x; then
18781    # Oops. Which didn't find the executable.
18782    # The splitting of arguments from the executable at a space might have been incorrect,
18783    # since paths with space are more likely in Windows. Give it another try with the whole
18784    # argument.
18785    path="$complete"
18786    arguments="EOL"
18787    new_path="$path"
18788
18789  windows_path="$new_path"
18790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18791    unix_path=`$CYGPATH -u "$windows_path"`
18792    new_path="$unix_path"
18793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18795    new_path="$unix_path"
18796  fi
18797
18798
18799    new_path=`$WHICH "$new_path" 2> /dev/null`
18800
18801    if test "x$new_path" = x; then
18802      # It's still not found. Now this is an unrecoverable error.
18803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18804$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18805      has_space=`$ECHO "$complete" | $GREP " "`
18806      if test "x$has_space" != x; then
18807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18809      fi
18810      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18811    fi
18812  fi
18813
18814  # Now new_path has a complete unix path to the binary
18815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18816    # Keep paths in /bin as-is, but remove trailing .exe if any
18817    new_path="${new_path/%.exe/}"
18818    # Do not save /bin paths to all_fixpath_prefixes!
18819  else
18820    # Not in mixed or Windows style, start by that.
18821    new_path=`cmd //c echo $new_path`
18822
18823  input_path="$new_path"
18824  # Check if we need to convert this using DOS-style short mode. If the path
18825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18826  # take no chances and rewrite it.
18827  # Note: m4 eats our [], so we need to use [ and ] instead.
18828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18829  if test "x$has_forbidden_chars" != x; then
18830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18832  fi
18833
18834    # Output is in $new_path
18835
18836  windows_path="$new_path"
18837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18838    unix_path=`$CYGPATH -u "$windows_path"`
18839    new_path="$unix_path"
18840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18842    new_path="$unix_path"
18843  fi
18844
18845    # remove trailing .exe if any
18846    new_path="${new_path/%.exe/}"
18847
18848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18850  fi
18851
18852  else
18853    # We're on a posix platform. Hooray! :)
18854    # First separate the path from the arguments. This will split at the first
18855    # space.
18856    complete="$PROPER_COMPILER_CC"
18857    path="${complete%% *}"
18858    tmp="$complete EOL"
18859    arguments="${tmp#* }"
18860
18861    # Cannot rely on the command "which" here since it doesn't always work.
18862    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18863    if test -z "$is_absolute_path"; then
18864      # Path to executable is not absolute. Find it.
18865      IFS_save="$IFS"
18866      IFS=:
18867      for p in $PATH; do
18868        if test -f "$p/$path" && test -x "$p/$path"; then
18869          new_path="$p/$path"
18870          break
18871        fi
18872      done
18873      IFS="$IFS_save"
18874    else
18875      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
18876$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
18877      new_path="$path"
18878    fi
18879
18880    if test "x$new_path" = x; then
18881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
18882$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
18883        has_space=`$ECHO "$complete" | $GREP " "`
18884        if test "x$has_space" != x; then
18885          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18886$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18887        fi
18888        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
18889      fi
18890  fi
18891
18892      # Now join together the path and the arguments once again
18893      if test "x$arguments" != xEOL; then
18894        new_complete="$new_path ${arguments% *}"
18895      else
18896        new_complete="$new_path"
18897      fi
18898
18899  if test "x$complete" != "x$new_complete"; then
18900      PROPER_COMPILER_CC="$new_complete"
18901      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
18902$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
18903    fi
18904
18905    PATH="$RETRY_COMPILER_SAVED_PATH"
18906
18907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
18908$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
18909
18910    if test "x$OPENJDK_BUILD_OS" != xwindows; then
18911        # Follow a chain of symbolic links. Use readlink
18912        # where it exists, else fall back to horribly
18913        # complicated shell code.
18914        if test "x$READLINK_TESTED" != yes; then
18915            # On MacOSX there is a readlink tool with a different
18916            # purpose than the GNU readlink tool. Check the found readlink.
18917            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
18918            if test "x$ISGNU" = x; then
18919                 # A readlink that we do not know how to use.
18920                 # Are there other non-GNU readlinks out there?
18921                 READLINK_TESTED=yes
18922                 READLINK=
18923            fi
18924        fi
18925
18926        if test "x$READLINK" != x; then
18927            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
18928        else
18929            # Save the current directory for restoring afterwards
18930            STARTDIR=$PWD
18931            COUNTER=0
18932            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
18933            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
18934            # Use the system pwd and not the shell builtin to resolve directory symlinks
18935            cd $sym_link_dir
18936            cd `$THEPWDCMD`
18937            sym_link_dir=`$THEPWDCMD`
18938            # Resolve file symlinks
18939            while test $COUNTER -lt 20; do
18940                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
18941                if test "x$ISLINK" == x; then
18942                    # This is not a symbolic link! We are done!
18943                    break
18944                fi
18945                # Again resolve directory symlinks since the target of the just found
18946                # link could be in a different directory
18947                cd `$DIRNAME $ISLINK`
18948                sym_link_dir=`$THEPWDCMD`
18949                sym_link_file=`$BASENAME $ISLINK`
18950                let COUNTER=COUNTER+1
18951            done
18952            cd $STARTDIR
18953            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
18954        fi
18955    fi
18956
18957    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
18958$as_echo "$PROPER_COMPILER_CC" >&6; }
18959    CC="$PROPER_COMPILER_CC"
18960  else
18961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
18962$as_echo "no, keeping CC" >&6; }
18963    CC="$TEST_COMPILER"
18964  fi
18965
18966  COMPILER=$CC
18967  COMPILER_NAME=$COMPILER_NAME
18968
18969  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
18970    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
18971    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
18972    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
18973    if test $? -ne 0; then
18974      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
18975
18976      { $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
18977$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
18978      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
18979$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
18980      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
18981    else
18982      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
18983      COMPILER_VENDOR="Sun Studio"
18984    fi
18985  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
18986    # First line typically looks something like:
18987    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
18988    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
18989    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
18990    COMPILER_VENDOR="Microsoft CL.EXE"
18991    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
18992    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
18993      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
18994        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
18995      fi
18996    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
18997      if test "x$COMPILER_CPU_TEST" != "xx64"; then
18998        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
18999      fi
19000    fi
19001  else
19002    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19003    # Check that this is likely to be GCC.
19004    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19005    if test $? -ne 0; then
19006      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19007$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19008      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19009$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19010      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19011    fi
19012
19013    # First line typically looks something like:
19014    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19015    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19016    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19017  fi
19018  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19019  CC_VERSION="$COMPILER_VERSION"
19020  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19021  CC_VENDOR="$COMPILER_VENDOR"
19022
19023  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19024$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19025
19026
19027# Now that we have resolved CC ourself, let autoconf have it's go at it
19028ac_ext=c
19029ac_cpp='$CPP $CPPFLAGS'
19030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19032ac_compiler_gnu=$ac_cv_c_compiler_gnu
19033if test -n "$ac_tool_prefix"; then
19034  for ac_prog in $CC
19035  do
19036    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19037set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19039$as_echo_n "checking for $ac_word... " >&6; }
19040if test "${ac_cv_prog_CC+set}" = set; then :
19041  $as_echo_n "(cached) " >&6
19042else
19043  if test -n "$CC"; then
19044  ac_cv_prog_CC="$CC" # Let the user override the test.
19045else
19046as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19047for as_dir in $PATH
19048do
19049  IFS=$as_save_IFS
19050  test -z "$as_dir" && as_dir=.
19051    for ac_exec_ext in '' $ac_executable_extensions; do
19052  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19053    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19055    break 2
19056  fi
19057done
19058  done
19059IFS=$as_save_IFS
19060
19061fi
19062fi
19063CC=$ac_cv_prog_CC
19064if test -n "$CC"; then
19065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19066$as_echo "$CC" >&6; }
19067else
19068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19069$as_echo "no" >&6; }
19070fi
19071
19072
19073    test -n "$CC" && break
19074  done
19075fi
19076if test -z "$CC"; then
19077  ac_ct_CC=$CC
19078  for ac_prog in $CC
19079do
19080  # Extract the first word of "$ac_prog", so it can be a program name with args.
19081set dummy $ac_prog; ac_word=$2
19082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19083$as_echo_n "checking for $ac_word... " >&6; }
19084if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19085  $as_echo_n "(cached) " >&6
19086else
19087  if test -n "$ac_ct_CC"; then
19088  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19089else
19090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19091for as_dir in $PATH
19092do
19093  IFS=$as_save_IFS
19094  test -z "$as_dir" && as_dir=.
19095    for ac_exec_ext in '' $ac_executable_extensions; do
19096  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19097    ac_cv_prog_ac_ct_CC="$ac_prog"
19098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19099    break 2
19100  fi
19101done
19102  done
19103IFS=$as_save_IFS
19104
19105fi
19106fi
19107ac_ct_CC=$ac_cv_prog_ac_ct_CC
19108if test -n "$ac_ct_CC"; then
19109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
19110$as_echo "$ac_ct_CC" >&6; }
19111else
19112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19113$as_echo "no" >&6; }
19114fi
19115
19116
19117  test -n "$ac_ct_CC" && break
19118done
19119
19120  if test "x$ac_ct_CC" = x; then
19121    CC=""
19122  else
19123    case $cross_compiling:$ac_tool_warned in
19124yes:)
19125{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19126$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19127ac_tool_warned=yes ;;
19128esac
19129    CC=$ac_ct_CC
19130  fi
19131fi
19132
19133
19134test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19135$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19136as_fn_error $? "no acceptable C compiler found in \$PATH
19137See \`config.log' for more details" "$LINENO" 5 ; }
19138
19139# Provide some information about the compiler.
19140$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
19141set X $ac_compile
19142ac_compiler=$2
19143for ac_option in --version -v -V -qversion; do
19144  { { ac_try="$ac_compiler $ac_option >&5"
19145case "(($ac_try" in
19146  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19147  *) ac_try_echo=$ac_try;;
19148esac
19149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19150$as_echo "$ac_try_echo"; } >&5
19151  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
19152  ac_status=$?
19153  if test -s conftest.err; then
19154    sed '10a\
19155... rest of stderr output deleted ...
19156         10q' conftest.err >conftest.er1
19157    cat conftest.er1 >&5
19158  fi
19159  rm -f conftest.er1 conftest.err
19160  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19161  test $ac_status = 0; }
19162done
19163
19164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19165/* end confdefs.h.  */
19166
19167int
19168main ()
19169{
19170
19171  ;
19172  return 0;
19173}
19174_ACEOF
19175ac_clean_files_save=$ac_clean_files
19176ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
19177# Try to create an executable without -o first, disregard a.out.
19178# It will help us diagnose broken compilers, and finding out an intuition
19179# of exeext.
19180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
19181$as_echo_n "checking whether the C compiler works... " >&6; }
19182ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
19183
19184# The possible output files:
19185ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
19186
19187ac_rmfiles=
19188for ac_file in $ac_files
19189do
19190  case $ac_file in
19191    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19192    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
19193  esac
19194done
19195rm -f $ac_rmfiles
19196
19197if { { ac_try="$ac_link_default"
19198case "(($ac_try" in
19199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19200  *) ac_try_echo=$ac_try;;
19201esac
19202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19203$as_echo "$ac_try_echo"; } >&5
19204  (eval "$ac_link_default") 2>&5
19205  ac_status=$?
19206  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19207  test $ac_status = 0; }; then :
19208  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
19209# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
19210# in a Makefile.  We should not override ac_cv_exeext if it was cached,
19211# so that the user can short-circuit this test for compilers unknown to
19212# Autoconf.
19213for ac_file in $ac_files ''
19214do
19215  test -f "$ac_file" || continue
19216  case $ac_file in
19217    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
19218	;;
19219    [ab].out )
19220	# We found the default executable, but exeext='' is most
19221	# certainly right.
19222	break;;
19223    *.* )
19224	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
19225	then :; else
19226	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19227	fi
19228	# We set ac_cv_exeext here because the later test for it is not
19229	# safe: cross compilers may not add the suffix if given an `-o'
19230	# argument, so we may need to know it at that point already.
19231	# Even if this section looks crufty: it has the advantage of
19232	# actually working.
19233	break;;
19234    * )
19235	break;;
19236  esac
19237done
19238test "$ac_cv_exeext" = no && ac_cv_exeext=
19239
19240else
19241  ac_file=''
19242fi
19243if test -z "$ac_file"; then :
19244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19245$as_echo "no" >&6; }
19246$as_echo "$as_me: failed program was:" >&5
19247sed 's/^/| /' conftest.$ac_ext >&5
19248
19249{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19251as_fn_error 77 "C compiler cannot create executables
19252See \`config.log' for more details" "$LINENO" 5 ; }
19253else
19254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19255$as_echo "yes" >&6; }
19256fi
19257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
19258$as_echo_n "checking for C compiler default output file name... " >&6; }
19259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
19260$as_echo "$ac_file" >&6; }
19261ac_exeext=$ac_cv_exeext
19262
19263rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
19264ac_clean_files=$ac_clean_files_save
19265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
19266$as_echo_n "checking for suffix of executables... " >&6; }
19267if { { ac_try="$ac_link"
19268case "(($ac_try" in
19269  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19270  *) ac_try_echo=$ac_try;;
19271esac
19272eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19273$as_echo "$ac_try_echo"; } >&5
19274  (eval "$ac_link") 2>&5
19275  ac_status=$?
19276  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19277  test $ac_status = 0; }; then :
19278  # If both `conftest.exe' and `conftest' are `present' (well, observable)
19279# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
19280# work properly (i.e., refer to `conftest.exe'), while it won't with
19281# `rm'.
19282for ac_file in conftest.exe conftest conftest.*; do
19283  test -f "$ac_file" || continue
19284  case $ac_file in
19285    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
19286    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
19287	  break;;
19288    * ) break;;
19289  esac
19290done
19291else
19292  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19294as_fn_error $? "cannot compute suffix of executables: cannot compile and link
19295See \`config.log' for more details" "$LINENO" 5 ; }
19296fi
19297rm -f conftest conftest$ac_cv_exeext
19298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
19299$as_echo "$ac_cv_exeext" >&6; }
19300
19301rm -f conftest.$ac_ext
19302EXEEXT=$ac_cv_exeext
19303ac_exeext=$EXEEXT
19304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19305/* end confdefs.h.  */
19306#include <stdio.h>
19307int
19308main ()
19309{
19310FILE *f = fopen ("conftest.out", "w");
19311 return ferror (f) || fclose (f) != 0;
19312
19313  ;
19314  return 0;
19315}
19316_ACEOF
19317ac_clean_files="$ac_clean_files conftest.out"
19318# Check that the compiler produces executables we can run.  If not, either
19319# the compiler is broken, or we cross compile.
19320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
19321$as_echo_n "checking whether we are cross compiling... " >&6; }
19322if test "$cross_compiling" != yes; then
19323  { { ac_try="$ac_link"
19324case "(($ac_try" in
19325  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19326  *) ac_try_echo=$ac_try;;
19327esac
19328eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19329$as_echo "$ac_try_echo"; } >&5
19330  (eval "$ac_link") 2>&5
19331  ac_status=$?
19332  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19333  test $ac_status = 0; }
19334  if { ac_try='./conftest$ac_cv_exeext'
19335  { { case "(($ac_try" in
19336  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19337  *) ac_try_echo=$ac_try;;
19338esac
19339eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19340$as_echo "$ac_try_echo"; } >&5
19341  (eval "$ac_try") 2>&5
19342  ac_status=$?
19343  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19344  test $ac_status = 0; }; }; then
19345    cross_compiling=no
19346  else
19347    if test "$cross_compiling" = maybe; then
19348	cross_compiling=yes
19349    else
19350	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19351$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19352as_fn_error $? "cannot run C compiled programs.
19353If you meant to cross compile, use \`--host'.
19354See \`config.log' for more details" "$LINENO" 5 ; }
19355    fi
19356  fi
19357fi
19358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
19359$as_echo "$cross_compiling" >&6; }
19360
19361rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
19362ac_clean_files=$ac_clean_files_save
19363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
19364$as_echo_n "checking for suffix of object files... " >&6; }
19365if test "${ac_cv_objext+set}" = set; then :
19366  $as_echo_n "(cached) " >&6
19367else
19368  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19369/* end confdefs.h.  */
19370
19371int
19372main ()
19373{
19374
19375  ;
19376  return 0;
19377}
19378_ACEOF
19379rm -f conftest.o conftest.obj
19380if { { ac_try="$ac_compile"
19381case "(($ac_try" in
19382  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19383  *) ac_try_echo=$ac_try;;
19384esac
19385eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
19386$as_echo "$ac_try_echo"; } >&5
19387  (eval "$ac_compile") 2>&5
19388  ac_status=$?
19389  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
19390  test $ac_status = 0; }; then :
19391  for ac_file in conftest.o conftest.obj conftest.*; do
19392  test -f "$ac_file" || continue;
19393  case $ac_file in
19394    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
19395    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
19396       break;;
19397  esac
19398done
19399else
19400  $as_echo "$as_me: failed program was:" >&5
19401sed 's/^/| /' conftest.$ac_ext >&5
19402
19403{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
19404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
19405as_fn_error $? "cannot compute suffix of object files: cannot compile
19406See \`config.log' for more details" "$LINENO" 5 ; }
19407fi
19408rm -f conftest.$ac_cv_objext conftest.$ac_ext
19409fi
19410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
19411$as_echo "$ac_cv_objext" >&6; }
19412OBJEXT=$ac_cv_objext
19413ac_objext=$OBJEXT
19414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
19415$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
19416if test "${ac_cv_c_compiler_gnu+set}" = set; then :
19417  $as_echo_n "(cached) " >&6
19418else
19419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19420/* end confdefs.h.  */
19421
19422int
19423main ()
19424{
19425#ifndef __GNUC__
19426       choke me
19427#endif
19428
19429  ;
19430  return 0;
19431}
19432_ACEOF
19433if ac_fn_c_try_compile "$LINENO"; then :
19434  ac_compiler_gnu=yes
19435else
19436  ac_compiler_gnu=no
19437fi
19438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19439ac_cv_c_compiler_gnu=$ac_compiler_gnu
19440
19441fi
19442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
19443$as_echo "$ac_cv_c_compiler_gnu" >&6; }
19444if test $ac_compiler_gnu = yes; then
19445  GCC=yes
19446else
19447  GCC=
19448fi
19449ac_test_CFLAGS=${CFLAGS+set}
19450ac_save_CFLAGS=$CFLAGS
19451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
19452$as_echo_n "checking whether $CC accepts -g... " >&6; }
19453if test "${ac_cv_prog_cc_g+set}" = set; then :
19454  $as_echo_n "(cached) " >&6
19455else
19456  ac_save_c_werror_flag=$ac_c_werror_flag
19457   ac_c_werror_flag=yes
19458   ac_cv_prog_cc_g=no
19459   CFLAGS="-g"
19460   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19461/* end confdefs.h.  */
19462
19463int
19464main ()
19465{
19466
19467  ;
19468  return 0;
19469}
19470_ACEOF
19471if ac_fn_c_try_compile "$LINENO"; then :
19472  ac_cv_prog_cc_g=yes
19473else
19474  CFLAGS=""
19475      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19476/* end confdefs.h.  */
19477
19478int
19479main ()
19480{
19481
19482  ;
19483  return 0;
19484}
19485_ACEOF
19486if ac_fn_c_try_compile "$LINENO"; then :
19487
19488else
19489  ac_c_werror_flag=$ac_save_c_werror_flag
19490	 CFLAGS="-g"
19491	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19492/* end confdefs.h.  */
19493
19494int
19495main ()
19496{
19497
19498  ;
19499  return 0;
19500}
19501_ACEOF
19502if ac_fn_c_try_compile "$LINENO"; then :
19503  ac_cv_prog_cc_g=yes
19504fi
19505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19506fi
19507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19508fi
19509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19510   ac_c_werror_flag=$ac_save_c_werror_flag
19511fi
19512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
19513$as_echo "$ac_cv_prog_cc_g" >&6; }
19514if test "$ac_test_CFLAGS" = set; then
19515  CFLAGS=$ac_save_CFLAGS
19516elif test $ac_cv_prog_cc_g = yes; then
19517  if test "$GCC" = yes; then
19518    CFLAGS="-g -O2"
19519  else
19520    CFLAGS="-g"
19521  fi
19522else
19523  if test "$GCC" = yes; then
19524    CFLAGS="-O2"
19525  else
19526    CFLAGS=
19527  fi
19528fi
19529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
19530$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
19531if test "${ac_cv_prog_cc_c89+set}" = set; then :
19532  $as_echo_n "(cached) " >&6
19533else
19534  ac_cv_prog_cc_c89=no
19535ac_save_CC=$CC
19536cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19537/* end confdefs.h.  */
19538#include <stdarg.h>
19539#include <stdio.h>
19540#include <sys/types.h>
19541#include <sys/stat.h>
19542/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
19543struct buf { int x; };
19544FILE * (*rcsopen) (struct buf *, struct stat *, int);
19545static char *e (p, i)
19546     char **p;
19547     int i;
19548{
19549  return p[i];
19550}
19551static char *f (char * (*g) (char **, int), char **p, ...)
19552{
19553  char *s;
19554  va_list v;
19555  va_start (v,p);
19556  s = g (p, va_arg (v,int));
19557  va_end (v);
19558  return s;
19559}
19560
19561/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
19562   function prototypes and stuff, but not '\xHH' hex character constants.
19563   These don't provoke an error unfortunately, instead are silently treated
19564   as 'x'.  The following induces an error, until -std is added to get
19565   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
19566   array size at least.  It's necessary to write '\x00'==0 to get something
19567   that's true only with -std.  */
19568int osf4_cc_array ['\x00' == 0 ? 1 : -1];
19569
19570/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
19571   inside strings and character constants.  */
19572#define FOO(x) 'x'
19573int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
19574
19575int test (int i, double x);
19576struct s1 {int (*f) (int a);};
19577struct s2 {int (*f) (double a);};
19578int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
19579int argc;
19580char **argv;
19581int
19582main ()
19583{
19584return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
19585  ;
19586  return 0;
19587}
19588_ACEOF
19589for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
19590	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
19591do
19592  CC="$ac_save_CC $ac_arg"
19593  if ac_fn_c_try_compile "$LINENO"; then :
19594  ac_cv_prog_cc_c89=$ac_arg
19595fi
19596rm -f core conftest.err conftest.$ac_objext
19597  test "x$ac_cv_prog_cc_c89" != "xno" && break
19598done
19599rm -f conftest.$ac_ext
19600CC=$ac_save_CC
19601
19602fi
19603# AC_CACHE_VAL
19604case "x$ac_cv_prog_cc_c89" in
19605  x)
19606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
19607$as_echo "none needed" >&6; } ;;
19608  xno)
19609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
19610$as_echo "unsupported" >&6; } ;;
19611  *)
19612    CC="$CC $ac_cv_prog_cc_c89"
19613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
19614$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
19615esac
19616if test "x$ac_cv_prog_cc_c89" != xno; then :
19617
19618fi
19619
19620ac_ext=cpp
19621ac_cpp='$CXXCPP $CPPFLAGS'
19622ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19623ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19624ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19625
19626
19627### Locate C++ compiler (CXX)
19628
19629if test "x$OPENJDK_TARGET_OS" = xmacosx; then
19630  # Do not probe for CC on MacOSX.
19631  COMPILER_CHECK_LIST="cl g++"
19632else
19633  COMPILER_CHECK_LIST="cl CC g++"
19634fi
19635
19636  COMPILER_NAME=C++
19637
19638  CXX=
19639  # If TOOLS_DIR is set, check for all compiler names in there first
19640  # before checking the rest of the PATH.
19641  if test -n "$TOOLS_DIR"; then
19642    PATH_save="$PATH"
19643    PATH="$TOOLS_DIR"
19644    for ac_prog in $COMPILER_CHECK_LIST
19645do
19646  # Extract the first word of "$ac_prog", so it can be a program name with args.
19647set dummy $ac_prog; ac_word=$2
19648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19649$as_echo_n "checking for $ac_word... " >&6; }
19650if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
19651  $as_echo_n "(cached) " >&6
19652else
19653  case $TOOLS_DIR_CXX in
19654  [\\/]* | ?:[\\/]*)
19655  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
19656  ;;
19657  *)
19658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19659for as_dir in $PATH
19660do
19661  IFS=$as_save_IFS
19662  test -z "$as_dir" && as_dir=.
19663    for ac_exec_ext in '' $ac_executable_extensions; do
19664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19665    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
19666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19667    break 2
19668  fi
19669done
19670  done
19671IFS=$as_save_IFS
19672
19673  ;;
19674esac
19675fi
19676TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
19677if test -n "$TOOLS_DIR_CXX"; then
19678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
19679$as_echo "$TOOLS_DIR_CXX" >&6; }
19680else
19681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19682$as_echo "no" >&6; }
19683fi
19684
19685
19686  test -n "$TOOLS_DIR_CXX" && break
19687done
19688
19689    CXX=$TOOLS_DIR_CXX
19690    PATH="$PATH_save"
19691  fi
19692
19693  # AC_PATH_PROGS can't be run multiple times with the same variable,
19694  # so create a new name for this run.
19695  if test "x$CXX" = x; then
19696    for ac_prog in $COMPILER_CHECK_LIST
19697do
19698  # Extract the first word of "$ac_prog", so it can be a program name with args.
19699set dummy $ac_prog; ac_word=$2
19700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19701$as_echo_n "checking for $ac_word... " >&6; }
19702if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
19703  $as_echo_n "(cached) " >&6
19704else
19705  case $POTENTIAL_CXX in
19706  [\\/]* | ?:[\\/]*)
19707  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
19708  ;;
19709  *)
19710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19711for as_dir in $PATH
19712do
19713  IFS=$as_save_IFS
19714  test -z "$as_dir" && as_dir=.
19715    for ac_exec_ext in '' $ac_executable_extensions; do
19716  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19717    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
19718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19719    break 2
19720  fi
19721done
19722  done
19723IFS=$as_save_IFS
19724
19725  ;;
19726esac
19727fi
19728POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
19729if test -n "$POTENTIAL_CXX"; then
19730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
19731$as_echo "$POTENTIAL_CXX" >&6; }
19732else
19733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19734$as_echo "no" >&6; }
19735fi
19736
19737
19738  test -n "$POTENTIAL_CXX" && break
19739done
19740
19741    CXX=$POTENTIAL_CXX
19742  fi
19743
19744  if test "x$CXX" = x; then
19745
19746    # Print a helpful message on how to acquire the necessary build dependency.
19747    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19748    MISSING_DEPENDENCY=devkit
19749    PKGHANDLER_COMMAND=
19750
19751    case $PKGHANDLER in
19752	apt-get)
19753                apt_help     $MISSING_DEPENDENCY ;;
19754    yum)
19755                yum_help     $MISSING_DEPENDENCY ;;
19756	port)
19757                port_help    $MISSING_DEPENDENCY ;;
19758	pkgutil)
19759                pkgutil_help $MISSING_DEPENDENCY ;;
19760	pkgadd)
19761                pkgadd_help  $MISSING_DEPENDENCY ;;
19762    * )
19763      break ;;
19764    esac
19765
19766    if test "x$PKGHANDLER_COMMAND" != x; then
19767        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19768    fi
19769
19770      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19771  fi
19772
19773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19774
19775  # First separate the path from the arguments. This will split at the first
19776  # space.
19777  complete="$CXX"
19778  path="${complete%% *}"
19779  tmp="$complete EOL"
19780  arguments="${tmp#* }"
19781
19782  # Input might be given as Windows format, start by converting to
19783  # unix format.
19784  new_path=`$CYGPATH -u "$path"`
19785
19786  # Now try to locate executable using which
19787  new_path=`$WHICH "$new_path" 2> /dev/null`
19788  # bat and cmd files are not always considered executable in cygwin causing which
19789  # to not find them
19790  if test "x$new_path" = x \
19791           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19792           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19793    new_path=`$CYGPATH -u "$path"`
19794  fi
19795  if test "x$new_path" = x; then
19796    # Oops. Which didn't find the executable.
19797    # The splitting of arguments from the executable at a space might have been incorrect,
19798    # since paths with space are more likely in Windows. Give it another try with the whole
19799    # argument.
19800    path="$complete"
19801    arguments="EOL"
19802    new_path=`$CYGPATH -u "$path"`
19803    new_path=`$WHICH "$new_path" 2> /dev/null`
19804    # bat and cmd files are not always considered executable in cygwin causing which
19805    # to not find them
19806    if test "x$new_path" = x \
19807             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19808             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19809      new_path=`$CYGPATH -u "$path"`
19810    fi
19811    if test "x$new_path" = x; then
19812      # It's still not found. Now this is an unrecoverable error.
19813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19814$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19815      has_space=`$ECHO "$complete" | $GREP " "`
19816      if test "x$has_space" != x; then
19817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19819      fi
19820      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19821    fi
19822  fi
19823
19824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19827  # "foo.exe" is OK but "foo" is an error.
19828  #
19829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19830  # It is also a way to make sure we got the proper file name for the real test later on.
19831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19832  if test "x$test_shortpath" = x; then
19833    # Short path failed, file does not exist as specified.
19834    # Try adding .exe or .cmd
19835    if test -f "${new_path}.exe"; then
19836       input_to_shortpath="${new_path}.exe"
19837    elif test -f "${new_path}.cmd"; then
19838       input_to_shortpath="${new_path}.cmd"
19839    else
19840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
19841$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
19842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19844      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19845    fi
19846  else
19847    input_to_shortpath="$new_path"
19848  fi
19849
19850  # Call helper function which possibly converts this using DOS-style short mode.
19851  # If so, the updated path is stored in $new_path.
19852  new_path="$input_to_shortpath"
19853
19854  input_path="$input_to_shortpath"
19855  # Check if we need to convert this using DOS-style short mode. If the path
19856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19857  # take no chances and rewrite it.
19858  # Note: m4 eats our [], so we need to use [ and ] instead.
19859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19860  if test "x$has_forbidden_chars" != x; then
19861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19865      # Going to short mode and back again did indeed matter. Since short mode is
19866      # case insensitive, let's make it lowercase to improve readability.
19867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19868      # Now convert it back to Unix-stile (cygpath)
19869      input_path=`$CYGPATH -u "$shortmode_path"`
19870      new_path="$input_path"
19871    fi
19872  fi
19873
19874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19875  if test "x$test_cygdrive_prefix" = x; then
19876    # As a simple fix, exclude /usr/bin since it's not a real path.
19877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19879      # a path prefixed by /cygdrive for fixpath to work.
19880      new_path="$CYGWIN_ROOT_PATH$input_path"
19881    fi
19882  fi
19883
19884  # remove trailing .exe if any
19885  new_path="${new_path/%.exe/}"
19886
19887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19888
19889  # First separate the path from the arguments. This will split at the first
19890  # space.
19891  complete="$CXX"
19892  path="${complete%% *}"
19893  tmp="$complete EOL"
19894  arguments="${tmp#* }"
19895
19896  # Input might be given as Windows format, start by converting to
19897  # unix format.
19898  new_path="$path"
19899
19900  windows_path="$new_path"
19901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19902    unix_path=`$CYGPATH -u "$windows_path"`
19903    new_path="$unix_path"
19904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19906    new_path="$unix_path"
19907  fi
19908
19909
19910  # Now try to locate executable using which
19911  new_path=`$WHICH "$new_path" 2> /dev/null`
19912
19913  if test "x$new_path" = x; then
19914    # Oops. Which didn't find the executable.
19915    # The splitting of arguments from the executable at a space might have been incorrect,
19916    # since paths with space are more likely in Windows. Give it another try with the whole
19917    # argument.
19918    path="$complete"
19919    arguments="EOL"
19920    new_path="$path"
19921
19922  windows_path="$new_path"
19923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19924    unix_path=`$CYGPATH -u "$windows_path"`
19925    new_path="$unix_path"
19926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19928    new_path="$unix_path"
19929  fi
19930
19931
19932    new_path=`$WHICH "$new_path" 2> /dev/null`
19933
19934    if test "x$new_path" = x; then
19935      # It's still not found. Now this is an unrecoverable error.
19936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
19937$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
19938      has_space=`$ECHO "$complete" | $GREP " "`
19939      if test "x$has_space" != x; then
19940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19942      fi
19943      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
19944    fi
19945  fi
19946
19947  # Now new_path has a complete unix path to the binary
19948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19949    # Keep paths in /bin as-is, but remove trailing .exe if any
19950    new_path="${new_path/%.exe/}"
19951    # Do not save /bin paths to all_fixpath_prefixes!
19952  else
19953    # Not in mixed or Windows style, start by that.
19954    new_path=`cmd //c echo $new_path`
19955
19956  input_path="$new_path"
19957  # Check if we need to convert this using DOS-style short mode. If the path
19958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19959  # take no chances and rewrite it.
19960  # Note: m4 eats our [], so we need to use [ and ] instead.
19961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19962  if test "x$has_forbidden_chars" != x; then
19963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19965  fi
19966
19967    # Output is in $new_path
19968
19969  windows_path="$new_path"
19970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19971    unix_path=`$CYGPATH -u "$windows_path"`
19972    new_path="$unix_path"
19973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19975    new_path="$unix_path"
19976  fi
19977
19978    # remove trailing .exe if any
19979    new_path="${new_path/%.exe/}"
19980
19981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19983  fi
19984
19985  else
19986    # We're on a posix platform. Hooray! :)
19987    # First separate the path from the arguments. This will split at the first
19988    # space.
19989    complete="$CXX"
19990    path="${complete%% *}"
19991    tmp="$complete EOL"
19992    arguments="${tmp#* }"
19993
19994    # Cannot rely on the command "which" here since it doesn't always work.
19995    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19996    if test -z "$is_absolute_path"; then
19997      # Path to executable is not absolute. Find it.
19998      IFS_save="$IFS"
19999      IFS=:
20000      for p in $PATH; do
20001        if test -f "$p/$path" && test -x "$p/$path"; then
20002          new_path="$p/$path"
20003          break
20004        fi
20005      done
20006      IFS="$IFS_save"
20007    else
20008      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20009$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20010      new_path="$path"
20011    fi
20012
20013    if test "x$new_path" = x; then
20014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20015$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20016        has_space=`$ECHO "$complete" | $GREP " "`
20017        if test "x$has_space" != x; then
20018          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20019$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20020        fi
20021        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20022      fi
20023  fi
20024
20025      # Now join together the path and the arguments once again
20026      if test "x$arguments" != xEOL; then
20027        new_complete="$new_path ${arguments% *}"
20028      else
20029        new_complete="$new_path"
20030      fi
20031
20032  if test "x$complete" != "x$new_complete"; then
20033      CXX="$new_complete"
20034      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20035$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20036    fi
20037
20038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20039$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20040  TEST_COMPILER="$CXX"
20041
20042    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20043        # Follow a chain of symbolic links. Use readlink
20044        # where it exists, else fall back to horribly
20045        # complicated shell code.
20046        if test "x$READLINK_TESTED" != yes; then
20047            # On MacOSX there is a readlink tool with a different
20048            # purpose than the GNU readlink tool. Check the found readlink.
20049            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20050            if test "x$ISGNU" = x; then
20051                 # A readlink that we do not know how to use.
20052                 # Are there other non-GNU readlinks out there?
20053                 READLINK_TESTED=yes
20054                 READLINK=
20055            fi
20056        fi
20057
20058        if test "x$READLINK" != x; then
20059            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20060        else
20061            # Save the current directory for restoring afterwards
20062            STARTDIR=$PWD
20063            COUNTER=0
20064            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20065            sym_link_file=`$BASENAME $TEST_COMPILER`
20066            # Use the system pwd and not the shell builtin to resolve directory symlinks
20067            cd $sym_link_dir
20068            cd `$THEPWDCMD`
20069            sym_link_dir=`$THEPWDCMD`
20070            # Resolve file symlinks
20071            while test $COUNTER -lt 20; do
20072                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20073                if test "x$ISLINK" == x; then
20074                    # This is not a symbolic link! We are done!
20075                    break
20076                fi
20077                # Again resolve directory symlinks since the target of the just found
20078                # link could be in a different directory
20079                cd `$DIRNAME $ISLINK`
20080                sym_link_dir=`$THEPWDCMD`
20081                sym_link_file=`$BASENAME $ISLINK`
20082                let COUNTER=COUNTER+1
20083            done
20084            cd $STARTDIR
20085            TEST_COMPILER=$sym_link_dir/$sym_link_file
20086        fi
20087    fi
20088
20089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20090$as_echo "$TEST_COMPILER" >&6; }
20091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20092$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20093
20094  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
20095  if test "x$COMPILER_BASENAME" = "xccache"; then
20096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
20097$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
20098    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
20099    # We want to control ccache invocation ourselves, so ignore this cc and try
20100    # searching again.
20101
20102    # Remove the path to the fake ccache cc from the PATH
20103    RETRY_COMPILER_SAVED_PATH="$PATH"
20104    COMPILER_DIRNAME=`$DIRNAME $CXX`
20105    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
20106
20107    # Try again looking for our compiler
20108    if test -n "$ac_tool_prefix"; then
20109  for ac_prog in $COMPILER_CHECK_LIST
20110  do
20111    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20112set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20114$as_echo_n "checking for $ac_word... " >&6; }
20115if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
20116  $as_echo_n "(cached) " >&6
20117else
20118  if test -n "$PROPER_COMPILER_CXX"; then
20119  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
20120else
20121as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20122for as_dir in $PATH
20123do
20124  IFS=$as_save_IFS
20125  test -z "$as_dir" && as_dir=.
20126    for ac_exec_ext in '' $ac_executable_extensions; do
20127  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20128    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
20129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20130    break 2
20131  fi
20132done
20133  done
20134IFS=$as_save_IFS
20135
20136fi
20137fi
20138PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
20139if test -n "$PROPER_COMPILER_CXX"; then
20140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20141$as_echo "$PROPER_COMPILER_CXX" >&6; }
20142else
20143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20144$as_echo "no" >&6; }
20145fi
20146
20147
20148    test -n "$PROPER_COMPILER_CXX" && break
20149  done
20150fi
20151if test -z "$PROPER_COMPILER_CXX"; then
20152  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
20153  for ac_prog in $COMPILER_CHECK_LIST
20154do
20155  # Extract the first word of "$ac_prog", so it can be a program name with args.
20156set dummy $ac_prog; ac_word=$2
20157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20158$as_echo_n "checking for $ac_word... " >&6; }
20159if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
20160  $as_echo_n "(cached) " >&6
20161else
20162  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20163  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
20164else
20165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20166for as_dir in $PATH
20167do
20168  IFS=$as_save_IFS
20169  test -z "$as_dir" && as_dir=.
20170    for ac_exec_ext in '' $ac_executable_extensions; do
20171  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20172    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
20173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20174    break 2
20175  fi
20176done
20177  done
20178IFS=$as_save_IFS
20179
20180fi
20181fi
20182ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
20183if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
20184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
20185$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
20186else
20187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20188$as_echo "no" >&6; }
20189fi
20190
20191
20192  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
20193done
20194
20195  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
20196    PROPER_COMPILER_CXX=""
20197  else
20198    case $cross_compiling:$ac_tool_warned in
20199yes:)
20200{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20201$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20202ac_tool_warned=yes ;;
20203esac
20204    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
20205  fi
20206fi
20207
20208
20209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20210
20211  # First separate the path from the arguments. This will split at the first
20212  # space.
20213  complete="$PROPER_COMPILER_CXX"
20214  path="${complete%% *}"
20215  tmp="$complete EOL"
20216  arguments="${tmp#* }"
20217
20218  # Input might be given as Windows format, start by converting to
20219  # unix format.
20220  new_path=`$CYGPATH -u "$path"`
20221
20222  # Now try to locate executable using which
20223  new_path=`$WHICH "$new_path" 2> /dev/null`
20224  # bat and cmd files are not always considered executable in cygwin causing which
20225  # to not find them
20226  if test "x$new_path" = x \
20227           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20228           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20229    new_path=`$CYGPATH -u "$path"`
20230  fi
20231  if test "x$new_path" = x; then
20232    # Oops. Which didn't find the executable.
20233    # The splitting of arguments from the executable at a space might have been incorrect,
20234    # since paths with space are more likely in Windows. Give it another try with the whole
20235    # argument.
20236    path="$complete"
20237    arguments="EOL"
20238    new_path=`$CYGPATH -u "$path"`
20239    new_path=`$WHICH "$new_path" 2> /dev/null`
20240    # bat and cmd files are not always considered executable in cygwin causing which
20241    # to not find them
20242    if test "x$new_path" = x \
20243             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20244             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20245      new_path=`$CYGPATH -u "$path"`
20246    fi
20247    if test "x$new_path" = x; then
20248      # It's still not found. Now this is an unrecoverable error.
20249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20250$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20251      has_space=`$ECHO "$complete" | $GREP " "`
20252      if test "x$has_space" != x; then
20253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20255      fi
20256      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20257    fi
20258  fi
20259
20260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20263  # "foo.exe" is OK but "foo" is an error.
20264  #
20265  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20266  # It is also a way to make sure we got the proper file name for the real test later on.
20267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20268  if test "x$test_shortpath" = x; then
20269    # Short path failed, file does not exist as specified.
20270    # Try adding .exe or .cmd
20271    if test -f "${new_path}.exe"; then
20272       input_to_shortpath="${new_path}.exe"
20273    elif test -f "${new_path}.cmd"; then
20274       input_to_shortpath="${new_path}.cmd"
20275    else
20276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
20277$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
20278      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20279$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20280      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20281    fi
20282  else
20283    input_to_shortpath="$new_path"
20284  fi
20285
20286  # Call helper function which possibly converts this using DOS-style short mode.
20287  # If so, the updated path is stored in $new_path.
20288  new_path="$input_to_shortpath"
20289
20290  input_path="$input_to_shortpath"
20291  # Check if we need to convert this using DOS-style short mode. If the path
20292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20293  # take no chances and rewrite it.
20294  # Note: m4 eats our [], so we need to use [ and ] instead.
20295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20296  if test "x$has_forbidden_chars" != x; then
20297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20301      # Going to short mode and back again did indeed matter. Since short mode is
20302      # case insensitive, let's make it lowercase to improve readability.
20303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20304      # Now convert it back to Unix-stile (cygpath)
20305      input_path=`$CYGPATH -u "$shortmode_path"`
20306      new_path="$input_path"
20307    fi
20308  fi
20309
20310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20311  if test "x$test_cygdrive_prefix" = x; then
20312    # As a simple fix, exclude /usr/bin since it's not a real path.
20313    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20315      # a path prefixed by /cygdrive for fixpath to work.
20316      new_path="$CYGWIN_ROOT_PATH$input_path"
20317    fi
20318  fi
20319
20320  # remove trailing .exe if any
20321  new_path="${new_path/%.exe/}"
20322
20323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20324
20325  # First separate the path from the arguments. This will split at the first
20326  # space.
20327  complete="$PROPER_COMPILER_CXX"
20328  path="${complete%% *}"
20329  tmp="$complete EOL"
20330  arguments="${tmp#* }"
20331
20332  # Input might be given as Windows format, start by converting to
20333  # unix format.
20334  new_path="$path"
20335
20336  windows_path="$new_path"
20337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20338    unix_path=`$CYGPATH -u "$windows_path"`
20339    new_path="$unix_path"
20340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20342    new_path="$unix_path"
20343  fi
20344
20345
20346  # Now try to locate executable using which
20347  new_path=`$WHICH "$new_path" 2> /dev/null`
20348
20349  if test "x$new_path" = x; then
20350    # Oops. Which didn't find the executable.
20351    # The splitting of arguments from the executable at a space might have been incorrect,
20352    # since paths with space are more likely in Windows. Give it another try with the whole
20353    # argument.
20354    path="$complete"
20355    arguments="EOL"
20356    new_path="$path"
20357
20358  windows_path="$new_path"
20359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20360    unix_path=`$CYGPATH -u "$windows_path"`
20361    new_path="$unix_path"
20362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20364    new_path="$unix_path"
20365  fi
20366
20367
20368    new_path=`$WHICH "$new_path" 2> /dev/null`
20369
20370    if test "x$new_path" = x; then
20371      # It's still not found. Now this is an unrecoverable error.
20372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20373$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20374      has_space=`$ECHO "$complete" | $GREP " "`
20375      if test "x$has_space" != x; then
20376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20378      fi
20379      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20380    fi
20381  fi
20382
20383  # Now new_path has a complete unix path to the binary
20384  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20385    # Keep paths in /bin as-is, but remove trailing .exe if any
20386    new_path="${new_path/%.exe/}"
20387    # Do not save /bin paths to all_fixpath_prefixes!
20388  else
20389    # Not in mixed or Windows style, start by that.
20390    new_path=`cmd //c echo $new_path`
20391
20392  input_path="$new_path"
20393  # Check if we need to convert this using DOS-style short mode. If the path
20394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20395  # take no chances and rewrite it.
20396  # Note: m4 eats our [], so we need to use [ and ] instead.
20397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20398  if test "x$has_forbidden_chars" != x; then
20399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20401  fi
20402
20403    # Output is in $new_path
20404
20405  windows_path="$new_path"
20406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20407    unix_path=`$CYGPATH -u "$windows_path"`
20408    new_path="$unix_path"
20409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20411    new_path="$unix_path"
20412  fi
20413
20414    # remove trailing .exe if any
20415    new_path="${new_path/%.exe/}"
20416
20417    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20418    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20419  fi
20420
20421  else
20422    # We're on a posix platform. Hooray! :)
20423    # First separate the path from the arguments. This will split at the first
20424    # space.
20425    complete="$PROPER_COMPILER_CXX"
20426    path="${complete%% *}"
20427    tmp="$complete EOL"
20428    arguments="${tmp#* }"
20429
20430    # Cannot rely on the command "which" here since it doesn't always work.
20431    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20432    if test -z "$is_absolute_path"; then
20433      # Path to executable is not absolute. Find it.
20434      IFS_save="$IFS"
20435      IFS=:
20436      for p in $PATH; do
20437        if test -f "$p/$path" && test -x "$p/$path"; then
20438          new_path="$p/$path"
20439          break
20440        fi
20441      done
20442      IFS="$IFS_save"
20443    else
20444      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
20445$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
20446      new_path="$path"
20447    fi
20448
20449    if test "x$new_path" = x; then
20450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
20451$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
20452        has_space=`$ECHO "$complete" | $GREP " "`
20453        if test "x$has_space" != x; then
20454          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20455$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20456        fi
20457        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
20458      fi
20459  fi
20460
20461      # Now join together the path and the arguments once again
20462      if test "x$arguments" != xEOL; then
20463        new_complete="$new_path ${arguments% *}"
20464      else
20465        new_complete="$new_path"
20466      fi
20467
20468  if test "x$complete" != "x$new_complete"; then
20469      PROPER_COMPILER_CXX="$new_complete"
20470      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
20471$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
20472    fi
20473
20474    PATH="$RETRY_COMPILER_SAVED_PATH"
20475
20476    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
20477$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
20478
20479    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20480        # Follow a chain of symbolic links. Use readlink
20481        # where it exists, else fall back to horribly
20482        # complicated shell code.
20483        if test "x$READLINK_TESTED" != yes; then
20484            # On MacOSX there is a readlink tool with a different
20485            # purpose than the GNU readlink tool. Check the found readlink.
20486            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20487            if test "x$ISGNU" = x; then
20488                 # A readlink that we do not know how to use.
20489                 # Are there other non-GNU readlinks out there?
20490                 READLINK_TESTED=yes
20491                 READLINK=
20492            fi
20493        fi
20494
20495        if test "x$READLINK" != x; then
20496            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
20497        else
20498            # Save the current directory for restoring afterwards
20499            STARTDIR=$PWD
20500            COUNTER=0
20501            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
20502            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
20503            # Use the system pwd and not the shell builtin to resolve directory symlinks
20504            cd $sym_link_dir
20505            cd `$THEPWDCMD`
20506            sym_link_dir=`$THEPWDCMD`
20507            # Resolve file symlinks
20508            while test $COUNTER -lt 20; do
20509                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20510                if test "x$ISLINK" == x; then
20511                    # This is not a symbolic link! We are done!
20512                    break
20513                fi
20514                # Again resolve directory symlinks since the target of the just found
20515                # link could be in a different directory
20516                cd `$DIRNAME $ISLINK`
20517                sym_link_dir=`$THEPWDCMD`
20518                sym_link_file=`$BASENAME $ISLINK`
20519                let COUNTER=COUNTER+1
20520            done
20521            cd $STARTDIR
20522            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
20523        fi
20524    fi
20525
20526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
20527$as_echo "$PROPER_COMPILER_CXX" >&6; }
20528    CXX="$PROPER_COMPILER_CXX"
20529  else
20530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
20531$as_echo "no, keeping CXX" >&6; }
20532    CXX="$TEST_COMPILER"
20533  fi
20534
20535  COMPILER=$CXX
20536  COMPILER_NAME=$COMPILER_NAME
20537
20538  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
20539    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
20540    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
20541    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
20542    if test $? -ne 0; then
20543      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20544
20545      { $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
20546$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
20547      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
20548$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
20549      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20550    else
20551      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
20552      COMPILER_VENDOR="Sun Studio"
20553    fi
20554  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
20555    # First line typically looks something like:
20556    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
20557    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
20558    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
20559    COMPILER_VENDOR="Microsoft CL.EXE"
20560    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
20561    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
20562      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
20563        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
20564      fi
20565    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
20566      if test "x$COMPILER_CPU_TEST" != "xx64"; then
20567        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
20568      fi
20569    fi
20570  else
20571    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
20572    # Check that this is likely to be GCC.
20573    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
20574    if test $? -ne 0; then
20575      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
20576$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
20577      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
20578$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
20579      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
20580    fi
20581
20582    # First line typically looks something like:
20583    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
20584    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
20585    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
20586  fi
20587  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
20588  CXX_VERSION="$COMPILER_VERSION"
20589  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
20590  CXX_VENDOR="$COMPILER_VENDOR"
20591
20592  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
20593$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
20594
20595
20596# Now that we have resolved CXX ourself, let autoconf have it's go at it
20597ac_ext=cpp
20598ac_cpp='$CXXCPP $CPPFLAGS'
20599ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20600ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20601ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20602if test -z "$CXX"; then
20603  if test -n "$CCC"; then
20604    CXX=$CCC
20605  else
20606    if test -n "$ac_tool_prefix"; then
20607  for ac_prog in $CXX
20608  do
20609    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20610set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20612$as_echo_n "checking for $ac_word... " >&6; }
20613if test "${ac_cv_prog_CXX+set}" = set; then :
20614  $as_echo_n "(cached) " >&6
20615else
20616  if test -n "$CXX"; then
20617  ac_cv_prog_CXX="$CXX" # Let the user override the test.
20618else
20619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20620for as_dir in $PATH
20621do
20622  IFS=$as_save_IFS
20623  test -z "$as_dir" && as_dir=.
20624    for ac_exec_ext in '' $ac_executable_extensions; do
20625  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20626    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
20627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20628    break 2
20629  fi
20630done
20631  done
20632IFS=$as_save_IFS
20633
20634fi
20635fi
20636CXX=$ac_cv_prog_CXX
20637if test -n "$CXX"; then
20638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
20639$as_echo "$CXX" >&6; }
20640else
20641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20642$as_echo "no" >&6; }
20643fi
20644
20645
20646    test -n "$CXX" && break
20647  done
20648fi
20649if test -z "$CXX"; then
20650  ac_ct_CXX=$CXX
20651  for ac_prog in $CXX
20652do
20653  # Extract the first word of "$ac_prog", so it can be a program name with args.
20654set dummy $ac_prog; ac_word=$2
20655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20656$as_echo_n "checking for $ac_word... " >&6; }
20657if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
20658  $as_echo_n "(cached) " >&6
20659else
20660  if test -n "$ac_ct_CXX"; then
20661  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
20662else
20663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20664for as_dir in $PATH
20665do
20666  IFS=$as_save_IFS
20667  test -z "$as_dir" && as_dir=.
20668    for ac_exec_ext in '' $ac_executable_extensions; do
20669  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20670    ac_cv_prog_ac_ct_CXX="$ac_prog"
20671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20672    break 2
20673  fi
20674done
20675  done
20676IFS=$as_save_IFS
20677
20678fi
20679fi
20680ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
20681if test -n "$ac_ct_CXX"; then
20682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
20683$as_echo "$ac_ct_CXX" >&6; }
20684else
20685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20686$as_echo "no" >&6; }
20687fi
20688
20689
20690  test -n "$ac_ct_CXX" && break
20691done
20692
20693  if test "x$ac_ct_CXX" = x; then
20694    CXX="g++"
20695  else
20696    case $cross_compiling:$ac_tool_warned in
20697yes:)
20698{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20699$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20700ac_tool_warned=yes ;;
20701esac
20702    CXX=$ac_ct_CXX
20703  fi
20704fi
20705
20706  fi
20707fi
20708# Provide some information about the compiler.
20709$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
20710set X $ac_compile
20711ac_compiler=$2
20712for ac_option in --version -v -V -qversion; do
20713  { { ac_try="$ac_compiler $ac_option >&5"
20714case "(($ac_try" in
20715  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20716  *) ac_try_echo=$ac_try;;
20717esac
20718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20719$as_echo "$ac_try_echo"; } >&5
20720  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20721  ac_status=$?
20722  if test -s conftest.err; then
20723    sed '10a\
20724... rest of stderr output deleted ...
20725         10q' conftest.err >conftest.er1
20726    cat conftest.er1 >&5
20727  fi
20728  rm -f conftest.er1 conftest.err
20729  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20730  test $ac_status = 0; }
20731done
20732
20733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
20734$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
20735if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
20736  $as_echo_n "(cached) " >&6
20737else
20738  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20739/* end confdefs.h.  */
20740
20741int
20742main ()
20743{
20744#ifndef __GNUC__
20745       choke me
20746#endif
20747
20748  ;
20749  return 0;
20750}
20751_ACEOF
20752if ac_fn_cxx_try_compile "$LINENO"; then :
20753  ac_compiler_gnu=yes
20754else
20755  ac_compiler_gnu=no
20756fi
20757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20758ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
20759
20760fi
20761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
20762$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
20763if test $ac_compiler_gnu = yes; then
20764  GXX=yes
20765else
20766  GXX=
20767fi
20768ac_test_CXXFLAGS=${CXXFLAGS+set}
20769ac_save_CXXFLAGS=$CXXFLAGS
20770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
20771$as_echo_n "checking whether $CXX accepts -g... " >&6; }
20772if test "${ac_cv_prog_cxx_g+set}" = set; then :
20773  $as_echo_n "(cached) " >&6
20774else
20775  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
20776   ac_cxx_werror_flag=yes
20777   ac_cv_prog_cxx_g=no
20778   CXXFLAGS="-g"
20779   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20780/* end confdefs.h.  */
20781
20782int
20783main ()
20784{
20785
20786  ;
20787  return 0;
20788}
20789_ACEOF
20790if ac_fn_cxx_try_compile "$LINENO"; then :
20791  ac_cv_prog_cxx_g=yes
20792else
20793  CXXFLAGS=""
20794      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20795/* end confdefs.h.  */
20796
20797int
20798main ()
20799{
20800
20801  ;
20802  return 0;
20803}
20804_ACEOF
20805if ac_fn_cxx_try_compile "$LINENO"; then :
20806
20807else
20808  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20809	 CXXFLAGS="-g"
20810	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20811/* end confdefs.h.  */
20812
20813int
20814main ()
20815{
20816
20817  ;
20818  return 0;
20819}
20820_ACEOF
20821if ac_fn_cxx_try_compile "$LINENO"; then :
20822  ac_cv_prog_cxx_g=yes
20823fi
20824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20825fi
20826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20827fi
20828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20829   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
20830fi
20831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
20832$as_echo "$ac_cv_prog_cxx_g" >&6; }
20833if test "$ac_test_CXXFLAGS" = set; then
20834  CXXFLAGS=$ac_save_CXXFLAGS
20835elif test $ac_cv_prog_cxx_g = yes; then
20836  if test "$GXX" = yes; then
20837    CXXFLAGS="-g -O2"
20838  else
20839    CXXFLAGS="-g"
20840  fi
20841else
20842  if test "$GXX" = yes; then
20843    CXXFLAGS="-O2"
20844  else
20845    CXXFLAGS=
20846  fi
20847fi
20848ac_ext=cpp
20849ac_cpp='$CXXCPP $CPPFLAGS'
20850ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20851ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20852ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20853
20854
20855### Locate other tools
20856
20857if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20858    ac_ext=m
20859ac_cpp='$OBJCPP $CPPFLAGS'
20860ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20861ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20862ac_compiler_gnu=$ac_cv_objc_compiler_gnu
20863if test -n "$ac_tool_prefix"; then
20864  for ac_prog in gcc objcc objc cc CC
20865  do
20866    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20867set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20869$as_echo_n "checking for $ac_word... " >&6; }
20870if test "${ac_cv_prog_OBJC+set}" = set; then :
20871  $as_echo_n "(cached) " >&6
20872else
20873  if test -n "$OBJC"; then
20874  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
20875else
20876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20877for as_dir in $PATH
20878do
20879  IFS=$as_save_IFS
20880  test -z "$as_dir" && as_dir=.
20881    for ac_exec_ext in '' $ac_executable_extensions; do
20882  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20883    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
20884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20885    break 2
20886  fi
20887done
20888  done
20889IFS=$as_save_IFS
20890
20891fi
20892fi
20893OBJC=$ac_cv_prog_OBJC
20894if test -n "$OBJC"; then
20895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
20896$as_echo "$OBJC" >&6; }
20897else
20898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20899$as_echo "no" >&6; }
20900fi
20901
20902
20903    test -n "$OBJC" && break
20904  done
20905fi
20906if test -z "$OBJC"; then
20907  ac_ct_OBJC=$OBJC
20908  for ac_prog in gcc objcc objc cc CC
20909do
20910  # Extract the first word of "$ac_prog", so it can be a program name with args.
20911set dummy $ac_prog; ac_word=$2
20912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20913$as_echo_n "checking for $ac_word... " >&6; }
20914if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
20915  $as_echo_n "(cached) " >&6
20916else
20917  if test -n "$ac_ct_OBJC"; then
20918  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
20919else
20920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20921for as_dir in $PATH
20922do
20923  IFS=$as_save_IFS
20924  test -z "$as_dir" && as_dir=.
20925    for ac_exec_ext in '' $ac_executable_extensions; do
20926  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20927    ac_cv_prog_ac_ct_OBJC="$ac_prog"
20928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20929    break 2
20930  fi
20931done
20932  done
20933IFS=$as_save_IFS
20934
20935fi
20936fi
20937ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
20938if test -n "$ac_ct_OBJC"; then
20939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
20940$as_echo "$ac_ct_OBJC" >&6; }
20941else
20942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20943$as_echo "no" >&6; }
20944fi
20945
20946
20947  test -n "$ac_ct_OBJC" && break
20948done
20949
20950  if test "x$ac_ct_OBJC" = x; then
20951    OBJC="gcc"
20952  else
20953    case $cross_compiling:$ac_tool_warned in
20954yes:)
20955{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20956$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20957ac_tool_warned=yes ;;
20958esac
20959    OBJC=$ac_ct_OBJC
20960  fi
20961fi
20962
20963# Provide some information about the compiler.
20964$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
20965set X $ac_compile
20966ac_compiler=$2
20967for ac_option in --version -v -V -qversion; do
20968  { { ac_try="$ac_compiler $ac_option >&5"
20969case "(($ac_try" in
20970  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20971  *) ac_try_echo=$ac_try;;
20972esac
20973eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20974$as_echo "$ac_try_echo"; } >&5
20975  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20976  ac_status=$?
20977  if test -s conftest.err; then
20978    sed '10a\
20979... rest of stderr output deleted ...
20980         10q' conftest.err >conftest.er1
20981    cat conftest.er1 >&5
20982  fi
20983  rm -f conftest.er1 conftest.err
20984  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20985  test $ac_status = 0; }
20986done
20987
20988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
20989$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
20990if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
20991  $as_echo_n "(cached) " >&6
20992else
20993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20994/* end confdefs.h.  */
20995
20996int
20997main ()
20998{
20999#ifndef __GNUC__
21000       choke me
21001#endif
21002
21003  ;
21004  return 0;
21005}
21006_ACEOF
21007if ac_fn_objc_try_compile "$LINENO"; then :
21008  ac_compiler_gnu=yes
21009else
21010  ac_compiler_gnu=no
21011fi
21012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21013ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21014
21015fi
21016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21017$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21018if test $ac_compiler_gnu = yes; then
21019  GOBJC=yes
21020else
21021  GOBJC=
21022fi
21023ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21024ac_save_OBJCFLAGS=$OBJCFLAGS
21025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21026$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21027if test "${ac_cv_prog_objc_g+set}" = set; then :
21028  $as_echo_n "(cached) " >&6
21029else
21030  ac_save_objc_werror_flag=$ac_objc_werror_flag
21031   ac_objc_werror_flag=yes
21032   ac_cv_prog_objc_g=no
21033   OBJCFLAGS="-g"
21034   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21035/* end confdefs.h.  */
21036
21037int
21038main ()
21039{
21040
21041  ;
21042  return 0;
21043}
21044_ACEOF
21045if ac_fn_objc_try_compile "$LINENO"; then :
21046  ac_cv_prog_objc_g=yes
21047else
21048  OBJCFLAGS=""
21049      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21050/* end confdefs.h.  */
21051
21052int
21053main ()
21054{
21055
21056  ;
21057  return 0;
21058}
21059_ACEOF
21060if ac_fn_objc_try_compile "$LINENO"; then :
21061
21062else
21063  ac_objc_werror_flag=$ac_save_objc_werror_flag
21064	 OBJCFLAGS="-g"
21065	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21066/* end confdefs.h.  */
21067
21068int
21069main ()
21070{
21071
21072  ;
21073  return 0;
21074}
21075_ACEOF
21076if ac_fn_objc_try_compile "$LINENO"; then :
21077  ac_cv_prog_objc_g=yes
21078fi
21079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21080fi
21081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21082fi
21083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21084   ac_objc_werror_flag=$ac_save_objc_werror_flag
21085fi
21086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21087$as_echo "$ac_cv_prog_objc_g" >&6; }
21088if test "$ac_test_OBJCFLAGS" = set; then
21089  OBJCFLAGS=$ac_save_OBJCFLAGS
21090elif test $ac_cv_prog_objc_g = yes; then
21091  if test "$GOBJC" = yes; then
21092    OBJCFLAGS="-g -O2"
21093  else
21094    OBJCFLAGS="-g"
21095  fi
21096else
21097  if test "$GOBJC" = yes; then
21098    OBJCFLAGS="-O2"
21099  else
21100    OBJCFLAGS=
21101  fi
21102fi
21103ac_ext=cpp
21104ac_cpp='$CXXCPP $CPPFLAGS'
21105ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21106ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21107ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21108
21109
21110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21111
21112  # First separate the path from the arguments. This will split at the first
21113  # space.
21114  complete="$OBJC"
21115  path="${complete%% *}"
21116  tmp="$complete EOL"
21117  arguments="${tmp#* }"
21118
21119  # Input might be given as Windows format, start by converting to
21120  # unix format.
21121  new_path=`$CYGPATH -u "$path"`
21122
21123  # Now try to locate executable using which
21124  new_path=`$WHICH "$new_path" 2> /dev/null`
21125  # bat and cmd files are not always considered executable in cygwin causing which
21126  # to not find them
21127  if test "x$new_path" = x \
21128           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21129           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21130    new_path=`$CYGPATH -u "$path"`
21131  fi
21132  if test "x$new_path" = x; then
21133    # Oops. Which didn't find the executable.
21134    # The splitting of arguments from the executable at a space might have been incorrect,
21135    # since paths with space are more likely in Windows. Give it another try with the whole
21136    # argument.
21137    path="$complete"
21138    arguments="EOL"
21139    new_path=`$CYGPATH -u "$path"`
21140    new_path=`$WHICH "$new_path" 2> /dev/null`
21141    # bat and cmd files are not always considered executable in cygwin causing which
21142    # to not find them
21143    if test "x$new_path" = x \
21144             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21145             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21146      new_path=`$CYGPATH -u "$path"`
21147    fi
21148    if test "x$new_path" = x; then
21149      # It's still not found. Now this is an unrecoverable error.
21150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21151$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21152      has_space=`$ECHO "$complete" | $GREP " "`
21153      if test "x$has_space" != x; then
21154        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21155$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21156      fi
21157      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21158    fi
21159  fi
21160
21161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21164  # "foo.exe" is OK but "foo" is an error.
21165  #
21166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21167  # It is also a way to make sure we got the proper file name for the real test later on.
21168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21169  if test "x$test_shortpath" = x; then
21170    # Short path failed, file does not exist as specified.
21171    # Try adding .exe or .cmd
21172    if test -f "${new_path}.exe"; then
21173       input_to_shortpath="${new_path}.exe"
21174    elif test -f "${new_path}.cmd"; then
21175       input_to_shortpath="${new_path}.cmd"
21176    else
21177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
21178$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
21179      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21180$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21181      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21182    fi
21183  else
21184    input_to_shortpath="$new_path"
21185  fi
21186
21187  # Call helper function which possibly converts this using DOS-style short mode.
21188  # If so, the updated path is stored in $new_path.
21189  new_path="$input_to_shortpath"
21190
21191  input_path="$input_to_shortpath"
21192  # Check if we need to convert this using DOS-style short mode. If the path
21193  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21194  # take no chances and rewrite it.
21195  # Note: m4 eats our [], so we need to use [ and ] instead.
21196  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21197  if test "x$has_forbidden_chars" != x; then
21198    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21199    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21200    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21201    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21202      # Going to short mode and back again did indeed matter. Since short mode is
21203      # case insensitive, let's make it lowercase to improve readability.
21204      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21205      # Now convert it back to Unix-stile (cygpath)
21206      input_path=`$CYGPATH -u "$shortmode_path"`
21207      new_path="$input_path"
21208    fi
21209  fi
21210
21211  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21212  if test "x$test_cygdrive_prefix" = x; then
21213    # As a simple fix, exclude /usr/bin since it's not a real path.
21214    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21215      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21216      # a path prefixed by /cygdrive for fixpath to work.
21217      new_path="$CYGWIN_ROOT_PATH$input_path"
21218    fi
21219  fi
21220
21221  # remove trailing .exe if any
21222  new_path="${new_path/%.exe/}"
21223
21224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21225
21226  # First separate the path from the arguments. This will split at the first
21227  # space.
21228  complete="$OBJC"
21229  path="${complete%% *}"
21230  tmp="$complete EOL"
21231  arguments="${tmp#* }"
21232
21233  # Input might be given as Windows format, start by converting to
21234  # unix format.
21235  new_path="$path"
21236
21237  windows_path="$new_path"
21238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21239    unix_path=`$CYGPATH -u "$windows_path"`
21240    new_path="$unix_path"
21241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21243    new_path="$unix_path"
21244  fi
21245
21246
21247  # Now try to locate executable using which
21248  new_path=`$WHICH "$new_path" 2> /dev/null`
21249
21250  if test "x$new_path" = x; then
21251    # Oops. Which didn't find the executable.
21252    # The splitting of arguments from the executable at a space might have been incorrect,
21253    # since paths with space are more likely in Windows. Give it another try with the whole
21254    # argument.
21255    path="$complete"
21256    arguments="EOL"
21257    new_path="$path"
21258
21259  windows_path="$new_path"
21260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21261    unix_path=`$CYGPATH -u "$windows_path"`
21262    new_path="$unix_path"
21263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21265    new_path="$unix_path"
21266  fi
21267
21268
21269    new_path=`$WHICH "$new_path" 2> /dev/null`
21270
21271    if test "x$new_path" = x; then
21272      # It's still not found. Now this is an unrecoverable error.
21273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21274$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21275      has_space=`$ECHO "$complete" | $GREP " "`
21276      if test "x$has_space" != x; then
21277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21279      fi
21280      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21281    fi
21282  fi
21283
21284  # Now new_path has a complete unix path to the binary
21285  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21286    # Keep paths in /bin as-is, but remove trailing .exe if any
21287    new_path="${new_path/%.exe/}"
21288    # Do not save /bin paths to all_fixpath_prefixes!
21289  else
21290    # Not in mixed or Windows style, start by that.
21291    new_path=`cmd //c echo $new_path`
21292
21293  input_path="$new_path"
21294  # Check if we need to convert this using DOS-style short mode. If the path
21295  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21296  # take no chances and rewrite it.
21297  # Note: m4 eats our [], so we need to use [ and ] instead.
21298  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21299  if test "x$has_forbidden_chars" != x; then
21300    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21301    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21302  fi
21303
21304    # Output is in $new_path
21305
21306  windows_path="$new_path"
21307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21308    unix_path=`$CYGPATH -u "$windows_path"`
21309    new_path="$unix_path"
21310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21312    new_path="$unix_path"
21313  fi
21314
21315    # remove trailing .exe if any
21316    new_path="${new_path/%.exe/}"
21317
21318    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21319    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21320  fi
21321
21322  else
21323    # We're on a posix platform. Hooray! :)
21324    # First separate the path from the arguments. This will split at the first
21325    # space.
21326    complete="$OBJC"
21327    path="${complete%% *}"
21328    tmp="$complete EOL"
21329    arguments="${tmp#* }"
21330
21331    # Cannot rely on the command "which" here since it doesn't always work.
21332    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21333    if test -z "$is_absolute_path"; then
21334      # Path to executable is not absolute. Find it.
21335      IFS_save="$IFS"
21336      IFS=:
21337      for p in $PATH; do
21338        if test -f "$p/$path" && test -x "$p/$path"; then
21339          new_path="$p/$path"
21340          break
21341        fi
21342      done
21343      IFS="$IFS_save"
21344    else
21345      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
21346$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
21347      new_path="$path"
21348    fi
21349
21350    if test "x$new_path" = x; then
21351        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
21352$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
21353        has_space=`$ECHO "$complete" | $GREP " "`
21354        if test "x$has_space" != x; then
21355          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21356$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21357        fi
21358        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
21359      fi
21360  fi
21361
21362      # Now join together the path and the arguments once again
21363      if test "x$arguments" != xEOL; then
21364        new_complete="$new_path ${arguments% *}"
21365      else
21366        new_complete="$new_path"
21367      fi
21368
21369  if test "x$complete" != "x$new_complete"; then
21370      OBJC="$new_complete"
21371      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
21372$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
21373    fi
21374
21375else
21376    OBJC=
21377fi
21378
21379# Restore the flags to the user specified values.
21380# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
21381CFLAGS="$ORG_CFLAGS"
21382CXXFLAGS="$ORG_CXXFLAGS"
21383OBJCFLAGS="$ORG_OBJCFLAGS"
21384
21385LD="$CC"
21386LDEXE="$CC"
21387LDCXX="$CXX"
21388LDEXECXX="$CXX"
21389
21390# LDEXE is the linker to use, when creating executables.
21391
21392# Linking C++ libraries.
21393
21394# Linking C++ executables.
21395
21396
21397if test "x$OPENJDK_TARGET_OS" != xwindows; then
21398    if test -n "$ac_tool_prefix"; then
21399  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
21400set dummy ${ac_tool_prefix}ar; ac_word=$2
21401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21402$as_echo_n "checking for $ac_word... " >&6; }
21403if test "${ac_cv_prog_AR+set}" = set; then :
21404  $as_echo_n "(cached) " >&6
21405else
21406  if test -n "$AR"; then
21407  ac_cv_prog_AR="$AR" # Let the user override the test.
21408else
21409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21410for as_dir in $PATH
21411do
21412  IFS=$as_save_IFS
21413  test -z "$as_dir" && as_dir=.
21414    for ac_exec_ext in '' $ac_executable_extensions; do
21415  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21416    ac_cv_prog_AR="${ac_tool_prefix}ar"
21417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21418    break 2
21419  fi
21420done
21421  done
21422IFS=$as_save_IFS
21423
21424fi
21425fi
21426AR=$ac_cv_prog_AR
21427if test -n "$AR"; then
21428  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
21429$as_echo "$AR" >&6; }
21430else
21431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21432$as_echo "no" >&6; }
21433fi
21434
21435
21436fi
21437if test -z "$ac_cv_prog_AR"; then
21438  ac_ct_AR=$AR
21439  # Extract the first word of "ar", so it can be a program name with args.
21440set dummy ar; ac_word=$2
21441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21442$as_echo_n "checking for $ac_word... " >&6; }
21443if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
21444  $as_echo_n "(cached) " >&6
21445else
21446  if test -n "$ac_ct_AR"; then
21447  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
21448else
21449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21450for as_dir in $PATH
21451do
21452  IFS=$as_save_IFS
21453  test -z "$as_dir" && as_dir=.
21454    for ac_exec_ext in '' $ac_executable_extensions; do
21455  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21456    ac_cv_prog_ac_ct_AR="ar"
21457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21458    break 2
21459  fi
21460done
21461  done
21462IFS=$as_save_IFS
21463
21464fi
21465fi
21466ac_ct_AR=$ac_cv_prog_ac_ct_AR
21467if test -n "$ac_ct_AR"; then
21468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
21469$as_echo "$ac_ct_AR" >&6; }
21470else
21471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21472$as_echo "no" >&6; }
21473fi
21474
21475  if test "x$ac_ct_AR" = x; then
21476    AR=""
21477  else
21478    case $cross_compiling:$ac_tool_warned in
21479yes:)
21480{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21481$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21482ac_tool_warned=yes ;;
21483esac
21484    AR=$ac_ct_AR
21485  fi
21486else
21487  AR="$ac_cv_prog_AR"
21488fi
21489
21490
21491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21492
21493  # First separate the path from the arguments. This will split at the first
21494  # space.
21495  complete="$AR"
21496  path="${complete%% *}"
21497  tmp="$complete EOL"
21498  arguments="${tmp#* }"
21499
21500  # Input might be given as Windows format, start by converting to
21501  # unix format.
21502  new_path=`$CYGPATH -u "$path"`
21503
21504  # Now try to locate executable using which
21505  new_path=`$WHICH "$new_path" 2> /dev/null`
21506  # bat and cmd files are not always considered executable in cygwin causing which
21507  # to not find them
21508  if test "x$new_path" = x \
21509           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21510           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21511    new_path=`$CYGPATH -u "$path"`
21512  fi
21513  if test "x$new_path" = x; then
21514    # Oops. Which didn't find the executable.
21515    # The splitting of arguments from the executable at a space might have been incorrect,
21516    # since paths with space are more likely in Windows. Give it another try with the whole
21517    # argument.
21518    path="$complete"
21519    arguments="EOL"
21520    new_path=`$CYGPATH -u "$path"`
21521    new_path=`$WHICH "$new_path" 2> /dev/null`
21522    # bat and cmd files are not always considered executable in cygwin causing which
21523    # to not find them
21524    if test "x$new_path" = x \
21525             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21526             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21527      new_path=`$CYGPATH -u "$path"`
21528    fi
21529    if test "x$new_path" = x; then
21530      # It's still not found. Now this is an unrecoverable error.
21531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21532$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21533      has_space=`$ECHO "$complete" | $GREP " "`
21534      if test "x$has_space" != x; then
21535        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21536$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21537      fi
21538      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21539    fi
21540  fi
21541
21542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21545  # "foo.exe" is OK but "foo" is an error.
21546  #
21547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21548  # It is also a way to make sure we got the proper file name for the real test later on.
21549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21550  if test "x$test_shortpath" = x; then
21551    # Short path failed, file does not exist as specified.
21552    # Try adding .exe or .cmd
21553    if test -f "${new_path}.exe"; then
21554       input_to_shortpath="${new_path}.exe"
21555    elif test -f "${new_path}.cmd"; then
21556       input_to_shortpath="${new_path}.cmd"
21557    else
21558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
21559$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
21560      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21561$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21562      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21563    fi
21564  else
21565    input_to_shortpath="$new_path"
21566  fi
21567
21568  # Call helper function which possibly converts this using DOS-style short mode.
21569  # If so, the updated path is stored in $new_path.
21570  new_path="$input_to_shortpath"
21571
21572  input_path="$input_to_shortpath"
21573  # Check if we need to convert this using DOS-style short mode. If the path
21574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21575  # take no chances and rewrite it.
21576  # Note: m4 eats our [], so we need to use [ and ] instead.
21577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21578  if test "x$has_forbidden_chars" != x; then
21579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21580    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21581    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21582    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21583      # Going to short mode and back again did indeed matter. Since short mode is
21584      # case insensitive, let's make it lowercase to improve readability.
21585      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21586      # Now convert it back to Unix-stile (cygpath)
21587      input_path=`$CYGPATH -u "$shortmode_path"`
21588      new_path="$input_path"
21589    fi
21590  fi
21591
21592  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21593  if test "x$test_cygdrive_prefix" = x; then
21594    # As a simple fix, exclude /usr/bin since it's not a real path.
21595    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21596      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21597      # a path prefixed by /cygdrive for fixpath to work.
21598      new_path="$CYGWIN_ROOT_PATH$input_path"
21599    fi
21600  fi
21601
21602  # remove trailing .exe if any
21603  new_path="${new_path/%.exe/}"
21604
21605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21606
21607  # First separate the path from the arguments. This will split at the first
21608  # space.
21609  complete="$AR"
21610  path="${complete%% *}"
21611  tmp="$complete EOL"
21612  arguments="${tmp#* }"
21613
21614  # Input might be given as Windows format, start by converting to
21615  # unix format.
21616  new_path="$path"
21617
21618  windows_path="$new_path"
21619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21620    unix_path=`$CYGPATH -u "$windows_path"`
21621    new_path="$unix_path"
21622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21624    new_path="$unix_path"
21625  fi
21626
21627
21628  # Now try to locate executable using which
21629  new_path=`$WHICH "$new_path" 2> /dev/null`
21630
21631  if test "x$new_path" = x; then
21632    # Oops. Which didn't find the executable.
21633    # The splitting of arguments from the executable at a space might have been incorrect,
21634    # since paths with space are more likely in Windows. Give it another try with the whole
21635    # argument.
21636    path="$complete"
21637    arguments="EOL"
21638    new_path="$path"
21639
21640  windows_path="$new_path"
21641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21642    unix_path=`$CYGPATH -u "$windows_path"`
21643    new_path="$unix_path"
21644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21646    new_path="$unix_path"
21647  fi
21648
21649
21650    new_path=`$WHICH "$new_path" 2> /dev/null`
21651
21652    if test "x$new_path" = x; then
21653      # It's still not found. Now this is an unrecoverable error.
21654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21655$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21656      has_space=`$ECHO "$complete" | $GREP " "`
21657      if test "x$has_space" != x; then
21658        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21659$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21660      fi
21661      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21662    fi
21663  fi
21664
21665  # Now new_path has a complete unix path to the binary
21666  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21667    # Keep paths in /bin as-is, but remove trailing .exe if any
21668    new_path="${new_path/%.exe/}"
21669    # Do not save /bin paths to all_fixpath_prefixes!
21670  else
21671    # Not in mixed or Windows style, start by that.
21672    new_path=`cmd //c echo $new_path`
21673
21674  input_path="$new_path"
21675  # Check if we need to convert this using DOS-style short mode. If the path
21676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21677  # take no chances and rewrite it.
21678  # Note: m4 eats our [], so we need to use [ and ] instead.
21679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21680  if test "x$has_forbidden_chars" != x; then
21681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21682    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21683  fi
21684
21685    # Output is in $new_path
21686
21687  windows_path="$new_path"
21688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21689    unix_path=`$CYGPATH -u "$windows_path"`
21690    new_path="$unix_path"
21691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21693    new_path="$unix_path"
21694  fi
21695
21696    # remove trailing .exe if any
21697    new_path="${new_path/%.exe/}"
21698
21699    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21700    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21701  fi
21702
21703  else
21704    # We're on a posix platform. Hooray! :)
21705    # First separate the path from the arguments. This will split at the first
21706    # space.
21707    complete="$AR"
21708    path="${complete%% *}"
21709    tmp="$complete EOL"
21710    arguments="${tmp#* }"
21711
21712    # Cannot rely on the command "which" here since it doesn't always work.
21713    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21714    if test -z "$is_absolute_path"; then
21715      # Path to executable is not absolute. Find it.
21716      IFS_save="$IFS"
21717      IFS=:
21718      for p in $PATH; do
21719        if test -f "$p/$path" && test -x "$p/$path"; then
21720          new_path="$p/$path"
21721          break
21722        fi
21723      done
21724      IFS="$IFS_save"
21725    else
21726      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
21727$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
21728      new_path="$path"
21729    fi
21730
21731    if test "x$new_path" = x; then
21732        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
21733$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
21734        has_space=`$ECHO "$complete" | $GREP " "`
21735        if test "x$has_space" != x; then
21736          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21737$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21738        fi
21739        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
21740      fi
21741  fi
21742
21743      # Now join together the path and the arguments once again
21744      if test "x$arguments" != xEOL; then
21745        new_complete="$new_path ${arguments% *}"
21746      else
21747        new_complete="$new_path"
21748      fi
21749
21750  if test "x$complete" != "x$new_complete"; then
21751      AR="$new_complete"
21752      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
21753$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
21754    fi
21755
21756fi
21757if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21758    ARFLAGS="-r"
21759else
21760    ARFLAGS=""
21761fi
21762
21763
21764# For hotspot, we need these in Windows mixed path; other platforms keep them the same
21765HOTSPOT_CXX="$CXX"
21766HOTSPOT_LD="$LD"
21767
21768
21769
21770COMPILER_NAME=gcc
21771COMPILER_TYPE=CC
21772if test "x$OPENJDK_TARGET_OS" = xwindows; then :
21773
21774    # For now, assume that we are always compiling using cl.exe.
21775    CC_OUT_OPTION=-Fo
21776    EXE_OUT_OPTION=-out:
21777    LD_OUT_OPTION=-out:
21778    AR_OUT_OPTION=-out:
21779    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
21780    # program for something completely different.
21781    # Extract the first word of "link", so it can be a program name with args.
21782set dummy link; ac_word=$2
21783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21784$as_echo_n "checking for $ac_word... " >&6; }
21785if test "${ac_cv_prog_WINLD+set}" = set; then :
21786  $as_echo_n "(cached) " >&6
21787else
21788  if test -n "$WINLD"; then
21789  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
21790else
21791  ac_prog_rejected=no
21792as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21793for as_dir in $PATH
21794do
21795  IFS=$as_save_IFS
21796  test -z "$as_dir" && as_dir=.
21797    for ac_exec_ext in '' $ac_executable_extensions; do
21798  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21799    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
21800       ac_prog_rejected=yes
21801       continue
21802     fi
21803    ac_cv_prog_WINLD="link"
21804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21805    break 2
21806  fi
21807done
21808  done
21809IFS=$as_save_IFS
21810
21811if test $ac_prog_rejected = yes; then
21812  # We found a bogon in the path, so make sure we never use it.
21813  set dummy $ac_cv_prog_WINLD
21814  shift
21815  if test $# != 0; then
21816    # We chose a different compiler from the bogus one.
21817    # However, it has the same basename, so the bogon will be chosen
21818    # first if we set WINLD to just the basename; use the full file name.
21819    shift
21820    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
21821  fi
21822fi
21823fi
21824fi
21825WINLD=$ac_cv_prog_WINLD
21826if test -n "$WINLD"; then
21827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
21828$as_echo "$WINLD" >&6; }
21829else
21830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21831$as_echo "no" >&6; }
21832fi
21833
21834
21835    # Since we must ignore the first found link, WINLD will contain
21836    # the full path to the link.exe program.
21837
21838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21839
21840  # First separate the path from the arguments. This will split at the first
21841  # space.
21842  complete="$WINLD"
21843  path="${complete%% *}"
21844  tmp="$complete EOL"
21845  arguments="${tmp#* }"
21846
21847  # Input might be given as Windows format, start by converting to
21848  # unix format.
21849  new_path=`$CYGPATH -u "$path"`
21850
21851  # Now try to locate executable using which
21852  new_path=`$WHICH "$new_path" 2> /dev/null`
21853  # bat and cmd files are not always considered executable in cygwin causing which
21854  # to not find them
21855  if test "x$new_path" = x \
21856           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21857           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21858    new_path=`$CYGPATH -u "$path"`
21859  fi
21860  if test "x$new_path" = x; then
21861    # Oops. Which didn't find the executable.
21862    # The splitting of arguments from the executable at a space might have been incorrect,
21863    # since paths with space are more likely in Windows. Give it another try with the whole
21864    # argument.
21865    path="$complete"
21866    arguments="EOL"
21867    new_path=`$CYGPATH -u "$path"`
21868    new_path=`$WHICH "$new_path" 2> /dev/null`
21869    # bat and cmd files are not always considered executable in cygwin causing which
21870    # to not find them
21871    if test "x$new_path" = x \
21872             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21873             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21874      new_path=`$CYGPATH -u "$path"`
21875    fi
21876    if test "x$new_path" = x; then
21877      # It's still not found. Now this is an unrecoverable error.
21878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
21879$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
21880      has_space=`$ECHO "$complete" | $GREP " "`
21881      if test "x$has_space" != x; then
21882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21884      fi
21885      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21886    fi
21887  fi
21888
21889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21892  # "foo.exe" is OK but "foo" is an error.
21893  #
21894  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21895  # It is also a way to make sure we got the proper file name for the real test later on.
21896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21897  if test "x$test_shortpath" = x; then
21898    # Short path failed, file does not exist as specified.
21899    # Try adding .exe or .cmd
21900    if test -f "${new_path}.exe"; then
21901       input_to_shortpath="${new_path}.exe"
21902    elif test -f "${new_path}.cmd"; then
21903       input_to_shortpath="${new_path}.cmd"
21904    else
21905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
21906$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
21907      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21908$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21909      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
21910    fi
21911  else
21912    input_to_shortpath="$new_path"
21913  fi
21914
21915  # Call helper function which possibly converts this using DOS-style short mode.
21916  # If so, the updated path is stored in $new_path.
21917  new_path="$input_to_shortpath"
21918
21919  input_path="$input_to_shortpath"
21920  # Check if we need to convert this using DOS-style short mode. If the path
21921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21922  # take no chances and rewrite it.
21923  # Note: m4 eats our [], so we need to use [ and ] instead.
21924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21925  if test "x$has_forbidden_chars" != x; then
21926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21930      # Going to short mode and back again did indeed matter. Since short mode is
21931      # case insensitive, let's make it lowercase to improve readability.
21932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21933      # Now convert it back to Unix-stile (cygpath)
21934      input_path=`$CYGPATH -u "$shortmode_path"`
21935      new_path="$input_path"
21936    fi
21937  fi
21938
21939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21940  if test "x$test_cygdrive_prefix" = x; then
21941    # As a simple fix, exclude /usr/bin since it's not a real path.
21942    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21944      # a path prefixed by /cygdrive for fixpath to work.
21945      new_path="$CYGWIN_ROOT_PATH$input_path"
21946    fi
21947  fi
21948
21949  # remove trailing .exe if any
21950  new_path="${new_path/%.exe/}"
21951
21952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21953
21954  # First separate the path from the arguments. This will split at the first
21955  # space.
21956  complete="$WINLD"
21957  path="${complete%% *}"
21958  tmp="$complete EOL"
21959  arguments="${tmp#* }"
21960
21961  # Input might be given as Windows format, start by converting to
21962  # unix format.
21963  new_path="$path"
21964
21965  windows_path="$new_path"
21966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21967    unix_path=`$CYGPATH -u "$windows_path"`
21968    new_path="$unix_path"
21969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21971    new_path="$unix_path"
21972  fi
21973
21974
21975  # Now try to locate executable using which
21976  new_path=`$WHICH "$new_path" 2> /dev/null`
21977
21978  if test "x$new_path" = x; then
21979    # Oops. Which didn't find the executable.
21980    # The splitting of arguments from the executable at a space might have been incorrect,
21981    # since paths with space are more likely in Windows. Give it another try with the whole
21982    # argument.
21983    path="$complete"
21984    arguments="EOL"
21985    new_path="$path"
21986
21987  windows_path="$new_path"
21988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21989    unix_path=`$CYGPATH -u "$windows_path"`
21990    new_path="$unix_path"
21991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21993    new_path="$unix_path"
21994  fi
21995
21996
21997    new_path=`$WHICH "$new_path" 2> /dev/null`
21998
21999    if test "x$new_path" = x; then
22000      # It's still not found. Now this is an unrecoverable error.
22001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22002$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22003      has_space=`$ECHO "$complete" | $GREP " "`
22004      if test "x$has_space" != x; then
22005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22007      fi
22008      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22009    fi
22010  fi
22011
22012  # Now new_path has a complete unix path to the binary
22013  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22014    # Keep paths in /bin as-is, but remove trailing .exe if any
22015    new_path="${new_path/%.exe/}"
22016    # Do not save /bin paths to all_fixpath_prefixes!
22017  else
22018    # Not in mixed or Windows style, start by that.
22019    new_path=`cmd //c echo $new_path`
22020
22021  input_path="$new_path"
22022  # Check if we need to convert this using DOS-style short mode. If the path
22023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22024  # take no chances and rewrite it.
22025  # Note: m4 eats our [], so we need to use [ and ] instead.
22026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22027  if test "x$has_forbidden_chars" != x; then
22028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22030  fi
22031
22032    # Output is in $new_path
22033
22034  windows_path="$new_path"
22035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22036    unix_path=`$CYGPATH -u "$windows_path"`
22037    new_path="$unix_path"
22038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22040    new_path="$unix_path"
22041  fi
22042
22043    # remove trailing .exe if any
22044    new_path="${new_path/%.exe/}"
22045
22046    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22047    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22048  fi
22049
22050  else
22051    # We're on a posix platform. Hooray! :)
22052    # First separate the path from the arguments. This will split at the first
22053    # space.
22054    complete="$WINLD"
22055    path="${complete%% *}"
22056    tmp="$complete EOL"
22057    arguments="${tmp#* }"
22058
22059    # Cannot rely on the command "which" here since it doesn't always work.
22060    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22061    if test -z "$is_absolute_path"; then
22062      # Path to executable is not absolute. Find it.
22063      IFS_save="$IFS"
22064      IFS=:
22065      for p in $PATH; do
22066        if test -f "$p/$path" && test -x "$p/$path"; then
22067          new_path="$p/$path"
22068          break
22069        fi
22070      done
22071      IFS="$IFS_save"
22072    else
22073      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22074$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22075      new_path="$path"
22076    fi
22077
22078    if test "x$new_path" = x; then
22079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22080$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22081        has_space=`$ECHO "$complete" | $GREP " "`
22082        if test "x$has_space" != x; then
22083          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22084$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22085        fi
22086        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22087      fi
22088  fi
22089
22090      # Now join together the path and the arguments once again
22091      if test "x$arguments" != xEOL; then
22092        new_complete="$new_path ${arguments% *}"
22093      else
22094        new_complete="$new_path"
22095      fi
22096
22097  if test "x$complete" != "x$new_complete"; then
22098      WINLD="$new_complete"
22099      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
22100$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
22101    fi
22102
22103    printf "Windows linker was found at $WINLD\n"
22104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
22105$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
22106    "$WINLD" --version > /dev/null
22107    if test $? -eq 0 ; then
22108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22109$as_echo "no" >&6; }
22110      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
22111    else
22112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22113$as_echo "yes" >&6; }
22114    fi
22115    LD="$WINLD"
22116    LDEXE="$WINLD"
22117    LDCXX="$WINLD"
22118    LDEXECXX="$WINLD"
22119
22120    # Extract the first word of "mt", so it can be a program name with args.
22121set dummy mt; ac_word=$2
22122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22123$as_echo_n "checking for $ac_word... " >&6; }
22124if test "${ac_cv_prog_MT+set}" = set; then :
22125  $as_echo_n "(cached) " >&6
22126else
22127  if test -n "$MT"; then
22128  ac_cv_prog_MT="$MT" # Let the user override the test.
22129else
22130  ac_prog_rejected=no
22131as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22132for as_dir in $PATH
22133do
22134  IFS=$as_save_IFS
22135  test -z "$as_dir" && as_dir=.
22136    for ac_exec_ext in '' $ac_executable_extensions; do
22137  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22138    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
22139       ac_prog_rejected=yes
22140       continue
22141     fi
22142    ac_cv_prog_MT="mt"
22143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22144    break 2
22145  fi
22146done
22147  done
22148IFS=$as_save_IFS
22149
22150if test $ac_prog_rejected = yes; then
22151  # We found a bogon in the path, so make sure we never use it.
22152  set dummy $ac_cv_prog_MT
22153  shift
22154  if test $# != 0; then
22155    # We chose a different compiler from the bogus one.
22156    # However, it has the same basename, so the bogon will be chosen
22157    # first if we set MT to just the basename; use the full file name.
22158    shift
22159    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
22160  fi
22161fi
22162fi
22163fi
22164MT=$ac_cv_prog_MT
22165if test -n "$MT"; then
22166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
22167$as_echo "$MT" >&6; }
22168else
22169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22170$as_echo "no" >&6; }
22171fi
22172
22173
22174
22175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22176
22177  # First separate the path from the arguments. This will split at the first
22178  # space.
22179  complete="$MT"
22180  path="${complete%% *}"
22181  tmp="$complete EOL"
22182  arguments="${tmp#* }"
22183
22184  # Input might be given as Windows format, start by converting to
22185  # unix format.
22186  new_path=`$CYGPATH -u "$path"`
22187
22188  # Now try to locate executable using which
22189  new_path=`$WHICH "$new_path" 2> /dev/null`
22190  # bat and cmd files are not always considered executable in cygwin causing which
22191  # to not find them
22192  if test "x$new_path" = x \
22193           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22194           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22195    new_path=`$CYGPATH -u "$path"`
22196  fi
22197  if test "x$new_path" = x; then
22198    # Oops. Which didn't find the executable.
22199    # The splitting of arguments from the executable at a space might have been incorrect,
22200    # since paths with space are more likely in Windows. Give it another try with the whole
22201    # argument.
22202    path="$complete"
22203    arguments="EOL"
22204    new_path=`$CYGPATH -u "$path"`
22205    new_path=`$WHICH "$new_path" 2> /dev/null`
22206    # bat and cmd files are not always considered executable in cygwin causing which
22207    # to not find them
22208    if test "x$new_path" = x \
22209             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22210             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22211      new_path=`$CYGPATH -u "$path"`
22212    fi
22213    if test "x$new_path" = x; then
22214      # It's still not found. Now this is an unrecoverable error.
22215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22216$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22217      has_space=`$ECHO "$complete" | $GREP " "`
22218      if test "x$has_space" != x; then
22219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22221      fi
22222      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22223    fi
22224  fi
22225
22226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22229  # "foo.exe" is OK but "foo" is an error.
22230  #
22231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22232  # It is also a way to make sure we got the proper file name for the real test later on.
22233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22234  if test "x$test_shortpath" = x; then
22235    # Short path failed, file does not exist as specified.
22236    # Try adding .exe or .cmd
22237    if test -f "${new_path}.exe"; then
22238       input_to_shortpath="${new_path}.exe"
22239    elif test -f "${new_path}.cmd"; then
22240       input_to_shortpath="${new_path}.cmd"
22241    else
22242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
22243$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
22244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22246      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22247    fi
22248  else
22249    input_to_shortpath="$new_path"
22250  fi
22251
22252  # Call helper function which possibly converts this using DOS-style short mode.
22253  # If so, the updated path is stored in $new_path.
22254  new_path="$input_to_shortpath"
22255
22256  input_path="$input_to_shortpath"
22257  # Check if we need to convert this using DOS-style short mode. If the path
22258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22259  # take no chances and rewrite it.
22260  # Note: m4 eats our [], so we need to use [ and ] instead.
22261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22262  if test "x$has_forbidden_chars" != x; then
22263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22267      # Going to short mode and back again did indeed matter. Since short mode is
22268      # case insensitive, let's make it lowercase to improve readability.
22269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22270      # Now convert it back to Unix-stile (cygpath)
22271      input_path=`$CYGPATH -u "$shortmode_path"`
22272      new_path="$input_path"
22273    fi
22274  fi
22275
22276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22277  if test "x$test_cygdrive_prefix" = x; then
22278    # As a simple fix, exclude /usr/bin since it's not a real path.
22279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22281      # a path prefixed by /cygdrive for fixpath to work.
22282      new_path="$CYGWIN_ROOT_PATH$input_path"
22283    fi
22284  fi
22285
22286  # remove trailing .exe if any
22287  new_path="${new_path/%.exe/}"
22288
22289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22290
22291  # First separate the path from the arguments. This will split at the first
22292  # space.
22293  complete="$MT"
22294  path="${complete%% *}"
22295  tmp="$complete EOL"
22296  arguments="${tmp#* }"
22297
22298  # Input might be given as Windows format, start by converting to
22299  # unix format.
22300  new_path="$path"
22301
22302  windows_path="$new_path"
22303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22304    unix_path=`$CYGPATH -u "$windows_path"`
22305    new_path="$unix_path"
22306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22308    new_path="$unix_path"
22309  fi
22310
22311
22312  # Now try to locate executable using which
22313  new_path=`$WHICH "$new_path" 2> /dev/null`
22314
22315  if test "x$new_path" = x; then
22316    # Oops. Which didn't find the executable.
22317    # The splitting of arguments from the executable at a space might have been incorrect,
22318    # since paths with space are more likely in Windows. Give it another try with the whole
22319    # argument.
22320    path="$complete"
22321    arguments="EOL"
22322    new_path="$path"
22323
22324  windows_path="$new_path"
22325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22326    unix_path=`$CYGPATH -u "$windows_path"`
22327    new_path="$unix_path"
22328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22330    new_path="$unix_path"
22331  fi
22332
22333
22334    new_path=`$WHICH "$new_path" 2> /dev/null`
22335
22336    if test "x$new_path" = x; then
22337      # It's still not found. Now this is an unrecoverable error.
22338      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22339$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22340      has_space=`$ECHO "$complete" | $GREP " "`
22341      if test "x$has_space" != x; then
22342        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22343$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22344      fi
22345      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22346    fi
22347  fi
22348
22349  # Now new_path has a complete unix path to the binary
22350  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22351    # Keep paths in /bin as-is, but remove trailing .exe if any
22352    new_path="${new_path/%.exe/}"
22353    # Do not save /bin paths to all_fixpath_prefixes!
22354  else
22355    # Not in mixed or Windows style, start by that.
22356    new_path=`cmd //c echo $new_path`
22357
22358  input_path="$new_path"
22359  # Check if we need to convert this using DOS-style short mode. If the path
22360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22361  # take no chances and rewrite it.
22362  # Note: m4 eats our [], so we need to use [ and ] instead.
22363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22364  if test "x$has_forbidden_chars" != x; then
22365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22367  fi
22368
22369    # Output is in $new_path
22370
22371  windows_path="$new_path"
22372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22373    unix_path=`$CYGPATH -u "$windows_path"`
22374    new_path="$unix_path"
22375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22376    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22377    new_path="$unix_path"
22378  fi
22379
22380    # remove trailing .exe if any
22381    new_path="${new_path/%.exe/}"
22382
22383    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22384    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22385  fi
22386
22387  else
22388    # We're on a posix platform. Hooray! :)
22389    # First separate the path from the arguments. This will split at the first
22390    # space.
22391    complete="$MT"
22392    path="${complete%% *}"
22393    tmp="$complete EOL"
22394    arguments="${tmp#* }"
22395
22396    # Cannot rely on the command "which" here since it doesn't always work.
22397    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22398    if test -z "$is_absolute_path"; then
22399      # Path to executable is not absolute. Find it.
22400      IFS_save="$IFS"
22401      IFS=:
22402      for p in $PATH; do
22403        if test -f "$p/$path" && test -x "$p/$path"; then
22404          new_path="$p/$path"
22405          break
22406        fi
22407      done
22408      IFS="$IFS_save"
22409    else
22410      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
22411$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
22412      new_path="$path"
22413    fi
22414
22415    if test "x$new_path" = x; then
22416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
22417$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
22418        has_space=`$ECHO "$complete" | $GREP " "`
22419        if test "x$has_space" != x; then
22420          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22421$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22422        fi
22423        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
22424      fi
22425  fi
22426
22427      # Now join together the path and the arguments once again
22428      if test "x$arguments" != xEOL; then
22429        new_complete="$new_path ${arguments% *}"
22430      else
22431        new_complete="$new_path"
22432      fi
22433
22434  if test "x$complete" != "x$new_complete"; then
22435      MT="$new_complete"
22436      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
22437$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
22438    fi
22439
22440    # The resource compiler
22441    # Extract the first word of "rc", so it can be a program name with args.
22442set dummy rc; ac_word=$2
22443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22444$as_echo_n "checking for $ac_word... " >&6; }
22445if test "${ac_cv_prog_RC+set}" = set; then :
22446  $as_echo_n "(cached) " >&6
22447else
22448  if test -n "$RC"; then
22449  ac_cv_prog_RC="$RC" # Let the user override the test.
22450else
22451  ac_prog_rejected=no
22452as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22453for as_dir in $PATH
22454do
22455  IFS=$as_save_IFS
22456  test -z "$as_dir" && as_dir=.
22457    for ac_exec_ext in '' $ac_executable_extensions; do
22458  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22459    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
22460       ac_prog_rejected=yes
22461       continue
22462     fi
22463    ac_cv_prog_RC="rc"
22464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22465    break 2
22466  fi
22467done
22468  done
22469IFS=$as_save_IFS
22470
22471if test $ac_prog_rejected = yes; then
22472  # We found a bogon in the path, so make sure we never use it.
22473  set dummy $ac_cv_prog_RC
22474  shift
22475  if test $# != 0; then
22476    # We chose a different compiler from the bogus one.
22477    # However, it has the same basename, so the bogon will be chosen
22478    # first if we set RC to just the basename; use the full file name.
22479    shift
22480    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
22481  fi
22482fi
22483fi
22484fi
22485RC=$ac_cv_prog_RC
22486if test -n "$RC"; then
22487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
22488$as_echo "$RC" >&6; }
22489else
22490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22491$as_echo "no" >&6; }
22492fi
22493
22494
22495
22496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22497
22498  # First separate the path from the arguments. This will split at the first
22499  # space.
22500  complete="$RC"
22501  path="${complete%% *}"
22502  tmp="$complete EOL"
22503  arguments="${tmp#* }"
22504
22505  # Input might be given as Windows format, start by converting to
22506  # unix format.
22507  new_path=`$CYGPATH -u "$path"`
22508
22509  # Now try to locate executable using which
22510  new_path=`$WHICH "$new_path" 2> /dev/null`
22511  # bat and cmd files are not always considered executable in cygwin causing which
22512  # to not find them
22513  if test "x$new_path" = x \
22514           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22515           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22516    new_path=`$CYGPATH -u "$path"`
22517  fi
22518  if test "x$new_path" = x; then
22519    # Oops. Which didn't find the executable.
22520    # The splitting of arguments from the executable at a space might have been incorrect,
22521    # since paths with space are more likely in Windows. Give it another try with the whole
22522    # argument.
22523    path="$complete"
22524    arguments="EOL"
22525    new_path=`$CYGPATH -u "$path"`
22526    new_path=`$WHICH "$new_path" 2> /dev/null`
22527    # bat and cmd files are not always considered executable in cygwin causing which
22528    # to not find them
22529    if test "x$new_path" = x \
22530             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22531             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22532      new_path=`$CYGPATH -u "$path"`
22533    fi
22534    if test "x$new_path" = x; then
22535      # It's still not found. Now this is an unrecoverable error.
22536      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22537$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22538      has_space=`$ECHO "$complete" | $GREP " "`
22539      if test "x$has_space" != x; then
22540        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22541$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22542      fi
22543      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22544    fi
22545  fi
22546
22547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22550  # "foo.exe" is OK but "foo" is an error.
22551  #
22552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22553  # It is also a way to make sure we got the proper file name for the real test later on.
22554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22555  if test "x$test_shortpath" = x; then
22556    # Short path failed, file does not exist as specified.
22557    # Try adding .exe or .cmd
22558    if test -f "${new_path}.exe"; then
22559       input_to_shortpath="${new_path}.exe"
22560    elif test -f "${new_path}.cmd"; then
22561       input_to_shortpath="${new_path}.cmd"
22562    else
22563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
22564$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
22565      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22566$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22567      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22568    fi
22569  else
22570    input_to_shortpath="$new_path"
22571  fi
22572
22573  # Call helper function which possibly converts this using DOS-style short mode.
22574  # If so, the updated path is stored in $new_path.
22575  new_path="$input_to_shortpath"
22576
22577  input_path="$input_to_shortpath"
22578  # Check if we need to convert this using DOS-style short mode. If the path
22579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22580  # take no chances and rewrite it.
22581  # Note: m4 eats our [], so we need to use [ and ] instead.
22582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22583  if test "x$has_forbidden_chars" != x; then
22584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22588      # Going to short mode and back again did indeed matter. Since short mode is
22589      # case insensitive, let's make it lowercase to improve readability.
22590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22591      # Now convert it back to Unix-stile (cygpath)
22592      input_path=`$CYGPATH -u "$shortmode_path"`
22593      new_path="$input_path"
22594    fi
22595  fi
22596
22597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22598  if test "x$test_cygdrive_prefix" = x; then
22599    # As a simple fix, exclude /usr/bin since it's not a real path.
22600    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22602      # a path prefixed by /cygdrive for fixpath to work.
22603      new_path="$CYGWIN_ROOT_PATH$input_path"
22604    fi
22605  fi
22606
22607  # remove trailing .exe if any
22608  new_path="${new_path/%.exe/}"
22609
22610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22611
22612  # First separate the path from the arguments. This will split at the first
22613  # space.
22614  complete="$RC"
22615  path="${complete%% *}"
22616  tmp="$complete EOL"
22617  arguments="${tmp#* }"
22618
22619  # Input might be given as Windows format, start by converting to
22620  # unix format.
22621  new_path="$path"
22622
22623  windows_path="$new_path"
22624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22625    unix_path=`$CYGPATH -u "$windows_path"`
22626    new_path="$unix_path"
22627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22629    new_path="$unix_path"
22630  fi
22631
22632
22633  # Now try to locate executable using which
22634  new_path=`$WHICH "$new_path" 2> /dev/null`
22635
22636  if test "x$new_path" = x; then
22637    # Oops. Which didn't find the executable.
22638    # The splitting of arguments from the executable at a space might have been incorrect,
22639    # since paths with space are more likely in Windows. Give it another try with the whole
22640    # argument.
22641    path="$complete"
22642    arguments="EOL"
22643    new_path="$path"
22644
22645  windows_path="$new_path"
22646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22647    unix_path=`$CYGPATH -u "$windows_path"`
22648    new_path="$unix_path"
22649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22651    new_path="$unix_path"
22652  fi
22653
22654
22655    new_path=`$WHICH "$new_path" 2> /dev/null`
22656
22657    if test "x$new_path" = x; then
22658      # It's still not found. Now this is an unrecoverable error.
22659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22660$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22661      has_space=`$ECHO "$complete" | $GREP " "`
22662      if test "x$has_space" != x; then
22663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22665      fi
22666      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22667    fi
22668  fi
22669
22670  # Now new_path has a complete unix path to the binary
22671  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22672    # Keep paths in /bin as-is, but remove trailing .exe if any
22673    new_path="${new_path/%.exe/}"
22674    # Do not save /bin paths to all_fixpath_prefixes!
22675  else
22676    # Not in mixed or Windows style, start by that.
22677    new_path=`cmd //c echo $new_path`
22678
22679  input_path="$new_path"
22680  # Check if we need to convert this using DOS-style short mode. If the path
22681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22682  # take no chances and rewrite it.
22683  # Note: m4 eats our [], so we need to use [ and ] instead.
22684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22685  if test "x$has_forbidden_chars" != x; then
22686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22687    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22688  fi
22689
22690    # Output is in $new_path
22691
22692  windows_path="$new_path"
22693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22694    unix_path=`$CYGPATH -u "$windows_path"`
22695    new_path="$unix_path"
22696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22698    new_path="$unix_path"
22699  fi
22700
22701    # remove trailing .exe if any
22702    new_path="${new_path/%.exe/}"
22703
22704    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22705    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22706  fi
22707
22708  else
22709    # We're on a posix platform. Hooray! :)
22710    # First separate the path from the arguments. This will split at the first
22711    # space.
22712    complete="$RC"
22713    path="${complete%% *}"
22714    tmp="$complete EOL"
22715    arguments="${tmp#* }"
22716
22717    # Cannot rely on the command "which" here since it doesn't always work.
22718    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22719    if test -z "$is_absolute_path"; then
22720      # Path to executable is not absolute. Find it.
22721      IFS_save="$IFS"
22722      IFS=:
22723      for p in $PATH; do
22724        if test -f "$p/$path" && test -x "$p/$path"; then
22725          new_path="$p/$path"
22726          break
22727        fi
22728      done
22729      IFS="$IFS_save"
22730    else
22731      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
22732$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
22733      new_path="$path"
22734    fi
22735
22736    if test "x$new_path" = x; then
22737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
22738$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
22739        has_space=`$ECHO "$complete" | $GREP " "`
22740        if test "x$has_space" != x; then
22741          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22742$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22743        fi
22744        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
22745      fi
22746  fi
22747
22748      # Now join together the path and the arguments once again
22749      if test "x$arguments" != xEOL; then
22750        new_complete="$new_path ${arguments% *}"
22751      else
22752        new_complete="$new_path"
22753      fi
22754
22755  if test "x$complete" != "x$new_complete"; then
22756      RC="$new_complete"
22757      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
22758$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
22759    fi
22760
22761
22762    # For hotspot, we need these in Windows mixed path,
22763    # so rewrite them all. Need added .exe suffix.
22764    HOTSPOT_CXX="$CXX.exe"
22765    HOTSPOT_LD="$LD.exe"
22766    HOTSPOT_MT="$MT.exe"
22767    HOTSPOT_RC="$RC.exe"
22768
22769  unix_path="$HOTSPOT_CXX"
22770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22771    windows_path=`$CYGPATH -m "$unix_path"`
22772    HOTSPOT_CXX="$windows_path"
22773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22774    windows_path=`cmd //c echo $unix_path`
22775    HOTSPOT_CXX="$windows_path"
22776  fi
22777
22778
22779  unix_path="$HOTSPOT_LD"
22780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22781    windows_path=`$CYGPATH -m "$unix_path"`
22782    HOTSPOT_LD="$windows_path"
22783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22784    windows_path=`cmd //c echo $unix_path`
22785    HOTSPOT_LD="$windows_path"
22786  fi
22787
22788
22789  unix_path="$HOTSPOT_MT"
22790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22791    windows_path=`$CYGPATH -m "$unix_path"`
22792    HOTSPOT_MT="$windows_path"
22793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22794    windows_path=`cmd //c echo $unix_path`
22795    HOTSPOT_MT="$windows_path"
22796  fi
22797
22798
22799  unix_path="$HOTSPOT_RC"
22800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22801    windows_path=`$CYGPATH -m "$unix_path"`
22802    HOTSPOT_RC="$windows_path"
22803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22804    windows_path=`cmd //c echo $unix_path`
22805    HOTSPOT_RC="$windows_path"
22806  fi
22807
22808
22809
22810
22811    RC_FLAGS="-nologo -l 0x409 -r"
22812    if test "x$VARIANT" = xOPT; then :
22813
22814        RC_FLAGS="$RC_FLAGS -d NDEBUG"
22815
22816fi
22817    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
22818    if test "x$JDK_UPDATE_VERSION" = x; then :
22819
22820        JDK_UPDATE_VERSION_NOTNULL=0
22821
22822fi
22823    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
22824    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
22825    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
22826    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
22827    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
22828    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
22829    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
22830
22831    # lib.exe is used to create static libraries.
22832    # Extract the first word of "lib", so it can be a program name with args.
22833set dummy lib; ac_word=$2
22834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22835$as_echo_n "checking for $ac_word... " >&6; }
22836if test "${ac_cv_prog_WINAR+set}" = set; then :
22837  $as_echo_n "(cached) " >&6
22838else
22839  if test -n "$WINAR"; then
22840  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
22841else
22842as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22843for as_dir in $PATH
22844do
22845  IFS=$as_save_IFS
22846  test -z "$as_dir" && as_dir=.
22847    for ac_exec_ext in '' $ac_executable_extensions; do
22848  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22849    ac_cv_prog_WINAR="lib"
22850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22851    break 2
22852  fi
22853done
22854  done
22855IFS=$as_save_IFS
22856
22857fi
22858fi
22859WINAR=$ac_cv_prog_WINAR
22860if test -n "$WINAR"; then
22861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
22862$as_echo "$WINAR" >&6; }
22863else
22864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22865$as_echo "no" >&6; }
22866fi
22867
22868
22869
22870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22871
22872  # First separate the path from the arguments. This will split at the first
22873  # space.
22874  complete="$WINAR"
22875  path="${complete%% *}"
22876  tmp="$complete EOL"
22877  arguments="${tmp#* }"
22878
22879  # Input might be given as Windows format, start by converting to
22880  # unix format.
22881  new_path=`$CYGPATH -u "$path"`
22882
22883  # Now try to locate executable using which
22884  new_path=`$WHICH "$new_path" 2> /dev/null`
22885  # bat and cmd files are not always considered executable in cygwin causing which
22886  # to not find them
22887  if test "x$new_path" = x \
22888           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22889           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22890    new_path=`$CYGPATH -u "$path"`
22891  fi
22892  if test "x$new_path" = x; then
22893    # Oops. Which didn't find the executable.
22894    # The splitting of arguments from the executable at a space might have been incorrect,
22895    # since paths with space are more likely in Windows. Give it another try with the whole
22896    # argument.
22897    path="$complete"
22898    arguments="EOL"
22899    new_path=`$CYGPATH -u "$path"`
22900    new_path=`$WHICH "$new_path" 2> /dev/null`
22901    # bat and cmd files are not always considered executable in cygwin causing which
22902    # to not find them
22903    if test "x$new_path" = x \
22904             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22905             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22906      new_path=`$CYGPATH -u "$path"`
22907    fi
22908    if test "x$new_path" = x; then
22909      # It's still not found. Now this is an unrecoverable error.
22910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
22911$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
22912      has_space=`$ECHO "$complete" | $GREP " "`
22913      if test "x$has_space" != x; then
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22916      fi
22917      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22918    fi
22919  fi
22920
22921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22924  # "foo.exe" is OK but "foo" is an error.
22925  #
22926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22927  # It is also a way to make sure we got the proper file name for the real test later on.
22928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22929  if test "x$test_shortpath" = x; then
22930    # Short path failed, file does not exist as specified.
22931    # Try adding .exe or .cmd
22932    if test -f "${new_path}.exe"; then
22933       input_to_shortpath="${new_path}.exe"
22934    elif test -f "${new_path}.cmd"; then
22935       input_to_shortpath="${new_path}.cmd"
22936    else
22937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
22938$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
22939      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22940$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22941      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
22942    fi
22943  else
22944    input_to_shortpath="$new_path"
22945  fi
22946
22947  # Call helper function which possibly converts this using DOS-style short mode.
22948  # If so, the updated path is stored in $new_path.
22949  new_path="$input_to_shortpath"
22950
22951  input_path="$input_to_shortpath"
22952  # Check if we need to convert this using DOS-style short mode. If the path
22953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22954  # take no chances and rewrite it.
22955  # Note: m4 eats our [], so we need to use [ and ] instead.
22956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22957  if test "x$has_forbidden_chars" != x; then
22958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22962      # Going to short mode and back again did indeed matter. Since short mode is
22963      # case insensitive, let's make it lowercase to improve readability.
22964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22965      # Now convert it back to Unix-stile (cygpath)
22966      input_path=`$CYGPATH -u "$shortmode_path"`
22967      new_path="$input_path"
22968    fi
22969  fi
22970
22971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22972  if test "x$test_cygdrive_prefix" = x; then
22973    # As a simple fix, exclude /usr/bin since it's not a real path.
22974    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22976      # a path prefixed by /cygdrive for fixpath to work.
22977      new_path="$CYGWIN_ROOT_PATH$input_path"
22978    fi
22979  fi
22980
22981  # remove trailing .exe if any
22982  new_path="${new_path/%.exe/}"
22983
22984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22985
22986  # First separate the path from the arguments. This will split at the first
22987  # space.
22988  complete="$WINAR"
22989  path="${complete%% *}"
22990  tmp="$complete EOL"
22991  arguments="${tmp#* }"
22992
22993  # Input might be given as Windows format, start by converting to
22994  # unix format.
22995  new_path="$path"
22996
22997  windows_path="$new_path"
22998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22999    unix_path=`$CYGPATH -u "$windows_path"`
23000    new_path="$unix_path"
23001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23003    new_path="$unix_path"
23004  fi
23005
23006
23007  # Now try to locate executable using which
23008  new_path=`$WHICH "$new_path" 2> /dev/null`
23009
23010  if test "x$new_path" = x; then
23011    # Oops. Which didn't find the executable.
23012    # The splitting of arguments from the executable at a space might have been incorrect,
23013    # since paths with space are more likely in Windows. Give it another try with the whole
23014    # argument.
23015    path="$complete"
23016    arguments="EOL"
23017    new_path="$path"
23018
23019  windows_path="$new_path"
23020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23021    unix_path=`$CYGPATH -u "$windows_path"`
23022    new_path="$unix_path"
23023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23025    new_path="$unix_path"
23026  fi
23027
23028
23029    new_path=`$WHICH "$new_path" 2> /dev/null`
23030
23031    if test "x$new_path" = x; then
23032      # It's still not found. Now this is an unrecoverable error.
23033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23034$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23035      has_space=`$ECHO "$complete" | $GREP " "`
23036      if test "x$has_space" != x; then
23037        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23038$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23039      fi
23040      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23041    fi
23042  fi
23043
23044  # Now new_path has a complete unix path to the binary
23045  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23046    # Keep paths in /bin as-is, but remove trailing .exe if any
23047    new_path="${new_path/%.exe/}"
23048    # Do not save /bin paths to all_fixpath_prefixes!
23049  else
23050    # Not in mixed or Windows style, start by that.
23051    new_path=`cmd //c echo $new_path`
23052
23053  input_path="$new_path"
23054  # Check if we need to convert this using DOS-style short mode. If the path
23055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23056  # take no chances and rewrite it.
23057  # Note: m4 eats our [], so we need to use [ and ] instead.
23058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23059  if test "x$has_forbidden_chars" != x; then
23060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23062  fi
23063
23064    # Output is in $new_path
23065
23066  windows_path="$new_path"
23067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23068    unix_path=`$CYGPATH -u "$windows_path"`
23069    new_path="$unix_path"
23070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23072    new_path="$unix_path"
23073  fi
23074
23075    # remove trailing .exe if any
23076    new_path="${new_path/%.exe/}"
23077
23078    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23079    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23080  fi
23081
23082  else
23083    # We're on a posix platform. Hooray! :)
23084    # First separate the path from the arguments. This will split at the first
23085    # space.
23086    complete="$WINAR"
23087    path="${complete%% *}"
23088    tmp="$complete EOL"
23089    arguments="${tmp#* }"
23090
23091    # Cannot rely on the command "which" here since it doesn't always work.
23092    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23093    if test -z "$is_absolute_path"; then
23094      # Path to executable is not absolute. Find it.
23095      IFS_save="$IFS"
23096      IFS=:
23097      for p in $PATH; do
23098        if test -f "$p/$path" && test -x "$p/$path"; then
23099          new_path="$p/$path"
23100          break
23101        fi
23102      done
23103      IFS="$IFS_save"
23104    else
23105      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
23106$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
23107      new_path="$path"
23108    fi
23109
23110    if test "x$new_path" = x; then
23111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23112$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23113        has_space=`$ECHO "$complete" | $GREP " "`
23114        if test "x$has_space" != x; then
23115          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23116$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23117        fi
23118        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23119      fi
23120  fi
23121
23122      # Now join together the path and the arguments once again
23123      if test "x$arguments" != xEOL; then
23124        new_complete="$new_path ${arguments% *}"
23125      else
23126        new_complete="$new_path"
23127      fi
23128
23129  if test "x$complete" != "x$new_complete"; then
23130      WINAR="$new_complete"
23131      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
23132$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
23133    fi
23134
23135    AR="$WINAR"
23136    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
23137
23138    # Extract the first word of "dumpbin", so it can be a program name with args.
23139set dummy dumpbin; ac_word=$2
23140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23141$as_echo_n "checking for $ac_word... " >&6; }
23142if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
23143  $as_echo_n "(cached) " >&6
23144else
23145  if test -n "$DUMPBIN"; then
23146  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
23147else
23148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23149for as_dir in $PATH
23150do
23151  IFS=$as_save_IFS
23152  test -z "$as_dir" && as_dir=.
23153    for ac_exec_ext in '' $ac_executable_extensions; do
23154  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23155    ac_cv_prog_DUMPBIN="dumpbin"
23156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23157    break 2
23158  fi
23159done
23160  done
23161IFS=$as_save_IFS
23162
23163fi
23164fi
23165DUMPBIN=$ac_cv_prog_DUMPBIN
23166if test -n "$DUMPBIN"; then
23167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
23168$as_echo "$DUMPBIN" >&6; }
23169else
23170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23171$as_echo "no" >&6; }
23172fi
23173
23174
23175
23176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23177
23178  # First separate the path from the arguments. This will split at the first
23179  # space.
23180  complete="$DUMPBIN"
23181  path="${complete%% *}"
23182  tmp="$complete EOL"
23183  arguments="${tmp#* }"
23184
23185  # Input might be given as Windows format, start by converting to
23186  # unix format.
23187  new_path=`$CYGPATH -u "$path"`
23188
23189  # Now try to locate executable using which
23190  new_path=`$WHICH "$new_path" 2> /dev/null`
23191  # bat and cmd files are not always considered executable in cygwin causing which
23192  # to not find them
23193  if test "x$new_path" = x \
23194           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23195           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23196    new_path=`$CYGPATH -u "$path"`
23197  fi
23198  if test "x$new_path" = x; then
23199    # Oops. Which didn't find the executable.
23200    # The splitting of arguments from the executable at a space might have been incorrect,
23201    # since paths with space are more likely in Windows. Give it another try with the whole
23202    # argument.
23203    path="$complete"
23204    arguments="EOL"
23205    new_path=`$CYGPATH -u "$path"`
23206    new_path=`$WHICH "$new_path" 2> /dev/null`
23207    # bat and cmd files are not always considered executable in cygwin causing which
23208    # to not find them
23209    if test "x$new_path" = x \
23210             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23211             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23212      new_path=`$CYGPATH -u "$path"`
23213    fi
23214    if test "x$new_path" = x; then
23215      # It's still not found. Now this is an unrecoverable error.
23216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23217$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23218      has_space=`$ECHO "$complete" | $GREP " "`
23219      if test "x$has_space" != x; then
23220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23222      fi
23223      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23224    fi
23225  fi
23226
23227  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23228  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23229  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23230  # "foo.exe" is OK but "foo" is an error.
23231  #
23232  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23233  # It is also a way to make sure we got the proper file name for the real test later on.
23234  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23235  if test "x$test_shortpath" = x; then
23236    # Short path failed, file does not exist as specified.
23237    # Try adding .exe or .cmd
23238    if test -f "${new_path}.exe"; then
23239       input_to_shortpath="${new_path}.exe"
23240    elif test -f "${new_path}.cmd"; then
23241       input_to_shortpath="${new_path}.cmd"
23242    else
23243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
23244$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
23245      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23246$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23247      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23248    fi
23249  else
23250    input_to_shortpath="$new_path"
23251  fi
23252
23253  # Call helper function which possibly converts this using DOS-style short mode.
23254  # If so, the updated path is stored in $new_path.
23255  new_path="$input_to_shortpath"
23256
23257  input_path="$input_to_shortpath"
23258  # Check if we need to convert this using DOS-style short mode. If the path
23259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23260  # take no chances and rewrite it.
23261  # Note: m4 eats our [], so we need to use [ and ] instead.
23262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23263  if test "x$has_forbidden_chars" != x; then
23264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23268      # Going to short mode and back again did indeed matter. Since short mode is
23269      # case insensitive, let's make it lowercase to improve readability.
23270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23271      # Now convert it back to Unix-stile (cygpath)
23272      input_path=`$CYGPATH -u "$shortmode_path"`
23273      new_path="$input_path"
23274    fi
23275  fi
23276
23277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23278  if test "x$test_cygdrive_prefix" = x; then
23279    # As a simple fix, exclude /usr/bin since it's not a real path.
23280    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23282      # a path prefixed by /cygdrive for fixpath to work.
23283      new_path="$CYGWIN_ROOT_PATH$input_path"
23284    fi
23285  fi
23286
23287  # remove trailing .exe if any
23288  new_path="${new_path/%.exe/}"
23289
23290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23291
23292  # First separate the path from the arguments. This will split at the first
23293  # space.
23294  complete="$DUMPBIN"
23295  path="${complete%% *}"
23296  tmp="$complete EOL"
23297  arguments="${tmp#* }"
23298
23299  # Input might be given as Windows format, start by converting to
23300  # unix format.
23301  new_path="$path"
23302
23303  windows_path="$new_path"
23304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23305    unix_path=`$CYGPATH -u "$windows_path"`
23306    new_path="$unix_path"
23307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23309    new_path="$unix_path"
23310  fi
23311
23312
23313  # Now try to locate executable using which
23314  new_path=`$WHICH "$new_path" 2> /dev/null`
23315
23316  if test "x$new_path" = x; then
23317    # Oops. Which didn't find the executable.
23318    # The splitting of arguments from the executable at a space might have been incorrect,
23319    # since paths with space are more likely in Windows. Give it another try with the whole
23320    # argument.
23321    path="$complete"
23322    arguments="EOL"
23323    new_path="$path"
23324
23325  windows_path="$new_path"
23326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23327    unix_path=`$CYGPATH -u "$windows_path"`
23328    new_path="$unix_path"
23329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23331    new_path="$unix_path"
23332  fi
23333
23334
23335    new_path=`$WHICH "$new_path" 2> /dev/null`
23336
23337    if test "x$new_path" = x; then
23338      # It's still not found. Now this is an unrecoverable error.
23339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23340$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23341      has_space=`$ECHO "$complete" | $GREP " "`
23342      if test "x$has_space" != x; then
23343        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23344$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23345      fi
23346      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23347    fi
23348  fi
23349
23350  # Now new_path has a complete unix path to the binary
23351  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23352    # Keep paths in /bin as-is, but remove trailing .exe if any
23353    new_path="${new_path/%.exe/}"
23354    # Do not save /bin paths to all_fixpath_prefixes!
23355  else
23356    # Not in mixed or Windows style, start by that.
23357    new_path=`cmd //c echo $new_path`
23358
23359  input_path="$new_path"
23360  # Check if we need to convert this using DOS-style short mode. If the path
23361  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23362  # take no chances and rewrite it.
23363  # Note: m4 eats our [], so we need to use [ and ] instead.
23364  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23365  if test "x$has_forbidden_chars" != x; then
23366    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23367    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23368  fi
23369
23370    # Output is in $new_path
23371
23372  windows_path="$new_path"
23373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23374    unix_path=`$CYGPATH -u "$windows_path"`
23375    new_path="$unix_path"
23376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23378    new_path="$unix_path"
23379  fi
23380
23381    # remove trailing .exe if any
23382    new_path="${new_path/%.exe/}"
23383
23384    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23385    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23386  fi
23387
23388  else
23389    # We're on a posix platform. Hooray! :)
23390    # First separate the path from the arguments. This will split at the first
23391    # space.
23392    complete="$DUMPBIN"
23393    path="${complete%% *}"
23394    tmp="$complete EOL"
23395    arguments="${tmp#* }"
23396
23397    # Cannot rely on the command "which" here since it doesn't always work.
23398    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23399    if test -z "$is_absolute_path"; then
23400      # Path to executable is not absolute. Find it.
23401      IFS_save="$IFS"
23402      IFS=:
23403      for p in $PATH; do
23404        if test -f "$p/$path" && test -x "$p/$path"; then
23405          new_path="$p/$path"
23406          break
23407        fi
23408      done
23409      IFS="$IFS_save"
23410    else
23411      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
23412$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
23413      new_path="$path"
23414    fi
23415
23416    if test "x$new_path" = x; then
23417        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
23418$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
23419        has_space=`$ECHO "$complete" | $GREP " "`
23420        if test "x$has_space" != x; then
23421          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23422$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23423        fi
23424        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
23425      fi
23426  fi
23427
23428      # Now join together the path and the arguments once again
23429      if test "x$arguments" != xEOL; then
23430        new_complete="$new_path ${arguments% *}"
23431      else
23432        new_complete="$new_path"
23433      fi
23434
23435  if test "x$complete" != "x$new_complete"; then
23436      DUMPBIN="$new_complete"
23437      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
23438$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
23439    fi
23440
23441
23442    COMPILER_TYPE=CL
23443    CCXXFLAGS="$CCXXFLAGS -nologo"
23444
23445fi
23446
23447
23448
23449ac_ext=c
23450ac_cpp='$CPP $CPPFLAGS'
23451ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23452ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23453ac_compiler_gnu=$ac_cv_c_compiler_gnu
23454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
23455$as_echo_n "checking how to run the C preprocessor... " >&6; }
23456# On Suns, sometimes $CPP names a directory.
23457if test -n "$CPP" && test -d "$CPP"; then
23458  CPP=
23459fi
23460if test -z "$CPP"; then
23461  if test "${ac_cv_prog_CPP+set}" = set; then :
23462  $as_echo_n "(cached) " >&6
23463else
23464      # Double quotes because CPP needs to be expanded
23465    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
23466    do
23467      ac_preproc_ok=false
23468for ac_c_preproc_warn_flag in '' yes
23469do
23470  # Use a header file that comes with gcc, so configuring glibc
23471  # with a fresh cross-compiler works.
23472  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23473  # <limits.h> exists even on freestanding compilers.
23474  # On the NeXT, cc -E runs the code through the compiler's parser,
23475  # not just through cpp. "Syntax error" is here to catch this case.
23476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23477/* end confdefs.h.  */
23478#ifdef __STDC__
23479# include <limits.h>
23480#else
23481# include <assert.h>
23482#endif
23483		     Syntax error
23484_ACEOF
23485if ac_fn_c_try_cpp "$LINENO"; then :
23486
23487else
23488  # Broken: fails on valid input.
23489continue
23490fi
23491rm -f conftest.err conftest.i conftest.$ac_ext
23492
23493  # OK, works on sane cases.  Now check whether nonexistent headers
23494  # can be detected and how.
23495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23496/* end confdefs.h.  */
23497#include <ac_nonexistent.h>
23498_ACEOF
23499if ac_fn_c_try_cpp "$LINENO"; then :
23500  # Broken: success on invalid input.
23501continue
23502else
23503  # Passes both tests.
23504ac_preproc_ok=:
23505break
23506fi
23507rm -f conftest.err conftest.i conftest.$ac_ext
23508
23509done
23510# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23511rm -f conftest.i conftest.err conftest.$ac_ext
23512if $ac_preproc_ok; then :
23513  break
23514fi
23515
23516    done
23517    ac_cv_prog_CPP=$CPP
23518
23519fi
23520  CPP=$ac_cv_prog_CPP
23521else
23522  ac_cv_prog_CPP=$CPP
23523fi
23524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
23525$as_echo "$CPP" >&6; }
23526ac_preproc_ok=false
23527for ac_c_preproc_warn_flag in '' yes
23528do
23529  # Use a header file that comes with gcc, so configuring glibc
23530  # with a fresh cross-compiler works.
23531  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23532  # <limits.h> exists even on freestanding compilers.
23533  # On the NeXT, cc -E runs the code through the compiler's parser,
23534  # not just through cpp. "Syntax error" is here to catch this case.
23535  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23536/* end confdefs.h.  */
23537#ifdef __STDC__
23538# include <limits.h>
23539#else
23540# include <assert.h>
23541#endif
23542		     Syntax error
23543_ACEOF
23544if ac_fn_c_try_cpp "$LINENO"; then :
23545
23546else
23547  # Broken: fails on valid input.
23548continue
23549fi
23550rm -f conftest.err conftest.i conftest.$ac_ext
23551
23552  # OK, works on sane cases.  Now check whether nonexistent headers
23553  # can be detected and how.
23554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23555/* end confdefs.h.  */
23556#include <ac_nonexistent.h>
23557_ACEOF
23558if ac_fn_c_try_cpp "$LINENO"; then :
23559  # Broken: success on invalid input.
23560continue
23561else
23562  # Passes both tests.
23563ac_preproc_ok=:
23564break
23565fi
23566rm -f conftest.err conftest.i conftest.$ac_ext
23567
23568done
23569# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23570rm -f conftest.i conftest.err conftest.$ac_ext
23571if $ac_preproc_ok; then :
23572
23573else
23574  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23576as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
23577See \`config.log' for more details" "$LINENO" 5 ; }
23578fi
23579
23580ac_ext=cpp
23581ac_cpp='$CXXCPP $CPPFLAGS'
23582ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23583ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23584ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23585
23586
23587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23588
23589  # First separate the path from the arguments. This will split at the first
23590  # space.
23591  complete="$CPP"
23592  path="${complete%% *}"
23593  tmp="$complete EOL"
23594  arguments="${tmp#* }"
23595
23596  # Input might be given as Windows format, start by converting to
23597  # unix format.
23598  new_path=`$CYGPATH -u "$path"`
23599
23600  # Now try to locate executable using which
23601  new_path=`$WHICH "$new_path" 2> /dev/null`
23602  # bat and cmd files are not always considered executable in cygwin causing which
23603  # to not find them
23604  if test "x$new_path" = x \
23605           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23606           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23607    new_path=`$CYGPATH -u "$path"`
23608  fi
23609  if test "x$new_path" = x; then
23610    # Oops. Which didn't find the executable.
23611    # The splitting of arguments from the executable at a space might have been incorrect,
23612    # since paths with space are more likely in Windows. Give it another try with the whole
23613    # argument.
23614    path="$complete"
23615    arguments="EOL"
23616    new_path=`$CYGPATH -u "$path"`
23617    new_path=`$WHICH "$new_path" 2> /dev/null`
23618    # bat and cmd files are not always considered executable in cygwin causing which
23619    # to not find them
23620    if test "x$new_path" = x \
23621             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23622             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23623      new_path=`$CYGPATH -u "$path"`
23624    fi
23625    if test "x$new_path" = x; then
23626      # It's still not found. Now this is an unrecoverable error.
23627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23628$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23629      has_space=`$ECHO "$complete" | $GREP " "`
23630      if test "x$has_space" != x; then
23631        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23632$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23633      fi
23634      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23635    fi
23636  fi
23637
23638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23641  # "foo.exe" is OK but "foo" is an error.
23642  #
23643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23644  # It is also a way to make sure we got the proper file name for the real test later on.
23645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23646  if test "x$test_shortpath" = x; then
23647    # Short path failed, file does not exist as specified.
23648    # Try adding .exe or .cmd
23649    if test -f "${new_path}.exe"; then
23650       input_to_shortpath="${new_path}.exe"
23651    elif test -f "${new_path}.cmd"; then
23652       input_to_shortpath="${new_path}.cmd"
23653    else
23654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
23655$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
23656      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23657$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23658      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23659    fi
23660  else
23661    input_to_shortpath="$new_path"
23662  fi
23663
23664  # Call helper function which possibly converts this using DOS-style short mode.
23665  # If so, the updated path is stored in $new_path.
23666  new_path="$input_to_shortpath"
23667
23668  input_path="$input_to_shortpath"
23669  # Check if we need to convert this using DOS-style short mode. If the path
23670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23671  # take no chances and rewrite it.
23672  # Note: m4 eats our [], so we need to use [ and ] instead.
23673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23674  if test "x$has_forbidden_chars" != x; then
23675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23679      # Going to short mode and back again did indeed matter. Since short mode is
23680      # case insensitive, let's make it lowercase to improve readability.
23681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23682      # Now convert it back to Unix-stile (cygpath)
23683      input_path=`$CYGPATH -u "$shortmode_path"`
23684      new_path="$input_path"
23685    fi
23686  fi
23687
23688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23689  if test "x$test_cygdrive_prefix" = x; then
23690    # As a simple fix, exclude /usr/bin since it's not a real path.
23691    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23693      # a path prefixed by /cygdrive for fixpath to work.
23694      new_path="$CYGWIN_ROOT_PATH$input_path"
23695    fi
23696  fi
23697
23698  # remove trailing .exe if any
23699  new_path="${new_path/%.exe/}"
23700
23701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23702
23703  # First separate the path from the arguments. This will split at the first
23704  # space.
23705  complete="$CPP"
23706  path="${complete%% *}"
23707  tmp="$complete EOL"
23708  arguments="${tmp#* }"
23709
23710  # Input might be given as Windows format, start by converting to
23711  # unix format.
23712  new_path="$path"
23713
23714  windows_path="$new_path"
23715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23716    unix_path=`$CYGPATH -u "$windows_path"`
23717    new_path="$unix_path"
23718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23720    new_path="$unix_path"
23721  fi
23722
23723
23724  # Now try to locate executable using which
23725  new_path=`$WHICH "$new_path" 2> /dev/null`
23726
23727  if test "x$new_path" = x; then
23728    # Oops. Which didn't find the executable.
23729    # The splitting of arguments from the executable at a space might have been incorrect,
23730    # since paths with space are more likely in Windows. Give it another try with the whole
23731    # argument.
23732    path="$complete"
23733    arguments="EOL"
23734    new_path="$path"
23735
23736  windows_path="$new_path"
23737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23738    unix_path=`$CYGPATH -u "$windows_path"`
23739    new_path="$unix_path"
23740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23742    new_path="$unix_path"
23743  fi
23744
23745
23746    new_path=`$WHICH "$new_path" 2> /dev/null`
23747
23748    if test "x$new_path" = x; then
23749      # It's still not found. Now this is an unrecoverable error.
23750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23751$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23752      has_space=`$ECHO "$complete" | $GREP " "`
23753      if test "x$has_space" != x; then
23754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23756      fi
23757      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23758    fi
23759  fi
23760
23761  # Now new_path has a complete unix path to the binary
23762  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23763    # Keep paths in /bin as-is, but remove trailing .exe if any
23764    new_path="${new_path/%.exe/}"
23765    # Do not save /bin paths to all_fixpath_prefixes!
23766  else
23767    # Not in mixed or Windows style, start by that.
23768    new_path=`cmd //c echo $new_path`
23769
23770  input_path="$new_path"
23771  # Check if we need to convert this using DOS-style short mode. If the path
23772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23773  # take no chances and rewrite it.
23774  # Note: m4 eats our [], so we need to use [ and ] instead.
23775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23776  if test "x$has_forbidden_chars" != x; then
23777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23779  fi
23780
23781    # Output is in $new_path
23782
23783  windows_path="$new_path"
23784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23785    unix_path=`$CYGPATH -u "$windows_path"`
23786    new_path="$unix_path"
23787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23789    new_path="$unix_path"
23790  fi
23791
23792    # remove trailing .exe if any
23793    new_path="${new_path/%.exe/}"
23794
23795    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23796    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23797  fi
23798
23799  else
23800    # We're on a posix platform. Hooray! :)
23801    # First separate the path from the arguments. This will split at the first
23802    # space.
23803    complete="$CPP"
23804    path="${complete%% *}"
23805    tmp="$complete EOL"
23806    arguments="${tmp#* }"
23807
23808    # Cannot rely on the command "which" here since it doesn't always work.
23809    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23810    if test -z "$is_absolute_path"; then
23811      # Path to executable is not absolute. Find it.
23812      IFS_save="$IFS"
23813      IFS=:
23814      for p in $PATH; do
23815        if test -f "$p/$path" && test -x "$p/$path"; then
23816          new_path="$p/$path"
23817          break
23818        fi
23819      done
23820      IFS="$IFS_save"
23821    else
23822      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
23823$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
23824      new_path="$path"
23825    fi
23826
23827    if test "x$new_path" = x; then
23828        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
23829$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
23830        has_space=`$ECHO "$complete" | $GREP " "`
23831        if test "x$has_space" != x; then
23832          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23833$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23834        fi
23835        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
23836      fi
23837  fi
23838
23839      # Now join together the path and the arguments once again
23840      if test "x$arguments" != xEOL; then
23841        new_complete="$new_path ${arguments% *}"
23842      else
23843        new_complete="$new_path"
23844      fi
23845
23846  if test "x$complete" != "x$new_complete"; then
23847      CPP="$new_complete"
23848      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
23849$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
23850    fi
23851
23852
23853ac_ext=cpp
23854ac_cpp='$CXXCPP $CPPFLAGS'
23855ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23856ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23857ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
23859$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
23860if test -z "$CXXCPP"; then
23861  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
23862  $as_echo_n "(cached) " >&6
23863else
23864      # Double quotes because CXXCPP needs to be expanded
23865    for CXXCPP in "$CXX -E" "/lib/cpp"
23866    do
23867      ac_preproc_ok=false
23868for ac_cxx_preproc_warn_flag in '' yes
23869do
23870  # Use a header file that comes with gcc, so configuring glibc
23871  # with a fresh cross-compiler works.
23872  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23873  # <limits.h> exists even on freestanding compilers.
23874  # On the NeXT, cc -E runs the code through the compiler's parser,
23875  # not just through cpp. "Syntax error" is here to catch this case.
23876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23877/* end confdefs.h.  */
23878#ifdef __STDC__
23879# include <limits.h>
23880#else
23881# include <assert.h>
23882#endif
23883		     Syntax error
23884_ACEOF
23885if ac_fn_cxx_try_cpp "$LINENO"; then :
23886
23887else
23888  # Broken: fails on valid input.
23889continue
23890fi
23891rm -f conftest.err conftest.i conftest.$ac_ext
23892
23893  # OK, works on sane cases.  Now check whether nonexistent headers
23894  # can be detected and how.
23895  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23896/* end confdefs.h.  */
23897#include <ac_nonexistent.h>
23898_ACEOF
23899if ac_fn_cxx_try_cpp "$LINENO"; then :
23900  # Broken: success on invalid input.
23901continue
23902else
23903  # Passes both tests.
23904ac_preproc_ok=:
23905break
23906fi
23907rm -f conftest.err conftest.i conftest.$ac_ext
23908
23909done
23910# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23911rm -f conftest.i conftest.err conftest.$ac_ext
23912if $ac_preproc_ok; then :
23913  break
23914fi
23915
23916    done
23917    ac_cv_prog_CXXCPP=$CXXCPP
23918
23919fi
23920  CXXCPP=$ac_cv_prog_CXXCPP
23921else
23922  ac_cv_prog_CXXCPP=$CXXCPP
23923fi
23924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
23925$as_echo "$CXXCPP" >&6; }
23926ac_preproc_ok=false
23927for ac_cxx_preproc_warn_flag in '' yes
23928do
23929  # Use a header file that comes with gcc, so configuring glibc
23930  # with a fresh cross-compiler works.
23931  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23932  # <limits.h> exists even on freestanding compilers.
23933  # On the NeXT, cc -E runs the code through the compiler's parser,
23934  # not just through cpp. "Syntax error" is here to catch this case.
23935  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23936/* end confdefs.h.  */
23937#ifdef __STDC__
23938# include <limits.h>
23939#else
23940# include <assert.h>
23941#endif
23942		     Syntax error
23943_ACEOF
23944if ac_fn_cxx_try_cpp "$LINENO"; then :
23945
23946else
23947  # Broken: fails on valid input.
23948continue
23949fi
23950rm -f conftest.err conftest.i conftest.$ac_ext
23951
23952  # OK, works on sane cases.  Now check whether nonexistent headers
23953  # can be detected and how.
23954  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23955/* end confdefs.h.  */
23956#include <ac_nonexistent.h>
23957_ACEOF
23958if ac_fn_cxx_try_cpp "$LINENO"; then :
23959  # Broken: success on invalid input.
23960continue
23961else
23962  # Passes both tests.
23963ac_preproc_ok=:
23964break
23965fi
23966rm -f conftest.err conftest.i conftest.$ac_ext
23967
23968done
23969# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23970rm -f conftest.i conftest.err conftest.$ac_ext
23971if $ac_preproc_ok; then :
23972
23973else
23974  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
23975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23976as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
23977See \`config.log' for more details" "$LINENO" 5 ; }
23978fi
23979
23980ac_ext=cpp
23981ac_cpp='$CXXCPP $CPPFLAGS'
23982ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23983ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23984ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23985
23986
23987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23988
23989  # First separate the path from the arguments. This will split at the first
23990  # space.
23991  complete="$CXXCPP"
23992  path="${complete%% *}"
23993  tmp="$complete EOL"
23994  arguments="${tmp#* }"
23995
23996  # Input might be given as Windows format, start by converting to
23997  # unix format.
23998  new_path=`$CYGPATH -u "$path"`
23999
24000  # Now try to locate executable using which
24001  new_path=`$WHICH "$new_path" 2> /dev/null`
24002  # bat and cmd files are not always considered executable in cygwin causing which
24003  # to not find them
24004  if test "x$new_path" = x \
24005           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24006           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24007    new_path=`$CYGPATH -u "$path"`
24008  fi
24009  if test "x$new_path" = x; then
24010    # Oops. Which didn't find the executable.
24011    # The splitting of arguments from the executable at a space might have been incorrect,
24012    # since paths with space are more likely in Windows. Give it another try with the whole
24013    # argument.
24014    path="$complete"
24015    arguments="EOL"
24016    new_path=`$CYGPATH -u "$path"`
24017    new_path=`$WHICH "$new_path" 2> /dev/null`
24018    # bat and cmd files are not always considered executable in cygwin causing which
24019    # to not find them
24020    if test "x$new_path" = x \
24021             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24022             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24023      new_path=`$CYGPATH -u "$path"`
24024    fi
24025    if test "x$new_path" = x; then
24026      # It's still not found. Now this is an unrecoverable error.
24027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24028$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24029      has_space=`$ECHO "$complete" | $GREP " "`
24030      if test "x$has_space" != x; then
24031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24033      fi
24034      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24035    fi
24036  fi
24037
24038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24041  # "foo.exe" is OK but "foo" is an error.
24042  #
24043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24044  # It is also a way to make sure we got the proper file name for the real test later on.
24045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24046  if test "x$test_shortpath" = x; then
24047    # Short path failed, file does not exist as specified.
24048    # Try adding .exe or .cmd
24049    if test -f "${new_path}.exe"; then
24050       input_to_shortpath="${new_path}.exe"
24051    elif test -f "${new_path}.cmd"; then
24052       input_to_shortpath="${new_path}.cmd"
24053    else
24054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24055$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24056      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24057$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24058      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24059    fi
24060  else
24061    input_to_shortpath="$new_path"
24062  fi
24063
24064  # Call helper function which possibly converts this using DOS-style short mode.
24065  # If so, the updated path is stored in $new_path.
24066  new_path="$input_to_shortpath"
24067
24068  input_path="$input_to_shortpath"
24069  # Check if we need to convert this using DOS-style short mode. If the path
24070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24071  # take no chances and rewrite it.
24072  # Note: m4 eats our [], so we need to use [ and ] instead.
24073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24074  if test "x$has_forbidden_chars" != x; then
24075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24079      # Going to short mode and back again did indeed matter. Since short mode is
24080      # case insensitive, let's make it lowercase to improve readability.
24081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24082      # Now convert it back to Unix-stile (cygpath)
24083      input_path=`$CYGPATH -u "$shortmode_path"`
24084      new_path="$input_path"
24085    fi
24086  fi
24087
24088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24089  if test "x$test_cygdrive_prefix" = x; then
24090    # As a simple fix, exclude /usr/bin since it's not a real path.
24091    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24093      # a path prefixed by /cygdrive for fixpath to work.
24094      new_path="$CYGWIN_ROOT_PATH$input_path"
24095    fi
24096  fi
24097
24098  # remove trailing .exe if any
24099  new_path="${new_path/%.exe/}"
24100
24101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24102
24103  # First separate the path from the arguments. This will split at the first
24104  # space.
24105  complete="$CXXCPP"
24106  path="${complete%% *}"
24107  tmp="$complete EOL"
24108  arguments="${tmp#* }"
24109
24110  # Input might be given as Windows format, start by converting to
24111  # unix format.
24112  new_path="$path"
24113
24114  windows_path="$new_path"
24115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24116    unix_path=`$CYGPATH -u "$windows_path"`
24117    new_path="$unix_path"
24118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24120    new_path="$unix_path"
24121  fi
24122
24123
24124  # Now try to locate executable using which
24125  new_path=`$WHICH "$new_path" 2> /dev/null`
24126
24127  if test "x$new_path" = x; then
24128    # Oops. Which didn't find the executable.
24129    # The splitting of arguments from the executable at a space might have been incorrect,
24130    # since paths with space are more likely in Windows. Give it another try with the whole
24131    # argument.
24132    path="$complete"
24133    arguments="EOL"
24134    new_path="$path"
24135
24136  windows_path="$new_path"
24137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24138    unix_path=`$CYGPATH -u "$windows_path"`
24139    new_path="$unix_path"
24140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24142    new_path="$unix_path"
24143  fi
24144
24145
24146    new_path=`$WHICH "$new_path" 2> /dev/null`
24147
24148    if test "x$new_path" = x; then
24149      # It's still not found. Now this is an unrecoverable error.
24150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24151$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24152      has_space=`$ECHO "$complete" | $GREP " "`
24153      if test "x$has_space" != x; then
24154        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24155$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24156      fi
24157      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24158    fi
24159  fi
24160
24161  # Now new_path has a complete unix path to the binary
24162  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24163    # Keep paths in /bin as-is, but remove trailing .exe if any
24164    new_path="${new_path/%.exe/}"
24165    # Do not save /bin paths to all_fixpath_prefixes!
24166  else
24167    # Not in mixed or Windows style, start by that.
24168    new_path=`cmd //c echo $new_path`
24169
24170  input_path="$new_path"
24171  # Check if we need to convert this using DOS-style short mode. If the path
24172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24173  # take no chances and rewrite it.
24174  # Note: m4 eats our [], so we need to use [ and ] instead.
24175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24176  if test "x$has_forbidden_chars" != x; then
24177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24179  fi
24180
24181    # Output is in $new_path
24182
24183  windows_path="$new_path"
24184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24185    unix_path=`$CYGPATH -u "$windows_path"`
24186    new_path="$unix_path"
24187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24189    new_path="$unix_path"
24190  fi
24191
24192    # remove trailing .exe if any
24193    new_path="${new_path/%.exe/}"
24194
24195    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24196    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24197  fi
24198
24199  else
24200    # We're on a posix platform. Hooray! :)
24201    # First separate the path from the arguments. This will split at the first
24202    # space.
24203    complete="$CXXCPP"
24204    path="${complete%% *}"
24205    tmp="$complete EOL"
24206    arguments="${tmp#* }"
24207
24208    # Cannot rely on the command "which" here since it doesn't always work.
24209    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24210    if test -z "$is_absolute_path"; then
24211      # Path to executable is not absolute. Find it.
24212      IFS_save="$IFS"
24213      IFS=:
24214      for p in $PATH; do
24215        if test -f "$p/$path" && test -x "$p/$path"; then
24216          new_path="$p/$path"
24217          break
24218        fi
24219      done
24220      IFS="$IFS_save"
24221    else
24222      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
24223$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
24224      new_path="$path"
24225    fi
24226
24227    if test "x$new_path" = x; then
24228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24229$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24230        has_space=`$ECHO "$complete" | $GREP " "`
24231        if test "x$has_space" != x; then
24232          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24233$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24234        fi
24235        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24236      fi
24237  fi
24238
24239      # Now join together the path and the arguments once again
24240      if test "x$arguments" != xEOL; then
24241        new_complete="$new_path ${arguments% *}"
24242      else
24243        new_complete="$new_path"
24244      fi
24245
24246  if test "x$complete" != "x$new_complete"; then
24247      CXXCPP="$new_complete"
24248      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
24249$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
24250    fi
24251
24252
24253if test "x$COMPILE_TYPE" != "xcross"; then
24254    # If we are not cross compiling, use the same compilers for
24255    # building the build platform executables. The cross-compilation
24256    # case needed to be done earlier, but this can only be done after
24257    # the native tools have been localized.
24258    BUILD_CC="$CC"
24259    BUILD_CXX="$CXX"
24260    BUILD_LD="$LD"
24261fi
24262
24263# for solaris we really need solaris tools, and not gnu equivalent
24264#   these seems to normally reside in /usr/ccs/bin so add that to path before
24265#   starting to probe
24266#
24267#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
24268#         so that it can be overriden --with-tools-dir
24269if test "x$OPENJDK_BUILD_OS" = xsolaris; then
24270    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
24271fi
24272
24273# Find the right assembler.
24274if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24275    # Extract the first word of "as", so it can be a program name with args.
24276set dummy as; ac_word=$2
24277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24278$as_echo_n "checking for $ac_word... " >&6; }
24279if test "${ac_cv_path_AS+set}" = set; then :
24280  $as_echo_n "(cached) " >&6
24281else
24282  case $AS in
24283  [\\/]* | ?:[\\/]*)
24284  ac_cv_path_AS="$AS" # Let the user override the test with a path.
24285  ;;
24286  *)
24287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24288for as_dir in $PATH
24289do
24290  IFS=$as_save_IFS
24291  test -z "$as_dir" && as_dir=.
24292    for ac_exec_ext in '' $ac_executable_extensions; do
24293  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24294    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
24295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24296    break 2
24297  fi
24298done
24299  done
24300IFS=$as_save_IFS
24301
24302  ;;
24303esac
24304fi
24305AS=$ac_cv_path_AS
24306if test -n "$AS"; then
24307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
24308$as_echo "$AS" >&6; }
24309else
24310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24311$as_echo "no" >&6; }
24312fi
24313
24314
24315
24316  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24317
24318  # First separate the path from the arguments. This will split at the first
24319  # space.
24320  complete="$AS"
24321  path="${complete%% *}"
24322  tmp="$complete EOL"
24323  arguments="${tmp#* }"
24324
24325  # Input might be given as Windows format, start by converting to
24326  # unix format.
24327  new_path=`$CYGPATH -u "$path"`
24328
24329  # Now try to locate executable using which
24330  new_path=`$WHICH "$new_path" 2> /dev/null`
24331  # bat and cmd files are not always considered executable in cygwin causing which
24332  # to not find them
24333  if test "x$new_path" = x \
24334           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24335           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24336    new_path=`$CYGPATH -u "$path"`
24337  fi
24338  if test "x$new_path" = x; then
24339    # Oops. Which didn't find the executable.
24340    # The splitting of arguments from the executable at a space might have been incorrect,
24341    # since paths with space are more likely in Windows. Give it another try with the whole
24342    # argument.
24343    path="$complete"
24344    arguments="EOL"
24345    new_path=`$CYGPATH -u "$path"`
24346    new_path=`$WHICH "$new_path" 2> /dev/null`
24347    # bat and cmd files are not always considered executable in cygwin causing which
24348    # to not find them
24349    if test "x$new_path" = x \
24350             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24351             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24352      new_path=`$CYGPATH -u "$path"`
24353    fi
24354    if test "x$new_path" = x; then
24355      # It's still not found. Now this is an unrecoverable error.
24356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24357$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24358      has_space=`$ECHO "$complete" | $GREP " "`
24359      if test "x$has_space" != x; then
24360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24362      fi
24363      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24364    fi
24365  fi
24366
24367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24370  # "foo.exe" is OK but "foo" is an error.
24371  #
24372  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24373  # It is also a way to make sure we got the proper file name for the real test later on.
24374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24375  if test "x$test_shortpath" = x; then
24376    # Short path failed, file does not exist as specified.
24377    # Try adding .exe or .cmd
24378    if test -f "${new_path}.exe"; then
24379       input_to_shortpath="${new_path}.exe"
24380    elif test -f "${new_path}.cmd"; then
24381       input_to_shortpath="${new_path}.cmd"
24382    else
24383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
24384$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
24385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24387      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24388    fi
24389  else
24390    input_to_shortpath="$new_path"
24391  fi
24392
24393  # Call helper function which possibly converts this using DOS-style short mode.
24394  # If so, the updated path is stored in $new_path.
24395  new_path="$input_to_shortpath"
24396
24397  input_path="$input_to_shortpath"
24398  # Check if we need to convert this using DOS-style short mode. If the path
24399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24400  # take no chances and rewrite it.
24401  # Note: m4 eats our [], so we need to use [ and ] instead.
24402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24403  if test "x$has_forbidden_chars" != x; then
24404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24408      # Going to short mode and back again did indeed matter. Since short mode is
24409      # case insensitive, let's make it lowercase to improve readability.
24410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24411      # Now convert it back to Unix-stile (cygpath)
24412      input_path=`$CYGPATH -u "$shortmode_path"`
24413      new_path="$input_path"
24414    fi
24415  fi
24416
24417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24418  if test "x$test_cygdrive_prefix" = x; then
24419    # As a simple fix, exclude /usr/bin since it's not a real path.
24420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24422      # a path prefixed by /cygdrive for fixpath to work.
24423      new_path="$CYGWIN_ROOT_PATH$input_path"
24424    fi
24425  fi
24426
24427  # remove trailing .exe if any
24428  new_path="${new_path/%.exe/}"
24429
24430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24431
24432  # First separate the path from the arguments. This will split at the first
24433  # space.
24434  complete="$AS"
24435  path="${complete%% *}"
24436  tmp="$complete EOL"
24437  arguments="${tmp#* }"
24438
24439  # Input might be given as Windows format, start by converting to
24440  # unix format.
24441  new_path="$path"
24442
24443  windows_path="$new_path"
24444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24445    unix_path=`$CYGPATH -u "$windows_path"`
24446    new_path="$unix_path"
24447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24449    new_path="$unix_path"
24450  fi
24451
24452
24453  # Now try to locate executable using which
24454  new_path=`$WHICH "$new_path" 2> /dev/null`
24455
24456  if test "x$new_path" = x; then
24457    # Oops. Which didn't find the executable.
24458    # The splitting of arguments from the executable at a space might have been incorrect,
24459    # since paths with space are more likely in Windows. Give it another try with the whole
24460    # argument.
24461    path="$complete"
24462    arguments="EOL"
24463    new_path="$path"
24464
24465  windows_path="$new_path"
24466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24467    unix_path=`$CYGPATH -u "$windows_path"`
24468    new_path="$unix_path"
24469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24471    new_path="$unix_path"
24472  fi
24473
24474
24475    new_path=`$WHICH "$new_path" 2> /dev/null`
24476
24477    if test "x$new_path" = x; then
24478      # It's still not found. Now this is an unrecoverable error.
24479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24480$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24481      has_space=`$ECHO "$complete" | $GREP " "`
24482      if test "x$has_space" != x; then
24483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24485      fi
24486      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24487    fi
24488  fi
24489
24490  # Now new_path has a complete unix path to the binary
24491  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24492    # Keep paths in /bin as-is, but remove trailing .exe if any
24493    new_path="${new_path/%.exe/}"
24494    # Do not save /bin paths to all_fixpath_prefixes!
24495  else
24496    # Not in mixed or Windows style, start by that.
24497    new_path=`cmd //c echo $new_path`
24498
24499  input_path="$new_path"
24500  # Check if we need to convert this using DOS-style short mode. If the path
24501  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24502  # take no chances and rewrite it.
24503  # Note: m4 eats our [], so we need to use [ and ] instead.
24504  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24505  if test "x$has_forbidden_chars" != x; then
24506    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24507    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24508  fi
24509
24510    # Output is in $new_path
24511
24512  windows_path="$new_path"
24513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24514    unix_path=`$CYGPATH -u "$windows_path"`
24515    new_path="$unix_path"
24516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24518    new_path="$unix_path"
24519  fi
24520
24521    # remove trailing .exe if any
24522    new_path="${new_path/%.exe/}"
24523
24524    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24525    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24526  fi
24527
24528  else
24529    # We're on a posix platform. Hooray! :)
24530    # First separate the path from the arguments. This will split at the first
24531    # space.
24532    complete="$AS"
24533    path="${complete%% *}"
24534    tmp="$complete EOL"
24535    arguments="${tmp#* }"
24536
24537    # Cannot rely on the command "which" here since it doesn't always work.
24538    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24539    if test -z "$is_absolute_path"; then
24540      # Path to executable is not absolute. Find it.
24541      IFS_save="$IFS"
24542      IFS=:
24543      for p in $PATH; do
24544        if test -f "$p/$path" && test -x "$p/$path"; then
24545          new_path="$p/$path"
24546          break
24547        fi
24548      done
24549      IFS="$IFS_save"
24550    else
24551      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
24552$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
24553      new_path="$path"
24554    fi
24555
24556    if test "x$new_path" = x; then
24557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
24558$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
24559        has_space=`$ECHO "$complete" | $GREP " "`
24560        if test "x$has_space" != x; then
24561          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24562$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24563        fi
24564        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
24565      fi
24566  fi
24567
24568      # Now join together the path and the arguments once again
24569      if test "x$arguments" != xEOL; then
24570        new_complete="$new_path ${arguments% *}"
24571      else
24572        new_complete="$new_path"
24573      fi
24574
24575  if test "x$complete" != "x$new_complete"; then
24576      AS="$new_complete"
24577      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
24578$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
24579    fi
24580
24581else
24582    AS="$CC -c"
24583fi
24584
24585
24586if test "x$OPENJDK_TARGET_OS" = xsolaris; then
24587    for ac_prog in gnm nm
24588do
24589  # Extract the first word of "$ac_prog", so it can be a program name with args.
24590set dummy $ac_prog; ac_word=$2
24591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24592$as_echo_n "checking for $ac_word... " >&6; }
24593if test "${ac_cv_path_NM+set}" = set; then :
24594  $as_echo_n "(cached) " >&6
24595else
24596  case $NM in
24597  [\\/]* | ?:[\\/]*)
24598  ac_cv_path_NM="$NM" # Let the user override the test with a path.
24599  ;;
24600  *)
24601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24602for as_dir in $PATH
24603do
24604  IFS=$as_save_IFS
24605  test -z "$as_dir" && as_dir=.
24606    for ac_exec_ext in '' $ac_executable_extensions; do
24607  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24608    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
24609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24610    break 2
24611  fi
24612done
24613  done
24614IFS=$as_save_IFS
24615
24616  ;;
24617esac
24618fi
24619NM=$ac_cv_path_NM
24620if test -n "$NM"; then
24621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
24622$as_echo "$NM" >&6; }
24623else
24624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24625$as_echo "no" >&6; }
24626fi
24627
24628
24629  test -n "$NM" && break
24630done
24631
24632
24633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24634
24635  # First separate the path from the arguments. This will split at the first
24636  # space.
24637  complete="$NM"
24638  path="${complete%% *}"
24639  tmp="$complete EOL"
24640  arguments="${tmp#* }"
24641
24642  # Input might be given as Windows format, start by converting to
24643  # unix format.
24644  new_path=`$CYGPATH -u "$path"`
24645
24646  # Now try to locate executable using which
24647  new_path=`$WHICH "$new_path" 2> /dev/null`
24648  # bat and cmd files are not always considered executable in cygwin causing which
24649  # to not find them
24650  if test "x$new_path" = x \
24651           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24652           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24653    new_path=`$CYGPATH -u "$path"`
24654  fi
24655  if test "x$new_path" = x; then
24656    # Oops. Which didn't find the executable.
24657    # The splitting of arguments from the executable at a space might have been incorrect,
24658    # since paths with space are more likely in Windows. Give it another try with the whole
24659    # argument.
24660    path="$complete"
24661    arguments="EOL"
24662    new_path=`$CYGPATH -u "$path"`
24663    new_path=`$WHICH "$new_path" 2> /dev/null`
24664    # bat and cmd files are not always considered executable in cygwin causing which
24665    # to not find them
24666    if test "x$new_path" = x \
24667             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24668             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24669      new_path=`$CYGPATH -u "$path"`
24670    fi
24671    if test "x$new_path" = x; then
24672      # It's still not found. Now this is an unrecoverable error.
24673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24674$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24675      has_space=`$ECHO "$complete" | $GREP " "`
24676      if test "x$has_space" != x; then
24677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24679      fi
24680      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24681    fi
24682  fi
24683
24684  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24685  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24686  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24687  # "foo.exe" is OK but "foo" is an error.
24688  #
24689  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24690  # It is also a way to make sure we got the proper file name for the real test later on.
24691  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24692  if test "x$test_shortpath" = x; then
24693    # Short path failed, file does not exist as specified.
24694    # Try adding .exe or .cmd
24695    if test -f "${new_path}.exe"; then
24696       input_to_shortpath="${new_path}.exe"
24697    elif test -f "${new_path}.cmd"; then
24698       input_to_shortpath="${new_path}.cmd"
24699    else
24700      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
24701$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
24702      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24703$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24704      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24705    fi
24706  else
24707    input_to_shortpath="$new_path"
24708  fi
24709
24710  # Call helper function which possibly converts this using DOS-style short mode.
24711  # If so, the updated path is stored in $new_path.
24712  new_path="$input_to_shortpath"
24713
24714  input_path="$input_to_shortpath"
24715  # Check if we need to convert this using DOS-style short mode. If the path
24716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24717  # take no chances and rewrite it.
24718  # Note: m4 eats our [], so we need to use [ and ] instead.
24719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24720  if test "x$has_forbidden_chars" != x; then
24721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24725      # Going to short mode and back again did indeed matter. Since short mode is
24726      # case insensitive, let's make it lowercase to improve readability.
24727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24728      # Now convert it back to Unix-stile (cygpath)
24729      input_path=`$CYGPATH -u "$shortmode_path"`
24730      new_path="$input_path"
24731    fi
24732  fi
24733
24734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24735  if test "x$test_cygdrive_prefix" = x; then
24736    # As a simple fix, exclude /usr/bin since it's not a real path.
24737    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24739      # a path prefixed by /cygdrive for fixpath to work.
24740      new_path="$CYGWIN_ROOT_PATH$input_path"
24741    fi
24742  fi
24743
24744  # remove trailing .exe if any
24745  new_path="${new_path/%.exe/}"
24746
24747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24748
24749  # First separate the path from the arguments. This will split at the first
24750  # space.
24751  complete="$NM"
24752  path="${complete%% *}"
24753  tmp="$complete EOL"
24754  arguments="${tmp#* }"
24755
24756  # Input might be given as Windows format, start by converting to
24757  # unix format.
24758  new_path="$path"
24759
24760  windows_path="$new_path"
24761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24762    unix_path=`$CYGPATH -u "$windows_path"`
24763    new_path="$unix_path"
24764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24766    new_path="$unix_path"
24767  fi
24768
24769
24770  # Now try to locate executable using which
24771  new_path=`$WHICH "$new_path" 2> /dev/null`
24772
24773  if test "x$new_path" = x; then
24774    # Oops. Which didn't find the executable.
24775    # The splitting of arguments from the executable at a space might have been incorrect,
24776    # since paths with space are more likely in Windows. Give it another try with the whole
24777    # argument.
24778    path="$complete"
24779    arguments="EOL"
24780    new_path="$path"
24781
24782  windows_path="$new_path"
24783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24784    unix_path=`$CYGPATH -u "$windows_path"`
24785    new_path="$unix_path"
24786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24788    new_path="$unix_path"
24789  fi
24790
24791
24792    new_path=`$WHICH "$new_path" 2> /dev/null`
24793
24794    if test "x$new_path" = x; then
24795      # It's still not found. Now this is an unrecoverable error.
24796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24797$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24798      has_space=`$ECHO "$complete" | $GREP " "`
24799      if test "x$has_space" != x; then
24800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24802      fi
24803      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24804    fi
24805  fi
24806
24807  # Now new_path has a complete unix path to the binary
24808  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24809    # Keep paths in /bin as-is, but remove trailing .exe if any
24810    new_path="${new_path/%.exe/}"
24811    # Do not save /bin paths to all_fixpath_prefixes!
24812  else
24813    # Not in mixed or Windows style, start by that.
24814    new_path=`cmd //c echo $new_path`
24815
24816  input_path="$new_path"
24817  # Check if we need to convert this using DOS-style short mode. If the path
24818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24819  # take no chances and rewrite it.
24820  # Note: m4 eats our [], so we need to use [ and ] instead.
24821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24822  if test "x$has_forbidden_chars" != x; then
24823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24825  fi
24826
24827    # Output is in $new_path
24828
24829  windows_path="$new_path"
24830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24831    unix_path=`$CYGPATH -u "$windows_path"`
24832    new_path="$unix_path"
24833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24835    new_path="$unix_path"
24836  fi
24837
24838    # remove trailing .exe if any
24839    new_path="${new_path/%.exe/}"
24840
24841    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24842    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24843  fi
24844
24845  else
24846    # We're on a posix platform. Hooray! :)
24847    # First separate the path from the arguments. This will split at the first
24848    # space.
24849    complete="$NM"
24850    path="${complete%% *}"
24851    tmp="$complete EOL"
24852    arguments="${tmp#* }"
24853
24854    # Cannot rely on the command "which" here since it doesn't always work.
24855    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24856    if test -z "$is_absolute_path"; then
24857      # Path to executable is not absolute. Find it.
24858      IFS_save="$IFS"
24859      IFS=:
24860      for p in $PATH; do
24861        if test -f "$p/$path" && test -x "$p/$path"; then
24862          new_path="$p/$path"
24863          break
24864        fi
24865      done
24866      IFS="$IFS_save"
24867    else
24868      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
24869$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
24870      new_path="$path"
24871    fi
24872
24873    if test "x$new_path" = x; then
24874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
24875$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
24876        has_space=`$ECHO "$complete" | $GREP " "`
24877        if test "x$has_space" != x; then
24878          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24879$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24880        fi
24881        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
24882      fi
24883  fi
24884
24885      # Now join together the path and the arguments once again
24886      if test "x$arguments" != xEOL; then
24887        new_complete="$new_path ${arguments% *}"
24888      else
24889        new_complete="$new_path"
24890      fi
24891
24892  if test "x$complete" != "x$new_complete"; then
24893      NM="$new_complete"
24894      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
24895$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
24896    fi
24897
24898    # Extract the first word of "strip", so it can be a program name with args.
24899set dummy strip; ac_word=$2
24900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24901$as_echo_n "checking for $ac_word... " >&6; }
24902if test "${ac_cv_path_STRIP+set}" = set; then :
24903  $as_echo_n "(cached) " >&6
24904else
24905  case $STRIP in
24906  [\\/]* | ?:[\\/]*)
24907  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
24908  ;;
24909  *)
24910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24911for as_dir in $PATH
24912do
24913  IFS=$as_save_IFS
24914  test -z "$as_dir" && as_dir=.
24915    for ac_exec_ext in '' $ac_executable_extensions; do
24916  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24917    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
24918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24919    break 2
24920  fi
24921done
24922  done
24923IFS=$as_save_IFS
24924
24925  ;;
24926esac
24927fi
24928STRIP=$ac_cv_path_STRIP
24929if test -n "$STRIP"; then
24930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
24931$as_echo "$STRIP" >&6; }
24932else
24933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24934$as_echo "no" >&6; }
24935fi
24936
24937
24938
24939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24940
24941  # First separate the path from the arguments. This will split at the first
24942  # space.
24943  complete="$STRIP"
24944  path="${complete%% *}"
24945  tmp="$complete EOL"
24946  arguments="${tmp#* }"
24947
24948  # Input might be given as Windows format, start by converting to
24949  # unix format.
24950  new_path=`$CYGPATH -u "$path"`
24951
24952  # Now try to locate executable using which
24953  new_path=`$WHICH "$new_path" 2> /dev/null`
24954  # bat and cmd files are not always considered executable in cygwin causing which
24955  # to not find them
24956  if test "x$new_path" = x \
24957           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24958           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24959    new_path=`$CYGPATH -u "$path"`
24960  fi
24961  if test "x$new_path" = x; then
24962    # Oops. Which didn't find the executable.
24963    # The splitting of arguments from the executable at a space might have been incorrect,
24964    # since paths with space are more likely in Windows. Give it another try with the whole
24965    # argument.
24966    path="$complete"
24967    arguments="EOL"
24968    new_path=`$CYGPATH -u "$path"`
24969    new_path=`$WHICH "$new_path" 2> /dev/null`
24970    # bat and cmd files are not always considered executable in cygwin causing which
24971    # to not find them
24972    if test "x$new_path" = x \
24973             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24974             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24975      new_path=`$CYGPATH -u "$path"`
24976    fi
24977    if test "x$new_path" = x; then
24978      # It's still not found. Now this is an unrecoverable error.
24979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
24980$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
24981      has_space=`$ECHO "$complete" | $GREP " "`
24982      if test "x$has_space" != x; then
24983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24985      fi
24986      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
24987    fi
24988  fi
24989
24990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24993  # "foo.exe" is OK but "foo" is an error.
24994  #
24995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24996  # It is also a way to make sure we got the proper file name for the real test later on.
24997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24998  if test "x$test_shortpath" = x; then
24999    # Short path failed, file does not exist as specified.
25000    # Try adding .exe or .cmd
25001    if test -f "${new_path}.exe"; then
25002       input_to_shortpath="${new_path}.exe"
25003    elif test -f "${new_path}.cmd"; then
25004       input_to_shortpath="${new_path}.cmd"
25005    else
25006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
25007$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
25008      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25009$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25010      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25011    fi
25012  else
25013    input_to_shortpath="$new_path"
25014  fi
25015
25016  # Call helper function which possibly converts this using DOS-style short mode.
25017  # If so, the updated path is stored in $new_path.
25018  new_path="$input_to_shortpath"
25019
25020  input_path="$input_to_shortpath"
25021  # Check if we need to convert this using DOS-style short mode. If the path
25022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25023  # take no chances and rewrite it.
25024  # Note: m4 eats our [], so we need to use [ and ] instead.
25025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25026  if test "x$has_forbidden_chars" != x; then
25027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25028    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25031      # Going to short mode and back again did indeed matter. Since short mode is
25032      # case insensitive, let's make it lowercase to improve readability.
25033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25034      # Now convert it back to Unix-stile (cygpath)
25035      input_path=`$CYGPATH -u "$shortmode_path"`
25036      new_path="$input_path"
25037    fi
25038  fi
25039
25040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25041  if test "x$test_cygdrive_prefix" = x; then
25042    # As a simple fix, exclude /usr/bin since it's not a real path.
25043    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25045      # a path prefixed by /cygdrive for fixpath to work.
25046      new_path="$CYGWIN_ROOT_PATH$input_path"
25047    fi
25048  fi
25049
25050  # remove trailing .exe if any
25051  new_path="${new_path/%.exe/}"
25052
25053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25054
25055  # First separate the path from the arguments. This will split at the first
25056  # space.
25057  complete="$STRIP"
25058  path="${complete%% *}"
25059  tmp="$complete EOL"
25060  arguments="${tmp#* }"
25061
25062  # Input might be given as Windows format, start by converting to
25063  # unix format.
25064  new_path="$path"
25065
25066  windows_path="$new_path"
25067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25068    unix_path=`$CYGPATH -u "$windows_path"`
25069    new_path="$unix_path"
25070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25071    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25072    new_path="$unix_path"
25073  fi
25074
25075
25076  # Now try to locate executable using which
25077  new_path=`$WHICH "$new_path" 2> /dev/null`
25078
25079  if test "x$new_path" = x; then
25080    # Oops. Which didn't find the executable.
25081    # The splitting of arguments from the executable at a space might have been incorrect,
25082    # since paths with space are more likely in Windows. Give it another try with the whole
25083    # argument.
25084    path="$complete"
25085    arguments="EOL"
25086    new_path="$path"
25087
25088  windows_path="$new_path"
25089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25090    unix_path=`$CYGPATH -u "$windows_path"`
25091    new_path="$unix_path"
25092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25094    new_path="$unix_path"
25095  fi
25096
25097
25098    new_path=`$WHICH "$new_path" 2> /dev/null`
25099
25100    if test "x$new_path" = x; then
25101      # It's still not found. Now this is an unrecoverable error.
25102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25103$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25104      has_space=`$ECHO "$complete" | $GREP " "`
25105      if test "x$has_space" != x; then
25106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25108      fi
25109      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25110    fi
25111  fi
25112
25113  # Now new_path has a complete unix path to the binary
25114  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25115    # Keep paths in /bin as-is, but remove trailing .exe if any
25116    new_path="${new_path/%.exe/}"
25117    # Do not save /bin paths to all_fixpath_prefixes!
25118  else
25119    # Not in mixed or Windows style, start by that.
25120    new_path=`cmd //c echo $new_path`
25121
25122  input_path="$new_path"
25123  # Check if we need to convert this using DOS-style short mode. If the path
25124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25125  # take no chances and rewrite it.
25126  # Note: m4 eats our [], so we need to use [ and ] instead.
25127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25128  if test "x$has_forbidden_chars" != x; then
25129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25130    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25131  fi
25132
25133    # Output is in $new_path
25134
25135  windows_path="$new_path"
25136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25137    unix_path=`$CYGPATH -u "$windows_path"`
25138    new_path="$unix_path"
25139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25141    new_path="$unix_path"
25142  fi
25143
25144    # remove trailing .exe if any
25145    new_path="${new_path/%.exe/}"
25146
25147    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25148    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25149  fi
25150
25151  else
25152    # We're on a posix platform. Hooray! :)
25153    # First separate the path from the arguments. This will split at the first
25154    # space.
25155    complete="$STRIP"
25156    path="${complete%% *}"
25157    tmp="$complete EOL"
25158    arguments="${tmp#* }"
25159
25160    # Cannot rely on the command "which" here since it doesn't always work.
25161    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25162    if test -z "$is_absolute_path"; then
25163      # Path to executable is not absolute. Find it.
25164      IFS_save="$IFS"
25165      IFS=:
25166      for p in $PATH; do
25167        if test -f "$p/$path" && test -x "$p/$path"; then
25168          new_path="$p/$path"
25169          break
25170        fi
25171      done
25172      IFS="$IFS_save"
25173    else
25174      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
25175$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
25176      new_path="$path"
25177    fi
25178
25179    if test "x$new_path" = x; then
25180        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
25181$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
25182        has_space=`$ECHO "$complete" | $GREP " "`
25183        if test "x$has_space" != x; then
25184          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25185$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25186        fi
25187        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
25188      fi
25189  fi
25190
25191      # Now join together the path and the arguments once again
25192      if test "x$arguments" != xEOL; then
25193        new_complete="$new_path ${arguments% *}"
25194      else
25195        new_complete="$new_path"
25196      fi
25197
25198  if test "x$complete" != "x$new_complete"; then
25199      STRIP="$new_complete"
25200      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
25201$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
25202    fi
25203
25204    # Extract the first word of "mcs", so it can be a program name with args.
25205set dummy mcs; ac_word=$2
25206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25207$as_echo_n "checking for $ac_word... " >&6; }
25208if test "${ac_cv_path_MCS+set}" = set; then :
25209  $as_echo_n "(cached) " >&6
25210else
25211  case $MCS in
25212  [\\/]* | ?:[\\/]*)
25213  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
25214  ;;
25215  *)
25216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25217for as_dir in $PATH
25218do
25219  IFS=$as_save_IFS
25220  test -z "$as_dir" && as_dir=.
25221    for ac_exec_ext in '' $ac_executable_extensions; do
25222  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25223    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
25224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25225    break 2
25226  fi
25227done
25228  done
25229IFS=$as_save_IFS
25230
25231  ;;
25232esac
25233fi
25234MCS=$ac_cv_path_MCS
25235if test -n "$MCS"; then
25236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
25237$as_echo "$MCS" >&6; }
25238else
25239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25240$as_echo "no" >&6; }
25241fi
25242
25243
25244
25245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25246
25247  # First separate the path from the arguments. This will split at the first
25248  # space.
25249  complete="$MCS"
25250  path="${complete%% *}"
25251  tmp="$complete EOL"
25252  arguments="${tmp#* }"
25253
25254  # Input might be given as Windows format, start by converting to
25255  # unix format.
25256  new_path=`$CYGPATH -u "$path"`
25257
25258  # Now try to locate executable using which
25259  new_path=`$WHICH "$new_path" 2> /dev/null`
25260  # bat and cmd files are not always considered executable in cygwin causing which
25261  # to not find them
25262  if test "x$new_path" = x \
25263           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25264           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25265    new_path=`$CYGPATH -u "$path"`
25266  fi
25267  if test "x$new_path" = x; then
25268    # Oops. Which didn't find the executable.
25269    # The splitting of arguments from the executable at a space might have been incorrect,
25270    # since paths with space are more likely in Windows. Give it another try with the whole
25271    # argument.
25272    path="$complete"
25273    arguments="EOL"
25274    new_path=`$CYGPATH -u "$path"`
25275    new_path=`$WHICH "$new_path" 2> /dev/null`
25276    # bat and cmd files are not always considered executable in cygwin causing which
25277    # to not find them
25278    if test "x$new_path" = x \
25279             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25280             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25281      new_path=`$CYGPATH -u "$path"`
25282    fi
25283    if test "x$new_path" = x; then
25284      # It's still not found. Now this is an unrecoverable error.
25285      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25286$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25287      has_space=`$ECHO "$complete" | $GREP " "`
25288      if test "x$has_space" != x; then
25289        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25290$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25291      fi
25292      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25293    fi
25294  fi
25295
25296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25299  # "foo.exe" is OK but "foo" is an error.
25300  #
25301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25302  # It is also a way to make sure we got the proper file name for the real test later on.
25303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25304  if test "x$test_shortpath" = x; then
25305    # Short path failed, file does not exist as specified.
25306    # Try adding .exe or .cmd
25307    if test -f "${new_path}.exe"; then
25308       input_to_shortpath="${new_path}.exe"
25309    elif test -f "${new_path}.cmd"; then
25310       input_to_shortpath="${new_path}.cmd"
25311    else
25312      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
25313$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
25314      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25315$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25316      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25317    fi
25318  else
25319    input_to_shortpath="$new_path"
25320  fi
25321
25322  # Call helper function which possibly converts this using DOS-style short mode.
25323  # If so, the updated path is stored in $new_path.
25324  new_path="$input_to_shortpath"
25325
25326  input_path="$input_to_shortpath"
25327  # Check if we need to convert this using DOS-style short mode. If the path
25328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25329  # take no chances and rewrite it.
25330  # Note: m4 eats our [], so we need to use [ and ] instead.
25331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25332  if test "x$has_forbidden_chars" != x; then
25333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25337      # Going to short mode and back again did indeed matter. Since short mode is
25338      # case insensitive, let's make it lowercase to improve readability.
25339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25340      # Now convert it back to Unix-stile (cygpath)
25341      input_path=`$CYGPATH -u "$shortmode_path"`
25342      new_path="$input_path"
25343    fi
25344  fi
25345
25346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25347  if test "x$test_cygdrive_prefix" = x; then
25348    # As a simple fix, exclude /usr/bin since it's not a real path.
25349    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25351      # a path prefixed by /cygdrive for fixpath to work.
25352      new_path="$CYGWIN_ROOT_PATH$input_path"
25353    fi
25354  fi
25355
25356  # remove trailing .exe if any
25357  new_path="${new_path/%.exe/}"
25358
25359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25360
25361  # First separate the path from the arguments. This will split at the first
25362  # space.
25363  complete="$MCS"
25364  path="${complete%% *}"
25365  tmp="$complete EOL"
25366  arguments="${tmp#* }"
25367
25368  # Input might be given as Windows format, start by converting to
25369  # unix format.
25370  new_path="$path"
25371
25372  windows_path="$new_path"
25373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25374    unix_path=`$CYGPATH -u "$windows_path"`
25375    new_path="$unix_path"
25376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25378    new_path="$unix_path"
25379  fi
25380
25381
25382  # Now try to locate executable using which
25383  new_path=`$WHICH "$new_path" 2> /dev/null`
25384
25385  if test "x$new_path" = x; then
25386    # Oops. Which didn't find the executable.
25387    # The splitting of arguments from the executable at a space might have been incorrect,
25388    # since paths with space are more likely in Windows. Give it another try with the whole
25389    # argument.
25390    path="$complete"
25391    arguments="EOL"
25392    new_path="$path"
25393
25394  windows_path="$new_path"
25395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25396    unix_path=`$CYGPATH -u "$windows_path"`
25397    new_path="$unix_path"
25398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25400    new_path="$unix_path"
25401  fi
25402
25403
25404    new_path=`$WHICH "$new_path" 2> /dev/null`
25405
25406    if test "x$new_path" = x; then
25407      # It's still not found. Now this is an unrecoverable error.
25408      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25409$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25410      has_space=`$ECHO "$complete" | $GREP " "`
25411      if test "x$has_space" != x; then
25412        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25413$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25414      fi
25415      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25416    fi
25417  fi
25418
25419  # Now new_path has a complete unix path to the binary
25420  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25421    # Keep paths in /bin as-is, but remove trailing .exe if any
25422    new_path="${new_path/%.exe/}"
25423    # Do not save /bin paths to all_fixpath_prefixes!
25424  else
25425    # Not in mixed or Windows style, start by that.
25426    new_path=`cmd //c echo $new_path`
25427
25428  input_path="$new_path"
25429  # Check if we need to convert this using DOS-style short mode. If the path
25430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25431  # take no chances and rewrite it.
25432  # Note: m4 eats our [], so we need to use [ and ] instead.
25433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25434  if test "x$has_forbidden_chars" != x; then
25435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25437  fi
25438
25439    # Output is in $new_path
25440
25441  windows_path="$new_path"
25442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25443    unix_path=`$CYGPATH -u "$windows_path"`
25444    new_path="$unix_path"
25445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25447    new_path="$unix_path"
25448  fi
25449
25450    # remove trailing .exe if any
25451    new_path="${new_path/%.exe/}"
25452
25453    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25454    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25455  fi
25456
25457  else
25458    # We're on a posix platform. Hooray! :)
25459    # First separate the path from the arguments. This will split at the first
25460    # space.
25461    complete="$MCS"
25462    path="${complete%% *}"
25463    tmp="$complete EOL"
25464    arguments="${tmp#* }"
25465
25466    # Cannot rely on the command "which" here since it doesn't always work.
25467    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25468    if test -z "$is_absolute_path"; then
25469      # Path to executable is not absolute. Find it.
25470      IFS_save="$IFS"
25471      IFS=:
25472      for p in $PATH; do
25473        if test -f "$p/$path" && test -x "$p/$path"; then
25474          new_path="$p/$path"
25475          break
25476        fi
25477      done
25478      IFS="$IFS_save"
25479    else
25480      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
25481$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
25482      new_path="$path"
25483    fi
25484
25485    if test "x$new_path" = x; then
25486        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
25487$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
25488        has_space=`$ECHO "$complete" | $GREP " "`
25489        if test "x$has_space" != x; then
25490          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25491$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25492        fi
25493        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
25494      fi
25495  fi
25496
25497      # Now join together the path and the arguments once again
25498      if test "x$arguments" != xEOL; then
25499        new_complete="$new_path ${arguments% *}"
25500      else
25501        new_complete="$new_path"
25502      fi
25503
25504  if test "x$complete" != "x$new_complete"; then
25505      MCS="$new_complete"
25506      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
25507$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
25508    fi
25509
25510elif test "x$OPENJDK_TARGET_OS" != xwindows; then
25511    if test -n "$ac_tool_prefix"; then
25512  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
25513set dummy ${ac_tool_prefix}nm; ac_word=$2
25514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25515$as_echo_n "checking for $ac_word... " >&6; }
25516if test "${ac_cv_prog_NM+set}" = set; then :
25517  $as_echo_n "(cached) " >&6
25518else
25519  if test -n "$NM"; then
25520  ac_cv_prog_NM="$NM" # Let the user override the test.
25521else
25522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25523for as_dir in $PATH
25524do
25525  IFS=$as_save_IFS
25526  test -z "$as_dir" && as_dir=.
25527    for ac_exec_ext in '' $ac_executable_extensions; do
25528  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25529    ac_cv_prog_NM="${ac_tool_prefix}nm"
25530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25531    break 2
25532  fi
25533done
25534  done
25535IFS=$as_save_IFS
25536
25537fi
25538fi
25539NM=$ac_cv_prog_NM
25540if test -n "$NM"; then
25541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25542$as_echo "$NM" >&6; }
25543else
25544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25545$as_echo "no" >&6; }
25546fi
25547
25548
25549fi
25550if test -z "$ac_cv_prog_NM"; then
25551  ac_ct_NM=$NM
25552  # Extract the first word of "nm", so it can be a program name with args.
25553set dummy nm; ac_word=$2
25554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25555$as_echo_n "checking for $ac_word... " >&6; }
25556if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
25557  $as_echo_n "(cached) " >&6
25558else
25559  if test -n "$ac_ct_NM"; then
25560  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
25561else
25562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25563for as_dir in $PATH
25564do
25565  IFS=$as_save_IFS
25566  test -z "$as_dir" && as_dir=.
25567    for ac_exec_ext in '' $ac_executable_extensions; do
25568  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25569    ac_cv_prog_ac_ct_NM="nm"
25570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25571    break 2
25572  fi
25573done
25574  done
25575IFS=$as_save_IFS
25576
25577fi
25578fi
25579ac_ct_NM=$ac_cv_prog_ac_ct_NM
25580if test -n "$ac_ct_NM"; then
25581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
25582$as_echo "$ac_ct_NM" >&6; }
25583else
25584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25585$as_echo "no" >&6; }
25586fi
25587
25588  if test "x$ac_ct_NM" = x; then
25589    NM=""
25590  else
25591    case $cross_compiling:$ac_tool_warned in
25592yes:)
25593{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25594$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25595ac_tool_warned=yes ;;
25596esac
25597    NM=$ac_ct_NM
25598  fi
25599else
25600  NM="$ac_cv_prog_NM"
25601fi
25602
25603
25604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25605
25606  # First separate the path from the arguments. This will split at the first
25607  # space.
25608  complete="$NM"
25609  path="${complete%% *}"
25610  tmp="$complete EOL"
25611  arguments="${tmp#* }"
25612
25613  # Input might be given as Windows format, start by converting to
25614  # unix format.
25615  new_path=`$CYGPATH -u "$path"`
25616
25617  # Now try to locate executable using which
25618  new_path=`$WHICH "$new_path" 2> /dev/null`
25619  # bat and cmd files are not always considered executable in cygwin causing which
25620  # to not find them
25621  if test "x$new_path" = x \
25622           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25623           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25624    new_path=`$CYGPATH -u "$path"`
25625  fi
25626  if test "x$new_path" = x; then
25627    # Oops. Which didn't find the executable.
25628    # The splitting of arguments from the executable at a space might have been incorrect,
25629    # since paths with space are more likely in Windows. Give it another try with the whole
25630    # argument.
25631    path="$complete"
25632    arguments="EOL"
25633    new_path=`$CYGPATH -u "$path"`
25634    new_path=`$WHICH "$new_path" 2> /dev/null`
25635    # bat and cmd files are not always considered executable in cygwin causing which
25636    # to not find them
25637    if test "x$new_path" = x \
25638             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25639             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25640      new_path=`$CYGPATH -u "$path"`
25641    fi
25642    if test "x$new_path" = x; then
25643      # It's still not found. Now this is an unrecoverable error.
25644      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25645$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25646      has_space=`$ECHO "$complete" | $GREP " "`
25647      if test "x$has_space" != x; then
25648        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25649$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25650      fi
25651      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25652    fi
25653  fi
25654
25655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25658  # "foo.exe" is OK but "foo" is an error.
25659  #
25660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25661  # It is also a way to make sure we got the proper file name for the real test later on.
25662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25663  if test "x$test_shortpath" = x; then
25664    # Short path failed, file does not exist as specified.
25665    # Try adding .exe or .cmd
25666    if test -f "${new_path}.exe"; then
25667       input_to_shortpath="${new_path}.exe"
25668    elif test -f "${new_path}.cmd"; then
25669       input_to_shortpath="${new_path}.cmd"
25670    else
25671      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25672$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25673      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25674$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25675      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25676    fi
25677  else
25678    input_to_shortpath="$new_path"
25679  fi
25680
25681  # Call helper function which possibly converts this using DOS-style short mode.
25682  # If so, the updated path is stored in $new_path.
25683  new_path="$input_to_shortpath"
25684
25685  input_path="$input_to_shortpath"
25686  # Check if we need to convert this using DOS-style short mode. If the path
25687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25688  # take no chances and rewrite it.
25689  # Note: m4 eats our [], so we need to use [ and ] instead.
25690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25691  if test "x$has_forbidden_chars" != x; then
25692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25696      # Going to short mode and back again did indeed matter. Since short mode is
25697      # case insensitive, let's make it lowercase to improve readability.
25698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25699      # Now convert it back to Unix-stile (cygpath)
25700      input_path=`$CYGPATH -u "$shortmode_path"`
25701      new_path="$input_path"
25702    fi
25703  fi
25704
25705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25706  if test "x$test_cygdrive_prefix" = x; then
25707    # As a simple fix, exclude /usr/bin since it's not a real path.
25708    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25710      # a path prefixed by /cygdrive for fixpath to work.
25711      new_path="$CYGWIN_ROOT_PATH$input_path"
25712    fi
25713  fi
25714
25715  # remove trailing .exe if any
25716  new_path="${new_path/%.exe/}"
25717
25718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25719
25720  # First separate the path from the arguments. This will split at the first
25721  # space.
25722  complete="$NM"
25723  path="${complete%% *}"
25724  tmp="$complete EOL"
25725  arguments="${tmp#* }"
25726
25727  # Input might be given as Windows format, start by converting to
25728  # unix format.
25729  new_path="$path"
25730
25731  windows_path="$new_path"
25732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25733    unix_path=`$CYGPATH -u "$windows_path"`
25734    new_path="$unix_path"
25735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25737    new_path="$unix_path"
25738  fi
25739
25740
25741  # Now try to locate executable using which
25742  new_path=`$WHICH "$new_path" 2> /dev/null`
25743
25744  if test "x$new_path" = x; then
25745    # Oops. Which didn't find the executable.
25746    # The splitting of arguments from the executable at a space might have been incorrect,
25747    # since paths with space are more likely in Windows. Give it another try with the whole
25748    # argument.
25749    path="$complete"
25750    arguments="EOL"
25751    new_path="$path"
25752
25753  windows_path="$new_path"
25754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25755    unix_path=`$CYGPATH -u "$windows_path"`
25756    new_path="$unix_path"
25757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25759    new_path="$unix_path"
25760  fi
25761
25762
25763    new_path=`$WHICH "$new_path" 2> /dev/null`
25764
25765    if test "x$new_path" = x; then
25766      # It's still not found. Now this is an unrecoverable error.
25767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25768$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25769      has_space=`$ECHO "$complete" | $GREP " "`
25770      if test "x$has_space" != x; then
25771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25773      fi
25774      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25775    fi
25776  fi
25777
25778  # Now new_path has a complete unix path to the binary
25779  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25780    # Keep paths in /bin as-is, but remove trailing .exe if any
25781    new_path="${new_path/%.exe/}"
25782    # Do not save /bin paths to all_fixpath_prefixes!
25783  else
25784    # Not in mixed or Windows style, start by that.
25785    new_path=`cmd //c echo $new_path`
25786
25787  input_path="$new_path"
25788  # Check if we need to convert this using DOS-style short mode. If the path
25789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25790  # take no chances and rewrite it.
25791  # Note: m4 eats our [], so we need to use [ and ] instead.
25792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25793  if test "x$has_forbidden_chars" != x; then
25794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25795    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25796  fi
25797
25798    # Output is in $new_path
25799
25800  windows_path="$new_path"
25801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25802    unix_path=`$CYGPATH -u "$windows_path"`
25803    new_path="$unix_path"
25804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25806    new_path="$unix_path"
25807  fi
25808
25809    # remove trailing .exe if any
25810    new_path="${new_path/%.exe/}"
25811
25812    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25813    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25814  fi
25815
25816  else
25817    # We're on a posix platform. Hooray! :)
25818    # First separate the path from the arguments. This will split at the first
25819    # space.
25820    complete="$NM"
25821    path="${complete%% *}"
25822    tmp="$complete EOL"
25823    arguments="${tmp#* }"
25824
25825    # Cannot rely on the command "which" here since it doesn't always work.
25826    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25827    if test -z "$is_absolute_path"; then
25828      # Path to executable is not absolute. Find it.
25829      IFS_save="$IFS"
25830      IFS=:
25831      for p in $PATH; do
25832        if test -f "$p/$path" && test -x "$p/$path"; then
25833          new_path="$p/$path"
25834          break
25835        fi
25836      done
25837      IFS="$IFS_save"
25838    else
25839      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25840$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25841      new_path="$path"
25842    fi
25843
25844    if test "x$new_path" = x; then
25845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25846$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25847        has_space=`$ECHO "$complete" | $GREP " "`
25848        if test "x$has_space" != x; then
25849          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25850$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25851        fi
25852        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25853      fi
25854  fi
25855
25856      # Now join together the path and the arguments once again
25857      if test "x$arguments" != xEOL; then
25858        new_complete="$new_path ${arguments% *}"
25859      else
25860        new_complete="$new_path"
25861      fi
25862
25863  if test "x$complete" != "x$new_complete"; then
25864      NM="$new_complete"
25865      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25866$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25867    fi
25868
25869    if test -n "$ac_tool_prefix"; then
25870  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
25871set dummy ${ac_tool_prefix}strip; ac_word=$2
25872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25873$as_echo_n "checking for $ac_word... " >&6; }
25874if test "${ac_cv_prog_STRIP+set}" = set; then :
25875  $as_echo_n "(cached) " >&6
25876else
25877  if test -n "$STRIP"; then
25878  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
25879else
25880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25881for as_dir in $PATH
25882do
25883  IFS=$as_save_IFS
25884  test -z "$as_dir" && as_dir=.
25885    for ac_exec_ext in '' $ac_executable_extensions; do
25886  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25887    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
25888    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25889    break 2
25890  fi
25891done
25892  done
25893IFS=$as_save_IFS
25894
25895fi
25896fi
25897STRIP=$ac_cv_prog_STRIP
25898if test -n "$STRIP"; then
25899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
25900$as_echo "$STRIP" >&6; }
25901else
25902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25903$as_echo "no" >&6; }
25904fi
25905
25906
25907fi
25908if test -z "$ac_cv_prog_STRIP"; then
25909  ac_ct_STRIP=$STRIP
25910  # Extract the first word of "strip", so it can be a program name with args.
25911set dummy strip; ac_word=$2
25912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25913$as_echo_n "checking for $ac_word... " >&6; }
25914if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
25915  $as_echo_n "(cached) " >&6
25916else
25917  if test -n "$ac_ct_STRIP"; then
25918  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
25919else
25920as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25921for as_dir in $PATH
25922do
25923  IFS=$as_save_IFS
25924  test -z "$as_dir" && as_dir=.
25925    for ac_exec_ext in '' $ac_executable_extensions; do
25926  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25927    ac_cv_prog_ac_ct_STRIP="strip"
25928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25929    break 2
25930  fi
25931done
25932  done
25933IFS=$as_save_IFS
25934
25935fi
25936fi
25937ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
25938if test -n "$ac_ct_STRIP"; then
25939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
25940$as_echo "$ac_ct_STRIP" >&6; }
25941else
25942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25943$as_echo "no" >&6; }
25944fi
25945
25946  if test "x$ac_ct_STRIP" = x; then
25947    STRIP=""
25948  else
25949    case $cross_compiling:$ac_tool_warned in
25950yes:)
25951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
25952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
25953ac_tool_warned=yes ;;
25954esac
25955    STRIP=$ac_ct_STRIP
25956  fi
25957else
25958  STRIP="$ac_cv_prog_STRIP"
25959fi
25960
25961
25962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25963
25964  # First separate the path from the arguments. This will split at the first
25965  # space.
25966  complete="$STRIP"
25967  path="${complete%% *}"
25968  tmp="$complete EOL"
25969  arguments="${tmp#* }"
25970
25971  # Input might be given as Windows format, start by converting to
25972  # unix format.
25973  new_path=`$CYGPATH -u "$path"`
25974
25975  # Now try to locate executable using which
25976  new_path=`$WHICH "$new_path" 2> /dev/null`
25977  # bat and cmd files are not always considered executable in cygwin causing which
25978  # to not find them
25979  if test "x$new_path" = x \
25980           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25981           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25982    new_path=`$CYGPATH -u "$path"`
25983  fi
25984  if test "x$new_path" = x; then
25985    # Oops. Which didn't find the executable.
25986    # The splitting of arguments from the executable at a space might have been incorrect,
25987    # since paths with space are more likely in Windows. Give it another try with the whole
25988    # argument.
25989    path="$complete"
25990    arguments="EOL"
25991    new_path=`$CYGPATH -u "$path"`
25992    new_path=`$WHICH "$new_path" 2> /dev/null`
25993    # bat and cmd files are not always considered executable in cygwin causing which
25994    # to not find them
25995    if test "x$new_path" = x \
25996             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25997             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25998      new_path=`$CYGPATH -u "$path"`
25999    fi
26000    if test "x$new_path" = x; then
26001      # It's still not found. Now this is an unrecoverable error.
26002      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26003$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26004      has_space=`$ECHO "$complete" | $GREP " "`
26005      if test "x$has_space" != x; then
26006        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26007$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26008      fi
26009      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26010    fi
26011  fi
26012
26013  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26014  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26015  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26016  # "foo.exe" is OK but "foo" is an error.
26017  #
26018  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26019  # It is also a way to make sure we got the proper file name for the real test later on.
26020  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26021  if test "x$test_shortpath" = x; then
26022    # Short path failed, file does not exist as specified.
26023    # Try adding .exe or .cmd
26024    if test -f "${new_path}.exe"; then
26025       input_to_shortpath="${new_path}.exe"
26026    elif test -f "${new_path}.cmd"; then
26027       input_to_shortpath="${new_path}.cmd"
26028    else
26029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26030$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26031      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26032$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26033      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26034    fi
26035  else
26036    input_to_shortpath="$new_path"
26037  fi
26038
26039  # Call helper function which possibly converts this using DOS-style short mode.
26040  # If so, the updated path is stored in $new_path.
26041  new_path="$input_to_shortpath"
26042
26043  input_path="$input_to_shortpath"
26044  # Check if we need to convert this using DOS-style short mode. If the path
26045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26046  # take no chances and rewrite it.
26047  # Note: m4 eats our [], so we need to use [ and ] instead.
26048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26049  if test "x$has_forbidden_chars" != x; then
26050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26054      # Going to short mode and back again did indeed matter. Since short mode is
26055      # case insensitive, let's make it lowercase to improve readability.
26056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26057      # Now convert it back to Unix-stile (cygpath)
26058      input_path=`$CYGPATH -u "$shortmode_path"`
26059      new_path="$input_path"
26060    fi
26061  fi
26062
26063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26064  if test "x$test_cygdrive_prefix" = x; then
26065    # As a simple fix, exclude /usr/bin since it's not a real path.
26066    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26068      # a path prefixed by /cygdrive for fixpath to work.
26069      new_path="$CYGWIN_ROOT_PATH$input_path"
26070    fi
26071  fi
26072
26073  # remove trailing .exe if any
26074  new_path="${new_path/%.exe/}"
26075
26076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26077
26078  # First separate the path from the arguments. This will split at the first
26079  # space.
26080  complete="$STRIP"
26081  path="${complete%% *}"
26082  tmp="$complete EOL"
26083  arguments="${tmp#* }"
26084
26085  # Input might be given as Windows format, start by converting to
26086  # unix format.
26087  new_path="$path"
26088
26089  windows_path="$new_path"
26090  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26091    unix_path=`$CYGPATH -u "$windows_path"`
26092    new_path="$unix_path"
26093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26094    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26095    new_path="$unix_path"
26096  fi
26097
26098
26099  # Now try to locate executable using which
26100  new_path=`$WHICH "$new_path" 2> /dev/null`
26101
26102  if test "x$new_path" = x; then
26103    # Oops. Which didn't find the executable.
26104    # The splitting of arguments from the executable at a space might have been incorrect,
26105    # since paths with space are more likely in Windows. Give it another try with the whole
26106    # argument.
26107    path="$complete"
26108    arguments="EOL"
26109    new_path="$path"
26110
26111  windows_path="$new_path"
26112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26113    unix_path=`$CYGPATH -u "$windows_path"`
26114    new_path="$unix_path"
26115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26117    new_path="$unix_path"
26118  fi
26119
26120
26121    new_path=`$WHICH "$new_path" 2> /dev/null`
26122
26123    if test "x$new_path" = x; then
26124      # It's still not found. Now this is an unrecoverable error.
26125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26126$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26127      has_space=`$ECHO "$complete" | $GREP " "`
26128      if test "x$has_space" != x; then
26129        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26130$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26131      fi
26132      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26133    fi
26134  fi
26135
26136  # Now new_path has a complete unix path to the binary
26137  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26138    # Keep paths in /bin as-is, but remove trailing .exe if any
26139    new_path="${new_path/%.exe/}"
26140    # Do not save /bin paths to all_fixpath_prefixes!
26141  else
26142    # Not in mixed or Windows style, start by that.
26143    new_path=`cmd //c echo $new_path`
26144
26145  input_path="$new_path"
26146  # Check if we need to convert this using DOS-style short mode. If the path
26147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26148  # take no chances and rewrite it.
26149  # Note: m4 eats our [], so we need to use [ and ] instead.
26150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26151  if test "x$has_forbidden_chars" != x; then
26152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26154  fi
26155
26156    # Output is in $new_path
26157
26158  windows_path="$new_path"
26159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26160    unix_path=`$CYGPATH -u "$windows_path"`
26161    new_path="$unix_path"
26162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26164    new_path="$unix_path"
26165  fi
26166
26167    # remove trailing .exe if any
26168    new_path="${new_path/%.exe/}"
26169
26170    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26171    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26172  fi
26173
26174  else
26175    # We're on a posix platform. Hooray! :)
26176    # First separate the path from the arguments. This will split at the first
26177    # space.
26178    complete="$STRIP"
26179    path="${complete%% *}"
26180    tmp="$complete EOL"
26181    arguments="${tmp#* }"
26182
26183    # Cannot rely on the command "which" here since it doesn't always work.
26184    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26185    if test -z "$is_absolute_path"; then
26186      # Path to executable is not absolute. Find it.
26187      IFS_save="$IFS"
26188      IFS=:
26189      for p in $PATH; do
26190        if test -f "$p/$path" && test -x "$p/$path"; then
26191          new_path="$p/$path"
26192          break
26193        fi
26194      done
26195      IFS="$IFS_save"
26196    else
26197      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26198$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26199      new_path="$path"
26200    fi
26201
26202    if test "x$new_path" = x; then
26203        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26204$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26205        has_space=`$ECHO "$complete" | $GREP " "`
26206        if test "x$has_space" != x; then
26207          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26208$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26209        fi
26210        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26211      fi
26212  fi
26213
26214      # Now join together the path and the arguments once again
26215      if test "x$arguments" != xEOL; then
26216        new_complete="$new_path ${arguments% *}"
26217      else
26218        new_complete="$new_path"
26219      fi
26220
26221  if test "x$complete" != "x$new_complete"; then
26222      STRIP="$new_complete"
26223      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26224$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26225    fi
26226
26227fi
26228
26229# objcopy is used for moving debug symbols to separate files when
26230# full debug symbols are enabled.
26231if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
26232    if test -n "$ac_tool_prefix"; then
26233  for ac_prog in gobjcopy objcopy
26234  do
26235    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26236set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26238$as_echo_n "checking for $ac_word... " >&6; }
26239if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
26240  $as_echo_n "(cached) " >&6
26241else
26242  if test -n "$OBJCOPY"; then
26243  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
26244else
26245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26246for as_dir in $PATH
26247do
26248  IFS=$as_save_IFS
26249  test -z "$as_dir" && as_dir=.
26250    for ac_exec_ext in '' $ac_executable_extensions; do
26251  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26252    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
26253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26254    break 2
26255  fi
26256done
26257  done
26258IFS=$as_save_IFS
26259
26260fi
26261fi
26262OBJCOPY=$ac_cv_prog_OBJCOPY
26263if test -n "$OBJCOPY"; then
26264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
26265$as_echo "$OBJCOPY" >&6; }
26266else
26267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26268$as_echo "no" >&6; }
26269fi
26270
26271
26272    test -n "$OBJCOPY" && break
26273  done
26274fi
26275if test -z "$OBJCOPY"; then
26276  ac_ct_OBJCOPY=$OBJCOPY
26277  for ac_prog in gobjcopy objcopy
26278do
26279  # Extract the first word of "$ac_prog", so it can be a program name with args.
26280set dummy $ac_prog; ac_word=$2
26281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26282$as_echo_n "checking for $ac_word... " >&6; }
26283if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
26284  $as_echo_n "(cached) " >&6
26285else
26286  if test -n "$ac_ct_OBJCOPY"; then
26287  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
26288else
26289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26290for as_dir in $PATH
26291do
26292  IFS=$as_save_IFS
26293  test -z "$as_dir" && as_dir=.
26294    for ac_exec_ext in '' $ac_executable_extensions; do
26295  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26296    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
26297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26298    break 2
26299  fi
26300done
26301  done
26302IFS=$as_save_IFS
26303
26304fi
26305fi
26306ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
26307if test -n "$ac_ct_OBJCOPY"; then
26308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
26309$as_echo "$ac_ct_OBJCOPY" >&6; }
26310else
26311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26312$as_echo "no" >&6; }
26313fi
26314
26315
26316  test -n "$ac_ct_OBJCOPY" && break
26317done
26318
26319  if test "x$ac_ct_OBJCOPY" = x; then
26320    OBJCOPY=""
26321  else
26322    case $cross_compiling:$ac_tool_warned in
26323yes:)
26324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26326ac_tool_warned=yes ;;
26327esac
26328    OBJCOPY=$ac_ct_OBJCOPY
26329  fi
26330fi
26331
26332    # Only call fixup if objcopy was found.
26333    if test -n "$OBJCOPY"; then
26334
26335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26336
26337  # First separate the path from the arguments. This will split at the first
26338  # space.
26339  complete="$OBJCOPY"
26340  path="${complete%% *}"
26341  tmp="$complete EOL"
26342  arguments="${tmp#* }"
26343
26344  # Input might be given as Windows format, start by converting to
26345  # unix format.
26346  new_path=`$CYGPATH -u "$path"`
26347
26348  # Now try to locate executable using which
26349  new_path=`$WHICH "$new_path" 2> /dev/null`
26350  # bat and cmd files are not always considered executable in cygwin causing which
26351  # to not find them
26352  if test "x$new_path" = x \
26353           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26354           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26355    new_path=`$CYGPATH -u "$path"`
26356  fi
26357  if test "x$new_path" = x; then
26358    # Oops. Which didn't find the executable.
26359    # The splitting of arguments from the executable at a space might have been incorrect,
26360    # since paths with space are more likely in Windows. Give it another try with the whole
26361    # argument.
26362    path="$complete"
26363    arguments="EOL"
26364    new_path=`$CYGPATH -u "$path"`
26365    new_path=`$WHICH "$new_path" 2> /dev/null`
26366    # bat and cmd files are not always considered executable in cygwin causing which
26367    # to not find them
26368    if test "x$new_path" = x \
26369             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26370             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26371      new_path=`$CYGPATH -u "$path"`
26372    fi
26373    if test "x$new_path" = x; then
26374      # It's still not found. Now this is an unrecoverable error.
26375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26376$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26377      has_space=`$ECHO "$complete" | $GREP " "`
26378      if test "x$has_space" != x; then
26379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26381      fi
26382      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26383    fi
26384  fi
26385
26386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26389  # "foo.exe" is OK but "foo" is an error.
26390  #
26391  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26392  # It is also a way to make sure we got the proper file name for the real test later on.
26393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26394  if test "x$test_shortpath" = x; then
26395    # Short path failed, file does not exist as specified.
26396    # Try adding .exe or .cmd
26397    if test -f "${new_path}.exe"; then
26398       input_to_shortpath="${new_path}.exe"
26399    elif test -f "${new_path}.cmd"; then
26400       input_to_shortpath="${new_path}.cmd"
26401    else
26402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
26403$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
26404      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26405$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26406      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26407    fi
26408  else
26409    input_to_shortpath="$new_path"
26410  fi
26411
26412  # Call helper function which possibly converts this using DOS-style short mode.
26413  # If so, the updated path is stored in $new_path.
26414  new_path="$input_to_shortpath"
26415
26416  input_path="$input_to_shortpath"
26417  # Check if we need to convert this using DOS-style short mode. If the path
26418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26419  # take no chances and rewrite it.
26420  # Note: m4 eats our [], so we need to use [ and ] instead.
26421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26422  if test "x$has_forbidden_chars" != x; then
26423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26427      # Going to short mode and back again did indeed matter. Since short mode is
26428      # case insensitive, let's make it lowercase to improve readability.
26429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26430      # Now convert it back to Unix-stile (cygpath)
26431      input_path=`$CYGPATH -u "$shortmode_path"`
26432      new_path="$input_path"
26433    fi
26434  fi
26435
26436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26437  if test "x$test_cygdrive_prefix" = x; then
26438    # As a simple fix, exclude /usr/bin since it's not a real path.
26439    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26441      # a path prefixed by /cygdrive for fixpath to work.
26442      new_path="$CYGWIN_ROOT_PATH$input_path"
26443    fi
26444  fi
26445
26446  # remove trailing .exe if any
26447  new_path="${new_path/%.exe/}"
26448
26449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26450
26451  # First separate the path from the arguments. This will split at the first
26452  # space.
26453  complete="$OBJCOPY"
26454  path="${complete%% *}"
26455  tmp="$complete EOL"
26456  arguments="${tmp#* }"
26457
26458  # Input might be given as Windows format, start by converting to
26459  # unix format.
26460  new_path="$path"
26461
26462  windows_path="$new_path"
26463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26464    unix_path=`$CYGPATH -u "$windows_path"`
26465    new_path="$unix_path"
26466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26468    new_path="$unix_path"
26469  fi
26470
26471
26472  # Now try to locate executable using which
26473  new_path=`$WHICH "$new_path" 2> /dev/null`
26474
26475  if test "x$new_path" = x; then
26476    # Oops. Which didn't find the executable.
26477    # The splitting of arguments from the executable at a space might have been incorrect,
26478    # since paths with space are more likely in Windows. Give it another try with the whole
26479    # argument.
26480    path="$complete"
26481    arguments="EOL"
26482    new_path="$path"
26483
26484  windows_path="$new_path"
26485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26486    unix_path=`$CYGPATH -u "$windows_path"`
26487    new_path="$unix_path"
26488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26490    new_path="$unix_path"
26491  fi
26492
26493
26494    new_path=`$WHICH "$new_path" 2> /dev/null`
26495
26496    if test "x$new_path" = x; then
26497      # It's still not found. Now this is an unrecoverable error.
26498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26499$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26500      has_space=`$ECHO "$complete" | $GREP " "`
26501      if test "x$has_space" != x; then
26502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26504      fi
26505      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26506    fi
26507  fi
26508
26509  # Now new_path has a complete unix path to the binary
26510  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26511    # Keep paths in /bin as-is, but remove trailing .exe if any
26512    new_path="${new_path/%.exe/}"
26513    # Do not save /bin paths to all_fixpath_prefixes!
26514  else
26515    # Not in mixed or Windows style, start by that.
26516    new_path=`cmd //c echo $new_path`
26517
26518  input_path="$new_path"
26519  # Check if we need to convert this using DOS-style short mode. If the path
26520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26521  # take no chances and rewrite it.
26522  # Note: m4 eats our [], so we need to use [ and ] instead.
26523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26524  if test "x$has_forbidden_chars" != x; then
26525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26527  fi
26528
26529    # Output is in $new_path
26530
26531  windows_path="$new_path"
26532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26533    unix_path=`$CYGPATH -u "$windows_path"`
26534    new_path="$unix_path"
26535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26537    new_path="$unix_path"
26538  fi
26539
26540    # remove trailing .exe if any
26541    new_path="${new_path/%.exe/}"
26542
26543    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26544    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26545  fi
26546
26547  else
26548    # We're on a posix platform. Hooray! :)
26549    # First separate the path from the arguments. This will split at the first
26550    # space.
26551    complete="$OBJCOPY"
26552    path="${complete%% *}"
26553    tmp="$complete EOL"
26554    arguments="${tmp#* }"
26555
26556    # Cannot rely on the command "which" here since it doesn't always work.
26557    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26558    if test -z "$is_absolute_path"; then
26559      # Path to executable is not absolute. Find it.
26560      IFS_save="$IFS"
26561      IFS=:
26562      for p in $PATH; do
26563        if test -f "$p/$path" && test -x "$p/$path"; then
26564          new_path="$p/$path"
26565          break
26566        fi
26567      done
26568      IFS="$IFS_save"
26569    else
26570      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
26571$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
26572      new_path="$path"
26573    fi
26574
26575    if test "x$new_path" = x; then
26576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
26577$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
26578        has_space=`$ECHO "$complete" | $GREP " "`
26579        if test "x$has_space" != x; then
26580          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26581$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26582        fi
26583        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
26584      fi
26585  fi
26586
26587      # Now join together the path and the arguments once again
26588      if test "x$arguments" != xEOL; then
26589        new_complete="$new_path ${arguments% *}"
26590      else
26591        new_complete="$new_path"
26592      fi
26593
26594  if test "x$complete" != "x$new_complete"; then
26595      OBJCOPY="$new_complete"
26596      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
26597$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
26598    fi
26599
26600    fi
26601fi
26602
26603if test -n "$ac_tool_prefix"; then
26604  for ac_prog in gobjdump objdump
26605  do
26606    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
26607set dummy $ac_tool_prefix$ac_prog; ac_word=$2
26608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26609$as_echo_n "checking for $ac_word... " >&6; }
26610if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
26611  $as_echo_n "(cached) " >&6
26612else
26613  if test -n "$OBJDUMP"; then
26614  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
26615else
26616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26617for as_dir in $PATH
26618do
26619  IFS=$as_save_IFS
26620  test -z "$as_dir" && as_dir=.
26621    for ac_exec_ext in '' $ac_executable_extensions; do
26622  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26623    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
26624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26625    break 2
26626  fi
26627done
26628  done
26629IFS=$as_save_IFS
26630
26631fi
26632fi
26633OBJDUMP=$ac_cv_prog_OBJDUMP
26634if test -n "$OBJDUMP"; then
26635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
26636$as_echo "$OBJDUMP" >&6; }
26637else
26638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26639$as_echo "no" >&6; }
26640fi
26641
26642
26643    test -n "$OBJDUMP" && break
26644  done
26645fi
26646if test -z "$OBJDUMP"; then
26647  ac_ct_OBJDUMP=$OBJDUMP
26648  for ac_prog in gobjdump objdump
26649do
26650  # Extract the first word of "$ac_prog", so it can be a program name with args.
26651set dummy $ac_prog; ac_word=$2
26652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26653$as_echo_n "checking for $ac_word... " >&6; }
26654if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
26655  $as_echo_n "(cached) " >&6
26656else
26657  if test -n "$ac_ct_OBJDUMP"; then
26658  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
26659else
26660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26661for as_dir in $PATH
26662do
26663  IFS=$as_save_IFS
26664  test -z "$as_dir" && as_dir=.
26665    for ac_exec_ext in '' $ac_executable_extensions; do
26666  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26667    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
26668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26669    break 2
26670  fi
26671done
26672  done
26673IFS=$as_save_IFS
26674
26675fi
26676fi
26677ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
26678if test -n "$ac_ct_OBJDUMP"; then
26679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
26680$as_echo "$ac_ct_OBJDUMP" >&6; }
26681else
26682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26683$as_echo "no" >&6; }
26684fi
26685
26686
26687  test -n "$ac_ct_OBJDUMP" && break
26688done
26689
26690  if test "x$ac_ct_OBJDUMP" = x; then
26691    OBJDUMP=""
26692  else
26693    case $cross_compiling:$ac_tool_warned in
26694yes:)
26695{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26696$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26697ac_tool_warned=yes ;;
26698esac
26699    OBJDUMP=$ac_ct_OBJDUMP
26700  fi
26701fi
26702
26703if test "x$OBJDUMP" != x; then
26704  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
26705
26706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26707
26708  # First separate the path from the arguments. This will split at the first
26709  # space.
26710  complete="$OBJDUMP"
26711  path="${complete%% *}"
26712  tmp="$complete EOL"
26713  arguments="${tmp#* }"
26714
26715  # Input might be given as Windows format, start by converting to
26716  # unix format.
26717  new_path=`$CYGPATH -u "$path"`
26718
26719  # Now try to locate executable using which
26720  new_path=`$WHICH "$new_path" 2> /dev/null`
26721  # bat and cmd files are not always considered executable in cygwin causing which
26722  # to not find them
26723  if test "x$new_path" = x \
26724           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26725           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26726    new_path=`$CYGPATH -u "$path"`
26727  fi
26728  if test "x$new_path" = x; then
26729    # Oops. Which didn't find the executable.
26730    # The splitting of arguments from the executable at a space might have been incorrect,
26731    # since paths with space are more likely in Windows. Give it another try with the whole
26732    # argument.
26733    path="$complete"
26734    arguments="EOL"
26735    new_path=`$CYGPATH -u "$path"`
26736    new_path=`$WHICH "$new_path" 2> /dev/null`
26737    # bat and cmd files are not always considered executable in cygwin causing which
26738    # to not find them
26739    if test "x$new_path" = x \
26740             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26741             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26742      new_path=`$CYGPATH -u "$path"`
26743    fi
26744    if test "x$new_path" = x; then
26745      # It's still not found. Now this is an unrecoverable error.
26746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26747$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26748      has_space=`$ECHO "$complete" | $GREP " "`
26749      if test "x$has_space" != x; then
26750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26752      fi
26753      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26754    fi
26755  fi
26756
26757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26760  # "foo.exe" is OK but "foo" is an error.
26761  #
26762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26763  # It is also a way to make sure we got the proper file name for the real test later on.
26764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26765  if test "x$test_shortpath" = x; then
26766    # Short path failed, file does not exist as specified.
26767    # Try adding .exe or .cmd
26768    if test -f "${new_path}.exe"; then
26769       input_to_shortpath="${new_path}.exe"
26770    elif test -f "${new_path}.cmd"; then
26771       input_to_shortpath="${new_path}.cmd"
26772    else
26773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
26774$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
26775      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26776$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26777      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26778    fi
26779  else
26780    input_to_shortpath="$new_path"
26781  fi
26782
26783  # Call helper function which possibly converts this using DOS-style short mode.
26784  # If so, the updated path is stored in $new_path.
26785  new_path="$input_to_shortpath"
26786
26787  input_path="$input_to_shortpath"
26788  # Check if we need to convert this using DOS-style short mode. If the path
26789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26790  # take no chances and rewrite it.
26791  # Note: m4 eats our [], so we need to use [ and ] instead.
26792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26793  if test "x$has_forbidden_chars" != x; then
26794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26798      # Going to short mode and back again did indeed matter. Since short mode is
26799      # case insensitive, let's make it lowercase to improve readability.
26800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26801      # Now convert it back to Unix-stile (cygpath)
26802      input_path=`$CYGPATH -u "$shortmode_path"`
26803      new_path="$input_path"
26804    fi
26805  fi
26806
26807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26808  if test "x$test_cygdrive_prefix" = x; then
26809    # As a simple fix, exclude /usr/bin since it's not a real path.
26810    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26812      # a path prefixed by /cygdrive for fixpath to work.
26813      new_path="$CYGWIN_ROOT_PATH$input_path"
26814    fi
26815  fi
26816
26817  # remove trailing .exe if any
26818  new_path="${new_path/%.exe/}"
26819
26820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26821
26822  # First separate the path from the arguments. This will split at the first
26823  # space.
26824  complete="$OBJDUMP"
26825  path="${complete%% *}"
26826  tmp="$complete EOL"
26827  arguments="${tmp#* }"
26828
26829  # Input might be given as Windows format, start by converting to
26830  # unix format.
26831  new_path="$path"
26832
26833  windows_path="$new_path"
26834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26835    unix_path=`$CYGPATH -u "$windows_path"`
26836    new_path="$unix_path"
26837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26839    new_path="$unix_path"
26840  fi
26841
26842
26843  # Now try to locate executable using which
26844  new_path=`$WHICH "$new_path" 2> /dev/null`
26845
26846  if test "x$new_path" = x; then
26847    # Oops. Which didn't find the executable.
26848    # The splitting of arguments from the executable at a space might have been incorrect,
26849    # since paths with space are more likely in Windows. Give it another try with the whole
26850    # argument.
26851    path="$complete"
26852    arguments="EOL"
26853    new_path="$path"
26854
26855  windows_path="$new_path"
26856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26857    unix_path=`$CYGPATH -u "$windows_path"`
26858    new_path="$unix_path"
26859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26861    new_path="$unix_path"
26862  fi
26863
26864
26865    new_path=`$WHICH "$new_path" 2> /dev/null`
26866
26867    if test "x$new_path" = x; then
26868      # It's still not found. Now this is an unrecoverable error.
26869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26870$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26871      has_space=`$ECHO "$complete" | $GREP " "`
26872      if test "x$has_space" != x; then
26873        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26874$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26875      fi
26876      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26877    fi
26878  fi
26879
26880  # Now new_path has a complete unix path to the binary
26881  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26882    # Keep paths in /bin as-is, but remove trailing .exe if any
26883    new_path="${new_path/%.exe/}"
26884    # Do not save /bin paths to all_fixpath_prefixes!
26885  else
26886    # Not in mixed or Windows style, start by that.
26887    new_path=`cmd //c echo $new_path`
26888
26889  input_path="$new_path"
26890  # Check if we need to convert this using DOS-style short mode. If the path
26891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26892  # take no chances and rewrite it.
26893  # Note: m4 eats our [], so we need to use [ and ] instead.
26894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26895  if test "x$has_forbidden_chars" != x; then
26896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26898  fi
26899
26900    # Output is in $new_path
26901
26902  windows_path="$new_path"
26903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26904    unix_path=`$CYGPATH -u "$windows_path"`
26905    new_path="$unix_path"
26906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26908    new_path="$unix_path"
26909  fi
26910
26911    # remove trailing .exe if any
26912    new_path="${new_path/%.exe/}"
26913
26914    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26915    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26916  fi
26917
26918  else
26919    # We're on a posix platform. Hooray! :)
26920    # First separate the path from the arguments. This will split at the first
26921    # space.
26922    complete="$OBJDUMP"
26923    path="${complete%% *}"
26924    tmp="$complete EOL"
26925    arguments="${tmp#* }"
26926
26927    # Cannot rely on the command "which" here since it doesn't always work.
26928    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26929    if test -z "$is_absolute_path"; then
26930      # Path to executable is not absolute. Find it.
26931      IFS_save="$IFS"
26932      IFS=:
26933      for p in $PATH; do
26934        if test -f "$p/$path" && test -x "$p/$path"; then
26935          new_path="$p/$path"
26936          break
26937        fi
26938      done
26939      IFS="$IFS_save"
26940    else
26941      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
26942$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
26943      new_path="$path"
26944    fi
26945
26946    if test "x$new_path" = x; then
26947        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
26948$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
26949        has_space=`$ECHO "$complete" | $GREP " "`
26950        if test "x$has_space" != x; then
26951          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26952$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26953        fi
26954        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
26955      fi
26956  fi
26957
26958      # Now join together the path and the arguments once again
26959      if test "x$arguments" != xEOL; then
26960        new_complete="$new_path ${arguments% *}"
26961      else
26962        new_complete="$new_path"
26963      fi
26964
26965  if test "x$complete" != "x$new_complete"; then
26966      OBJDUMP="$new_complete"
26967      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
26968$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
26969    fi
26970
26971fi
26972
26973if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
26974   # Extract the first word of "lipo", so it can be a program name with args.
26975set dummy lipo; ac_word=$2
26976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26977$as_echo_n "checking for $ac_word... " >&6; }
26978if test "${ac_cv_path_LIPO+set}" = set; then :
26979  $as_echo_n "(cached) " >&6
26980else
26981  case $LIPO in
26982  [\\/]* | ?:[\\/]*)
26983  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
26984  ;;
26985  *)
26986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26987for as_dir in $PATH
26988do
26989  IFS=$as_save_IFS
26990  test -z "$as_dir" && as_dir=.
26991    for ac_exec_ext in '' $ac_executable_extensions; do
26992  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26993    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
26994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26995    break 2
26996  fi
26997done
26998  done
26999IFS=$as_save_IFS
27000
27001  ;;
27002esac
27003fi
27004LIPO=$ac_cv_path_LIPO
27005if test -n "$LIPO"; then
27006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
27007$as_echo "$LIPO" >&6; }
27008else
27009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27010$as_echo "no" >&6; }
27011fi
27012
27013
27014
27015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27016
27017  # First separate the path from the arguments. This will split at the first
27018  # space.
27019  complete="$LIPO"
27020  path="${complete%% *}"
27021  tmp="$complete EOL"
27022  arguments="${tmp#* }"
27023
27024  # Input might be given as Windows format, start by converting to
27025  # unix format.
27026  new_path=`$CYGPATH -u "$path"`
27027
27028  # Now try to locate executable using which
27029  new_path=`$WHICH "$new_path" 2> /dev/null`
27030  # bat and cmd files are not always considered executable in cygwin causing which
27031  # to not find them
27032  if test "x$new_path" = x \
27033           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27034           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27035    new_path=`$CYGPATH -u "$path"`
27036  fi
27037  if test "x$new_path" = x; then
27038    # Oops. Which didn't find the executable.
27039    # The splitting of arguments from the executable at a space might have been incorrect,
27040    # since paths with space are more likely in Windows. Give it another try with the whole
27041    # argument.
27042    path="$complete"
27043    arguments="EOL"
27044    new_path=`$CYGPATH -u "$path"`
27045    new_path=`$WHICH "$new_path" 2> /dev/null`
27046    # bat and cmd files are not always considered executable in cygwin causing which
27047    # to not find them
27048    if test "x$new_path" = x \
27049             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27050             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27051      new_path=`$CYGPATH -u "$path"`
27052    fi
27053    if test "x$new_path" = x; then
27054      # It's still not found. Now this is an unrecoverable error.
27055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27056$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27057      has_space=`$ECHO "$complete" | $GREP " "`
27058      if test "x$has_space" != x; then
27059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27061      fi
27062      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27063    fi
27064  fi
27065
27066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27069  # "foo.exe" is OK but "foo" is an error.
27070  #
27071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27072  # It is also a way to make sure we got the proper file name for the real test later on.
27073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27074  if test "x$test_shortpath" = x; then
27075    # Short path failed, file does not exist as specified.
27076    # Try adding .exe or .cmd
27077    if test -f "${new_path}.exe"; then
27078       input_to_shortpath="${new_path}.exe"
27079    elif test -f "${new_path}.cmd"; then
27080       input_to_shortpath="${new_path}.cmd"
27081    else
27082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
27083$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
27084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27086      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27087    fi
27088  else
27089    input_to_shortpath="$new_path"
27090  fi
27091
27092  # Call helper function which possibly converts this using DOS-style short mode.
27093  # If so, the updated path is stored in $new_path.
27094  new_path="$input_to_shortpath"
27095
27096  input_path="$input_to_shortpath"
27097  # Check if we need to convert this using DOS-style short mode. If the path
27098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27099  # take no chances and rewrite it.
27100  # Note: m4 eats our [], so we need to use [ and ] instead.
27101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27102  if test "x$has_forbidden_chars" != x; then
27103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27107      # Going to short mode and back again did indeed matter. Since short mode is
27108      # case insensitive, let's make it lowercase to improve readability.
27109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27110      # Now convert it back to Unix-stile (cygpath)
27111      input_path=`$CYGPATH -u "$shortmode_path"`
27112      new_path="$input_path"
27113    fi
27114  fi
27115
27116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27117  if test "x$test_cygdrive_prefix" = x; then
27118    # As a simple fix, exclude /usr/bin since it's not a real path.
27119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27121      # a path prefixed by /cygdrive for fixpath to work.
27122      new_path="$CYGWIN_ROOT_PATH$input_path"
27123    fi
27124  fi
27125
27126  # remove trailing .exe if any
27127  new_path="${new_path/%.exe/}"
27128
27129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27130
27131  # First separate the path from the arguments. This will split at the first
27132  # space.
27133  complete="$LIPO"
27134  path="${complete%% *}"
27135  tmp="$complete EOL"
27136  arguments="${tmp#* }"
27137
27138  # Input might be given as Windows format, start by converting to
27139  # unix format.
27140  new_path="$path"
27141
27142  windows_path="$new_path"
27143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27144    unix_path=`$CYGPATH -u "$windows_path"`
27145    new_path="$unix_path"
27146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27148    new_path="$unix_path"
27149  fi
27150
27151
27152  # Now try to locate executable using which
27153  new_path=`$WHICH "$new_path" 2> /dev/null`
27154
27155  if test "x$new_path" = x; then
27156    # Oops. Which didn't find the executable.
27157    # The splitting of arguments from the executable at a space might have been incorrect,
27158    # since paths with space are more likely in Windows. Give it another try with the whole
27159    # argument.
27160    path="$complete"
27161    arguments="EOL"
27162    new_path="$path"
27163
27164  windows_path="$new_path"
27165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27166    unix_path=`$CYGPATH -u "$windows_path"`
27167    new_path="$unix_path"
27168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27170    new_path="$unix_path"
27171  fi
27172
27173
27174    new_path=`$WHICH "$new_path" 2> /dev/null`
27175
27176    if test "x$new_path" = x; then
27177      # It's still not found. Now this is an unrecoverable error.
27178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27179$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27180      has_space=`$ECHO "$complete" | $GREP " "`
27181      if test "x$has_space" != x; then
27182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27184      fi
27185      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27186    fi
27187  fi
27188
27189  # Now new_path has a complete unix path to the binary
27190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27191    # Keep paths in /bin as-is, but remove trailing .exe if any
27192    new_path="${new_path/%.exe/}"
27193    # Do not save /bin paths to all_fixpath_prefixes!
27194  else
27195    # Not in mixed or Windows style, start by that.
27196    new_path=`cmd //c echo $new_path`
27197
27198  input_path="$new_path"
27199  # Check if we need to convert this using DOS-style short mode. If the path
27200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27201  # take no chances and rewrite it.
27202  # Note: m4 eats our [], so we need to use [ and ] instead.
27203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27204  if test "x$has_forbidden_chars" != x; then
27205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27207  fi
27208
27209    # Output is in $new_path
27210
27211  windows_path="$new_path"
27212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27213    unix_path=`$CYGPATH -u "$windows_path"`
27214    new_path="$unix_path"
27215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27217    new_path="$unix_path"
27218  fi
27219
27220    # remove trailing .exe if any
27221    new_path="${new_path/%.exe/}"
27222
27223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27225  fi
27226
27227  else
27228    # We're on a posix platform. Hooray! :)
27229    # First separate the path from the arguments. This will split at the first
27230    # space.
27231    complete="$LIPO"
27232    path="${complete%% *}"
27233    tmp="$complete EOL"
27234    arguments="${tmp#* }"
27235
27236    # Cannot rely on the command "which" here since it doesn't always work.
27237    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27238    if test -z "$is_absolute_path"; then
27239      # Path to executable is not absolute. Find it.
27240      IFS_save="$IFS"
27241      IFS=:
27242      for p in $PATH; do
27243        if test -f "$p/$path" && test -x "$p/$path"; then
27244          new_path="$p/$path"
27245          break
27246        fi
27247      done
27248      IFS="$IFS_save"
27249    else
27250      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
27251$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
27252      new_path="$path"
27253    fi
27254
27255    if test "x$new_path" = x; then
27256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
27257$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
27258        has_space=`$ECHO "$complete" | $GREP " "`
27259        if test "x$has_space" != x; then
27260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27262        fi
27263        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
27264      fi
27265  fi
27266
27267      # Now join together the path and the arguments once again
27268      if test "x$arguments" != xEOL; then
27269        new_complete="$new_path ${arguments% *}"
27270      else
27271        new_complete="$new_path"
27272      fi
27273
27274  if test "x$complete" != "x$new_complete"; then
27275      LIPO="$new_complete"
27276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
27277$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
27278    fi
27279
27280fi
27281
27282# Restore old path without tools dir
27283PATH="$OLD_PATH"
27284
27285
27286# FIXME: Currently we must test this after paths but before flags. Fix!
27287
27288# And we can test some aspects on the target using configure macros.
27289
27290
27291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
27292$as_echo_n "checking for ANSI C header files... " >&6; }
27293if test "${ac_cv_header_stdc+set}" = set; then :
27294  $as_echo_n "(cached) " >&6
27295else
27296  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27297/* end confdefs.h.  */
27298#include <stdlib.h>
27299#include <stdarg.h>
27300#include <string.h>
27301#include <float.h>
27302
27303int
27304main ()
27305{
27306
27307  ;
27308  return 0;
27309}
27310_ACEOF
27311if ac_fn_cxx_try_compile "$LINENO"; then :
27312  ac_cv_header_stdc=yes
27313else
27314  ac_cv_header_stdc=no
27315fi
27316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27317
27318if test $ac_cv_header_stdc = yes; then
27319  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
27320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27321/* end confdefs.h.  */
27322#include <string.h>
27323
27324_ACEOF
27325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27326  $EGREP "memchr" >/dev/null 2>&1; then :
27327
27328else
27329  ac_cv_header_stdc=no
27330fi
27331rm -f conftest*
27332
27333fi
27334
27335if test $ac_cv_header_stdc = yes; then
27336  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
27337  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27338/* end confdefs.h.  */
27339#include <stdlib.h>
27340
27341_ACEOF
27342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27343  $EGREP "free" >/dev/null 2>&1; then :
27344
27345else
27346  ac_cv_header_stdc=no
27347fi
27348rm -f conftest*
27349
27350fi
27351
27352if test $ac_cv_header_stdc = yes; then
27353  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
27354  if test "$cross_compiling" = yes; then :
27355  :
27356else
27357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27358/* end confdefs.h.  */
27359#include <ctype.h>
27360#include <stdlib.h>
27361#if ((' ' & 0x0FF) == 0x020)
27362# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
27363# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
27364#else
27365# define ISLOWER(c) \
27366		   (('a' <= (c) && (c) <= 'i') \
27367		     || ('j' <= (c) && (c) <= 'r') \
27368		     || ('s' <= (c) && (c) <= 'z'))
27369# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
27370#endif
27371
27372#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
27373int
27374main ()
27375{
27376  int i;
27377  for (i = 0; i < 256; i++)
27378    if (XOR (islower (i), ISLOWER (i))
27379	|| toupper (i) != TOUPPER (i))
27380      return 2;
27381  return 0;
27382}
27383_ACEOF
27384if ac_fn_cxx_try_run "$LINENO"; then :
27385
27386else
27387  ac_cv_header_stdc=no
27388fi
27389rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27390  conftest.$ac_objext conftest.beam conftest.$ac_ext
27391fi
27392
27393fi
27394fi
27395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
27396$as_echo "$ac_cv_header_stdc" >&6; }
27397if test $ac_cv_header_stdc = yes; then
27398
27399$as_echo "#define STDC_HEADERS 1" >>confdefs.h
27400
27401fi
27402
27403# On IRIX 5.3, sys/types and inttypes.h are conflicting.
27404for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
27405		  inttypes.h stdint.h unistd.h
27406do :
27407  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
27408ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
27409"
27410if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
27411  cat >>confdefs.h <<_ACEOF
27412#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
27413_ACEOF
27414
27415fi
27416
27417done
27418
27419
27420
27421###############################################################################
27422#
27423# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
27424# (The JVM can use 32 or 64 bit Java pointers but that decision
27425# is made at runtime.)
27426#
27427if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27428  # Always specify -m flags on Solaris
27429
27430  # keep track of c/cxx flags that we added outselves...
27431  #   to prevent emitting warning...
27432  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27433  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27434  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27435
27436  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27437  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27438  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27439
27440  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27441  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27442  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27443
27444elif test "x$COMPILE_TYPE" = xreduced; then
27445  if test "x$OPENJDK_TARGET_OS" != xwindows; then
27446    # Specify -m if running reduced on other Posix platforms
27447
27448  # keep track of c/cxx flags that we added outselves...
27449  #   to prevent emitting warning...
27450  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27451  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27452  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
27453
27454  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
27455  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
27456  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
27457
27458  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
27459  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
27460  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
27461
27462  fi
27463fi
27464
27465# Make compilation sanity check
27466for ac_header in stdio.h
27467do :
27468  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
27469if test "x$ac_cv_header_stdio_h" = x""yes; then :
27470  cat >>confdefs.h <<_ACEOF
27471#define HAVE_STDIO_H 1
27472_ACEOF
27473
27474else
27475
27476  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
27477$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
27478  if test "x$COMPILE_TYPE" = xreduced; then
27479    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
27480$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
27481  elif test "x$COMPILE_TYPE" = xcross; then
27482    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
27483$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
27484  fi
27485  as_fn_error $? "Cannot continue." "$LINENO" 5
27486
27487fi
27488
27489done
27490
27491
27492# The cast to long int works around a bug in the HP C Compiler
27493# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
27494# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
27495# This bug is HP SR number 8606223364.
27496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
27497$as_echo_n "checking size of int *... " >&6; }
27498if test "${ac_cv_sizeof_int_p+set}" = set; then :
27499  $as_echo_n "(cached) " >&6
27500else
27501  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
27502
27503else
27504  if test "$ac_cv_type_int_p" = yes; then
27505     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
27506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
27507as_fn_error 77 "cannot compute sizeof (int *)
27508See \`config.log' for more details" "$LINENO" 5 ; }
27509   else
27510     ac_cv_sizeof_int_p=0
27511   fi
27512fi
27513
27514fi
27515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
27516$as_echo "$ac_cv_sizeof_int_p" >&6; }
27517
27518
27519
27520cat >>confdefs.h <<_ACEOF
27521#define SIZEOF_INT_P $ac_cv_sizeof_int_p
27522_ACEOF
27523
27524
27525
27526if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
27527  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
27528  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
27529fi
27530
27531if test "x$SIZEOF_INT_P" = x; then
27532    # The test failed, lets stick to the assumed value.
27533    { $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
27534$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
27535else
27536    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
27537
27538    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
27539        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
27540    fi
27541fi
27542
27543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
27544$as_echo_n "checking for target address size... " >&6; }
27545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
27546$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
27547
27548
27549###############################################################################
27550#
27551# Is the target little of big endian?
27552#
27553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
27554$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
27555if test "${ac_cv_c_bigendian+set}" = set; then :
27556  $as_echo_n "(cached) " >&6
27557else
27558  ac_cv_c_bigendian=unknown
27559    # See if we're dealing with a universal compiler.
27560    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27561/* end confdefs.h.  */
27562#ifndef __APPLE_CC__
27563	       not a universal capable compiler
27564	     #endif
27565	     typedef int dummy;
27566
27567_ACEOF
27568if ac_fn_cxx_try_compile "$LINENO"; then :
27569
27570	# Check for potential -arch flags.  It is not universal unless
27571	# there are at least two -arch flags with different values.
27572	ac_arch=
27573	ac_prev=
27574	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
27575	 if test -n "$ac_prev"; then
27576	   case $ac_word in
27577	     i?86 | x86_64 | ppc | ppc64)
27578	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
27579		 ac_arch=$ac_word
27580	       else
27581		 ac_cv_c_bigendian=universal
27582		 break
27583	       fi
27584	       ;;
27585	   esac
27586	   ac_prev=
27587	 elif test "x$ac_word" = "x-arch"; then
27588	   ac_prev=arch
27589	 fi
27590       done
27591fi
27592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27593    if test $ac_cv_c_bigendian = unknown; then
27594      # See if sys/param.h defines the BYTE_ORDER macro.
27595      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27596/* end confdefs.h.  */
27597#include <sys/types.h>
27598	     #include <sys/param.h>
27599
27600int
27601main ()
27602{
27603#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
27604		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
27605		     && LITTLE_ENDIAN)
27606	      bogus endian macros
27607	     #endif
27608
27609  ;
27610  return 0;
27611}
27612_ACEOF
27613if ac_fn_cxx_try_compile "$LINENO"; then :
27614  # It does; now see whether it defined to BIG_ENDIAN or not.
27615	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27616/* end confdefs.h.  */
27617#include <sys/types.h>
27618		#include <sys/param.h>
27619
27620int
27621main ()
27622{
27623#if BYTE_ORDER != BIG_ENDIAN
27624		 not big endian
27625		#endif
27626
27627  ;
27628  return 0;
27629}
27630_ACEOF
27631if ac_fn_cxx_try_compile "$LINENO"; then :
27632  ac_cv_c_bigendian=yes
27633else
27634  ac_cv_c_bigendian=no
27635fi
27636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27637fi
27638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27639    fi
27640    if test $ac_cv_c_bigendian = unknown; then
27641      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
27642      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27643/* end confdefs.h.  */
27644#include <limits.h>
27645
27646int
27647main ()
27648{
27649#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
27650	      bogus endian macros
27651	     #endif
27652
27653  ;
27654  return 0;
27655}
27656_ACEOF
27657if ac_fn_cxx_try_compile "$LINENO"; then :
27658  # It does; now see whether it defined to _BIG_ENDIAN or not.
27659	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27660/* end confdefs.h.  */
27661#include <limits.h>
27662
27663int
27664main ()
27665{
27666#ifndef _BIG_ENDIAN
27667		 not big endian
27668		#endif
27669
27670  ;
27671  return 0;
27672}
27673_ACEOF
27674if ac_fn_cxx_try_compile "$LINENO"; then :
27675  ac_cv_c_bigendian=yes
27676else
27677  ac_cv_c_bigendian=no
27678fi
27679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27680fi
27681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27682    fi
27683    if test $ac_cv_c_bigendian = unknown; then
27684      # Compile a test program.
27685      if test "$cross_compiling" = yes; then :
27686  # Try to guess by grepping values from an object file.
27687	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27688/* end confdefs.h.  */
27689short int ascii_mm[] =
27690		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
27691		short int ascii_ii[] =
27692		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
27693		int use_ascii (int i) {
27694		  return ascii_mm[i] + ascii_ii[i];
27695		}
27696		short int ebcdic_ii[] =
27697		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
27698		short int ebcdic_mm[] =
27699		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
27700		int use_ebcdic (int i) {
27701		  return ebcdic_mm[i] + ebcdic_ii[i];
27702		}
27703		extern int foo;
27704
27705int
27706main ()
27707{
27708return use_ascii (foo) == use_ebcdic (foo);
27709  ;
27710  return 0;
27711}
27712_ACEOF
27713if ac_fn_cxx_try_compile "$LINENO"; then :
27714  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
27715	      ac_cv_c_bigendian=yes
27716	    fi
27717	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
27718	      if test "$ac_cv_c_bigendian" = unknown; then
27719		ac_cv_c_bigendian=no
27720	      else
27721		# finding both strings is unlikely to happen, but who knows?
27722		ac_cv_c_bigendian=unknown
27723	      fi
27724	    fi
27725fi
27726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27727else
27728  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27729/* end confdefs.h.  */
27730$ac_includes_default
27731int
27732main ()
27733{
27734
27735	     /* Are we little or big endian?  From Harbison&Steele.  */
27736	     union
27737	     {
27738	       long int l;
27739	       char c[sizeof (long int)];
27740	     } u;
27741	     u.l = 1;
27742	     return u.c[sizeof (long int) - 1] == 1;
27743
27744  ;
27745  return 0;
27746}
27747_ACEOF
27748if ac_fn_cxx_try_run "$LINENO"; then :
27749  ac_cv_c_bigendian=no
27750else
27751  ac_cv_c_bigendian=yes
27752fi
27753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27754  conftest.$ac_objext conftest.beam conftest.$ac_ext
27755fi
27756
27757    fi
27758fi
27759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
27760$as_echo "$ac_cv_c_bigendian" >&6; }
27761 case $ac_cv_c_bigendian in #(
27762   yes)
27763     ENDIAN="big";; #(
27764   no)
27765     ENDIAN="little" ;; #(
27766   universal)
27767     ENDIAN="universal_endianness"
27768     ;; #(
27769   *)
27770     ENDIAN="unknown" ;;
27771 esac
27772
27773
27774if test "x$ENDIAN" = xuniversal_endianness; then
27775    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
27776fi
27777if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
27778    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
27779fi
27780
27781
27782# Configure flags for the tools
27783
27784
27785###############################################################################
27786#
27787# How to compile shared libraries.
27788#
27789
27790if test "x$GCC" = xyes; then
27791    COMPILER_NAME=gcc
27792    PICFLAG="-fPIC"
27793    LIBRARY_PREFIX=lib
27794    SHARED_LIBRARY='lib$1.so'
27795    STATIC_LIBRARY='lib$1.a'
27796    SHARED_LIBRARY_FLAGS="-shared"
27797    SHARED_LIBRARY_SUFFIX='.so'
27798    STATIC_LIBRARY_SUFFIX='.a'
27799    OBJ_SUFFIX='.o'
27800    EXE_SUFFIX=''
27801    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
27802    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
27803    C_FLAG_REORDER=''
27804    CXX_FLAG_REORDER=''
27805    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27806    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
27807    LD="$CC"
27808    LDEXE="$CC"
27809    LDCXX="$CXX"
27810    LDEXECXX="$CXX"
27811    POST_STRIP_CMD="$STRIP -g"
27812
27813    # Linking is different on MacOSX
27814    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
27815        # Might change in the future to clang.
27816        COMPILER_NAME=gcc
27817        SHARED_LIBRARY='lib$1.dylib'
27818        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
27819        SHARED_LIBRARY_SUFFIX='.dylib'
27820        EXE_SUFFIX=''
27821        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
27822        SET_SHARED_LIBRARY_MAPFILE=''
27823        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
27824        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27825        POST_STRIP_CMD="$STRIP -S"
27826    fi
27827else
27828    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
27829        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
27830        COMPILER_NAME=ossc
27831        PICFLAG="-KPIC"
27832        LIBRARY_PREFIX=lib
27833        SHARED_LIBRARY='lib$1.so'
27834        STATIC_LIBRARY='lib$1.a'
27835        SHARED_LIBRARY_FLAGS="-G"
27836        SHARED_LIBRARY_SUFFIX='.so'
27837        STATIC_LIBRARY_SUFFIX='.a'
27838        OBJ_SUFFIX='.o'
27839        EXE_SUFFIX=''
27840        SET_SHARED_LIBRARY_NAME=''
27841        SET_SHARED_LIBRARY_MAPFILE='-M$1'
27842	C_FLAG_REORDER='-xF'
27843	CXX_FLAG_REORDER='-xF'
27844        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
27845        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
27846        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
27847        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
27848        CFLAGS_JDKLIB_EXTRA='-xstrconst'
27849        POST_STRIP_CMD="$STRIP -x"
27850        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
27851    fi
27852    if test "x$OPENJDK_TARGET_OS" = xwindows; then
27853        # If it is not gcc, then assume it is the MS Visual Studio compiler
27854        COMPILER_NAME=cl
27855        PICFLAG=""
27856        LIBRARY_PREFIX=
27857        SHARED_LIBRARY='$1.dll'
27858        STATIC_LIBRARY='$1.lib'
27859        SHARED_LIBRARY_FLAGS="-LD"
27860        SHARED_LIBRARY_SUFFIX='.dll'
27861        STATIC_LIBRARY_SUFFIX='.lib'
27862        OBJ_SUFFIX='.obj'
27863        EXE_SUFFIX='.exe'
27864        SET_SHARED_LIBRARY_NAME=''
27865        SET_SHARED_LIBRARY_MAPFILE=''
27866        SET_SHARED_LIBRARY_ORIGIN=''
27867        SET_EXECUTABLE_ORIGIN=''
27868    fi
27869fi
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888# The (cross) compiler is now configured, we can now test capabilities
27889# of the target platform.
27890
27891
27892
27893###############################################################################
27894#
27895# Setup the opt flags for different compilers
27896# and different operating systems.
27897#
27898
27899#
27900# NOTE: check for -mstackrealign needs to be below potential addition of -m32
27901#
27902if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
27903    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
27904    # While waiting for a better solution, the current workaround is to use -mstackrealign.
27905    CFLAGS="$CFLAGS -mstackrealign"
27906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
27907$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
27908    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27909/* end confdefs.h.  */
27910int main() { return 0; }
27911_ACEOF
27912if ac_fn_cxx_try_link "$LINENO"; then :
27913
27914		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27915$as_echo "yes" >&6; }
27916
27917else
27918
27919		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27920$as_echo "no" >&6; }
27921	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
27922
27923fi
27924rm -f core conftest.err conftest.$ac_objext \
27925    conftest$ac_exeext conftest.$ac_ext
27926fi
27927
27928C_FLAG_DEPS="-MMD -MF"
27929CXX_FLAG_DEPS="-MMD -MF"
27930
27931case $COMPILER_TYPE in
27932  CC )
27933    D_FLAG="-g"
27934    case $COMPILER_NAME in
27935      gcc )
27936      	case $OPENJDK_TARGET_OS in
27937	  macosx )
27938	    # On MacOSX we optimize for size, something
27939	    # we should do for all platforms?
27940	    C_O_FLAG_HI="-Os"
27941	    C_O_FLAG_NORM="-Os"
27942	    C_O_FLAG_NONE=""
27943	    ;;
27944	  *)
27945	    C_O_FLAG_HI="-O3"
27946	    C_O_FLAG_NORM="-O2"
27947	    C_O_FLAG_NONE="-O0"
27948	    CFLAGS_DEBUG_SYMBOLS="-g"
27949	    CXXFLAGS_DEBUG_SYMBOLS="-g"
27950	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
27951	       CFLAGS_DEBUG_SYMBOLS="-g1"
27952	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
27953	    fi
27954	    ;;
27955	esac
27956        CXX_O_FLAG_HI="$C_O_FLAG_HI"
27957        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
27958        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
27959        ;;
27960      ossc )
27961        #
27962        # Forte has different names for this with their C++ compiler...
27963        #
27964        C_FLAG_DEPS="-xMMD -xMF"
27965        CXX_FLAG_DEPS="-xMMD -xMF"
27966
27967        # Extra options used with HIGHEST
27968        #
27969        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
27970        #          done with care, there are some assumptions below that need to
27971        #          be understood about the use of pointers, and IEEE behavior.
27972        #
27973        # Use non-standard floating point mode (not IEEE 754)
27974        CC_HIGHEST="$CC_HIGHEST -fns"
27975        # Do some simplification of floating point arithmetic (not IEEE 754)
27976        CC_HIGHEST="$CC_HIGHEST -fsimple"
27977        # Use single precision floating point with 'float'
27978        CC_HIGHEST="$CC_HIGHEST -fsingle"
27979        # Assume memory references via basic pointer types do not alias
27980        #   (Source with excessing pointer casting and data access with mixed
27981        #    pointer types are not recommended)
27982        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
27983        # Use intrinsic or inline versions for math/std functions
27984        #   (If you expect perfect errno behavior, do not use this)
27985        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
27986        # Loop data dependency optimizations (need -xO3 or higher)
27987        CC_HIGHEST="$CC_HIGHEST -xdepend"
27988        # Pointer parameters to functions do not overlap
27989        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
27990        #    If you pass in multiple pointers to the same data, do not use this)
27991        CC_HIGHEST="$CC_HIGHEST -xrestrict"
27992        # Inline some library routines
27993        #   (If you expect perfect errno behavior, do not use this)
27994        CC_HIGHEST="$CC_HIGHEST -xlibmil"
27995        # Use optimized math routines
27996        #   (If you expect perfect errno behavior, do not use this)
27997        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
27998        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
27999
28000        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
28001          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
28002          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
28003        fi
28004
28005        case $OPENJDK_TARGET_CPU_ARCH in
28006          x86)
28007            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
28008            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
28009            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
28010            C_O_FLAG_NONE="-xregs=no%frameptr"
28011            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
28012            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
28013            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
28014            CXX_O_FLAG_NONE="-xregs=no%frameptr"
28015            if test "x$OPENJDK_TARGET_CPU" = xx86; then
28016               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
28017               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
28018            fi
28019            ;;
28020          sparc)
28021            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28022            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
28023            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28024            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28025            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
28026            C_O_FLAG_NONE=""
28027            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
28028            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28029            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
28030            CXX_O_FLAG_NONE=""
28031            ;;
28032        esac
28033
28034    CFLAGS_DEBUG_SYMBOLS="-g -xs"
28035    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
28036    esac
28037    ;;
28038  CL )
28039    D_FLAG=
28040    C_O_FLAG_HIGHEST="-O2"
28041    C_O_FLAG_HI="-O1"
28042    C_O_FLAG_NORM="-O1"
28043    C_O_FLAG_NONE="-Od"
28044    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
28045    CXX_O_FLAG_HI="$C_O_FLAG_HI"
28046    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
28047    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
28048    ;;
28049esac
28050
28051if test -z "$C_O_FLAG_HIGHEST"; then
28052   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
28053fi
28054
28055if test -z "$CXX_O_FLAG_HIGHEST"; then
28056   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
28057fi
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
28073   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
28074$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
28075fi
28076
28077if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
28078   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
28079$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
28080fi
28081
28082if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
28083   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
28084$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
28085fi
28086
28087
28088# Check whether --with-extra-cflags was given.
28089if test "${with_extra_cflags+set}" = set; then :
28090  withval=$with_extra_cflags;
28091fi
28092
28093
28094
28095# Check whether --with-extra-cxxflags was given.
28096if test "${with_extra_cxxflags+set}" = set; then :
28097  withval=$with_extra_cxxflags;
28098fi
28099
28100
28101
28102# Check whether --with-extra-ldflags was given.
28103if test "${with_extra_ldflags+set}" = set; then :
28104  withval=$with_extra_ldflags;
28105fi
28106
28107
28108CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
28109CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
28110LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
28111
28112# Hotspot needs these set in their legacy form
28113LEGACY_EXTRA_CFLAGS=$with_extra_cflags
28114LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
28115LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
28116
28117
28118
28119
28120
28121###############################################################################
28122#
28123# Now setup the CFLAGS and LDFLAGS for the JDK build.
28124# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
28125#
28126case $COMPILER_NAME in
28127      gcc )
28128      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
28129                          -pipe \
28130                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
28131	  case $OPENJDK_TARGET_CPU_ARCH in
28132	  arm )
28133            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
28134	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28135	  ;;
28136	  ppc )
28137            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
28138	  ;;
28139	  * )
28140	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
28141	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
28142          ;;
28143	  esac
28144          ;;
28145      ossc )
28146          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
28147          case $OPENJDK_TARGET_CPU_ARCH in
28148          x86 )
28149            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
28150       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
28151          ;;
28152          esac
28153
28154      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
28155      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
28156
28157          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
28158          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
28159          ;;
28160      cl )
28161          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
28162               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
28163	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
28164	       -DWIN32 -DIAL"
28165          case $OPENJDK_TARGET_CPU in
28166              x86 )
28167                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
28168                  ;;
28169              x86_64 )
28170                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
28171                  ;;
28172          esac
28173          ;;
28174esac
28175
28176###############################################################################
28177
28178CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
28179
28180# The package path is used only on macosx?
28181PACKAGE_PATH=/opt/local
28182
28183
28184if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
28185    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
28186    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
28187    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
28188    #   Note: -Dmacro         is the same as    #define macro 1
28189    #         -Dmacro=	    is the same as    #define macro
28190    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28191        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
28192    else
28193        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
28194    fi
28195else
28196    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
28197fi
28198if test "x$OPENJDK_TARGET_OS" = xlinux; then
28199    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
28200fi
28201if test "x$OPENJDK_TARGET_OS" = xwindows; then
28202    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
28203fi
28204if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28205    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
28206fi
28207if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28208    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
28209fi
28210if test "x$OPENJDK_TARGET_OS" = xbsd; then
28211    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
28212fi
28213if test "x$DEBUG_LEVEL" = xrelease; then
28214    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
28215    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28216        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
28217    fi
28218else
28219    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
28220fi
28221
28222CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
28223CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
28224
28225CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
28226        -I${JDK_OUTPUTDIR}/include \
28227        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
28228        -I${JDK_TOPDIR}/src/share/javavm/export \
28229        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
28230        -I${JDK_TOPDIR}/src/share/native/common \
28231        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
28232
28233# The shared libraries are compiled using the picflag.
28234CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
28235CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
28236
28237# Executable flags
28238CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
28239CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
28240
28241# Now this is odd. The JDK native libraries have to link against libjvm.so
28242# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
28243# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
28244# is identical for client and server? Yes. Which is picked at runtime (client or server)?
28245# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
28246# libraries will link to whatever is in memory. Yuck.
28247#
28248# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
28249if test "x$COMPILER_NAME" = xcl; then
28250    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
28251    if test "x$OPENJDK_TARGET_CPU" = xx86; then
28252        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
28253    fi
28254    # TODO: make -debug optional "--disable-full-debug-symbols"
28255    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
28256    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
28257    LDFLAGS_JDKLIB_SUFFIX=""
28258    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
28259        LDFLAGS_STACK_SIZE=1048576
28260    else
28261        LDFLAGS_STACK_SIZE=327680
28262    fi
28263    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
28264else
28265    if test "x$COMPILER_NAME" = xgcc; then
28266        # If this is a --hash-style=gnu system, use --hash-style=both, why?
28267        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
28268        if test -n "$HAS_GNU_HASH"; then
28269            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
28270        fi
28271        if test "x$OPENJDK_TARGET_OS" = xlinux; then
28272          # And since we now know that the linker is gnu, then add -z defs, to forbid
28273          # undefined symbols in object files.
28274          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
28275          if test "x$DEBUG_LEVEL" = "xrelease"; then
28276              # When building release libraries, tell the linker optimize them.
28277              # Should this be supplied to the OSS linker as well?
28278              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
28279          fi
28280        fi
28281    fi
28282    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
28283                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
28284
28285    # On some platforms (mac) the linker warns about non existing -L dirs.
28286    # Add server first if available. Linking aginst client does not always produce the same results.
28287    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
28288    # Default to server for other variants.
28289    if test "x$JVM_VARIANT_SERVER" = xtrue; then
28290        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28291    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
28292        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
28293    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
28294        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
28295    else
28296        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
28297    fi
28298
28299    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
28300    if test "x$COMPILER_NAME" = xossc; then
28301        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
28302    fi
28303
28304    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
28305    if test "x$OPENJDK_TARGET_OS" = xlinux; then
28306        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
28307    fi
28308fi
28309
28310# Adjust flags according to debug level.
28311case $DEBUG_LEVEL in
28312      fastdebug )
28313              CFLAGS="$CFLAGS $D_FLAG"
28314              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28315              ;;
28316      slowdebug )
28317              CFLAGS="$CFLAGS $D_FLAG"
28318	      C_O_FLAG_HI="$C_O_FLAG_NONE"
28319	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
28320	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
28321	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
28322              JAVAC_FLAGS="$JAVAC_FLAGS -g"
28323              ;;
28324esac
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340# Setup debug symbols (need objcopy from the toolchain for that)
28341
28342#
28343# ENABLE_DEBUG_SYMBOLS
28344# This must be done after the toolchain is setup, since we're looking at objcopy.
28345#
28346# Check whether --enable-debug-symbols was given.
28347if test "${enable_debug_symbols+set}" = set; then :
28348  enableval=$enable_debug_symbols;
28349fi
28350
28351
28352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
28353$as_echo_n "checking if we should generate debug symbols... " >&6; }
28354
28355if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
28356   # explicit enabling of enable-debug-symbols and can't find objcopy
28357   #   this is an error
28358   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
28359fi
28360
28361if test "x$enable_debug_symbols" = "xyes"; then
28362  ENABLE_DEBUG_SYMBOLS=true
28363elif test "x$enable_debug_symbols" = "xno"; then
28364  ENABLE_DEBUG_SYMBOLS=false
28365else
28366  # default on macosx is false
28367  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28368    ENABLE_DEBUG_SYMBOLS=false
28369  # Default is on if objcopy is found, otherwise off
28370  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
28371    ENABLE_DEBUG_SYMBOLS=true
28372  else
28373    ENABLE_DEBUG_SYMBOLS=false
28374  fi
28375fi
28376
28377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
28378$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
28379
28380#
28381# ZIP_DEBUGINFO_FILES
28382#
28383# Check whether --enable-zip-debug-info was given.
28384if test "${enable_zip_debug_info+set}" = set; then :
28385  enableval=$enable_zip_debug_info;
28386fi
28387
28388
28389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
28390$as_echo_n "checking if we should zip debug-info files... " >&6; }
28391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
28392$as_echo "${enable_zip_debug_info}" >&6; }
28393
28394if test "x${enable_zip_debug_info}" = "xno"; then
28395   ZIP_DEBUGINFO_FILES=false
28396else
28397   ZIP_DEBUGINFO_FILES=true
28398fi
28399
28400
28401
28402
28403
28404
28405
28406###############################################################################
28407#
28408# Check dependencies for external and internal libraries.
28409#
28410###############################################################################
28411
28412
28413
28414###############################################################################
28415#
28416# OS specific settings that we never will need to probe.
28417#
28418if test "x$OPENJDK_TARGET_OS" = xlinux; then
28419    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
28420$as_echo_n "checking what is not needed on Linux?... " >&6; }
28421    PULSE_NOT_NEEDED=yes
28422    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
28423$as_echo "pulse" >&6; }
28424fi
28425
28426if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
28428$as_echo_n "checking what is not needed on Solaris?... " >&6; }
28429    ALSA_NOT_NEEDED=yes
28430    PULSE_NOT_NEEDED=yes
28431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28432$as_echo "alsa pulse" >&6; }
28433fi
28434
28435if test "x$OPENJDK_TARGET_OS" = xwindows; then
28436    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
28437$as_echo_n "checking what is not needed on Windows?... " >&6; }
28438    CUPS_NOT_NEEDED=yes
28439    ALSA_NOT_NEEDED=yes
28440    PULSE_NOT_NEEDED=yes
28441    X11_NOT_NEEDED=yes
28442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
28443$as_echo "alsa cups pulse x11" >&6; }
28444fi
28445
28446if test "x$OPENJDK_TARGET_OS" = xmacosx; then
28447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
28448$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
28449    ALSA_NOT_NEEDED=yes
28450    PULSE_NOT_NEEDED=yes
28451    X11_NOT_NEEDED=yes
28452    FREETYPE2_NOT_NEEDED=yes
28453    # If the java runtime framework is disabled, then we need X11.
28454    # This will be adjusted below.
28455    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
28456$as_echo "alsa pulse x11" >&6; }
28457fi
28458
28459if test "x$OPENJDK_TARGET_OS" = xbsd; then
28460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
28461$as_echo_n "checking what is not needed on bsd?... " >&6; }
28462    ALSA_NOT_NEEDED=yes
28463    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
28464$as_echo "alsa" >&6; }
28465fi
28466
28467if test "x$OPENJDK" = "xfalse"; then
28468    FREETYPE2_NOT_NEEDED=yes
28469fi
28470
28471if test "x$SUPPORT_HEADFUL" = xno; then
28472    X11_NOT_NEEDED=yes
28473fi
28474
28475###############################################################################
28476#
28477# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
28478# that uses this API.
28479#
28480# Check whether --enable-macosx-runtime-support was given.
28481if test "${enable_macosx_runtime_support+set}" = set; then :
28482  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
28483else
28484  MACOSX_RUNTIME_SUPPORT="no"
28485fi
28486
28487
28488USE_MACOSX_RUNTIME_SUPPORT=no
28489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
28490$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
28491if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
28492    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
28493        MACOSX_RUNTIME_SUPPORT=yes
28494        USE_MACOSX_RUNTIME_SUPPORT=yes
28495        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
28496$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
28497    else
28498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
28499$as_echo "yes, but explicitly disabled." >&6; }
28500    fi
28501else
28502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28503$as_echo "no" >&6; }
28504fi
28505
28506if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
28507    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
28508$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
28509    X11_NOT_NEEDED=
28510    FREETYPE2_NOT_NEEDED=
28511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
28512$as_echo "alsa pulse" >&6; }
28513fi
28514
28515
28516
28517
28518###############################################################################
28519#
28520# Check for X Windows
28521#
28522
28523# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
28524# Make a simple check for the libraries at the sysroot, and setup --x-includes and
28525# --x-libraries for the sysroot, if that seems to be correct.
28526if test "x$SYS_ROOT" != "x/"; then
28527  if test "x$x_includes" = xNONE; then
28528    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
28529      x_includes="$SYS_ROOT/usr/X11R6/include"
28530    fi
28531  fi
28532  if test "x$x_libraries" = xNONE; then
28533    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
28534      x_libraries="$SYS_ROOT/usr/X11R6/lib"
28535    fi
28536  fi
28537fi
28538
28539# Now let autoconf do it's magic
28540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
28541$as_echo_n "checking for X... " >&6; }
28542
28543
28544# Check whether --with-x was given.
28545if test "${with_x+set}" = set; then :
28546  withval=$with_x;
28547fi
28548
28549# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
28550if test "x$with_x" = xno; then
28551  # The user explicitly disabled X.
28552  have_x=disabled
28553else
28554  case $x_includes,$x_libraries in #(
28555    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #(
28556    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
28557  $as_echo_n "(cached) " >&6
28558else
28559  # One or both of the vars are not set, and there is no cached value.
28560ac_x_includes=no ac_x_libraries=no
28561rm -f -r conftest.dir
28562if mkdir conftest.dir; then
28563  cd conftest.dir
28564  cat >Imakefile <<'_ACEOF'
28565incroot:
28566	@echo incroot='${INCROOT}'
28567usrlibdir:
28568	@echo usrlibdir='${USRLIBDIR}'
28569libdir:
28570	@echo libdir='${LIBDIR}'
28571_ACEOF
28572  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
28573    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
28574    for ac_var in incroot usrlibdir libdir; do
28575      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
28576    done
28577    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
28578    for ac_extension in a so sl dylib la dll; do
28579      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
28580	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
28581	ac_im_usrlibdir=$ac_im_libdir; break
28582      fi
28583    done
28584    # Screen out bogus values from the imake configuration.  They are
28585    # bogus both because they are the default anyway, and because
28586    # using them would break gcc on systems where it needs fixed includes.
28587    case $ac_im_incroot in
28588	/usr/include) ac_x_includes= ;;
28589	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
28590    esac
28591    case $ac_im_usrlibdir in
28592	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
28593	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
28594    esac
28595  fi
28596  cd ..
28597  rm -f -r conftest.dir
28598fi
28599
28600# Standard set of common directories for X headers.
28601# Check X11 before X11Rn because it is often a symlink to the current release.
28602ac_x_header_dirs='
28603/usr/X11/include
28604/usr/X11R7/include
28605/usr/X11R6/include
28606/usr/X11R5/include
28607/usr/X11R4/include
28608
28609/usr/include/X11
28610/usr/include/X11R7
28611/usr/include/X11R6
28612/usr/include/X11R5
28613/usr/include/X11R4
28614
28615/usr/local/X11/include
28616/usr/local/X11R7/include
28617/usr/local/X11R6/include
28618/usr/local/X11R5/include
28619/usr/local/X11R4/include
28620
28621/usr/local/include/X11
28622/usr/local/include/X11R7
28623/usr/local/include/X11R6
28624/usr/local/include/X11R5
28625/usr/local/include/X11R4
28626
28627/usr/X386/include
28628/usr/x386/include
28629/usr/XFree86/include/X11
28630
28631/usr/include
28632/usr/local/include
28633/usr/unsupported/include
28634/usr/athena/include
28635/usr/local/x11r5/include
28636/usr/lpp/Xamples/include
28637
28638/usr/openwin/include
28639/usr/openwin/share/include'
28640
28641if test "$ac_x_includes" = no; then
28642  # Guess where to find include files, by looking for Xlib.h.
28643  # First, try using that file with no special directory specified.
28644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28645/* end confdefs.h.  */
28646#include <X11/Xlib.h>
28647_ACEOF
28648if ac_fn_cxx_try_cpp "$LINENO"; then :
28649  # We can compile using X headers with no special include directory.
28650ac_x_includes=
28651else
28652  for ac_dir in $ac_x_header_dirs; do
28653  if test -r "$ac_dir/X11/Xlib.h"; then
28654    ac_x_includes=$ac_dir
28655    break
28656  fi
28657done
28658fi
28659rm -f conftest.err conftest.i conftest.$ac_ext
28660fi # $ac_x_includes = no
28661
28662if test "$ac_x_libraries" = no; then
28663  # Check for the libraries.
28664  # See if we find them without any special options.
28665  # Don't add to $LIBS permanently.
28666  ac_save_LIBS=$LIBS
28667  LIBS="-lX11 $LIBS"
28668  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28669/* end confdefs.h.  */
28670#include <X11/Xlib.h>
28671int
28672main ()
28673{
28674XrmInitialize ()
28675  ;
28676  return 0;
28677}
28678_ACEOF
28679if ac_fn_cxx_try_link "$LINENO"; then :
28680  LIBS=$ac_save_LIBS
28681# We can link X programs with no special library path.
28682ac_x_libraries=
28683else
28684  LIBS=$ac_save_LIBS
28685for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
28686do
28687  # Don't even attempt the hair of trying to link an X program!
28688  for ac_extension in a so sl dylib la dll; do
28689    if test -r "$ac_dir/libX11.$ac_extension"; then
28690      ac_x_libraries=$ac_dir
28691      break 2
28692    fi
28693  done
28694done
28695fi
28696rm -f core conftest.err conftest.$ac_objext \
28697    conftest$ac_exeext conftest.$ac_ext
28698fi # $ac_x_libraries = no
28699
28700case $ac_x_includes,$ac_x_libraries in #(
28701  no,* | *,no | *\'*)
28702    # Didn't find X, or a directory has "'" in its name.
28703    ac_cv_have_x="have_x=no";; #(
28704  *)
28705    # Record where we found X for the cache.
28706    ac_cv_have_x="have_x=yes\
28707	ac_x_includes='$ac_x_includes'\
28708	ac_x_libraries='$ac_x_libraries'"
28709esac
28710fi
28711;; #(
28712    *) have_x=yes;;
28713  esac
28714  eval "$ac_cv_have_x"
28715fi # $with_x != no
28716
28717if test "$have_x" != yes; then
28718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
28719$as_echo "$have_x" >&6; }
28720  no_x=yes
28721else
28722  # If each of the values was on the command line, it overrides each guess.
28723  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
28724  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
28725  # Update the cache value to reflect the command line values.
28726  ac_cv_have_x="have_x=yes\
28727	ac_x_includes='$x_includes'\
28728	ac_x_libraries='$x_libraries'"
28729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
28730$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
28731fi
28732
28733if test "$no_x" = yes; then
28734  # Not all programs may use this symbol, but it does not hurt to define it.
28735
28736$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
28737
28738  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
28739else
28740  if test -n "$x_includes"; then
28741    X_CFLAGS="$X_CFLAGS -I$x_includes"
28742  fi
28743
28744  # It would also be nice to do this for all -L options, not just this one.
28745  if test -n "$x_libraries"; then
28746    X_LIBS="$X_LIBS -L$x_libraries"
28747    # For Solaris; some versions of Sun CC require a space after -R and
28748    # others require no space.  Words are not sufficient . . . .
28749    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
28750$as_echo_n "checking whether -R must be followed by a space... " >&6; }
28751    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
28752    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
28753    ac_cxx_werror_flag=yes
28754    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28755/* end confdefs.h.  */
28756
28757int
28758main ()
28759{
28760
28761  ;
28762  return 0;
28763}
28764_ACEOF
28765if ac_fn_cxx_try_link "$LINENO"; then :
28766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28767$as_echo "no" >&6; }
28768       X_LIBS="$X_LIBS -R$x_libraries"
28769else
28770  LIBS="$ac_xsave_LIBS -R $x_libraries"
28771       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28772/* end confdefs.h.  */
28773
28774int
28775main ()
28776{
28777
28778  ;
28779  return 0;
28780}
28781_ACEOF
28782if ac_fn_cxx_try_link "$LINENO"; then :
28783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28784$as_echo "yes" >&6; }
28785	  X_LIBS="$X_LIBS -R $x_libraries"
28786else
28787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
28788$as_echo "neither works" >&6; }
28789fi
28790rm -f core conftest.err conftest.$ac_objext \
28791    conftest$ac_exeext conftest.$ac_ext
28792fi
28793rm -f core conftest.err conftest.$ac_objext \
28794    conftest$ac_exeext conftest.$ac_ext
28795    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
28796    LIBS=$ac_xsave_LIBS
28797  fi
28798
28799  # Check for system-dependent libraries X programs must link with.
28800  # Do this before checking for the system-independent R6 libraries
28801  # (-lICE), since we may need -lsocket or whatever for X linking.
28802
28803  if test "$ISC" = yes; then
28804    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
28805  else
28806    # Martyn Johnson says this is needed for Ultrix, if the X
28807    # libraries were built with DECnet support.  And Karl Berry says
28808    # the Alpha needs dnet_stub (dnet does not exist).
28809    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
28810    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28811/* end confdefs.h.  */
28812
28813/* Override any GCC internal prototype to avoid an error.
28814   Use char because int might match the return type of a GCC
28815   builtin and then its argument prototype would still apply.  */
28816#ifdef __cplusplus
28817extern "C"
28818#endif
28819char XOpenDisplay ();
28820int
28821main ()
28822{
28823return XOpenDisplay ();
28824  ;
28825  return 0;
28826}
28827_ACEOF
28828if ac_fn_cxx_try_link "$LINENO"; then :
28829
28830else
28831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
28832$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
28833if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
28834  $as_echo_n "(cached) " >&6
28835else
28836  ac_check_lib_save_LIBS=$LIBS
28837LIBS="-ldnet  $LIBS"
28838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28839/* end confdefs.h.  */
28840
28841/* Override any GCC internal prototype to avoid an error.
28842   Use char because int might match the return type of a GCC
28843   builtin and then its argument prototype would still apply.  */
28844#ifdef __cplusplus
28845extern "C"
28846#endif
28847char dnet_ntoa ();
28848int
28849main ()
28850{
28851return dnet_ntoa ();
28852  ;
28853  return 0;
28854}
28855_ACEOF
28856if ac_fn_cxx_try_link "$LINENO"; then :
28857  ac_cv_lib_dnet_dnet_ntoa=yes
28858else
28859  ac_cv_lib_dnet_dnet_ntoa=no
28860fi
28861rm -f core conftest.err conftest.$ac_objext \
28862    conftest$ac_exeext conftest.$ac_ext
28863LIBS=$ac_check_lib_save_LIBS
28864fi
28865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
28866$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
28867if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
28868  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
28869fi
28870
28871    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
28872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
28873$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
28874if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
28875  $as_echo_n "(cached) " >&6
28876else
28877  ac_check_lib_save_LIBS=$LIBS
28878LIBS="-ldnet_stub  $LIBS"
28879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28880/* end confdefs.h.  */
28881
28882/* Override any GCC internal prototype to avoid an error.
28883   Use char because int might match the return type of a GCC
28884   builtin and then its argument prototype would still apply.  */
28885#ifdef __cplusplus
28886extern "C"
28887#endif
28888char dnet_ntoa ();
28889int
28890main ()
28891{
28892return dnet_ntoa ();
28893  ;
28894  return 0;
28895}
28896_ACEOF
28897if ac_fn_cxx_try_link "$LINENO"; then :
28898  ac_cv_lib_dnet_stub_dnet_ntoa=yes
28899else
28900  ac_cv_lib_dnet_stub_dnet_ntoa=no
28901fi
28902rm -f core conftest.err conftest.$ac_objext \
28903    conftest$ac_exeext conftest.$ac_ext
28904LIBS=$ac_check_lib_save_LIBS
28905fi
28906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
28907$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
28908if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
28909  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
28910fi
28911
28912    fi
28913fi
28914rm -f core conftest.err conftest.$ac_objext \
28915    conftest$ac_exeext conftest.$ac_ext
28916    LIBS="$ac_xsave_LIBS"
28917
28918    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
28919    # to get the SysV transport functions.
28920    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
28921    # needs -lnsl.
28922    # The nsl library prevents programs from opening the X display
28923    # on Irix 5.2, according to T.E. Dickey.
28924    # The functions gethostbyname, getservbyname, and inet_addr are
28925    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
28926    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
28927if test "x$ac_cv_func_gethostbyname" = x""yes; then :
28928
28929fi
28930
28931    if test $ac_cv_func_gethostbyname = no; then
28932      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
28933$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
28934if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
28935  $as_echo_n "(cached) " >&6
28936else
28937  ac_check_lib_save_LIBS=$LIBS
28938LIBS="-lnsl  $LIBS"
28939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28940/* end confdefs.h.  */
28941
28942/* Override any GCC internal prototype to avoid an error.
28943   Use char because int might match the return type of a GCC
28944   builtin and then its argument prototype would still apply.  */
28945#ifdef __cplusplus
28946extern "C"
28947#endif
28948char gethostbyname ();
28949int
28950main ()
28951{
28952return gethostbyname ();
28953  ;
28954  return 0;
28955}
28956_ACEOF
28957if ac_fn_cxx_try_link "$LINENO"; then :
28958  ac_cv_lib_nsl_gethostbyname=yes
28959else
28960  ac_cv_lib_nsl_gethostbyname=no
28961fi
28962rm -f core conftest.err conftest.$ac_objext \
28963    conftest$ac_exeext conftest.$ac_ext
28964LIBS=$ac_check_lib_save_LIBS
28965fi
28966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
28967$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
28968if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
28969  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
28970fi
28971
28972      if test $ac_cv_lib_nsl_gethostbyname = no; then
28973	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
28974$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
28975if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
28976  $as_echo_n "(cached) " >&6
28977else
28978  ac_check_lib_save_LIBS=$LIBS
28979LIBS="-lbsd  $LIBS"
28980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28981/* end confdefs.h.  */
28982
28983/* Override any GCC internal prototype to avoid an error.
28984   Use char because int might match the return type of a GCC
28985   builtin and then its argument prototype would still apply.  */
28986#ifdef __cplusplus
28987extern "C"
28988#endif
28989char gethostbyname ();
28990int
28991main ()
28992{
28993return gethostbyname ();
28994  ;
28995  return 0;
28996}
28997_ACEOF
28998if ac_fn_cxx_try_link "$LINENO"; then :
28999  ac_cv_lib_bsd_gethostbyname=yes
29000else
29001  ac_cv_lib_bsd_gethostbyname=no
29002fi
29003rm -f core conftest.err conftest.$ac_objext \
29004    conftest$ac_exeext conftest.$ac_ext
29005LIBS=$ac_check_lib_save_LIBS
29006fi
29007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
29008$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
29009if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
29010  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
29011fi
29012
29013      fi
29014    fi
29015
29016    # lieder@skyler.mavd.honeywell.com says without -lsocket,
29017    # socket/setsockopt and other routines are undefined under SCO ODT
29018    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
29019    # on later versions), says Simon Leinen: it contains gethostby*
29020    # variants that don't use the name server (or something).  -lsocket
29021    # must be given before -lnsl if both are needed.  We assume that
29022    # if connect needs -lnsl, so does gethostbyname.
29023    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
29024if test "x$ac_cv_func_connect" = x""yes; then :
29025
29026fi
29027
29028    if test $ac_cv_func_connect = no; then
29029      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
29030$as_echo_n "checking for connect in -lsocket... " >&6; }
29031if test "${ac_cv_lib_socket_connect+set}" = set; then :
29032  $as_echo_n "(cached) " >&6
29033else
29034  ac_check_lib_save_LIBS=$LIBS
29035LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
29036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29037/* end confdefs.h.  */
29038
29039/* Override any GCC internal prototype to avoid an error.
29040   Use char because int might match the return type of a GCC
29041   builtin and then its argument prototype would still apply.  */
29042#ifdef __cplusplus
29043extern "C"
29044#endif
29045char connect ();
29046int
29047main ()
29048{
29049return connect ();
29050  ;
29051  return 0;
29052}
29053_ACEOF
29054if ac_fn_cxx_try_link "$LINENO"; then :
29055  ac_cv_lib_socket_connect=yes
29056else
29057  ac_cv_lib_socket_connect=no
29058fi
29059rm -f core conftest.err conftest.$ac_objext \
29060    conftest$ac_exeext conftest.$ac_ext
29061LIBS=$ac_check_lib_save_LIBS
29062fi
29063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
29064$as_echo "$ac_cv_lib_socket_connect" >&6; }
29065if test "x$ac_cv_lib_socket_connect" = x""yes; then :
29066  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
29067fi
29068
29069    fi
29070
29071    # Guillermo Gomez says -lposix is necessary on A/UX.
29072    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
29073if test "x$ac_cv_func_remove" = x""yes; then :
29074
29075fi
29076
29077    if test $ac_cv_func_remove = no; then
29078      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
29079$as_echo_n "checking for remove in -lposix... " >&6; }
29080if test "${ac_cv_lib_posix_remove+set}" = set; then :
29081  $as_echo_n "(cached) " >&6
29082else
29083  ac_check_lib_save_LIBS=$LIBS
29084LIBS="-lposix  $LIBS"
29085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29086/* end confdefs.h.  */
29087
29088/* Override any GCC internal prototype to avoid an error.
29089   Use char because int might match the return type of a GCC
29090   builtin and then its argument prototype would still apply.  */
29091#ifdef __cplusplus
29092extern "C"
29093#endif
29094char remove ();
29095int
29096main ()
29097{
29098return remove ();
29099  ;
29100  return 0;
29101}
29102_ACEOF
29103if ac_fn_cxx_try_link "$LINENO"; then :
29104  ac_cv_lib_posix_remove=yes
29105else
29106  ac_cv_lib_posix_remove=no
29107fi
29108rm -f core conftest.err conftest.$ac_objext \
29109    conftest$ac_exeext conftest.$ac_ext
29110LIBS=$ac_check_lib_save_LIBS
29111fi
29112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
29113$as_echo "$ac_cv_lib_posix_remove" >&6; }
29114if test "x$ac_cv_lib_posix_remove" = x""yes; then :
29115  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
29116fi
29117
29118    fi
29119
29120    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
29121    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
29122if test "x$ac_cv_func_shmat" = x""yes; then :
29123
29124fi
29125
29126    if test $ac_cv_func_shmat = no; then
29127      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
29128$as_echo_n "checking for shmat in -lipc... " >&6; }
29129if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
29130  $as_echo_n "(cached) " >&6
29131else
29132  ac_check_lib_save_LIBS=$LIBS
29133LIBS="-lipc  $LIBS"
29134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29135/* end confdefs.h.  */
29136
29137/* Override any GCC internal prototype to avoid an error.
29138   Use char because int might match the return type of a GCC
29139   builtin and then its argument prototype would still apply.  */
29140#ifdef __cplusplus
29141extern "C"
29142#endif
29143char shmat ();
29144int
29145main ()
29146{
29147return shmat ();
29148  ;
29149  return 0;
29150}
29151_ACEOF
29152if ac_fn_cxx_try_link "$LINENO"; then :
29153  ac_cv_lib_ipc_shmat=yes
29154else
29155  ac_cv_lib_ipc_shmat=no
29156fi
29157rm -f core conftest.err conftest.$ac_objext \
29158    conftest$ac_exeext conftest.$ac_ext
29159LIBS=$ac_check_lib_save_LIBS
29160fi
29161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
29162$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
29163if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
29164  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
29165fi
29166
29167    fi
29168  fi
29169
29170  # Check for libraries that X11R6 Xt/Xaw programs need.
29171  ac_save_LDFLAGS=$LDFLAGS
29172  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
29173  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
29174  # check for ICE first), but we must link in the order -lSM -lICE or
29175  # we get undefined symbols.  So assume we have SM if we have ICE.
29176  # These have to be linked with before -lX11, unlike the other
29177  # libraries we check for below, so use a different variable.
29178  # John Interrante, Karl Berry
29179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
29180$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
29181if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
29182  $as_echo_n "(cached) " >&6
29183else
29184  ac_check_lib_save_LIBS=$LIBS
29185LIBS="-lICE $X_EXTRA_LIBS $LIBS"
29186cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29187/* end confdefs.h.  */
29188
29189/* Override any GCC internal prototype to avoid an error.
29190   Use char because int might match the return type of a GCC
29191   builtin and then its argument prototype would still apply.  */
29192#ifdef __cplusplus
29193extern "C"
29194#endif
29195char IceConnectionNumber ();
29196int
29197main ()
29198{
29199return IceConnectionNumber ();
29200  ;
29201  return 0;
29202}
29203_ACEOF
29204if ac_fn_cxx_try_link "$LINENO"; then :
29205  ac_cv_lib_ICE_IceConnectionNumber=yes
29206else
29207  ac_cv_lib_ICE_IceConnectionNumber=no
29208fi
29209rm -f core conftest.err conftest.$ac_objext \
29210    conftest$ac_exeext conftest.$ac_ext
29211LIBS=$ac_check_lib_save_LIBS
29212fi
29213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
29214$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
29215if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
29216  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
29217fi
29218
29219  LDFLAGS=$ac_save_LDFLAGS
29220
29221fi
29222
29223
29224if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
29225
29226    # Print a helpful message on how to acquire the necessary build dependency.
29227    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29228    MISSING_DEPENDENCY=x11
29229    PKGHANDLER_COMMAND=
29230
29231    case $PKGHANDLER in
29232	apt-get)
29233                apt_help     $MISSING_DEPENDENCY ;;
29234    yum)
29235                yum_help     $MISSING_DEPENDENCY ;;
29236	port)
29237                port_help    $MISSING_DEPENDENCY ;;
29238	pkgutil)
29239                pkgutil_help $MISSING_DEPENDENCY ;;
29240	pkgadd)
29241                pkgadd_help  $MISSING_DEPENDENCY ;;
29242    * )
29243      break ;;
29244    esac
29245
29246    if test "x$PKGHANDLER_COMMAND" != x; then
29247        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29248    fi
29249
29250    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
29251fi
29252
29253# Some of the old makefiles require a setting of OPENWIN_HOME
29254# Since the X11R6 directory has disappeared on later Linuxes,
29255# we need to probe for it.
29256if test "x$OPENJDK_TARGET_OS" = xlinux; then
29257    if test -d "$SYS_ROOT/usr/X11R6"; then
29258        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
29259    fi
29260    if test -d "$SYS_ROOT/usr/include/X11"; then
29261        OPENWIN_HOME="$SYS_ROOT/usr"
29262    fi
29263fi
29264if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29265    OPENWIN_HOME="/usr/openwin"
29266fi
29267
29268
29269
29270#
29271# Weird Sol10 something check...TODO change to try compile
29272#
29273if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
29274  if test "`uname -r`" = "5.10"; then
29275     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
29276     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
29277     fi
29278  fi
29279fi
29280
29281ac_ext=c
29282ac_cpp='$CPP $CPPFLAGS'
29283ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29284ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29285ac_compiler_gnu=$ac_cv_c_compiler_gnu
29286
29287OLD_CFLAGS="$CFLAGS"
29288CFLAGS="$CFLAGS $X_CFLAGS"
29289
29290# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
29291for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
29292do :
29293  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29294ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
29295                   # include <X11/Xutil.h>
29296
29297"
29298if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29299  cat >>confdefs.h <<_ACEOF
29300#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29301_ACEOF
29302 X11_A_OK=yes
29303else
29304  X11_A_OK=no
29305fi
29306
29307done
29308
29309
29310CFLAGS="$OLD_CFLAGS"
29311ac_ext=cpp
29312ac_cpp='$CXXCPP $CPPFLAGS'
29313ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29314ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29315ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29316
29317
29318if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
29319
29320    # Print a helpful message on how to acquire the necessary build dependency.
29321    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
29322    MISSING_DEPENDENCY=x11
29323    PKGHANDLER_COMMAND=
29324
29325    case $PKGHANDLER in
29326	apt-get)
29327                apt_help     $MISSING_DEPENDENCY ;;
29328    yum)
29329                yum_help     $MISSING_DEPENDENCY ;;
29330	port)
29331                port_help    $MISSING_DEPENDENCY ;;
29332	pkgutil)
29333                pkgutil_help $MISSING_DEPENDENCY ;;
29334	pkgadd)
29335                pkgadd_help  $MISSING_DEPENDENCY ;;
29336    * )
29337      break ;;
29338    esac
29339
29340    if test "x$PKGHANDLER_COMMAND" != x; then
29341        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29342    fi
29343
29344    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
29345fi
29346
29347
29348
29349
29350
29351
29352###############################################################################
29353#
29354# The common unix printing system cups is used to print from java.
29355#
29356
29357# Check whether --with-cups was given.
29358if test "${with_cups+set}" = set; then :
29359  withval=$with_cups;
29360fi
29361
29362
29363# Check whether --with-cups-include was given.
29364if test "${with_cups_include+set}" = set; then :
29365  withval=$with_cups_include;
29366fi
29367
29368
29369if test "x$CUPS_NOT_NEEDED" = xyes; then
29370	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
29371		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
29372$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
29373	fi
29374	CUPS_CFLAGS=
29375else
29376	CUPS_FOUND=no
29377
29378	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
29379	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
29380	fi
29381
29382	if test "x${with_cups}" != x; then
29383	    CUPS_CFLAGS="-I${with_cups}/include"
29384	    CUPS_FOUND=yes
29385	fi
29386	if test "x${with_cups_include}" != x; then
29387	    CUPS_CFLAGS="-I${with_cups_include}"
29388	    CUPS_FOUND=yes
29389	fi
29390	if test "x$CUPS_FOUND" = xno; then
29391
29392
29393    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29394        # Source the builddeps file again, to make sure it uses the latest variables!
29395        . $builddepsfile
29396        # Look for a target and build machine specific resource!
29397        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29398        if test "x$resource" = x; then
29399            # Ok, lets instead look for a target specific resource
29400            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
29401        fi
29402        if test "x$resource" = x; then
29403            # Ok, lets instead look for a build specific resource
29404            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
29405        fi
29406        if test "x$resource" = x; then
29407            # Ok, lets instead look for a generic resource
29408            # (The cups comes from M4 and not the shell, thus no need for eval here.)
29409            resource=${builddep_cups}
29410        fi
29411        if test "x$resource" != x; then
29412            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
29413$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
29414	    # If the resource in the builddeps.conf file is an existing directory,
29415	    # for example /java/linux/cups
29416	    if test -d ${resource}; then
29417	       depdir=${resource}
29418	    else
29419
29420# cups is for example mymodule
29421# $resource is for example libs/general/libmymod_1_2_3.zip
29422# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29423# $with_builddeps_dir is for example /localhome/builddeps
29424# depdir is the name of the variable into which we store the depdir, eg MYMOD
29425# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29426# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29427    filename=`basename $resource`
29428    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29429    filebase=${filename%%.*}
29430    extension=${filename#*.}
29431    installdir=$with_builddeps_dir/$filebase
29432    if test ! -f $installdir/$filename.unpacked; then
29433        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
29434$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29435        if test ! -d $installdir; then
29436            mkdir -p $installdir
29437        fi
29438        if test ! -d $installdir; then
29439            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29440        fi
29441        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
29442        touch $tmpfile
29443        if test ! -f $tmpfile; then
29444            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29445        fi
29446
29447    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29448    # $tmpfile is the local file name for the downloaded file.
29449    VALID_TOOL=no
29450    if test "x$BDEPS_FTP" = xwget; then
29451       VALID_TOOL=yes
29452       wget -O $tmpfile $with_builddeps_server/$resource
29453    fi
29454    if test "x$BDEPS_FTP" = xlftp; then
29455       VALID_TOOL=yes
29456       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29457    fi
29458    if test "x$BDEPS_FTP" = xftp; then
29459        VALID_TOOL=yes
29460        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29461        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29462        FTPUSERPWD=${FTPSERVER%%@*}
29463        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29464            FTPUSER=${userpwd%%:*}
29465            FTPPWD=${userpwd#*@}
29466            FTPSERVER=${FTPSERVER#*@}
29467        else
29468            FTPUSER=ftp
29469            FTPPWD=ftp
29470        fi
29471        # the "pass" command does not work on some
29472        # ftp clients (read ftp.exe) but if it works,
29473        # passive mode is better!
29474        (\
29475            echo "user $FTPUSER $FTPPWD"        ;\
29476            echo "pass"                         ;\
29477            echo "bin"                          ;\
29478            echo "get $FTPPATH $tmpfile"              ;\
29479        ) | ftp -in $FTPSERVER
29480    fi
29481    if test "x$VALID_TOOL" != xyes; then
29482       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29483    fi
29484
29485        mv $tmpfile $installdir/$filename
29486        if test ! -s $installdir/$filename; then
29487            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29488        fi
29489        case "$extension" in
29490            zip)  echo "Unzipping $installdir/$filename..."
29491               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29492            ;;
29493            tar.gz) echo "Untaring $installdir/$filename..."
29494               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29495            ;;
29496            tgz) echo "Untaring $installdir/$filename..."
29497               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29498            ;;
29499            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29500            ;;
29501        esac
29502    fi
29503    if test -f $installdir/$filename.unpacked; then
29504        depdir=$installdir
29505    fi
29506
29507	    fi
29508            # Source the builddeps file again, because in the previous command, the depdir
29509            # was updated to point at the current build dependency install directory.
29510            . $builddepsfile
29511            # Now extract variables from the builddeps.conf files.
29512            theroot=${builddep_cups_ROOT}
29513            thecflags=${builddep_cups_CFLAGS}
29514            thelibs=${builddep_cups_LIBS}
29515            if test "x$depdir" = x; then
29516                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
29517            fi
29518            CUPS=$depdir
29519            if test "x$theroot" != x; then
29520               CUPS="$theroot"
29521            fi
29522            if test "x$thecflags" != x; then
29523               CUPS_CFLAGS="$thecflags"
29524            fi
29525            if test "x$thelibs" != x; then
29526               CUPS_LIBS="$thelibs"
29527            fi
29528            CUPS_FOUND=yes
29529
29530        fi
29531
29532    fi
29533
29534	fi
29535	if test "x$CUPS_FOUND" = xno; then
29536	    # Are the cups headers installed in the default /usr/include location?
29537	    for ac_header in cups/cups.h cups/ppd.h
29538do :
29539  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29540ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29541if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29542  cat >>confdefs.h <<_ACEOF
29543#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29544_ACEOF
29545 CUPS_FOUND=yes
29546	                      CUPS_CFLAGS=
29547	                      DEFAULT_CUPS=yes
29548fi
29549
29550done
29551
29552	fi
29553	if test "x$CUPS_FOUND" = xno; then
29554	    # Getting nervous now? Lets poke around for standard Solaris third-party
29555	    # package installation locations.
29556	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
29557$as_echo_n "checking for cups headers... " >&6; }
29558	    if test -s /opt/sfw/cups/include/cups/cups.h; then
29559	       # An SFW package seems to be installed!
29560	       CUPS_FOUND=yes
29561	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
29562	    elif test -s /opt/csw/include/cups/cups.h; then
29563	       # A CSW package seems to be installed!
29564	       CUPS_FOUND=yes
29565	       CUPS_CFLAGS="-I/opt/csw/include"
29566	    fi
29567	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
29568$as_echo "$CUPS_FOUND" >&6; }
29569	fi
29570	if test "x$CUPS_FOUND" = xno; then
29571
29572    # Print a helpful message on how to acquire the necessary build dependency.
29573    # cups is the help tag: freetyp2, cups, pulse, alsa etc
29574    MISSING_DEPENDENCY=cups
29575    PKGHANDLER_COMMAND=
29576
29577    case $PKGHANDLER in
29578	apt-get)
29579                apt_help     $MISSING_DEPENDENCY ;;
29580    yum)
29581                yum_help     $MISSING_DEPENDENCY ;;
29582	port)
29583                port_help    $MISSING_DEPENDENCY ;;
29584	pkgutil)
29585                pkgutil_help $MISSING_DEPENDENCY ;;
29586	pkgadd)
29587                pkgadd_help  $MISSING_DEPENDENCY ;;
29588    * )
29589      break ;;
29590    esac
29591
29592    if test "x$PKGHANDLER_COMMAND" != x; then
29593        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29594    fi
29595
29596	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
29597	fi
29598fi
29599
29600
29601
29602
29603
29604
29605###############################################################################
29606#
29607# The ubiquitous freetype2 library is used to render fonts.
29608#
29609
29610# Check whether --with-freetype was given.
29611if test "${with_freetype+set}" = set; then :
29612  withval=$with_freetype;
29613fi
29614
29615
29616# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
29617USING_SYSTEM_FT_LIB=false
29618
29619if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
29620	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
29621		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
29622$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
29623	fi
29624	FREETYPE2_CFLAGS=
29625	FREETYPE2_LIBS=
29626        FREETYPE2_LIB_PATH=
29627else
29628	FREETYPE2_FOUND=no
29629
29630	if test "x$with_freetype" != x; then
29631
29632  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29633
29634  # Input might be given as Windows format, start by converting to
29635  # unix format.
29636  path="$with_freetype"
29637  new_path=`$CYGPATH -u "$path"`
29638
29639  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29640  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29641  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29642  # "foo.exe" is OK but "foo" is an error.
29643  #
29644  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29645  # It is also a way to make sure we got the proper file name for the real test later on.
29646  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29647  if test "x$test_shortpath" = x; then
29648    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29649$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29650    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
29651  fi
29652
29653  # Call helper function which possibly converts this using DOS-style short mode.
29654  # If so, the updated path is stored in $new_path.
29655
29656  input_path="$new_path"
29657  # Check if we need to convert this using DOS-style short mode. If the path
29658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29659  # take no chances and rewrite it.
29660  # Note: m4 eats our [], so we need to use [ and ] instead.
29661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29662  if test "x$has_forbidden_chars" != x; then
29663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29667      # Going to short mode and back again did indeed matter. Since short mode is
29668      # case insensitive, let's make it lowercase to improve readability.
29669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29670      # Now convert it back to Unix-stile (cygpath)
29671      input_path=`$CYGPATH -u "$shortmode_path"`
29672      new_path="$input_path"
29673    fi
29674  fi
29675
29676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29677  if test "x$test_cygdrive_prefix" = x; then
29678    # As a simple fix, exclude /usr/bin since it's not a real path.
29679    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29681      # a path prefixed by /cygdrive for fixpath to work.
29682      new_path="$CYGWIN_ROOT_PATH$input_path"
29683    fi
29684  fi
29685
29686
29687  if test "x$path" != "x$new_path"; then
29688    with_freetype="$new_path"
29689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29690$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29691  fi
29692
29693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29694
29695  path="$with_freetype"
29696  has_colon=`$ECHO $path | $GREP ^.:`
29697  new_path="$path"
29698  if test "x$has_colon" = x; then
29699    # Not in mixed or Windows style, start by that.
29700    new_path=`cmd //c echo $path`
29701  fi
29702
29703
29704  input_path="$new_path"
29705  # Check if we need to convert this using DOS-style short mode. If the path
29706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29707  # take no chances and rewrite it.
29708  # Note: m4 eats our [], so we need to use [ and ] instead.
29709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29710  if test "x$has_forbidden_chars" != x; then
29711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29713  fi
29714
29715
29716  windows_path="$new_path"
29717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29718    unix_path=`$CYGPATH -u "$windows_path"`
29719    new_path="$unix_path"
29720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29722    new_path="$unix_path"
29723  fi
29724
29725  if test "x$path" != "x$new_path"; then
29726    with_freetype="$new_path"
29727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
29728$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
29729  fi
29730
29731  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29732  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29733
29734  else
29735    # We're on a posix platform. Hooray! :)
29736    path="$with_freetype"
29737
29738    if test ! -f "$path" && test ! -d "$path"; then
29739      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
29740    fi
29741
29742    has_space=`$ECHO "$path" | $GREP " "`
29743    if test "x$has_space" != x; then
29744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
29745$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
29746      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29747    fi
29748  fi
29749
29750	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
29751            FREETYPE2_LIB_PATH="$with_freetype/lib"
29752            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
29753                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
29754                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
29755            fi
29756            if test "x$OPENJDK_TARGET_OS" = xwindows; then
29757                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
29758            fi
29759	    FREETYPE2_CFLAGS="-I$with_freetype/include"
29760            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
29761                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
29762            fi
29763 	    FREETYPE2_FOUND=yes
29764   	    if test "x$FREETYPE2_FOUND" = xyes; then
29765	        # Verify that the directories exist
29766                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
29767		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
29768		fi
29769	        # List the contents of the lib.
29770		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
29771                if test "x$FREETYPELIB" = x; then
29772		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
29773		fi
29774	        # Check one h-file
29775                if ! test -s "$with_freetype/include/ft2build.h"; then
29776		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
29777		fi
29778            fi
29779        fi
29780	if test "x$FREETYPE2_FOUND" = xno; then
29781
29782
29783    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
29784        # Source the builddeps file again, to make sure it uses the latest variables!
29785        . $builddepsfile
29786        # Look for a target and build machine specific resource!
29787        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
29788        if test "x$resource" = x; then
29789            # Ok, lets instead look for a target specific resource
29790            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
29791        fi
29792        if test "x$resource" = x; then
29793            # Ok, lets instead look for a build specific resource
29794            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
29795        fi
29796        if test "x$resource" = x; then
29797            # Ok, lets instead look for a generic resource
29798            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
29799            resource=${builddep_freetype2}
29800        fi
29801        if test "x$resource" != x; then
29802            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
29803$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
29804	    # If the resource in the builddeps.conf file is an existing directory,
29805	    # for example /java/linux/cups
29806	    if test -d ${resource}; then
29807	       depdir=${resource}
29808	    else
29809
29810# freetype2 is for example mymodule
29811# $resource is for example libs/general/libmymod_1_2_3.zip
29812# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
29813# $with_builddeps_dir is for example /localhome/builddeps
29814# depdir is the name of the variable into which we store the depdir, eg MYMOD
29815# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
29816# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
29817    filename=`basename $resource`
29818    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
29819    filebase=${filename%%.*}
29820    extension=${filename#*.}
29821    installdir=$with_builddeps_dir/$filebase
29822    if test ! -f $installdir/$filename.unpacked; then
29823        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
29824$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
29825        if test ! -d $installdir; then
29826            mkdir -p $installdir
29827        fi
29828        if test ! -d $installdir; then
29829            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
29830        fi
29831        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
29832        touch $tmpfile
29833        if test ! -f $tmpfile; then
29834            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
29835        fi
29836
29837    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
29838    # $tmpfile is the local file name for the downloaded file.
29839    VALID_TOOL=no
29840    if test "x$BDEPS_FTP" = xwget; then
29841       VALID_TOOL=yes
29842       wget -O $tmpfile $with_builddeps_server/$resource
29843    fi
29844    if test "x$BDEPS_FTP" = xlftp; then
29845       VALID_TOOL=yes
29846       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
29847    fi
29848    if test "x$BDEPS_FTP" = xftp; then
29849        VALID_TOOL=yes
29850        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
29851        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
29852        FTPUSERPWD=${FTPSERVER%%@*}
29853        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
29854            FTPUSER=${userpwd%%:*}
29855            FTPPWD=${userpwd#*@}
29856            FTPSERVER=${FTPSERVER#*@}
29857        else
29858            FTPUSER=ftp
29859            FTPPWD=ftp
29860        fi
29861        # the "pass" command does not work on some
29862        # ftp clients (read ftp.exe) but if it works,
29863        # passive mode is better!
29864        (\
29865            echo "user $FTPUSER $FTPPWD"        ;\
29866            echo "pass"                         ;\
29867            echo "bin"                          ;\
29868            echo "get $FTPPATH $tmpfile"              ;\
29869        ) | ftp -in $FTPSERVER
29870    fi
29871    if test "x$VALID_TOOL" != xyes; then
29872       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
29873    fi
29874
29875        mv $tmpfile $installdir/$filename
29876        if test ! -s $installdir/$filename; then
29877            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
29878        fi
29879        case "$extension" in
29880            zip)  echo "Unzipping $installdir/$filename..."
29881               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
29882            ;;
29883            tar.gz) echo "Untaring $installdir/$filename..."
29884               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29885            ;;
29886            tgz) echo "Untaring $installdir/$filename..."
29887               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
29888            ;;
29889            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
29890            ;;
29891        esac
29892    fi
29893    if test -f $installdir/$filename.unpacked; then
29894        depdir=$installdir
29895    fi
29896
29897	    fi
29898            # Source the builddeps file again, because in the previous command, the depdir
29899            # was updated to point at the current build dependency install directory.
29900            . $builddepsfile
29901            # Now extract variables from the builddeps.conf files.
29902            theroot=${builddep_freetype2_ROOT}
29903            thecflags=${builddep_freetype2_CFLAGS}
29904            thelibs=${builddep_freetype2_LIBS}
29905            if test "x$depdir" = x; then
29906                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
29907            fi
29908            FREETYPE2=$depdir
29909            if test "x$theroot" != x; then
29910               FREETYPE2="$theroot"
29911            fi
29912            if test "x$thecflags" != x; then
29913               FREETYPE2_CFLAGS="$thecflags"
29914            fi
29915            if test "x$thelibs" != x; then
29916               FREETYPE2_LIBS="$thelibs"
29917            fi
29918            FREETYPE2_FOUND=yes
29919            else FREETYPE2_FOUND=no
29920
29921        fi
29922        else FREETYPE2_FOUND=no
29923
29924    fi
29925
29926            USING_SYSTEM_FT_LIB=true
29927	fi
29928	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
29929            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
29930
29931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29932
29933  # Input might be given as Windows format, start by converting to
29934  # unix format.
29935  path="$FREETYPELOCATION"
29936  new_path=`$CYGPATH -u "$path"`
29937
29938  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29939  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29940  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29941  # "foo.exe" is OK but "foo" is an error.
29942  #
29943  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29944  # It is also a way to make sure we got the proper file name for the real test later on.
29945  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29946  if test "x$test_shortpath" = x; then
29947    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
29948$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
29949    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
29950  fi
29951
29952  # Call helper function which possibly converts this using DOS-style short mode.
29953  # If so, the updated path is stored in $new_path.
29954
29955  input_path="$new_path"
29956  # Check if we need to convert this using DOS-style short mode. If the path
29957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29958  # take no chances and rewrite it.
29959  # Note: m4 eats our [], so we need to use [ and ] instead.
29960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29961  if test "x$has_forbidden_chars" != x; then
29962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29963    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29964    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29965    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29966      # Going to short mode and back again did indeed matter. Since short mode is
29967      # case insensitive, let's make it lowercase to improve readability.
29968      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29969      # Now convert it back to Unix-stile (cygpath)
29970      input_path=`$CYGPATH -u "$shortmode_path"`
29971      new_path="$input_path"
29972    fi
29973  fi
29974
29975  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29976  if test "x$test_cygdrive_prefix" = x; then
29977    # As a simple fix, exclude /usr/bin since it's not a real path.
29978    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29979      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29980      # a path prefixed by /cygdrive for fixpath to work.
29981      new_path="$CYGWIN_ROOT_PATH$input_path"
29982    fi
29983  fi
29984
29985
29986  if test "x$path" != "x$new_path"; then
29987    FREETYPELOCATION="$new_path"
29988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
29989$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
29990  fi
29991
29992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29993
29994  path="$FREETYPELOCATION"
29995  has_colon=`$ECHO $path | $GREP ^.:`
29996  new_path="$path"
29997  if test "x$has_colon" = x; then
29998    # Not in mixed or Windows style, start by that.
29999    new_path=`cmd //c echo $path`
30000  fi
30001
30002
30003  input_path="$new_path"
30004  # Check if we need to convert this using DOS-style short mode. If the path
30005  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30006  # take no chances and rewrite it.
30007  # Note: m4 eats our [], so we need to use [ and ] instead.
30008  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30009  if test "x$has_forbidden_chars" != x; then
30010    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30011    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30012  fi
30013
30014
30015  windows_path="$new_path"
30016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30017    unix_path=`$CYGPATH -u "$windows_path"`
30018    new_path="$unix_path"
30019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30021    new_path="$unix_path"
30022  fi
30023
30024  if test "x$path" != "x$new_path"; then
30025    FREETYPELOCATION="$new_path"
30026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
30027$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
30028  fi
30029
30030  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30031  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30032
30033  else
30034    # We're on a posix platform. Hooray! :)
30035    path="$FREETYPELOCATION"
30036
30037    if test ! -f "$path" && test ! -d "$path"; then
30038      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
30039    fi
30040
30041    has_space=`$ECHO "$path" | $GREP " "`
30042    if test "x$has_space" != x; then
30043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
30044$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
30045      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30046    fi
30047  fi
30048
30049	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
30050$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
30051	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
30052	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
30053	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
30054 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
30055                if ! test -s "$FREETYPE2_LIBS"; then
30056		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
30057		fi
30058                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
30059		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
30060		fi
30061                USING_SYSTEM_FT_LIB=true
30062                FREETYPE2_FOUND=yes
30063	    fi
30064	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30065$as_echo "$FREETYPE2_FOUND" >&6; }
30066        fi
30067	if test "x$FREETYPE2_FOUND" = xno; then
30068
30069pkg_failed=no
30070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
30071$as_echo_n "checking for FREETYPE2... " >&6; }
30072
30073if test -n "$FREETYPE2_CFLAGS"; then
30074    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
30075 elif test -n "$PKG_CONFIG"; then
30076    if test -n "$PKG_CONFIG" && \
30077    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30078  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30079  ac_status=$?
30080  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30081  test $ac_status = 0; }; then
30082  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
30083else
30084  pkg_failed=yes
30085fi
30086 else
30087    pkg_failed=untried
30088fi
30089if test -n "$FREETYPE2_LIBS"; then
30090    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
30091 elif test -n "$PKG_CONFIG"; then
30092    if test -n "$PKG_CONFIG" && \
30093    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
30094  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
30095  ac_status=$?
30096  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30097  test $ac_status = 0; }; then
30098  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
30099else
30100  pkg_failed=yes
30101fi
30102 else
30103    pkg_failed=untried
30104fi
30105
30106
30107
30108if test $pkg_failed = yes; then
30109
30110if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30111        _pkg_short_errors_supported=yes
30112else
30113        _pkg_short_errors_supported=no
30114fi
30115        if test $_pkg_short_errors_supported = yes; then
30116	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
30117        else
30118	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
30119        fi
30120	# Put the nasty error message in config.log where it belongs
30121	echo "$FREETYPE2_PKG_ERRORS" >&5
30122
30123	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30124$as_echo "no" >&6; }
30125                FREETYPE2_FOUND=no
30126elif test $pkg_failed = untried; then
30127	FREETYPE2_FOUND=no
30128else
30129	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
30130	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
30131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30132$as_echo "yes" >&6; }
30133	FREETYPE2_FOUND=yes
30134fi
30135            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
30136            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
30137            USING_SYSTEM_FT_LIB=true
30138            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
30139            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
30140              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
30141            fi
30142	fi
30143	if test "x$FREETYPE2_FOUND" = xno; then
30144	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
30145$as_echo_n "checking for freetype in some standard locations... " >&6; }
30146
30147	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
30148	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
30149	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
30150	    fi
30151	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
30152	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
30153	        DEFAULT_FREETYPE_LIBS="-lfreetype"
30154	    fi
30155
30156	    PREV_CXXCFLAGS="$CXXFLAGS"
30157	    PREV_LDFLAGS="$LDFLAGS"
30158	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
30159	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
30160	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30161/* end confdefs.h.  */
30162#include<ft2build.h>
30163	                    #include FT_FREETYPE_H
30164	                   int main() { return 0; }
30165
30166_ACEOF
30167if ac_fn_cxx_try_link "$LINENO"; then :
30168
30169	                      # Yes, the default cflags and libs did the trick.
30170	                      FREETYPE2_FOUND=yes
30171	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
30172	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
30173
30174else
30175
30176	                      FREETYPE2_FOUND=no
30177
30178fi
30179rm -f core conftest.err conftest.$ac_objext \
30180    conftest$ac_exeext conftest.$ac_ext
30181            CXXCFLAGS="$PREV_CXXFLAGS"
30182	    LDFLAGS="$PREV_LDFLAGS"
30183	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
30184$as_echo "$FREETYPE2_FOUND" >&6; }
30185            USING_SYSTEM_FT_LIB=true
30186	fi
30187	if test "x$FREETYPE2_FOUND" = xno; then
30188
30189    # Print a helpful message on how to acquire the necessary build dependency.
30190    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
30191    MISSING_DEPENDENCY=freetype2
30192    PKGHANDLER_COMMAND=
30193
30194    case $PKGHANDLER in
30195	apt-get)
30196                apt_help     $MISSING_DEPENDENCY ;;
30197    yum)
30198                yum_help     $MISSING_DEPENDENCY ;;
30199	port)
30200                port_help    $MISSING_DEPENDENCY ;;
30201	pkgutil)
30202                pkgutil_help $MISSING_DEPENDENCY ;;
30203	pkgadd)
30204                pkgadd_help  $MISSING_DEPENDENCY ;;
30205    * )
30206      break ;;
30207    esac
30208
30209    if test "x$PKGHANDLER_COMMAND" != x; then
30210        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30211    fi
30212
30213		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30214	fi
30215
30216        if test "x$OPENJDK_TARGET_OS" != xwindows; then
30217            # AC_CHECK_LIB does not support use of cl.exe
30218            PREV_LDFLAGS="$LDFLAGS"
30219            LDFLAGS="$FREETYPE2_LIBS"
30220            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
30221$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
30222if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
30223  $as_echo_n "(cached) " >&6
30224else
30225  ac_check_lib_save_LIBS=$LIBS
30226LIBS="-lfreetype  $LIBS"
30227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30228/* end confdefs.h.  */
30229
30230/* Override any GCC internal prototype to avoid an error.
30231   Use char because int might match the return type of a GCC
30232   builtin and then its argument prototype would still apply.  */
30233#ifdef __cplusplus
30234extern "C"
30235#endif
30236char FT_Init_FreeType ();
30237int
30238main ()
30239{
30240return FT_Init_FreeType ();
30241  ;
30242  return 0;
30243}
30244_ACEOF
30245if ac_fn_cxx_try_link "$LINENO"; then :
30246  ac_cv_lib_freetype_FT_Init_FreeType=yes
30247else
30248  ac_cv_lib_freetype_FT_Init_FreeType=no
30249fi
30250rm -f core conftest.err conftest.$ac_objext \
30251    conftest$ac_exeext conftest.$ac_ext
30252LIBS=$ac_check_lib_save_LIBS
30253fi
30254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
30255$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
30256if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
30257  FREETYPE2_FOUND=true
30258else
30259  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
30260fi
30261
30262            LDFLAGS="$PREV_LDFLAGS"
30263        fi
30264fi
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274###############################################################################
30275#
30276# Check for alsa headers and libraries. Used on Linux/GNU systems.
30277#
30278
30279# Check whether --with-alsa was given.
30280if test "${with_alsa+set}" = set; then :
30281  withval=$with_alsa;
30282fi
30283
30284
30285# Check whether --with-alsa-include was given.
30286if test "${with_alsa_include+set}" = set; then :
30287  withval=$with_alsa_include;
30288fi
30289
30290
30291# Check whether --with-alsa-lib was given.
30292if test "${with_alsa_lib+set}" = set; then :
30293  withval=$with_alsa_lib;
30294fi
30295
30296
30297if test "x$ALSA_NOT_NEEDED" = xyes; then
30298	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
30299		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
30300$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
30301	fi
30302	ALSA_CFLAGS=
30303	ALSA_LIBS=
30304else
30305	ALSA_FOUND=no
30306
30307	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
30308	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
30309	fi
30310
30311	if test "x${with_alsa}" != x; then
30312	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
30313	    ALSA_CFLAGS="-I${with_alsa}/include"
30314	    ALSA_FOUND=yes
30315	fi
30316	if test "x${with_alsa_include}" != x; then
30317	    ALSA_CFLAGS="-I${with_alsa_include}"
30318	    ALSA_FOUND=yes
30319	fi
30320	if test "x${with_alsa_lib}" != x; then
30321	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
30322	    ALSA_FOUND=yes
30323	fi
30324	if test "x$ALSA_FOUND" = xno; then
30325
30326
30327    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30328        # Source the builddeps file again, to make sure it uses the latest variables!
30329        . $builddepsfile
30330        # Look for a target and build machine specific resource!
30331        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30332        if test "x$resource" = x; then
30333            # Ok, lets instead look for a target specific resource
30334            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
30335        fi
30336        if test "x$resource" = x; then
30337            # Ok, lets instead look for a build specific resource
30338            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
30339        fi
30340        if test "x$resource" = x; then
30341            # Ok, lets instead look for a generic resource
30342            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
30343            resource=${builddep_alsa}
30344        fi
30345        if test "x$resource" != x; then
30346            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
30347$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
30348	    # If the resource in the builddeps.conf file is an existing directory,
30349	    # for example /java/linux/cups
30350	    if test -d ${resource}; then
30351	       depdir=${resource}
30352	    else
30353
30354# alsa is for example mymodule
30355# $resource is for example libs/general/libmymod_1_2_3.zip
30356# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30357# $with_builddeps_dir is for example /localhome/builddeps
30358# depdir is the name of the variable into which we store the depdir, eg MYMOD
30359# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30360# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30361    filename=`basename $resource`
30362    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30363    filebase=${filename%%.*}
30364    extension=${filename#*.}
30365    installdir=$with_builddeps_dir/$filebase
30366    if test ! -f $installdir/$filename.unpacked; then
30367        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
30368$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30369        if test ! -d $installdir; then
30370            mkdir -p $installdir
30371        fi
30372        if test ! -d $installdir; then
30373            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30374        fi
30375        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
30376        touch $tmpfile
30377        if test ! -f $tmpfile; then
30378            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30379        fi
30380
30381    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30382    # $tmpfile is the local file name for the downloaded file.
30383    VALID_TOOL=no
30384    if test "x$BDEPS_FTP" = xwget; then
30385       VALID_TOOL=yes
30386       wget -O $tmpfile $with_builddeps_server/$resource
30387    fi
30388    if test "x$BDEPS_FTP" = xlftp; then
30389       VALID_TOOL=yes
30390       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30391    fi
30392    if test "x$BDEPS_FTP" = xftp; then
30393        VALID_TOOL=yes
30394        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30395        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30396        FTPUSERPWD=${FTPSERVER%%@*}
30397        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30398            FTPUSER=${userpwd%%:*}
30399            FTPPWD=${userpwd#*@}
30400            FTPSERVER=${FTPSERVER#*@}
30401        else
30402            FTPUSER=ftp
30403            FTPPWD=ftp
30404        fi
30405        # the "pass" command does not work on some
30406        # ftp clients (read ftp.exe) but if it works,
30407        # passive mode is better!
30408        (\
30409            echo "user $FTPUSER $FTPPWD"        ;\
30410            echo "pass"                         ;\
30411            echo "bin"                          ;\
30412            echo "get $FTPPATH $tmpfile"              ;\
30413        ) | ftp -in $FTPSERVER
30414    fi
30415    if test "x$VALID_TOOL" != xyes; then
30416       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30417    fi
30418
30419        mv $tmpfile $installdir/$filename
30420        if test ! -s $installdir/$filename; then
30421            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30422        fi
30423        case "$extension" in
30424            zip)  echo "Unzipping $installdir/$filename..."
30425               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30426            ;;
30427            tar.gz) echo "Untaring $installdir/$filename..."
30428               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30429            ;;
30430            tgz) echo "Untaring $installdir/$filename..."
30431               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30432            ;;
30433            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30434            ;;
30435        esac
30436    fi
30437    if test -f $installdir/$filename.unpacked; then
30438        depdir=$installdir
30439    fi
30440
30441	    fi
30442            # Source the builddeps file again, because in the previous command, the depdir
30443            # was updated to point at the current build dependency install directory.
30444            . $builddepsfile
30445            # Now extract variables from the builddeps.conf files.
30446            theroot=${builddep_alsa_ROOT}
30447            thecflags=${builddep_alsa_CFLAGS}
30448            thelibs=${builddep_alsa_LIBS}
30449            if test "x$depdir" = x; then
30450                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
30451            fi
30452            ALSA=$depdir
30453            if test "x$theroot" != x; then
30454               ALSA="$theroot"
30455            fi
30456            if test "x$thecflags" != x; then
30457               ALSA_CFLAGS="$thecflags"
30458            fi
30459            if test "x$thelibs" != x; then
30460               ALSA_LIBS="$thelibs"
30461            fi
30462            ALSA_FOUND=yes
30463            else ALSA_FOUND=no
30464
30465        fi
30466        else ALSA_FOUND=no
30467
30468    fi
30469
30470	fi
30471	if test "x$ALSA_FOUND" = xno; then
30472
30473pkg_failed=no
30474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
30475$as_echo_n "checking for ALSA... " >&6; }
30476
30477if test -n "$ALSA_CFLAGS"; then
30478    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
30479 elif test -n "$PKG_CONFIG"; then
30480    if test -n "$PKG_CONFIG" && \
30481    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30482  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30483  ac_status=$?
30484  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30485  test $ac_status = 0; }; then
30486  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
30487else
30488  pkg_failed=yes
30489fi
30490 else
30491    pkg_failed=untried
30492fi
30493if test -n "$ALSA_LIBS"; then
30494    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
30495 elif test -n "$PKG_CONFIG"; then
30496    if test -n "$PKG_CONFIG" && \
30497    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
30498  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
30499  ac_status=$?
30500  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30501  test $ac_status = 0; }; then
30502  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
30503else
30504  pkg_failed=yes
30505fi
30506 else
30507    pkg_failed=untried
30508fi
30509
30510
30511
30512if test $pkg_failed = yes; then
30513
30514if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
30515        _pkg_short_errors_supported=yes
30516else
30517        _pkg_short_errors_supported=no
30518fi
30519        if test $_pkg_short_errors_supported = yes; then
30520	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
30521        else
30522	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
30523        fi
30524	# Put the nasty error message in config.log where it belongs
30525	echo "$ALSA_PKG_ERRORS" >&5
30526
30527	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30528$as_echo "no" >&6; }
30529                ALSA_FOUND=no
30530elif test $pkg_failed = untried; then
30531	ALSA_FOUND=no
30532else
30533	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
30534	ALSA_LIBS=$pkg_cv_ALSA_LIBS
30535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30536$as_echo "yes" >&6; }
30537	ALSA_FOUND=yes
30538fi
30539	fi
30540	if test "x$ALSA_FOUND" = xno; then
30541	    for ac_header in alsa/asoundlib.h
30542do :
30543  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
30544if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
30545  cat >>confdefs.h <<_ACEOF
30546#define HAVE_ALSA_ASOUNDLIB_H 1
30547_ACEOF
30548 ALSA_FOUND=yes
30549	                      ALSA_CFLAGS=-Iignoreme
30550	                      ALSA_LIBS=-lasound
30551	                      DEFAULT_ALSA=yes
30552else
30553  ALSA_FOUND=no
30554fi
30555
30556done
30557
30558	fi
30559	if test "x$ALSA_FOUND" = xno; then
30560
30561    # Print a helpful message on how to acquire the necessary build dependency.
30562    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
30563    MISSING_DEPENDENCY=alsa
30564    PKGHANDLER_COMMAND=
30565
30566    case $PKGHANDLER in
30567	apt-get)
30568                apt_help     $MISSING_DEPENDENCY ;;
30569    yum)
30570                yum_help     $MISSING_DEPENDENCY ;;
30571	port)
30572                port_help    $MISSING_DEPENDENCY ;;
30573	pkgutil)
30574                pkgutil_help $MISSING_DEPENDENCY ;;
30575	pkgadd)
30576                pkgadd_help  $MISSING_DEPENDENCY ;;
30577    * )
30578      break ;;
30579    esac
30580
30581    if test "x$PKGHANDLER_COMMAND" != x; then
30582        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30583    fi
30584
30585	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
30586	fi
30587fi
30588
30589
30590
30591
30592
30593
30594
30595###############################################################################
30596#
30597# Check for the jpeg library
30598#
30599
30600USE_EXTERNAL_LIBJPEG=true
30601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
30602$as_echo_n "checking for main in -ljpeg... " >&6; }
30603if test "${ac_cv_lib_jpeg_main+set}" = set; then :
30604  $as_echo_n "(cached) " >&6
30605else
30606  ac_check_lib_save_LIBS=$LIBS
30607LIBS="-ljpeg  $LIBS"
30608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30609/* end confdefs.h.  */
30610
30611
30612int
30613main ()
30614{
30615return main ();
30616  ;
30617  return 0;
30618}
30619_ACEOF
30620if ac_fn_cxx_try_link "$LINENO"; then :
30621  ac_cv_lib_jpeg_main=yes
30622else
30623  ac_cv_lib_jpeg_main=no
30624fi
30625rm -f core conftest.err conftest.$ac_objext \
30626    conftest$ac_exeext conftest.$ac_ext
30627LIBS=$ac_check_lib_save_LIBS
30628fi
30629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
30630$as_echo "$ac_cv_lib_jpeg_main" >&6; }
30631if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
30632  cat >>confdefs.h <<_ACEOF
30633#define HAVE_LIBJPEG 1
30634_ACEOF
30635
30636  LIBS="-ljpeg $LIBS"
30637
30638else
30639   USE_EXTERNAL_LIBJPEG=false
30640               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
30641$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
30642
30643fi
30644
30645
30646
30647###############################################################################
30648#
30649# Check for the gif library
30650#
30651
30652USE_EXTERNAL_LIBJPEG=true
30653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lgif" >&5
30654$as_echo_n "checking for main in -lgif... " >&6; }
30655if test "${ac_cv_lib_gif_main+set}" = set; then :
30656  $as_echo_n "(cached) " >&6
30657else
30658  ac_check_lib_save_LIBS=$LIBS
30659LIBS="-lgif  $LIBS"
30660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30661/* end confdefs.h.  */
30662
30663
30664int
30665main ()
30666{
30667return main ();
30668  ;
30669  return 0;
30670}
30671_ACEOF
30672if ac_fn_cxx_try_link "$LINENO"; then :
30673  ac_cv_lib_gif_main=yes
30674else
30675  ac_cv_lib_gif_main=no
30676fi
30677rm -f core conftest.err conftest.$ac_objext \
30678    conftest$ac_exeext conftest.$ac_ext
30679LIBS=$ac_check_lib_save_LIBS
30680fi
30681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_main" >&5
30682$as_echo "$ac_cv_lib_gif_main" >&6; }
30683if test "x$ac_cv_lib_gif_main" = x""yes; then :
30684  cat >>confdefs.h <<_ACEOF
30685#define HAVE_LIBGIF 1
30686_ACEOF
30687
30688  LIBS="-lgif $LIBS"
30689
30690else
30691   USE_EXTERNAL_LIBGIF=false
30692               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use gif decoder bundled with the OpenJDK source" >&5
30693$as_echo "$as_me: Will use gif decoder bundled with the OpenJDK source" >&6;}
30694
30695fi
30696
30697
30698
30699###############################################################################
30700#
30701# Check for the zlib library
30702#
30703
30704
30705# Check whether --with-zlib was given.
30706if test "${with_zlib+set}" = set; then :
30707  withval=$with_zlib;
30708fi
30709
30710
30711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
30712$as_echo_n "checking for compress in -lz... " >&6; }
30713if test "${ac_cv_lib_z_compress+set}" = set; then :
30714  $as_echo_n "(cached) " >&6
30715else
30716  ac_check_lib_save_LIBS=$LIBS
30717LIBS="-lz  $LIBS"
30718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30719/* end confdefs.h.  */
30720
30721/* Override any GCC internal prototype to avoid an error.
30722   Use char because int might match the return type of a GCC
30723   builtin and then its argument prototype would still apply.  */
30724#ifdef __cplusplus
30725extern "C"
30726#endif
30727char compress ();
30728int
30729main ()
30730{
30731return compress ();
30732  ;
30733  return 0;
30734}
30735_ACEOF
30736if ac_fn_cxx_try_link "$LINENO"; then :
30737  ac_cv_lib_z_compress=yes
30738else
30739  ac_cv_lib_z_compress=no
30740fi
30741rm -f core conftest.err conftest.$ac_objext \
30742    conftest$ac_exeext conftest.$ac_ext
30743LIBS=$ac_check_lib_save_LIBS
30744fi
30745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
30746$as_echo "$ac_cv_lib_z_compress" >&6; }
30747if test "x$ac_cv_lib_z_compress" = x""yes; then :
30748   ZLIB_FOUND=yes
30749else
30750   ZLIB_FOUND=no
30751fi
30752
30753
30754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
30755$as_echo_n "checking for which zlib to use... " >&6; }
30756
30757DEFAULT_ZLIB=bundled
30758if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30759#
30760# On macosx default is system...on others default is
30761#
30762    DEFAULT_ZLIB=system
30763fi
30764
30765if test "x${ZLIB_FOUND}" != "xyes"; then
30766#
30767# If we don't find any system...set default to bundled
30768#
30769    DEFAULT_ZLIB=bundled
30770fi
30771
30772#
30773# If user didn't specify, use DEFAULT_ZLIB
30774#
30775if test "x${with_zlib}" = "x"; then
30776    with_zlib=${DEFAULT_ZLIB}
30777fi
30778
30779if test "x${with_zlib}" = "xbundled"; then
30780    USE_EXTERNAL_LIBZ=false
30781    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
30782$as_echo "bundled" >&6; }
30783elif test "x${with_zlib}" = "xsystem"; then
30784    if test "x${ZLIB_FOUND}" = "xyes"; then
30785        USE_EXTERNAL_LIBZ=true
30786        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
30787$as_echo "system" >&6; }
30788    else
30789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
30790$as_echo "system not found" >&6; }
30791        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
30792    fi
30793else
30794    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
30795fi
30796
30797
30798
30799###############################################################################
30800LIBZIP_CAN_USE_MMAP=true
30801
30802
30803
30804###############################################################################
30805#
30806# Check if altzone exists in time.h
30807#
30808
30809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30810/* end confdefs.h.  */
30811#include <time.h>
30812int
30813main ()
30814{
30815return (int)altzone;
30816  ;
30817  return 0;
30818}
30819_ACEOF
30820if ac_fn_cxx_try_link "$LINENO"; then :
30821  has_altzone=yes
30822else
30823  has_altzone=no
30824fi
30825rm -f core conftest.err conftest.$ac_objext \
30826    conftest$ac_exeext conftest.$ac_ext
30827if test "x$has_altzone" = xyes; then
30828
30829$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
30830
30831fi
30832
30833###############################################################################
30834#
30835# Check the maths library
30836#
30837
30838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
30839$as_echo_n "checking for cos in -lm... " >&6; }
30840if test "${ac_cv_lib_m_cos+set}" = set; then :
30841  $as_echo_n "(cached) " >&6
30842else
30843  ac_check_lib_save_LIBS=$LIBS
30844LIBS="-lm  $LIBS"
30845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30846/* end confdefs.h.  */
30847
30848/* Override any GCC internal prototype to avoid an error.
30849   Use char because int might match the return type of a GCC
30850   builtin and then its argument prototype would still apply.  */
30851#ifdef __cplusplus
30852extern "C"
30853#endif
30854char cos ();
30855int
30856main ()
30857{
30858return cos ();
30859  ;
30860  return 0;
30861}
30862_ACEOF
30863if ac_fn_cxx_try_link "$LINENO"; then :
30864  ac_cv_lib_m_cos=yes
30865else
30866  ac_cv_lib_m_cos=no
30867fi
30868rm -f core conftest.err conftest.$ac_objext \
30869    conftest$ac_exeext conftest.$ac_ext
30870LIBS=$ac_check_lib_save_LIBS
30871fi
30872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
30873$as_echo "$ac_cv_lib_m_cos" >&6; }
30874if test "x$ac_cv_lib_m_cos" = x""yes; then :
30875  cat >>confdefs.h <<_ACEOF
30876#define HAVE_LIBM 1
30877_ACEOF
30878
30879  LIBS="-lm $LIBS"
30880
30881else
30882
30883                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
30884$as_echo "$as_me: Maths library was not found" >&6;}
30885
30886fi
30887
30888
30889
30890###############################################################################
30891#
30892# Check for libdl.so
30893
30894save_LIBS="$LIBS"
30895LIBS=""
30896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
30897$as_echo_n "checking for dlopen in -ldl... " >&6; }
30898if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
30899  $as_echo_n "(cached) " >&6
30900else
30901  ac_check_lib_save_LIBS=$LIBS
30902LIBS="-ldl  $LIBS"
30903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30904/* end confdefs.h.  */
30905
30906/* Override any GCC internal prototype to avoid an error.
30907   Use char because int might match the return type of a GCC
30908   builtin and then its argument prototype would still apply.  */
30909#ifdef __cplusplus
30910extern "C"
30911#endif
30912char dlopen ();
30913int
30914main ()
30915{
30916return dlopen ();
30917  ;
30918  return 0;
30919}
30920_ACEOF
30921if ac_fn_cxx_try_link "$LINENO"; then :
30922  ac_cv_lib_dl_dlopen=yes
30923else
30924  ac_cv_lib_dl_dlopen=no
30925fi
30926rm -f core conftest.err conftest.$ac_objext \
30927    conftest$ac_exeext conftest.$ac_ext
30928LIBS=$ac_check_lib_save_LIBS
30929fi
30930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
30931$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
30932if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
30933  cat >>confdefs.h <<_ACEOF
30934#define HAVE_LIBDL 1
30935_ACEOF
30936
30937  LIBS="-ldl $LIBS"
30938
30939fi
30940
30941LIBDL="$LIBS"
30942
30943LIBS="$save_LIBS"
30944
30945
30946
30947###############################################################################
30948#
30949# statically link libstdc++ before C++ ABI is stablized on Linux unless
30950# dynamic build is configured on command line.
30951#
30952
30953# Check whether --with-stdc++lib was given.
30954if test "${with_stdc__lib+set}" = set; then :
30955  withval=$with_stdc__lib;
30956    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
30957        && test "x$with_stdc__lib" != xdefault; then
30958      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
30959    fi
30960
30961else
30962  with_stdc__lib=default
30963
30964fi
30965
30966
30967if test "x$OPENJDK_TARGET_OS" = xlinux; then
30968    # Test if -lstdc++ works.
30969    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
30970$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
30971    ac_ext=cpp
30972ac_cpp='$CXXCPP $CPPFLAGS'
30973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30976
30977    OLD_CXXFLAGS="$CXXFLAGS"
30978    CXXFLAGS="$CXXFLAGS -lstdc++"
30979    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30980/* end confdefs.h.  */
30981
30982int
30983main ()
30984{
30985return 0;
30986  ;
30987  return 0;
30988}
30989_ACEOF
30990if ac_fn_cxx_try_link "$LINENO"; then :
30991  has_dynamic_libstdcxx=yes
30992else
30993  has_dynamic_libstdcxx=no
30994fi
30995rm -f core conftest.err conftest.$ac_objext \
30996    conftest$ac_exeext conftest.$ac_ext
30997    CXXFLAGS="$OLD_CXXFLAGS"
30998    ac_ext=cpp
30999ac_cpp='$CXXCPP $CPPFLAGS'
31000ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31001ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31002ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31003
31004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
31005$as_echo "$has_dynamic_libstdcxx" >&6; }
31006
31007    # Test if stdc++ can be linked statically.
31008    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
31009$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
31010    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
31011    ac_ext=cpp
31012ac_cpp='$CXXCPP $CPPFLAGS'
31013ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31014ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31015ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31016
31017    OLD_LIBS="$LIBS"
31018    OLD_CXX="$CXX"
31019    LIBS="$STATIC_STDCXX_FLAGS"
31020    CXX="$CC"
31021    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31022/* end confdefs.h.  */
31023
31024int
31025main ()
31026{
31027return 0;
31028  ;
31029  return 0;
31030}
31031_ACEOF
31032if ac_fn_cxx_try_link "$LINENO"; then :
31033  has_static_libstdcxx=yes
31034else
31035  has_static_libstdcxx=no
31036fi
31037rm -f core conftest.err conftest.$ac_objext \
31038    conftest$ac_exeext conftest.$ac_ext
31039    LIBS="$OLD_LIBS"
31040    CXX="$OLD_CXX"
31041    ac_ext=cpp
31042ac_cpp='$CXXCPP $CPPFLAGS'
31043ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31044ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31045ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31046
31047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31048$as_echo "$has_static_libstdcxx" >&6; }
31049
31050    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31051        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31052    fi
31053
31054    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31055        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31056    fi
31057
31058    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31059        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31060    fi
31061
31062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31063$as_echo_n "checking how to link with libstdc++... " >&6; }
31064    # If dynamic was requested, it's available since it would fail above otherwise.
31065    # If dynamic wasn't requested, go with static unless it isn't available.
31066    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31067        LIBCXX="$LIBCXX -lstdc++"
31068        LDCXX="$CXX"
31069        STATIC_CXX_SETTING="STATIC_CXX=false"
31070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31071$as_echo "dynamic" >&6; }
31072    else
31073        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31074        LDCXX="$CC"
31075        STATIC_CXX_SETTING="STATIC_CXX=true"
31076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31077$as_echo "static" >&6; }
31078    fi
31079fi
31080
31081
31082# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31083if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31084    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31085fi
31086
31087# TODO better (platform agnostic) test
31088if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31089    LIBCXX="-lstdc++"
31090fi
31091
31092
31093
31094
31095
31096# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31097
31098# When using cygwin or msys, we need a wrapper binary that renames
31099# /cygdrive/c/ arguments into c:/ arguments and peeks into
31100# @files and rewrites these too! This wrapper binary is
31101# called fixpath.
31102FIXPATH=
31103if test "x$OPENJDK_BUILD_OS" = xwindows; then
31104    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
31105$as_echo_n "checking if fixpath can be created... " >&6; }
31106    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
31107    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
31108    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
31109      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
31110      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
31111      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
31112      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
31113    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
31114      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
31115      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
31116
31117      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
31118      # @ was chosen as separator to minimize risk of other tools messing around with it
31119      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
31120      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
31121
31122      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
31123    fi
31124    rm -f $OUTPUT_ROOT/fixpath*
31125    cd $OUTPUT_ROOT
31126    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
31127    cd $CURDIR
31128
31129    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
31130        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31131$as_echo "no" >&6; }
31132        cat $OUTPUT_ROOT/fixpath1.log
31133        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
31134    fi
31135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31136$as_echo "yes" >&6; }
31137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
31138$as_echo_n "checking if fixpath.exe works... " >&6; }
31139    cd $OUTPUT_ROOT
31140    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
31141    cd $CURDIR
31142    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
31143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31144$as_echo "no" >&6; }
31145        cat $OUTPUT_ROOT/fixpath2.log
31146        as_fn_error $? "fixpath did not work!" "$LINENO" 5
31147    fi
31148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31149$as_echo "yes" >&6; }
31150    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
31151fi
31152
31153
31154
31155
31156###############################################################################
31157#
31158# We need to do some final tweaking, when everything else is done.
31159#
31160###############################################################################
31161
31162
31163HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
31164
31165
31166# The name of the Service Agent jar.
31167SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
31168if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
31169  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
31170fi
31171
31172
31173
31174
31175###############################################################################
31176#
31177# Configure parts of the build that only affect the build performance,
31178# not the result.
31179#
31180###############################################################################
31181
31182
31183# How many cores do we have on this build system?
31184
31185# Check whether --with-num-cores was given.
31186if test "${with_num_cores+set}" = set; then :
31187  withval=$with_num_cores;
31188fi
31189
31190if test "x$with_num_cores" = x; then
31191    # The number of cores were not specified, try to probe them.
31192
31193    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
31194$as_echo_n "checking for number of cores... " >&6; }
31195    NUM_CORES=1
31196    FOUND_CORES=no
31197
31198    if test -f /proc/cpuinfo; then
31199        # Looks like a Linux (or cygwin) system
31200        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
31201        FOUND_CORES=yes
31202    elif test -x /usr/sbin/psrinfo; then
31203        # Looks like a Solaris system
31204        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
31205        FOUND_CORES=yes
31206    elif test -x /usr/sbin/system_profiler; then
31207        # Looks like a MacOSX system
31208        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
31209        FOUND_CORES=yes
31210    elif test -n "$NUMBER_OF_PROCESSORS"; then
31211        # On windows, look in the env
31212        NUM_CORES=$NUMBER_OF_PROCESSORS
31213        FOUND_CORES=yes
31214    fi
31215
31216    # For c/c++ code we run twice as many concurrent build
31217    # jobs than we have cores, otherwise we will stall on io.
31218    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31219
31220    if test "x$FOUND_CORES" = xyes; then
31221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
31222$as_echo "$NUM_CORES" >&6; }
31223    else
31224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
31225$as_echo "could not detect number of cores, defaulting to 1" >&6; }
31226        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
31227$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
31228    fi
31229
31230
31231else
31232    NUM_CORES=$with_num_cores
31233    CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
31234fi
31235
31236
31237
31238
31239# How much memory do we have on this build system?
31240
31241# Check whether --with-memory-size was given.
31242if test "${with_memory_size+set}" = set; then :
31243  withval=$with_memory_size;
31244fi
31245
31246if test "x$with_memory_size" = x; then
31247    # The memory size was not specified, try to probe it.
31248
31249    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
31250$as_echo_n "checking for memory size... " >&6; }
31251    # Default to 1024 MB
31252    MEMORY_SIZE=1024
31253    FOUND_MEM=no
31254
31255    if test -f /proc/meminfo; then
31256        # Looks like a Linux (or cygwin) system
31257        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
31258        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
31259        FOUND_MEM=yes
31260    elif test -x /usr/sbin/prtconf; then
31261        # Looks like a Solaris system
31262        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
31263        FOUND_MEM=yes
31264    elif test -x /usr/sbin/system_profiler; then
31265        # Looks like a MacOSX system
31266        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
31267        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
31268        FOUND_MEM=yes
31269    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
31270        # Windows, but without cygwin
31271        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
31272        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
31273        FOUND_MEM=yes
31274    fi
31275
31276    if test "x$FOUND_MEM" = xyes; then
31277        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
31278$as_echo "$MEMORY_SIZE MB" >&6; }
31279    else
31280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
31281$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
31282        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
31283$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
31284    fi
31285
31286else
31287    MEMORY_SIZE=$with_memory_size
31288fi
31289
31290
31291
31292# Setup smart javac (after cores and memory have been setup)
31293
31294
31295# Check whether --with-sjavac-server-java was given.
31296if test "${with_sjavac_server_java+set}" = set; then :
31297  withval=$with_sjavac_server_java;
31298fi
31299
31300
31301if test "x$with_sjavac_server_java" != x; then
31302    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
31303    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
31304    if test "x$FOUND_VERSION" = x; then
31305        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
31306    fi
31307else
31308    SJAVAC_SERVER_JAVA=""
31309    # Hotspot specific options.
31310
31311    # Test if -verbosegc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31312    # If so, then append -verbosegc to SJAVAC_SERVER_JAVA
31313    FOUND_WARN=`$JAVA -verbosegc -version 2>&1 | grep -i warn`
31314    FOUND_VERSION=`$JAVA -verbosegc -version 2>&1 | grep " version \""`
31315    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31316        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
31317    fi
31318
31319    # JRockit specific options.
31320
31321    # Test if -Xverbose:gc is a valid argument to $JAVA (often is $JAVA passed as $JAVA)
31322    # If so, then append -Xverbose:gc to SJAVAC_SERVER_JAVA
31323    FOUND_WARN=`$JAVA -Xverbose:gc -version 2>&1 | grep -i warn`
31324    FOUND_VERSION=`$JAVA -Xverbose:gc -version 2>&1 | grep " version \""`
31325    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31326        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
31327    fi
31328
31329    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
31330fi
31331
31332
31333
31334# Check whether --with-sjavac-server-cores was given.
31335if test "${with_sjavac_server_cores+set}" = set; then :
31336  withval=$with_sjavac_server_cores;
31337fi
31338
31339if test "x$with_sjavac_server_cores" != x; then
31340    SJAVAC_SERVER_CORES="$with_sjavac_server_cores"
31341else
31342    if test "$NUM_CORES" -gt 16; then
31343        # We set this arbitrary limit because we want to limit the heap
31344        # size of the javac server.
31345        # In the future we will make the javac compilers in the server
31346        # share more and more state, thus enabling us to use more and
31347        # more concurrent threads in the server.
31348        SJAVAC_SERVER_CORES="16"
31349    else
31350        SJAVAC_SERVER_CORES="$NUM_CORES"
31351    fi
31352
31353    if test "$MEMORY_SIZE" -gt "17000"; then
31354        MAX_HEAP_MEM=10000
31355
31356    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31357    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31358    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31359    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31360    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31361        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31362    fi
31363
31364
31365    # Test if -Xms10G -Xmx10G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31366    # If so, then append -Xms10G -Xmx10G to SJAVAC_SERVER_JAVA
31367    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep -i warn`
31368    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1 | grep " version \""`
31369    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31370        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
31371    fi
31372
31373    elif test "$MEMORY_SIZE" -gt "10000"; then
31374        MAX_HEAP_MEM=6000
31375
31376    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31377    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31378    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31379    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31380    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31381        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31382    fi
31383
31384
31385    # Test if -Xms6G -Xmx6G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31386    # If so, then append -Xms6G -Xmx6G to SJAVAC_SERVER_JAVA
31387    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep -i warn`
31388    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1 | grep " version \""`
31389    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31390        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
31391    fi
31392
31393    elif test "$MEMORY_SIZE" -gt "5000"; then
31394        MAX_HEAP_MEM=3000
31395
31396    # Test if -d64 is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31397    # If so, then append -d64 to SJAVAC_SERVER_JAVA
31398    FOUND_WARN=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep -i warn`
31399    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1 | grep " version \""`
31400    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31401        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
31402    fi
31403
31404
31405    # Test if -Xms1G -Xmx3G is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31406    # If so, then append -Xms1G -Xmx3G to SJAVAC_SERVER_JAVA
31407    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep -i warn`
31408    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1 | grep " version \""`
31409    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31410        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
31411    fi
31412
31413    elif test "$MEMORY_SIZE" -gt "3800"; then
31414        MAX_HEAP_MEM=2500
31415
31416    # Test if -Xms1G -Xmx2500M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31417    # If so, then append -Xms1G -Xmx2500M to SJAVAC_SERVER_JAVA
31418    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep -i warn`
31419    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1 | grep " version \""`
31420    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31421        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
31422    fi
31423
31424    elif test "$MEMORY_SIZE" -gt "1900"; then
31425        MAX_HEAP_MEM=1200
31426
31427    # Test if -Xms700M -Xmx1400M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31428    # If so, then append -Xms700M -Xmx1400M to SJAVAC_SERVER_JAVA
31429    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep -i warn`
31430    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M -version 2>&1 | grep " version \""`
31431    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31432        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms700M -Xmx1400M"
31433    fi
31434
31435    elif test "$MEMORY_SIZE" -gt "1000"; then
31436        MAX_HEAP_MEM=900
31437
31438    # Test if -Xms400M -Xmx1100M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31439    # If so, then append -Xms400M -Xmx1100M to SJAVAC_SERVER_JAVA
31440    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep -i warn`
31441    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1 | grep " version \""`
31442    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31443        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
31444    fi
31445
31446    else
31447        MAX_HEAP_MEM=512
31448
31449    # Test if -Xms256M -Xmx512M is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31450    # If so, then append -Xms256M -Xmx512M to SJAVAC_SERVER_JAVA
31451    FOUND_WARN=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep -i warn`
31452    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1 | grep " version \""`
31453    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31454        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
31455    fi
31456
31457    fi
31458
31459
31460    # Test if -XX:PermSize=32m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31461    # If so, then append -XX:PermSize=32m to SJAVAC_SERVER_JAVA
31462    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep -i warn`
31463    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:PermSize=32m -version 2>&1 | grep " version \""`
31464    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31465        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:PermSize=32m"
31466    fi
31467
31468
31469    # Test if -XX:MaxPermSize=160m is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31470    # If so, then append -XX:MaxPermSize=160m to SJAVAC_SERVER_JAVA
31471    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep -i warn`
31472    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m -version 2>&1 | grep " version \""`
31473    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31474        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:MaxPermSize=160m"
31475    fi
31476
31477
31478    # Test if -XX:ThreadStackSize=$STACK_SIZE is a valid argument to $SJAVAC_SERVER_JAVA (often is $JAVA passed as $SJAVAC_SERVER_JAVA)
31479    # If so, then append -XX:ThreadStackSize=$STACK_SIZE to SJAVAC_SERVER_JAVA
31480    FOUND_WARN=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep -i warn`
31481    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1 | grep " version \""`
31482    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31483        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -XX:ThreadStackSize=$STACK_SIZE"
31484    fi
31485
31486
31487    MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501`
31488    if test "$SJAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then
31489        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if number of server cores must be reduced" >&5
31490$as_echo_n "checking if number of server cores must be reduced... " >&6; }
31491        SJAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP"
31492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&5
31493$as_echo "yes, to $SJAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB" >&6; }
31494    fi
31495fi
31496
31497
31498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
31499$as_echo_n "checking whether to use sjavac... " >&6; }
31500# Check whether --enable-sjavac was given.
31501if test "${enable_sjavac+set}" = set; then :
31502  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
31503else
31504  ENABLE_SJAVAC='no'
31505fi
31506
31507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
31508$as_echo "$ENABLE_SJAVAC" >&6; }
31509
31510
31511if test "x$ENABLE_SJAVAC" = xyes; then
31512    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
31513else
31514    SJAVAC_SERVER_DIR=
31515fi
31516
31517
31518
31519
31520# Can the C/C++ compiler use precompiled headers?
31521
31522
31523###############################################################################
31524#
31525# Can the C/C++ compiler use precompiled headers?
31526#
31527# Check whether --enable-precompiled-headers was given.
31528if test "${enable_precompiled_headers+set}" = set; then :
31529  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
31530else
31531  ENABLE_PRECOMPH=yes
31532fi
31533
31534
31535USE_PRECOMPILED_HEADER=1
31536if test "x$ENABLE_PRECOMPH" = xno; then
31537    USE_PRECOMPILED_HEADER=0
31538fi
31539
31540if test "x$ENABLE_PRECOMPH" = xyes; then
31541    # Check that the compiler actually supports precomp headers.
31542    if test "x$GCC" = xyes; then
31543         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
31544$as_echo_n "checking that precompiled headers work... " >&6; }
31545         echo "int alfa();" > conftest.h
31546         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
31547         if test ! -f conftest.hpp.gch; then
31548             USE_PRECOMPILED_HEADER=0
31549             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31550$as_echo "no" >&6; }
31551         else
31552             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31553$as_echo "yes" >&6; }
31554         fi
31555         rm -f conftest.h conftest.hpp.gch
31556    fi
31557fi
31558
31559
31560
31561
31562# Setup use of ccache, if available
31563
31564    # Check whether --enable-ccache was given.
31565if test "${enable_ccache+set}" = set; then :
31566  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
31567else
31568  ENABLE_CCACHE=yes
31569fi
31570
31571    if test "x$ENABLE_CCACHE" = xyes; then
31572        # Extract the first word of "ccache", so it can be a program name with args.
31573set dummy ccache; ac_word=$2
31574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31575$as_echo_n "checking for $ac_word... " >&6; }
31576if test "${ac_cv_path_CCACHE+set}" = set; then :
31577  $as_echo_n "(cached) " >&6
31578else
31579  case $CCACHE in
31580  [\\/]* | ?:[\\/]*)
31581  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
31582  ;;
31583  *)
31584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31585for as_dir in $PATH
31586do
31587  IFS=$as_save_IFS
31588  test -z "$as_dir" && as_dir=.
31589    for ac_exec_ext in '' $ac_executable_extensions; do
31590  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31591    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
31592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31593    break 2
31594  fi
31595done
31596  done
31597IFS=$as_save_IFS
31598
31599  ;;
31600esac
31601fi
31602CCACHE=$ac_cv_path_CCACHE
31603if test -n "$CCACHE"; then
31604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
31605$as_echo "$CCACHE" >&6; }
31606else
31607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31608$as_echo "no" >&6; }
31609fi
31610
31611
31612    else
31613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
31614$as_echo_n "checking for ccache... " >&6; }
31615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
31616$as_echo "explicitly disabled" >&6; }
31617        CCACHE=
31618    fi
31619
31620
31621
31622# Check whether --with-ccache-dir was given.
31623if test "${with_ccache_dir+set}" = set; then :
31624  withval=$with_ccache_dir;
31625fi
31626
31627
31628    if test "x$with_ccache_dir" != x; then
31629        # When using a non home ccache directory, assume the use is to share ccache files
31630        # with other users. Thus change the umask.
31631        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
31632    fi
31633    CCACHE_FOUND=""
31634    if test "x$CCACHE" != x; then
31635
31636    if test "x$CCACHE" != x; then
31637        CCACHE_FOUND="true"
31638        # Only use ccache if it is 3.1.4 or later, which supports
31639        # precompiled headers.
31640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
31641$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
31642        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
31643        if test "x$HAS_GOOD_CCACHE" = x; then
31644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
31645$as_echo "no, disabling ccache" >&6; }
31646            CCACHE=
31647        else
31648            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31649$as_echo "yes" >&6; }
31650            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
31651$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
31652            PUSHED_FLAGS="$CXXFLAGS"
31653            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
31654            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31655/* end confdefs.h.  */
31656
31657int
31658main ()
31659{
31660
31661  ;
31662  return 0;
31663}
31664_ACEOF
31665if ac_fn_cxx_try_compile "$LINENO"; then :
31666  CC_KNOWS_CCACHE_TRICK=yes
31667else
31668  CC_KNOWS_CCACHE_TRICK=no
31669fi
31670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31671            CXXFLAGS="$PUSHED_FLAGS"
31672            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
31673                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31674$as_echo "yes" >&6; }
31675            else
31676                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
31677$as_echo "no, disabling ccaching of precompiled headers" >&6; }
31678                CCACHE=
31679            fi
31680        fi
31681    fi
31682
31683    if test "x$CCACHE" != x; then
31684        CCACHE_SLOPPINESS=time_macros
31685        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
31686        CCACHE_FLAGS=-fpch-preprocess
31687
31688        if test "x$SET_CCACHE_DIR" != x; then
31689            mkdir -p $CCACHE_DIR > /dev/null 2>&1
31690	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
31691        fi
31692    fi
31693
31694    fi
31695
31696
31697###############################################################################
31698#
31699# And now the finish...
31700#
31701###############################################################################
31702
31703# Check for some common pitfalls
31704
31705  if test x"$OPENJDK_BUILD_OS" = xwindows; then
31706    file_to_test="$SRC_ROOT/LICENSE"
31707    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
31708      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
31709    fi
31710  fi
31711
31712
31713
31714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
31715$as_echo_n "checking if build directory is on local disk... " >&6; }
31716
31717	# df -l lists only local disks; if the given directory is not found then
31718	# a non-zero exit code is given
31719  if test "x$DF" = x; then
31720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31721      # msys does not have df; use Windows "net use" instead.
31722      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
31723      if test "x$IS_NETWORK_DISK" = x; then
31724        OUTPUT_DIR_IS_LOCAL="yes"
31725      else
31726        OUTPUT_DIR_IS_LOCAL="no"
31727      fi
31728    else
31729      # No df here, say it's local
31730      OUTPUT_DIR_IS_LOCAL="yes"
31731    fi
31732  else
31733    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
31734      OUTPUT_DIR_IS_LOCAL="yes"
31735    else
31736      OUTPUT_DIR_IS_LOCAL="no"
31737    fi
31738  fi
31739
31740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
31741$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
31742
31743
31744
31745# Check if the user has any old-style ALT_ variables set.
31746FOUND_ALT_VARIABLES=`env | grep ^ALT_`
31747
31748# Before generating output files, test if they exist. If they do, this is a reconfigure.
31749# Since we can't properly handle the dependencies for this, warn the user about the situation
31750if test -e $OUTPUT_ROOT/spec.gmk; then
31751  IS_RECONFIGURE=yes
31752else
31753  IS_RECONFIGURE=no
31754fi
31755
31756if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
31757  HIDE_PERFORMANCE_HINTS=yes
31758else
31759  HIDE_PERFORMANCE_HINTS=no
31760  # Hide it the next time around...
31761  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
31762fi
31763
31764
31765
31766# At the end, call the custom hook. (Dummy macro if no custom sources available)
31767
31768
31769# We're messing a bit with internal autoconf variables to put the config.status
31770# in the output directory instead of the current directory.
31771CONFIG_STATUS="$OUTPUT_ROOT/config.status"
31772# Create the actual output files. Now the main work of configure is done.
31773cat >confcache <<\_ACEOF
31774# This file is a shell script that caches the results of configure
31775# tests run on this system so they can be shared between configure
31776# scripts and configure runs, see configure's option --config-cache.
31777# It is not useful on other systems.  If it contains results you don't
31778# want to keep, you may remove or edit it.
31779#
31780# config.status only pays attention to the cache file if you give it
31781# the --recheck option to rerun configure.
31782#
31783# `ac_cv_env_foo' variables (set or unset) will be overridden when
31784# loading this file, other *unset* `ac_cv_foo' will be assigned the
31785# following values.
31786
31787_ACEOF
31788
31789# The following way of writing the cache mishandles newlines in values,
31790# but we know of no workaround that is simple, portable, and efficient.
31791# So, we kill variables containing newlines.
31792# Ultrix sh set writes to stderr and can't be redirected directly,
31793# and sets the high bit in the cache file unless we assign to the vars.
31794(
31795  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
31796    eval ac_val=\$$ac_var
31797    case $ac_val in #(
31798    *${as_nl}*)
31799      case $ac_var in #(
31800      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
31801$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
31802      esac
31803      case $ac_var in #(
31804      _ | IFS | as_nl) ;; #(
31805      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
31806      *) { eval $ac_var=; unset $ac_var;} ;;
31807      esac ;;
31808    esac
31809  done
31810
31811  (set) 2>&1 |
31812    case $as_nl`(ac_space=' '; set) 2>&1` in #(
31813    *${as_nl}ac_space=\ *)
31814      # `set' does not quote correctly, so add quotes: double-quote
31815      # substitution turns \\\\ into \\, and sed turns \\ into \.
31816      sed -n \
31817	"s/'/'\\\\''/g;
31818	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
31819      ;; #(
31820    *)
31821      # `set' quotes correctly as required by POSIX, so do not add quotes.
31822      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
31823      ;;
31824    esac |
31825    sort
31826) |
31827  sed '
31828     /^ac_cv_env_/b end
31829     t clear
31830     :clear
31831     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
31832     t end
31833     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
31834     :end' >>confcache
31835if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
31836  if test -w "$cache_file"; then
31837    test "x$cache_file" != "x/dev/null" &&
31838      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
31839$as_echo "$as_me: updating cache $cache_file" >&6;}
31840    cat confcache >$cache_file
31841  else
31842    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
31843$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
31844  fi
31845fi
31846rm -f confcache
31847
31848test "x$prefix" = xNONE && prefix=$ac_default_prefix
31849# Let make expand exec_prefix.
31850test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
31851
31852DEFS=-DHAVE_CONFIG_H
31853
31854ac_libobjs=
31855ac_ltlibobjs=
31856U=
31857for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
31858  # 1. Remove the extension, and $U if already installed.
31859  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
31860  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
31861  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
31862  #    will be set to the directory where LIBOBJS objects are built.
31863  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
31864  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
31865done
31866LIBOBJS=$ac_libobjs
31867
31868LTLIBOBJS=$ac_ltlibobjs
31869
31870
31871
31872: ${CONFIG_STATUS=./config.status}
31873ac_write_fail=0
31874ac_clean_files_save=$ac_clean_files
31875ac_clean_files="$ac_clean_files $CONFIG_STATUS"
31876{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
31877$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
31878as_write_fail=0
31879cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
31880#! $SHELL
31881# Generated by $as_me.
31882# Run this file to recreate the current configuration.
31883# Compiler output produced by configure, useful for debugging
31884# configure, is in config.log if it exists.
31885
31886debug=false
31887ac_cs_recheck=false
31888ac_cs_silent=false
31889
31890SHELL=\${CONFIG_SHELL-$SHELL}
31891export SHELL
31892_ASEOF
31893cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
31894## -------------------- ##
31895## M4sh Initialization. ##
31896## -------------------- ##
31897
31898# Be more Bourne compatible
31899DUALCASE=1; export DUALCASE # for MKS sh
31900if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
31901  emulate sh
31902  NULLCMD=:
31903  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
31904  # is contrary to our usage.  Disable this feature.
31905  alias -g '${1+"$@"}'='"$@"'
31906  setopt NO_GLOB_SUBST
31907else
31908  case `(set -o) 2>/dev/null` in #(
31909  *posix*) :
31910    set -o posix ;; #(
31911  *) :
31912     ;;
31913esac
31914fi
31915
31916
31917as_nl='
31918'
31919export as_nl
31920# Printing a long string crashes Solaris 7 /usr/bin/printf.
31921as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
31922as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
31923as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
31924# Prefer a ksh shell builtin over an external printf program on Solaris,
31925# but without wasting forks for bash or zsh.
31926if test -z "$BASH_VERSION$ZSH_VERSION" \
31927    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
31928  as_echo='print -r --'
31929  as_echo_n='print -rn --'
31930elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
31931  as_echo='printf %s\n'
31932  as_echo_n='printf %s'
31933else
31934  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
31935    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
31936    as_echo_n='/usr/ucb/echo -n'
31937  else
31938    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
31939    as_echo_n_body='eval
31940      arg=$1;
31941      case $arg in #(
31942      *"$as_nl"*)
31943	expr "X$arg" : "X\\(.*\\)$as_nl";
31944	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
31945      esac;
31946      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
31947    '
31948    export as_echo_n_body
31949    as_echo_n='sh -c $as_echo_n_body as_echo'
31950  fi
31951  export as_echo_body
31952  as_echo='sh -c $as_echo_body as_echo'
31953fi
31954
31955# The user is always right.
31956if test "${PATH_SEPARATOR+set}" != set; then
31957  PATH_SEPARATOR=:
31958  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
31959    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
31960      PATH_SEPARATOR=';'
31961  }
31962fi
31963
31964
31965# IFS
31966# We need space, tab and new line, in precisely that order.  Quoting is
31967# there to prevent editors from complaining about space-tab.
31968# (If _AS_PATH_WALK were called with IFS unset, it would disable word
31969# splitting by setting IFS to empty value.)
31970IFS=" ""	$as_nl"
31971
31972# Find who we are.  Look in the path if we contain no directory separator.
31973case $0 in #((
31974  *[\\/]* ) as_myself=$0 ;;
31975  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31976for as_dir in $PATH
31977do
31978  IFS=$as_save_IFS
31979  test -z "$as_dir" && as_dir=.
31980    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
31981  done
31982IFS=$as_save_IFS
31983
31984     ;;
31985esac
31986# We did not find ourselves, most probably we were run as `sh COMMAND'
31987# in which case we are not to be found in the path.
31988if test "x$as_myself" = x; then
31989  as_myself=$0
31990fi
31991if test ! -f "$as_myself"; then
31992  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
31993  exit 1
31994fi
31995
31996# Unset variables that we do not need and which cause bugs (e.g. in
31997# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
31998# suppresses any "Segmentation fault" message there.  '((' could
31999# trigger a bug in pdksh 5.2.14.
32000for as_var in BASH_ENV ENV MAIL MAILPATH
32001do eval test x\${$as_var+set} = xset \
32002  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
32003done
32004PS1='$ '
32005PS2='> '
32006PS4='+ '
32007
32008# NLS nuisances.
32009LC_ALL=C
32010export LC_ALL
32011LANGUAGE=C
32012export LANGUAGE
32013
32014# CDPATH.
32015(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
32016
32017
32018# as_fn_error STATUS ERROR [LINENO LOG_FD]
32019# ----------------------------------------
32020# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32021# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32022# script with STATUS, using 1 if that was 0.
32023as_fn_error ()
32024{
32025  as_status=$1; test $as_status -eq 0 && as_status=1
32026  if test "$4"; then
32027    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
32028    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32029  fi
32030  $as_echo "$as_me: error: $2" >&2
32031  as_fn_exit $as_status
32032} # as_fn_error
32033
32034
32035# as_fn_set_status STATUS
32036# -----------------------
32037# Set $? to STATUS, without forking.
32038as_fn_set_status ()
32039{
32040  return $1
32041} # as_fn_set_status
32042
32043# as_fn_exit STATUS
32044# -----------------
32045# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32046as_fn_exit ()
32047{
32048  set +e
32049  as_fn_set_status $1
32050  exit $1
32051} # as_fn_exit
32052
32053# as_fn_unset VAR
32054# ---------------
32055# Portably unset VAR.
32056as_fn_unset ()
32057{
32058  { eval $1=; unset $1;}
32059}
32060as_unset=as_fn_unset
32061# as_fn_append VAR VALUE
32062# ----------------------
32063# Append the text in VALUE to the end of the definition contained in VAR. Take
32064# advantage of any shell optimizations that allow amortized linear growth over
32065# repeated appends, instead of the typical quadratic growth present in naive
32066# implementations.
32067if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
32068  eval 'as_fn_append ()
32069  {
32070    eval $1+=\$2
32071  }'
32072else
32073  as_fn_append ()
32074  {
32075    eval $1=\$$1\$2
32076  }
32077fi # as_fn_append
32078
32079# as_fn_arith ARG...
32080# ------------------
32081# Perform arithmetic evaluation on the ARGs, and store the result in the
32082# global $as_val. Take advantage of shells that can avoid forks. The arguments
32083# must be portable across $(()) and expr.
32084if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
32085  eval 'as_fn_arith ()
32086  {
32087    as_val=$(( $* ))
32088  }'
32089else
32090  as_fn_arith ()
32091  {
32092    as_val=`expr "$@" || test $? -eq 1`
32093  }
32094fi # as_fn_arith
32095
32096
32097if expr a : '\(a\)' >/dev/null 2>&1 &&
32098   test "X`expr 00001 : '.*\(...\)'`" = X001; then
32099  as_expr=expr
32100else
32101  as_expr=false
32102fi
32103
32104if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32105  as_basename=basename
32106else
32107  as_basename=false
32108fi
32109
32110if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
32111  as_dirname=dirname
32112else
32113  as_dirname=false
32114fi
32115
32116as_me=`$as_basename -- "$0" ||
32117$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32118	 X"$0" : 'X\(//\)$' \| \
32119	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32120$as_echo X/"$0" |
32121    sed '/^.*\/\([^/][^/]*\)\/*$/{
32122	    s//\1/
32123	    q
32124	  }
32125	  /^X\/\(\/\/\)$/{
32126	    s//\1/
32127	    q
32128	  }
32129	  /^X\/\(\/\).*/{
32130	    s//\1/
32131	    q
32132	  }
32133	  s/.*/./; q'`
32134
32135# Avoid depending upon Character Ranges.
32136as_cr_letters='abcdefghijklmnopqrstuvwxyz'
32137as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32138as_cr_Letters=$as_cr_letters$as_cr_LETTERS
32139as_cr_digits='0123456789'
32140as_cr_alnum=$as_cr_Letters$as_cr_digits
32141
32142ECHO_C= ECHO_N= ECHO_T=
32143case `echo -n x` in #(((((
32144-n*)
32145  case `echo 'xy\c'` in
32146  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
32147  xy)  ECHO_C='\c';;
32148  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
32149       ECHO_T='	';;
32150  esac;;
32151*)
32152  ECHO_N='-n';;
32153esac
32154
32155rm -f conf$$ conf$$.exe conf$$.file
32156if test -d conf$$.dir; then
32157  rm -f conf$$.dir/conf$$.file
32158else
32159  rm -f conf$$.dir
32160  mkdir conf$$.dir 2>/dev/null
32161fi
32162if (echo >conf$$.file) 2>/dev/null; then
32163  if ln -s conf$$.file conf$$ 2>/dev/null; then
32164    as_ln_s='ln -s'
32165    # ... but there are two gotchas:
32166    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32167    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32168    # In both cases, we have to default to `cp -p'.
32169    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
32170      as_ln_s='cp -p'
32171  elif ln conf$$.file conf$$ 2>/dev/null; then
32172    as_ln_s=ln
32173  else
32174    as_ln_s='cp -p'
32175  fi
32176else
32177  as_ln_s='cp -p'
32178fi
32179rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
32180rmdir conf$$.dir 2>/dev/null
32181
32182
32183# as_fn_mkdir_p
32184# -------------
32185# Create "$as_dir" as a directory, including parents if necessary.
32186as_fn_mkdir_p ()
32187{
32188
32189  case $as_dir in #(
32190  -*) as_dir=./$as_dir;;
32191  esac
32192  test -d "$as_dir" || eval $as_mkdir_p || {
32193    as_dirs=
32194    while :; do
32195      case $as_dir in #(
32196      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32197      *) as_qdir=$as_dir;;
32198      esac
32199      as_dirs="'$as_qdir' $as_dirs"
32200      as_dir=`$as_dirname -- "$as_dir" ||
32201$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32202	 X"$as_dir" : 'X\(//\)[^/]' \| \
32203	 X"$as_dir" : 'X\(//\)$' \| \
32204	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32205$as_echo X"$as_dir" |
32206    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32207	    s//\1/
32208	    q
32209	  }
32210	  /^X\(\/\/\)[^/].*/{
32211	    s//\1/
32212	    q
32213	  }
32214	  /^X\(\/\/\)$/{
32215	    s//\1/
32216	    q
32217	  }
32218	  /^X\(\/\).*/{
32219	    s//\1/
32220	    q
32221	  }
32222	  s/.*/./; q'`
32223      test -d "$as_dir" && break
32224    done
32225    test -z "$as_dirs" || eval "mkdir $as_dirs"
32226  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
32227
32228
32229} # as_fn_mkdir_p
32230if mkdir -p . 2>/dev/null; then
32231  as_mkdir_p='mkdir -p "$as_dir"'
32232else
32233  test -d ./-p && rmdir ./-p
32234  as_mkdir_p=false
32235fi
32236
32237if test -x / >/dev/null 2>&1; then
32238  as_test_x='test -x'
32239else
32240  if ls -dL / >/dev/null 2>&1; then
32241    as_ls_L_option=L
32242  else
32243    as_ls_L_option=
32244  fi
32245  as_test_x='
32246    eval sh -c '\''
32247      if test -d "$1"; then
32248	test -d "$1/.";
32249      else
32250	case $1 in #(
32251	-*)set "./$1";;
32252	esac;
32253	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
32254	???[sx]*):;;*)false;;esac;fi
32255    '\'' sh
32256  '
32257fi
32258as_executable_p=$as_test_x
32259
32260# Sed expression to map a string onto a valid CPP name.
32261as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32262
32263# Sed expression to map a string onto a valid variable name.
32264as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32265
32266
32267exec 6>&1
32268## ----------------------------------- ##
32269## Main body of $CONFIG_STATUS script. ##
32270## ----------------------------------- ##
32271_ASEOF
32272test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
32273
32274cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32275# Save the log message, to keep $0 and so on meaningful, and to
32276# report actual input values of CONFIG_FILES etc. instead of their
32277# values after options handling.
32278ac_log="
32279This file was extended by OpenJDK $as_me jdk8, which was
32280generated by GNU Autoconf 2.67.  Invocation command line was
32281
32282  CONFIG_FILES    = $CONFIG_FILES
32283  CONFIG_HEADERS  = $CONFIG_HEADERS
32284  CONFIG_LINKS    = $CONFIG_LINKS
32285  CONFIG_COMMANDS = $CONFIG_COMMANDS
32286  $ $0 $@
32287
32288on `(hostname || uname -n) 2>/dev/null | sed 1q`
32289"
32290
32291_ACEOF
32292
32293case $ac_config_files in *"
32294"*) set x $ac_config_files; shift; ac_config_files=$*;;
32295esac
32296
32297case $ac_config_headers in *"
32298"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
32299esac
32300
32301
32302cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32303# Files that config.status was made for.
32304config_files="$ac_config_files"
32305config_headers="$ac_config_headers"
32306
32307_ACEOF
32308
32309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32310ac_cs_usage="\
32311\`$as_me' instantiates files and other configuration actions
32312from templates according to the current configuration.  Unless the files
32313and actions are specified as TAGs, all are instantiated by default.
32314
32315Usage: $0 [OPTION]... [TAG]...
32316
32317  -h, --help       print this help, then exit
32318  -V, --version    print version number and configuration settings, then exit
32319      --config     print configuration, then exit
32320  -q, --quiet, --silent
32321                   do not print progress messages
32322  -d, --debug      don't remove temporary files
32323      --recheck    update $as_me by reconfiguring in the same conditions
32324      --file=FILE[:TEMPLATE]
32325                   instantiate the configuration file FILE
32326      --header=FILE[:TEMPLATE]
32327                   instantiate the configuration header FILE
32328
32329Configuration files:
32330$config_files
32331
32332Configuration headers:
32333$config_headers
32334
32335Report bugs to <build-dev@openjdk.java.net>.
32336OpenJDK home page: <http://openjdk.java.net>."
32337
32338_ACEOF
32339cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32340ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32341ac_cs_version="\\
32342OpenJDK config.status jdk8
32343configured by $0, generated by GNU Autoconf 2.67,
32344  with options \\"\$ac_cs_config\\"
32345
32346Copyright (C) 2010 Free Software Foundation, Inc.
32347This config.status script is free software; the Free Software Foundation
32348gives unlimited permission to copy, distribute and modify it."
32349
32350ac_pwd='$ac_pwd'
32351srcdir='$srcdir'
32352AWK='$AWK'
32353test -n "\$AWK" || AWK=awk
32354_ACEOF
32355
32356cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32357# The default lists apply if the user does not specify any file.
32358ac_need_defaults=:
32359while test $# != 0
32360do
32361  case $1 in
32362  --*=?*)
32363    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32364    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
32365    ac_shift=:
32366    ;;
32367  --*=)
32368    ac_option=`expr "X$1" : 'X\([^=]*\)='`
32369    ac_optarg=
32370    ac_shift=:
32371    ;;
32372  *)
32373    ac_option=$1
32374    ac_optarg=$2
32375    ac_shift=shift
32376    ;;
32377  esac
32378
32379  case $ac_option in
32380  # Handling of the options.
32381  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
32382    ac_cs_recheck=: ;;
32383  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
32384    $as_echo "$ac_cs_version"; exit ;;
32385  --config | --confi | --conf | --con | --co | --c )
32386    $as_echo "$ac_cs_config"; exit ;;
32387  --debug | --debu | --deb | --de | --d | -d )
32388    debug=: ;;
32389  --file | --fil | --fi | --f )
32390    $ac_shift
32391    case $ac_optarg in
32392    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32393    '') as_fn_error $? "missing file argument" ;;
32394    esac
32395    as_fn_append CONFIG_FILES " '$ac_optarg'"
32396    ac_need_defaults=false;;
32397  --header | --heade | --head | --hea )
32398    $ac_shift
32399    case $ac_optarg in
32400    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32401    esac
32402    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
32403    ac_need_defaults=false;;
32404  --he | --h)
32405    # Conflict between --help and --header
32406    as_fn_error $? "ambiguous option: \`$1'
32407Try \`$0 --help' for more information.";;
32408  --help | --hel | -h )
32409    $as_echo "$ac_cs_usage"; exit ;;
32410  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
32411  | -silent | --silent | --silen | --sile | --sil | --si | --s)
32412    ac_cs_silent=: ;;
32413
32414  # This is an error.
32415  -*) as_fn_error $? "unrecognized option: \`$1'
32416Try \`$0 --help' for more information." ;;
32417
32418  *) as_fn_append ac_config_targets " $1"
32419     ac_need_defaults=false ;;
32420
32421  esac
32422  shift
32423done
32424
32425ac_configure_extra_args=
32426
32427if $ac_cs_silent; then
32428  exec 6>/dev/null
32429  ac_configure_extra_args="$ac_configure_extra_args --silent"
32430fi
32431
32432_ACEOF
32433cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32434if \$ac_cs_recheck; then
32435  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32436  shift
32437  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32438  CONFIG_SHELL='$SHELL'
32439  export CONFIG_SHELL
32440  exec "\$@"
32441fi
32442
32443_ACEOF
32444cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32445exec 5>>config.log
32446{
32447  echo
32448  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32449## Running $as_me. ##
32450_ASBOX
32451  $as_echo "$ac_log"
32452} >&5
32453
32454_ACEOF
32455cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32456_ACEOF
32457
32458cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32459
32460# Handling of arguments.
32461for ac_config_target in $ac_config_targets
32462do
32463  case $ac_config_target in
32464    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
32465    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
32466    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
32467    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
32468    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
32469    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
32470    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
32471
32472  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
32473  esac
32474done
32475
32476
32477# If the user did not use the arguments to specify the items to instantiate,
32478# then the envvar interface is used.  Set only those that are not.
32479# We use the long form for the default assignment because of an extremely
32480# bizarre bug on SunOS 4.1.3.
32481if $ac_need_defaults; then
32482  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
32483  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
32484fi
32485
32486# Have a temporary directory for convenience.  Make it in the build tree
32487# simply because there is no reason against having it here, and in addition,
32488# creating and moving files from /tmp can sometimes cause problems.
32489# Hook for its removal unless debugging.
32490# Note that there is a small window in which the directory will not be cleaned:
32491# after its creation but before its name has been assigned to `$tmp'.
32492$debug ||
32493{
32494  tmp=
32495  trap 'exit_status=$?
32496  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
32497' 0
32498  trap 'as_fn_exit 1' 1 2 13 15
32499}
32500# Create a (secure) tmp directory for tmp files.
32501
32502{
32503  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
32504  test -n "$tmp" && test -d "$tmp"
32505}  ||
32506{
32507  tmp=./conf$$-$RANDOM
32508  (umask 077 && mkdir "$tmp")
32509} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
32510
32511# Set up the scripts for CONFIG_FILES section.
32512# No need to generate them if there are no CONFIG_FILES.
32513# This happens for instance with `./config.status config.h'.
32514if test -n "$CONFIG_FILES"; then
32515
32516
32517ac_cr=`echo X | tr X '\015'`
32518# On cygwin, bash can eat \r inside `` if the user requested igncr.
32519# But we know of no other shell where ac_cr would be empty at this
32520# point, so we can use a bashism as a fallback.
32521if test "x$ac_cr" = x; then
32522  eval ac_cr=\$\'\\r\'
32523fi
32524ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
32525if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
32526  ac_cs_awk_cr='\\r'
32527else
32528  ac_cs_awk_cr=$ac_cr
32529fi
32530
32531echo 'BEGIN {' >"$tmp/subs1.awk" &&
32532_ACEOF
32533
32534
32535{
32536  echo "cat >conf$$subs.awk <<_ACEOF" &&
32537  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
32538  echo "_ACEOF"
32539} >conf$$subs.sh ||
32540  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32541ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
32542ac_delim='%!_!# '
32543for ac_last_try in false false false false false :; do
32544  . ./conf$$subs.sh ||
32545    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32546
32547  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
32548  if test $ac_delim_n = $ac_delim_num; then
32549    break
32550  elif $ac_last_try; then
32551    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
32552  else
32553    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32554  fi
32555done
32556rm -f conf$$subs.sh
32557
32558cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32559cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
32560_ACEOF
32561sed -n '
32562h
32563s/^/S["/; s/!.*/"]=/
32564p
32565g
32566s/^[^!]*!//
32567:repl
32568t repl
32569s/'"$ac_delim"'$//
32570t delim
32571:nl
32572h
32573s/\(.\{148\}\)..*/\1/
32574t more1
32575s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
32576p
32577n
32578b repl
32579:more1
32580s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32581p
32582g
32583s/.\{148\}//
32584t nl
32585:delim
32586h
32587s/\(.\{148\}\)..*/\1/
32588t more2
32589s/["\\]/\\&/g; s/^/"/; s/$/"/
32590p
32591b
32592:more2
32593s/["\\]/\\&/g; s/^/"/; s/$/"\\/
32594p
32595g
32596s/.\{148\}//
32597t delim
32598' <conf$$subs.awk | sed '
32599/^[^""]/{
32600  N
32601  s/\n//
32602}
32603' >>$CONFIG_STATUS || ac_write_fail=1
32604rm -f conf$$subs.awk
32605cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32606_ACAWK
32607cat >>"\$tmp/subs1.awk" <<_ACAWK &&
32608  for (key in S) S_is_set[key] = 1
32609  FS = ""
32610
32611}
32612{
32613  line = $ 0
32614  nfields = split(line, field, "@")
32615  substed = 0
32616  len = length(field[1])
32617  for (i = 2; i < nfields; i++) {
32618    key = field[i]
32619    keylen = length(key)
32620    if (S_is_set[key]) {
32621      value = S[key]
32622      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
32623      len += length(value) + length(field[++i])
32624      substed = 1
32625    } else
32626      len += 1 + keylen
32627  }
32628
32629  print line
32630}
32631
32632_ACAWK
32633_ACEOF
32634cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32635if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
32636  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
32637else
32638  cat
32639fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
32640  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
32641_ACEOF
32642
32643# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
32644# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
32645# trailing colons and then remove the whole line if VPATH becomes empty
32646# (actually we leave an empty line to preserve line numbers).
32647if test "x$srcdir" = x.; then
32648  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
32649h
32650s///
32651s/^/:/
32652s/[	 ]*$/:/
32653s/:\$(srcdir):/:/g
32654s/:\${srcdir}:/:/g
32655s/:@srcdir@:/:/g
32656s/^:*//
32657s/:*$//
32658x
32659s/\(=[	 ]*\).*/\1/
32660G
32661s/\n//
32662s/^[^=]*=[	 ]*$//
32663}'
32664fi
32665
32666cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32667fi # test -n "$CONFIG_FILES"
32668
32669# Set up the scripts for CONFIG_HEADERS section.
32670# No need to generate them if there are no CONFIG_HEADERS.
32671# This happens for instance with `./config.status Makefile'.
32672if test -n "$CONFIG_HEADERS"; then
32673cat >"$tmp/defines.awk" <<\_ACAWK ||
32674BEGIN {
32675_ACEOF
32676
32677# Transform confdefs.h into an awk script `defines.awk', embedded as
32678# here-document in config.status, that substitutes the proper values into
32679# config.h.in to produce config.h.
32680
32681# Create a delimiter string that does not exist in confdefs.h, to ease
32682# handling of long lines.
32683ac_delim='%!_!# '
32684for ac_last_try in false false :; do
32685  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
32686  if test -z "$ac_t"; then
32687    break
32688  elif $ac_last_try; then
32689    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
32690  else
32691    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
32692  fi
32693done
32694
32695# For the awk script, D is an array of macro values keyed by name,
32696# likewise P contains macro parameters if any.  Preserve backslash
32697# newline sequences.
32698
32699ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
32700sed -n '
32701s/.\{148\}/&'"$ac_delim"'/g
32702t rset
32703:rset
32704s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
32705t def
32706d
32707:def
32708s/\\$//
32709t bsnl
32710s/["\\]/\\&/g
32711s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32712D["\1"]=" \3"/p
32713s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
32714d
32715:bsnl
32716s/["\\]/\\&/g
32717s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
32718D["\1"]=" \3\\\\\\n"\\/p
32719t cont
32720s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
32721t cont
32722d
32723:cont
32724n
32725s/.\{148\}/&'"$ac_delim"'/g
32726t clear
32727:clear
32728s/\\$//
32729t bsnlc
32730s/["\\]/\\&/g; s/^/"/; s/$/"/p
32731d
32732:bsnlc
32733s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
32734b cont
32735' <confdefs.h | sed '
32736s/'"$ac_delim"'/"\\\
32737"/g' >>$CONFIG_STATUS || ac_write_fail=1
32738
32739cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32740  for (key in D) D_is_set[key] = 1
32741  FS = ""
32742}
32743/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
32744  line = \$ 0
32745  split(line, arg, " ")
32746  if (arg[1] == "#") {
32747    defundef = arg[2]
32748    mac1 = arg[3]
32749  } else {
32750    defundef = substr(arg[1], 2)
32751    mac1 = arg[2]
32752  }
32753  split(mac1, mac2, "(") #)
32754  macro = mac2[1]
32755  prefix = substr(line, 1, index(line, defundef) - 1)
32756  if (D_is_set[macro]) {
32757    # Preserve the white space surrounding the "#".
32758    print prefix "define", macro P[macro] D[macro]
32759    next
32760  } else {
32761    # Replace #undef with comments.  This is necessary, for example,
32762    # in the case of _POSIX_SOURCE, which is predefined and required
32763    # on some systems where configure will not decide to define it.
32764    if (defundef == "undef") {
32765      print "/*", prefix defundef, macro, "*/"
32766      next
32767    }
32768  }
32769}
32770{ print }
32771_ACAWK
32772_ACEOF
32773cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32774  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
32775fi # test -n "$CONFIG_HEADERS"
32776
32777
32778eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
32779shift
32780for ac_tag
32781do
32782  case $ac_tag in
32783  :[FHLC]) ac_mode=$ac_tag; continue;;
32784  esac
32785  case $ac_mode$ac_tag in
32786  :[FHL]*:*);;
32787  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
32788  :[FH]-) ac_tag=-:-;;
32789  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
32790  esac
32791  ac_save_IFS=$IFS
32792  IFS=:
32793  set x $ac_tag
32794  IFS=$ac_save_IFS
32795  shift
32796  ac_file=$1
32797  shift
32798
32799  case $ac_mode in
32800  :L) ac_source=$1;;
32801  :[FH])
32802    ac_file_inputs=
32803    for ac_f
32804    do
32805      case $ac_f in
32806      -) ac_f="$tmp/stdin";;
32807      *) # Look for the file first in the build tree, then in the source tree
32808	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
32809	 # because $ac_f cannot contain `:'.
32810	 test -f "$ac_f" ||
32811	   case $ac_f in
32812	   [\\/$]*) false;;
32813	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
32814	   esac ||
32815	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
32816      esac
32817      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
32818      as_fn_append ac_file_inputs " '$ac_f'"
32819    done
32820
32821    # Let's still pretend it is `configure' which instantiates (i.e., don't
32822    # use $as_me), people would be surprised to read:
32823    #    /* config.h.  Generated by config.status.  */
32824    configure_input='Generated from '`
32825	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
32826	`' by configure.'
32827    if test x"$ac_file" != x-; then
32828      configure_input="$ac_file.  $configure_input"
32829      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
32830$as_echo "$as_me: creating $ac_file" >&6;}
32831    fi
32832    # Neutralize special characters interpreted by sed in replacement strings.
32833    case $configure_input in #(
32834    *\&* | *\|* | *\\* )
32835       ac_sed_conf_input=`$as_echo "$configure_input" |
32836       sed 's/[\\\\&|]/\\\\&/g'`;; #(
32837    *) ac_sed_conf_input=$configure_input;;
32838    esac
32839
32840    case $ac_tag in
32841    *:-:* | *:-) cat >"$tmp/stdin" \
32842      || as_fn_error $? "could not create $ac_file" "$LINENO" 5  ;;
32843    esac
32844    ;;
32845  esac
32846
32847  ac_dir=`$as_dirname -- "$ac_file" ||
32848$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32849	 X"$ac_file" : 'X\(//\)[^/]' \| \
32850	 X"$ac_file" : 'X\(//\)$' \| \
32851	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
32852$as_echo X"$ac_file" |
32853    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32854	    s//\1/
32855	    q
32856	  }
32857	  /^X\(\/\/\)[^/].*/{
32858	    s//\1/
32859	    q
32860	  }
32861	  /^X\(\/\/\)$/{
32862	    s//\1/
32863	    q
32864	  }
32865	  /^X\(\/\).*/{
32866	    s//\1/
32867	    q
32868	  }
32869	  s/.*/./; q'`
32870  as_dir="$ac_dir"; as_fn_mkdir_p
32871  ac_builddir=.
32872
32873case "$ac_dir" in
32874.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
32875*)
32876  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
32877  # A ".." for each directory in $ac_dir_suffix.
32878  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
32879  case $ac_top_builddir_sub in
32880  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
32881  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
32882  esac ;;
32883esac
32884ac_abs_top_builddir=$ac_pwd
32885ac_abs_builddir=$ac_pwd$ac_dir_suffix
32886# for backward compatibility:
32887ac_top_builddir=$ac_top_build_prefix
32888
32889case $srcdir in
32890  .)  # We are building in place.
32891    ac_srcdir=.
32892    ac_top_srcdir=$ac_top_builddir_sub
32893    ac_abs_top_srcdir=$ac_pwd ;;
32894  [\\/]* | ?:[\\/]* )  # Absolute name.
32895    ac_srcdir=$srcdir$ac_dir_suffix;
32896    ac_top_srcdir=$srcdir
32897    ac_abs_top_srcdir=$srcdir ;;
32898  *) # Relative name.
32899    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
32900    ac_top_srcdir=$ac_top_build_prefix$srcdir
32901    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
32902esac
32903ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
32904
32905
32906  case $ac_mode in
32907  :F)
32908  #
32909  # CONFIG_FILE
32910  #
32911
32912_ACEOF
32913
32914cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32915# If the template does not know about datarootdir, expand it.
32916# FIXME: This hack should be removed a few years after 2.60.
32917ac_datarootdir_hack=; ac_datarootdir_seen=
32918ac_sed_dataroot='
32919/datarootdir/ {
32920  p
32921  q
32922}
32923/@datadir@/p
32924/@docdir@/p
32925/@infodir@/p
32926/@localedir@/p
32927/@mandir@/p'
32928case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
32929*datarootdir*) ac_datarootdir_seen=yes;;
32930*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
32931  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
32932$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
32933_ACEOF
32934cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32935  ac_datarootdir_hack='
32936  s&@datadir@&$datadir&g
32937  s&@docdir@&$docdir&g
32938  s&@infodir@&$infodir&g
32939  s&@localedir@&$localedir&g
32940  s&@mandir@&$mandir&g
32941  s&\\\${datarootdir}&$datarootdir&g' ;;
32942esac
32943_ACEOF
32944
32945# Neutralize VPATH when `$srcdir' = `.'.
32946# Shell code in configure.ac might set extrasub.
32947# FIXME: do we really want to maintain this feature?
32948cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32949ac_sed_extra="$ac_vpsub
32950$extrasub
32951_ACEOF
32952cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
32953:t
32954/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
32955s|@configure_input@|$ac_sed_conf_input|;t t
32956s&@top_builddir@&$ac_top_builddir_sub&;t t
32957s&@top_build_prefix@&$ac_top_build_prefix&;t t
32958s&@srcdir@&$ac_srcdir&;t t
32959s&@abs_srcdir@&$ac_abs_srcdir&;t t
32960s&@top_srcdir@&$ac_top_srcdir&;t t
32961s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
32962s&@builddir@&$ac_builddir&;t t
32963s&@abs_builddir@&$ac_abs_builddir&;t t
32964s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
32965$ac_datarootdir_hack
32966"
32967eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
32968  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32969
32970test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
32971  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
32972  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
32973  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32974which seems to be undefined.  Please make sure it is defined" >&5
32975$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
32976which seems to be undefined.  Please make sure it is defined" >&2;}
32977
32978  rm -f "$tmp/stdin"
32979  case $ac_file in
32980  -) cat "$tmp/out" && rm -f "$tmp/out";;
32981  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
32982  esac \
32983  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32984 ;;
32985  :H)
32986  #
32987  # CONFIG_HEADER
32988  #
32989  if test x"$ac_file" != x-; then
32990    {
32991      $as_echo "/* $configure_input  */" \
32992      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
32993    } >"$tmp/config.h" \
32994      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
32995    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
32996      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
32997$as_echo "$as_me: $ac_file is unchanged" >&6;}
32998    else
32999      rm -f "$ac_file"
33000      mv "$tmp/config.h" "$ac_file" \
33001	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
33002    fi
33003  else
33004    $as_echo "/* $configure_input  */" \
33005      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
33006      || as_fn_error $? "could not create -" "$LINENO" 5
33007  fi
33008 ;;
33009
33010
33011  esac
33012
33013done # for ac_tag
33014
33015
33016as_fn_exit 0
33017_ACEOF
33018ac_clean_files=$ac_clean_files_save
33019
33020test $ac_write_fail = 0 ||
33021  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
33022
33023
33024# configure is writing to config.log, and then calls config.status.
33025# config.status does its own redirection, appending to config.log.
33026# Unfortunately, on DOS this fails, as config.log is still kept open
33027# by configure, so config.status won't be able to write to it; its
33028# output is simply discarded.  So we exec the FD to /dev/null,
33029# effectively closing config.log, so it can be properly (re)opened and
33030# appended to by config.status.  When coming back to configure, we
33031# need to make the FD available again.
33032if test "$no_create" != yes; then
33033  ac_cs_success=:
33034  ac_config_status_args=
33035  test "$silent" = yes &&
33036    ac_config_status_args="$ac_config_status_args --quiet"
33037  exec 5>/dev/null
33038  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
33039  exec 5>>config.log
33040  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33041  # would make configure fail if this is the last instruction.
33042  $ac_cs_success || as_fn_exit 1
33043fi
33044if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
33045  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33046$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
33047fi
33048
33049
33050# Make the compare script executable
33051$CHMOD +x $OUTPUT_ROOT/compare.sh
33052
33053# Finally output some useful information to the user
33054
33055# Finally output some useful information to the user
33056
33057if test "x$CCACHE_FOUND" != x; then
33058	if  test "x$HAS_GOOD_CCACHE" = x; then
33059		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
33060		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
33061	else
33062		CCACHE_STATUS="installed and in use"
33063	fi
33064else
33065	if test "x$GCC" = xyes; then
33066		CCACHE_STATUS="not installed (consider installing)"
33067		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
33068	else
33069		CCACHE_STATUS="not available for your system"
33070	fi
33071fi
33072
33073printf "\n"
33074printf "====================================================\n"
33075printf "A new configuration has been successfully created in\n"
33076printf "$OUTPUT_ROOT\n"
33077if test "x$CONFIGURE_COMMAND_LINE" != x; then
33078	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
33079else
33080	printf "using default settings.\n"
33081fi
33082
33083printf "\n"
33084printf "Configuration summary:\n"
33085printf "* Debug level:    $DEBUG_LEVEL\n"
33086printf "* JDK variant:    $JDK_VARIANT\n"
33087printf "* JVM variants:   $with_jvm_variants\n"
33088printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
33089
33090printf "\n"
33091printf "Tools summary:\n"
33092if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
33093  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
33094fi
33095printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
33096printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
33097printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
33098
33099printf "\n"
33100printf "Build performance summary:\n"
33101printf "* Cores to use:   $NUM_CORES\n"
33102printf "* Memory limit:   $MEMORY_SIZE MB\n"
33103printf "* ccache status:  $CCACHE_STATUS\n"
33104printf "\n"
33105
33106if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
33107	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
33108	printf "$CCACHE_HELP_MSG\n"
33109
33110    # Print a helpful message on how to acquire the necessary build dependency.
33111    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
33112    MISSING_DEPENDENCY=ccache
33113    PKGHANDLER_COMMAND=
33114
33115    case $PKGHANDLER in
33116	apt-get)
33117                apt_help     $MISSING_DEPENDENCY ;;
33118    yum)
33119                yum_help     $MISSING_DEPENDENCY ;;
33120	port)
33121                port_help    $MISSING_DEPENDENCY ;;
33122	pkgutil)
33123                pkgutil_help $MISSING_DEPENDENCY ;;
33124	pkgadd)
33125                pkgadd_help  $MISSING_DEPENDENCY ;;
33126    * )
33127      break ;;
33128    esac
33129
33130    if test "x$PKGHANDLER_COMMAND" != x; then
33131        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33132    fi
33133
33134	printf "$HELP_MSG\n"
33135	printf "\n"
33136fi
33137
33138if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
33139	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
33140	printf "will result in longer build times.\n"
33141	printf "\n"
33142fi
33143
33144if test "x$FOUND_ALT_VARIABLES" != "x"; then
33145	printf "WARNING: You have old-style ALT_ environment variables set.\n"
33146	printf "These are not respected, and will be ignored. It is recommended\n"
33147	printf "that you clean your environment. The following variables are set:\n"
33148	printf "$FOUND_ALT_VARIABLES\n"
33149	printf "\n"
33150fi
33151
33152if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
33153	printf "WARNING: Your build output directory is not on a local disk.\n"
33154	printf "This will severely degrade build performance!\n"
33155	printf "It is recommended that you create an output directory on a local disk,\n"
33156	printf "and run the configure script again from that directory.\n"
33157	printf "\n"
33158fi
33159
33160if test "x$IS_RECONFIGURE" = "xyes"; then
33161	printf "WARNING: The result of this configuration has overridden an older\n"
33162	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
33163	printf "proper build. Failure to do so might result in strange build problems.\n"
33164	printf "\n"
33165fi
33166
33167