generated-configure.sh revision 721:ea6f3bf82903
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_JAVA
603JOBS
604MEMORY_SIZE
605NUM_CORES
606ENABLE_INTREE_EC
607SALIB_NAME
608HOTSPOT_MAKE_ARGS
609FIXPATH
610LIBCXX
611LLVM_LIBS
612LLVM_LDFLAGS
613LLVM_CFLAGS
614LLVM_CONFIG
615LIBFFI_LIBS
616LIBFFI_CFLAGS
617STATIC_CXX_SETTING
618LIBDL
619LIBM
620LIBZIP_CAN_USE_MMAP
621USE_EXTERNAL_LIBZ
622USE_EXTERNAL_LIBGIF
623USE_EXTERNAL_LIBJPEG
624ALSA_LIBS
625ALSA_CFLAGS
626FREETYPE2_LIB_PATH
627USING_SYSTEM_FT_LIB
628FREETYPE2_LIBS
629FREETYPE2_CFLAGS
630CUPS_CFLAGS
631OPENWIN_HOME
632X_EXTRA_LIBS
633X_LIBS
634X_PRE_LIBS
635X_CFLAGS
636XMKMF
637CXXFLAGS_DEBUG_SYMBOLS
638CFLAGS_DEBUG_SYMBOLS
639ZIP_DEBUGINFO_FILES
640ENABLE_DEBUG_SYMBOLS
641COMPILER_SUPPORTS_TARGET_BITS_FLAG
642ZERO_ARCHFLAG
643LDFLAGS_CXX_JDK
644LDFLAGS_JDKEXE_SUFFIX
645LDFLAGS_JDKLIB_SUFFIX
646LDFLAGS_JDKEXE
647LDFLAGS_JDKLIB
648CXXFLAGS_JDKEXE
649CXXFLAGS_JDKLIB
650CFLAGS_JDKEXE
651CFLAGS_JDKLIB
652MACOSX_VERSION_MIN
653PACKAGE_PATH
654LEGACY_EXTRA_LDFLAGS
655LEGACY_EXTRA_CXXFLAGS
656LEGACY_EXTRA_CFLAGS
657CXX_FLAG_DEPS
658C_FLAG_DEPS
659CXX_O_FLAG_NONE
660CXX_O_FLAG_NORM
661CXX_O_FLAG_HI
662CXX_O_FLAG_HIGHEST
663C_O_FLAG_NONE
664C_O_FLAG_NORM
665C_O_FLAG_HI
666C_O_FLAG_HIGHEST
667POST_MCS_CMD
668POST_STRIP_CMD
669SET_EXECUTABLE_ORIGIN
670SET_SHARED_LIBRARY_ORIGIN
671CXX_FLAG_REORDER
672C_FLAG_REORDER
673SET_SHARED_LIBRARY_MAPFILE
674SET_SHARED_LIBRARY_NAME
675SHARED_LIBRARY_FLAGS
676EXE_SUFFIX
677STATIC_LIBRARY_SUFFIX
678SHARED_LIBRARY_SUFFIX
679LIBRARY_PREFIX
680STATIC_LIBRARY
681SHARED_LIBRARY
682OBJ_SUFFIX
683COMPILER_NAME
684JTREGEXE
685JT_HOME
686LIPO
687ac_ct_OBJDUMP
688OBJDUMP
689ac_ct_OBJCOPY
690OBJCOPY
691MCS
692STRIP
693GNM
694NM
695AS
696CXXCPP
697CPP
698COMPILER_TYPE
699RC_FLAGS
700DUMPBIN
701WINAR
702HOTSPOT_RC
703HOTSPOT_MT
704RC
705MT
706WINLD
707HOTSPOT_LD
708HOTSPOT_CXX
709ARFLAGS
710AR
711LDEXECXX
712LDCXX
713LDEXE
714LD
715ac_ct_OBJC
716OBJCFLAGS
717OBJC
718ac_ct_CXX
719CXXFLAGS
720CXX
721ac_ct_PROPER_COMPILER_CXX
722PROPER_COMPILER_CXX
723POTENTIAL_CXX
724TOOLS_DIR_CXX
725OBJEXT
726EXEEXT
727ac_ct_CC
728CPPFLAGS
729LDFLAGS
730CFLAGS
731CC
732ac_ct_PROPER_COMPILER_CC
733PROPER_COMPILER_CC
734POTENTIAL_CC
735TOOLS_DIR_CC
736BUILD_LD
737BUILD_CXX
738BUILD_CC
739MSVCR_DLL
740DXSDK_INCLUDE_PATH
741DXSDK_LIB_PATH
742VS_PATH
743VS_LIB
744VS_INCLUDE
745CYGWIN_LINK
746AR_OUT_OPTION
747LD_OUT_OPTION
748EXE_OUT_OPTION
749CC_OUT_OPTION
750BUILD_HOTSPOT
751HOTSPOT_DIST
752BUILD_OUTPUT
753OVERRIDE_SRC_ROOT
754ADD_SRC_ROOT
755JDK_TOPDIR
756NASHORN_TOPDIR
757HOTSPOT_TOPDIR
758JAXWS_TOPDIR
759JAXP_TOPDIR
760CORBA_TOPDIR
761LANGTOOLS_TOPDIR
762BOOT_JDK_JVMARGS
763JAVAC_FLAGS
764BOOT_JDK_SOURCETARGET
765BOOT_JDK
766BOOT_TOOLSJAR
767BOOT_RTJAR
768JAVA_CHECK
769JAVAC_CHECK
770COOKED_BUILD_NUMBER
771JDK_VERSION
772COPYRIGHT_YEAR
773MACOSX_BUNDLE_ID_BASE
774MACOSX_BUNDLE_NAME_BASE
775COMPANY_NAME
776JDK_RC_PLATFORM_NAME
777PRODUCT_SUFFIX
778PRODUCT_NAME
779LAUNCHER_NAME
780MILESTONE
781JDK_BUILD_NUMBER
782JDK_UPDATE_VERSION
783JDK_MICRO_VERSION
784JDK_MINOR_VERSION
785JDK_MAJOR_VERSION
786USER_RELEASE_SUFFIX
787COMPRESS_JARS
788UNLIMITED_CRYPTO
789CACERTS_FILE
790TEST_IN_BUILD
791BUILD_HEADLESS
792SUPPORT_HEADFUL
793SUPPORT_HEADLESS
794BDEPS_FTP
795BDEPS_UNZIP
796OS_VERSION_MICRO
797OS_VERSION_MINOR
798OS_VERSION_MAJOR
799PKG_CONFIG
800XATTR
801TIME
802STAT
803HG
804READELF
805OTOOL
806LDD
807ZIP
808UNZIP
809FIND_DELETE
810MAKE
811CHECK_TOOLSDIR_MAKE
812CHECK_TOOLSDIR_GMAKE
813CHECK_MAKE
814CHECK_GMAKE
815PKGHANDLER
816OUTPUT_ROOT
817CONF_NAME
818SPEC
819BUILD_VARIANT_RELEASE
820DEBUG_CLASSFILES
821FASTDEBUG
822VARIANT
823DEBUG_LEVEL
824MACOSX_UNIVERSAL
825INCLUDE_SA
826JVM_VARIANT_ZEROSHARK
827JVM_VARIANT_ZERO
828JVM_VARIANT_KERNEL
829JVM_VARIANT_MINIMAL1
830JVM_VARIANT_CLIENT
831JVM_VARIANT_SERVER
832JVM_VARIANTS
833JDK_VARIANT
834SET_OPENJDK
835BUILD_LOG_WRAPPER
836BUILD_LOG_PREVIOUS
837BUILD_LOG
838SYS_ROOT
839PATH_SEP
840SRC_ROOT
841ZERO_ARCHDEF
842DEFINE_CROSS_COMPILE_ARCH
843LP64
844OPENJDK_TARGET_OS_API_DIR
845OPENJDK_TARGET_CPU_JLI_CFLAGS
846OPENJDK_TARGET_CPU_OSARCH
847OPENJDK_TARGET_CPU_ISADIR
848OPENJDK_TARGET_CPU_LIBDIR
849OPENJDK_TARGET_CPU_LEGACY_LIB
850OPENJDK_TARGET_CPU_LEGACY
851REQUIRED_OS_VERSION
852REQUIRED_OS_NAME
853COMPILE_TYPE
854OPENJDK_TARGET_CPU_ENDIAN
855OPENJDK_TARGET_CPU_BITS
856OPENJDK_TARGET_CPU_ARCH
857OPENJDK_TARGET_CPU
858OPENJDK_TARGET_OS_API
859OPENJDK_TARGET_OS
860OPENJDK_BUILD_CPU_ENDIAN
861OPENJDK_BUILD_CPU_BITS
862OPENJDK_BUILD_CPU_ARCH
863OPENJDK_BUILD_CPU
864OPENJDK_BUILD_OS_API
865OPENJDK_BUILD_OS
866OPENJDK_BUILD_AUTOCONF_NAME
867OPENJDK_TARGET_AUTOCONF_NAME
868target_os
869target_vendor
870target_cpu
871target
872host_os
873host_vendor
874host_cpu
875host
876build_os
877build_vendor
878build_cpu
879build
880SETFILE
881DF
882READLINK
883CYGPATH
884NAWK
885SED
886FGREP
887EGREP
888GREP
889AWK
890XARGS
891WHICH
892WC
893UNIQ
894UNAME
895TR
896TOUCH
897TEE
898TAR
899TAIL
900SORT
901SH
902RM
903THEPWDCMD
904PRINTF
905MV
906MKTEMP
907MKDIR
908LS
909LN
910HEAD
911FIND
912FILE
913EXPR
914ECHO
915DIRNAME
916DIFF
917DATE
918CUT
919CPIO
920CP
921COMM
922CMP
923CHMOD
924CAT
925BASH
926BASENAME
927DATE_WHEN_CONFIGURED
928CONFIGURE_COMMAND_LINE
929CUSTOM_MAKE_DIR
930target_alias
931host_alias
932build_alias
933LIBS
934ECHO_T
935ECHO_N
936ECHO_C
937DEFS
938mandir
939localedir
940libdir
941psdir
942pdfdir
943dvidir
944htmldir
945infodir
946docdir
947oldincludedir
948includedir
949localstatedir
950sharedstatedir
951sysconfdir
952datadir
953datarootdir
954libexecdir
955sbindir
956bindir
957program_transform_name
958prefix
959exec_prefix
960PACKAGE_URL
961PACKAGE_BUGREPORT
962PACKAGE_STRING
963PACKAGE_VERSION
964PACKAGE_TARNAME
965PACKAGE_NAME
966PATH_SEPARATOR
967SHELL'
968ac_subst_files=''
969ac_user_opts='
970enable_option_checking
971with_custom_make_dir
972with_target_bits
973with_sys_root
974with_tools_dir
975with_devkit
976enable_openjdk_only
977with_jdk_variant
978with_jvm_variants
979enable_debug
980with_debug_level
981with_conf_name
982with_builddeps_conf
983with_builddeps_server
984with_builddeps_dir
985with_builddeps_group
986enable_headful
987enable_hotspot_test_in_build
988with_cacerts_file
989enable_unlimited_crypto
990with_milestone
991with_build_number
992with_user_release_suffix
993with_boot_jdk
994with_boot_jdk_jvmargs
995with_add_source_root
996with_override_source_root
997with_adds_and_overrides
998with_override_langtools
999with_override_corba
1000with_override_jaxp
1001with_override_jaxws
1002with_override_hotspot
1003with_override_jdk
1004with_import_hotspot
1005with_msvcr_dll
1006with_dxsdk
1007with_dxsdk_lib
1008with_dxsdk_include
1009with_jtreg
1010with_extra_cflags
1011with_extra_cxxflags
1012with_extra_ldflags
1013enable_debug_symbols
1014enable_zip_debug_info
1015enable_macosx_runtime_support
1016with_x
1017with_cups
1018with_cups_include
1019with_freetype
1020with_alsa
1021with_alsa_include
1022with_alsa_lib
1023with_giflib
1024with_zlib
1025with_stdc__lib
1026with_num_cores
1027with_memory_size
1028with_jobs
1029with_sjavac_server_java
1030enable_sjavac
1031enable_precompiled_headers
1032enable_ccache
1033with_ccache_dir
1034'
1035      ac_precious_vars='build_alias
1036host_alias
1037target_alias
1038PKG_CONFIG
1039CC
1040CFLAGS
1041LDFLAGS
1042LIBS
1043CPPFLAGS
1044CXX
1045CXXFLAGS
1046CCC
1047OBJC
1048OBJCFLAGS
1049CPP
1050CXXCPP
1051XMKMF
1052FREETYPE2_CFLAGS
1053FREETYPE2_LIBS
1054ALSA_CFLAGS
1055ALSA_LIBS
1056LIBFFI_CFLAGS
1057LIBFFI_LIBS'
1058
1059
1060# Initialize some variables set by options.
1061ac_init_help=
1062ac_init_version=false
1063ac_unrecognized_opts=
1064ac_unrecognized_sep=
1065# The variables have the same names as the options, with
1066# dashes changed to underlines.
1067cache_file=/dev/null
1068exec_prefix=NONE
1069no_create=
1070no_recursion=
1071prefix=NONE
1072program_prefix=NONE
1073program_suffix=NONE
1074program_transform_name=s,x,x,
1075silent=
1076site=
1077srcdir=
1078verbose=
1079x_includes=NONE
1080x_libraries=NONE
1081
1082# Installation directory options.
1083# These are left unexpanded so users can "make install exec_prefix=/foo"
1084# and all the variables that are supposed to be based on exec_prefix
1085# by default will actually change.
1086# Use braces instead of parens because sh, perl, etc. also accept them.
1087# (The list follows the same order as the GNU Coding Standards.)
1088bindir='${exec_prefix}/bin'
1089sbindir='${exec_prefix}/sbin'
1090libexecdir='${exec_prefix}/libexec'
1091datarootdir='${prefix}/share'
1092datadir='${datarootdir}'
1093sysconfdir='${prefix}/etc'
1094sharedstatedir='${prefix}/com'
1095localstatedir='${prefix}/var'
1096includedir='${prefix}/include'
1097oldincludedir='/usr/include'
1098docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1099infodir='${datarootdir}/info'
1100htmldir='${docdir}'
1101dvidir='${docdir}'
1102pdfdir='${docdir}'
1103psdir='${docdir}'
1104libdir='${exec_prefix}/lib'
1105localedir='${datarootdir}/locale'
1106mandir='${datarootdir}/man'
1107
1108ac_prev=
1109ac_dashdash=
1110for ac_option
1111do
1112  # If the previous option needs an argument, assign it.
1113  if test -n "$ac_prev"; then
1114    eval $ac_prev=\$ac_option
1115    ac_prev=
1116    continue
1117  fi
1118
1119  case $ac_option in
1120  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1121  *=)   ac_optarg= ;;
1122  *)    ac_optarg=yes ;;
1123  esac
1124
1125  # Accept the important Cygnus configure options, so we can diagnose typos.
1126
1127  case $ac_dashdash$ac_option in
1128  --)
1129    ac_dashdash=yes ;;
1130
1131  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1132    ac_prev=bindir ;;
1133  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1134    bindir=$ac_optarg ;;
1135
1136  -build | --build | --buil | --bui | --bu)
1137    ac_prev=build_alias ;;
1138  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1139    build_alias=$ac_optarg ;;
1140
1141  -cache-file | --cache-file | --cache-fil | --cache-fi \
1142  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1143    ac_prev=cache_file ;;
1144  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1145  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1146    cache_file=$ac_optarg ;;
1147
1148  --config-cache | -C)
1149    cache_file=config.cache ;;
1150
1151  -datadir | --datadir | --datadi | --datad)
1152    ac_prev=datadir ;;
1153  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1154    datadir=$ac_optarg ;;
1155
1156  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1157  | --dataroo | --dataro | --datar)
1158    ac_prev=datarootdir ;;
1159  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1160  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1161    datarootdir=$ac_optarg ;;
1162
1163  -disable-* | --disable-*)
1164    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
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--disable-$ac_useropt_orig"
1175	 ac_unrecognized_sep=', ';;
1176    esac
1177    eval enable_$ac_useropt=no ;;
1178
1179  -docdir | --docdir | --docdi | --doc | --do)
1180    ac_prev=docdir ;;
1181  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1182    docdir=$ac_optarg ;;
1183
1184  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1185    ac_prev=dvidir ;;
1186  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1187    dvidir=$ac_optarg ;;
1188
1189  -enable-* | --enable-*)
1190    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1191    # Reject names that are not valid shell variable names.
1192    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1193      as_fn_error $? "invalid feature name: $ac_useropt"
1194    ac_useropt_orig=$ac_useropt
1195    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1196    case $ac_user_opts in
1197      *"
1198"enable_$ac_useropt"
1199"*) ;;
1200      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1201	 ac_unrecognized_sep=', ';;
1202    esac
1203    eval enable_$ac_useropt=\$ac_optarg ;;
1204
1205  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1206  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1207  | --exec | --exe | --ex)
1208    ac_prev=exec_prefix ;;
1209  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1210  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1211  | --exec=* | --exe=* | --ex=*)
1212    exec_prefix=$ac_optarg ;;
1213
1214  -gas | --gas | --ga | --g)
1215    # Obsolete; use --with-gas.
1216    with_gas=yes ;;
1217
1218  -help | --help | --hel | --he | -h)
1219    ac_init_help=long ;;
1220  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1221    ac_init_help=recursive ;;
1222  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1223    ac_init_help=short ;;
1224
1225  -host | --host | --hos | --ho)
1226    ac_prev=host_alias ;;
1227  -host=* | --host=* | --hos=* | --ho=*)
1228    host_alias=$ac_optarg ;;
1229
1230  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1231    ac_prev=htmldir ;;
1232  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1233  | --ht=*)
1234    htmldir=$ac_optarg ;;
1235
1236  -includedir | --includedir | --includedi | --included | --include \
1237  | --includ | --inclu | --incl | --inc)
1238    ac_prev=includedir ;;
1239  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1240  | --includ=* | --inclu=* | --incl=* | --inc=*)
1241    includedir=$ac_optarg ;;
1242
1243  -infodir | --infodir | --infodi | --infod | --info | --inf)
1244    ac_prev=infodir ;;
1245  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1246    infodir=$ac_optarg ;;
1247
1248  -libdir | --libdir | --libdi | --libd)
1249    ac_prev=libdir ;;
1250  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1251    libdir=$ac_optarg ;;
1252
1253  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1254  | --libexe | --libex | --libe)
1255    ac_prev=libexecdir ;;
1256  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1257  | --libexe=* | --libex=* | --libe=*)
1258    libexecdir=$ac_optarg ;;
1259
1260  -localedir | --localedir | --localedi | --localed | --locale)
1261    ac_prev=localedir ;;
1262  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1263    localedir=$ac_optarg ;;
1264
1265  -localstatedir | --localstatedir | --localstatedi | --localstated \
1266  | --localstate | --localstat | --localsta | --localst | --locals)
1267    ac_prev=localstatedir ;;
1268  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1269  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1270    localstatedir=$ac_optarg ;;
1271
1272  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1273    ac_prev=mandir ;;
1274  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1275    mandir=$ac_optarg ;;
1276
1277  -nfp | --nfp | --nf)
1278    # Obsolete; use --without-fp.
1279    with_fp=no ;;
1280
1281  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1282  | --no-cr | --no-c | -n)
1283    no_create=yes ;;
1284
1285  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1286  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1287    no_recursion=yes ;;
1288
1289  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1290  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1291  | --oldin | --oldi | --old | --ol | --o)
1292    ac_prev=oldincludedir ;;
1293  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1294  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1295  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1296    oldincludedir=$ac_optarg ;;
1297
1298  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1299    ac_prev=prefix ;;
1300  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1301    prefix=$ac_optarg ;;
1302
1303  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1304  | --program-pre | --program-pr | --program-p)
1305    ac_prev=program_prefix ;;
1306  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1307  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1308    program_prefix=$ac_optarg ;;
1309
1310  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1311  | --program-suf | --program-su | --program-s)
1312    ac_prev=program_suffix ;;
1313  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1314  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1315    program_suffix=$ac_optarg ;;
1316
1317  -program-transform-name | --program-transform-name \
1318  | --program-transform-nam | --program-transform-na \
1319  | --program-transform-n | --program-transform- \
1320  | --program-transform | --program-transfor \
1321  | --program-transfo | --program-transf \
1322  | --program-trans | --program-tran \
1323  | --progr-tra | --program-tr | --program-t)
1324    ac_prev=program_transform_name ;;
1325  -program-transform-name=* | --program-transform-name=* \
1326  | --program-transform-nam=* | --program-transform-na=* \
1327  | --program-transform-n=* | --program-transform-=* \
1328  | --program-transform=* | --program-transfor=* \
1329  | --program-transfo=* | --program-transf=* \
1330  | --program-trans=* | --program-tran=* \
1331  | --progr-tra=* | --program-tr=* | --program-t=*)
1332    program_transform_name=$ac_optarg ;;
1333
1334  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1335    ac_prev=pdfdir ;;
1336  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1337    pdfdir=$ac_optarg ;;
1338
1339  -psdir | --psdir | --psdi | --psd | --ps)
1340    ac_prev=psdir ;;
1341  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1342    psdir=$ac_optarg ;;
1343
1344  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1345  | -silent | --silent | --silen | --sile | --sil)
1346    silent=yes ;;
1347
1348  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1349    ac_prev=sbindir ;;
1350  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1351  | --sbi=* | --sb=*)
1352    sbindir=$ac_optarg ;;
1353
1354  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1355  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1356  | --sharedst | --shareds | --shared | --share | --shar \
1357  | --sha | --sh)
1358    ac_prev=sharedstatedir ;;
1359  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1360  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1361  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1362  | --sha=* | --sh=*)
1363    sharedstatedir=$ac_optarg ;;
1364
1365  -site | --site | --sit)
1366    ac_prev=site ;;
1367  -site=* | --site=* | --sit=*)
1368    site=$ac_optarg ;;
1369
1370  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1371    ac_prev=srcdir ;;
1372  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1373    srcdir=$ac_optarg ;;
1374
1375  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1376  | --syscon | --sysco | --sysc | --sys | --sy)
1377    ac_prev=sysconfdir ;;
1378  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1379  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1380    sysconfdir=$ac_optarg ;;
1381
1382  -target | --target | --targe | --targ | --tar | --ta | --t)
1383    ac_prev=target_alias ;;
1384  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1385    target_alias=$ac_optarg ;;
1386
1387  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1388    verbose=yes ;;
1389
1390  -version | --version | --versio | --versi | --vers | -V)
1391    ac_init_version=: ;;
1392
1393  -with-* | --with-*)
1394    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1395    # Reject names that are not valid shell variable names.
1396    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1397      as_fn_error $? "invalid package name: $ac_useropt"
1398    ac_useropt_orig=$ac_useropt
1399    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1400    case $ac_user_opts in
1401      *"
1402"with_$ac_useropt"
1403"*) ;;
1404      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1405	 ac_unrecognized_sep=', ';;
1406    esac
1407    eval with_$ac_useropt=\$ac_optarg ;;
1408
1409  -without-* | --without-*)
1410    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1411    # Reject names that are not valid shell variable names.
1412    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1413      as_fn_error $? "invalid package name: $ac_useropt"
1414    ac_useropt_orig=$ac_useropt
1415    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1416    case $ac_user_opts in
1417      *"
1418"with_$ac_useropt"
1419"*) ;;
1420      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1421	 ac_unrecognized_sep=', ';;
1422    esac
1423    eval with_$ac_useropt=no ;;
1424
1425  --x)
1426    # Obsolete; use --with-x.
1427    with_x=yes ;;
1428
1429  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1430  | --x-incl | --x-inc | --x-in | --x-i)
1431    ac_prev=x_includes ;;
1432  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1433  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1434    x_includes=$ac_optarg ;;
1435
1436  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1437  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1438    ac_prev=x_libraries ;;
1439  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1440  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1441    x_libraries=$ac_optarg ;;
1442
1443  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1444Try \`$0 --help' for more information"
1445    ;;
1446
1447  *=*)
1448    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1449    # Reject names that are not valid shell variable names.
1450    case $ac_envvar in #(
1451      '' | [0-9]* | *[!_$as_cr_alnum]* )
1452      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1453    esac
1454    eval $ac_envvar=\$ac_optarg
1455    export $ac_envvar ;;
1456
1457  *)
1458    # FIXME: should be removed in autoconf 3.0.
1459    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1460    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1461      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1462    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1463    ;;
1464
1465  esac
1466done
1467
1468if test -n "$ac_prev"; then
1469  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1470  as_fn_error $? "missing argument to $ac_option"
1471fi
1472
1473if test -n "$ac_unrecognized_opts"; then
1474  case $enable_option_checking in
1475    no) ;;
1476    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1477    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1478  esac
1479fi
1480
1481# Check all directory arguments for consistency.
1482for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1483		datadir sysconfdir sharedstatedir localstatedir includedir \
1484		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1485		libdir localedir mandir
1486do
1487  eval ac_val=\$$ac_var
1488  # Remove trailing slashes.
1489  case $ac_val in
1490    */ )
1491      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1492      eval $ac_var=\$ac_val;;
1493  esac
1494  # Be sure to have absolute directory names.
1495  case $ac_val in
1496    [\\/$]* | ?:[\\/]* )  continue;;
1497    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1498  esac
1499  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1500done
1501
1502# There might be people who depend on the old broken behavior: `$host'
1503# used to hold the argument of --host etc.
1504# FIXME: To remove some day.
1505build=$build_alias
1506host=$host_alias
1507target=$target_alias
1508
1509# FIXME: To remove some day.
1510if test "x$host_alias" != x; then
1511  if test "x$build_alias" = x; then
1512    cross_compiling=maybe
1513    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1514    If a cross compiler is detected then cross compile mode will be used" >&2
1515  elif test "x$build_alias" != "x$host_alias"; then
1516    cross_compiling=yes
1517  fi
1518fi
1519
1520ac_tool_prefix=
1521test -n "$host_alias" && ac_tool_prefix=$host_alias-
1522
1523test "$silent" = yes && exec 6>/dev/null
1524
1525
1526ac_pwd=`pwd` && test -n "$ac_pwd" &&
1527ac_ls_di=`ls -di .` &&
1528ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1529  as_fn_error $? "working directory cannot be determined"
1530test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1531  as_fn_error $? "pwd does not report name of working directory"
1532
1533
1534# Find the source files, if location was not specified.
1535if test -z "$srcdir"; then
1536  ac_srcdir_defaulted=yes
1537  # Try the directory containing this script, then the parent directory.
1538  ac_confdir=`$as_dirname -- "$as_myself" ||
1539$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1540	 X"$as_myself" : 'X\(//\)[^/]' \| \
1541	 X"$as_myself" : 'X\(//\)$' \| \
1542	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1543$as_echo X"$as_myself" |
1544    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1545	    s//\1/
1546	    q
1547	  }
1548	  /^X\(\/\/\)[^/].*/{
1549	    s//\1/
1550	    q
1551	  }
1552	  /^X\(\/\/\)$/{
1553	    s//\1/
1554	    q
1555	  }
1556	  /^X\(\/\).*/{
1557	    s//\1/
1558	    q
1559	  }
1560	  s/.*/./; q'`
1561  srcdir=$ac_confdir
1562  if test ! -r "$srcdir/$ac_unique_file"; then
1563    srcdir=..
1564  fi
1565else
1566  ac_srcdir_defaulted=no
1567fi
1568if test ! -r "$srcdir/$ac_unique_file"; then
1569  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1570  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1571fi
1572ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1573ac_abs_confdir=`(
1574	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1575	pwd)`
1576# When building in place, set srcdir=.
1577if test "$ac_abs_confdir" = "$ac_pwd"; then
1578  srcdir=.
1579fi
1580# Remove unnecessary trailing slashes from srcdir.
1581# Double slashes in file names in object file debugging info
1582# mess up M-x gdb in Emacs.
1583case $srcdir in
1584*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1585esac
1586for ac_var in $ac_precious_vars; do
1587  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1588  eval ac_env_${ac_var}_value=\$${ac_var}
1589  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1590  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1591done
1592
1593#
1594# Report the --help message.
1595#
1596if test "$ac_init_help" = "long"; then
1597  # Omit some internal or obsolete options to make the list less imposing.
1598  # This message is too long to be a string in the A/UX 3.1 sh.
1599  cat <<_ACEOF
1600\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1601
1602Usage: $0 [OPTION]... [VAR=VALUE]...
1603
1604To assign environment variables (e.g., CC, CFLAGS...), specify them as
1605VAR=VALUE.  See below for descriptions of some of the useful variables.
1606
1607Defaults for the options are specified in brackets.
1608
1609Configuration:
1610  -h, --help              display this help and exit
1611      --help=short        display options specific to this package
1612      --help=recursive    display the short help of all the included packages
1613  -V, --version           display version information and exit
1614  -q, --quiet, --silent   do not print \`checking ...' messages
1615      --cache-file=FILE   cache test results in FILE [disabled]
1616  -C, --config-cache      alias for \`--cache-file=config.cache'
1617  -n, --no-create         do not create output files
1618      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1619
1620Installation directories:
1621  --prefix=PREFIX         install architecture-independent files in PREFIX
1622                          [$ac_default_prefix]
1623  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1624                          [PREFIX]
1625
1626By default, \`make install' will install all the files in
1627\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1628an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1629for instance \`--prefix=\$HOME'.
1630
1631For better control, use the options below.
1632
1633Fine tuning of the installation directories:
1634  --bindir=DIR            user executables [EPREFIX/bin]
1635  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1636  --libexecdir=DIR        program executables [EPREFIX/libexec]
1637  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1638  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1639  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1640  --libdir=DIR            object code libraries [EPREFIX/lib]
1641  --includedir=DIR        C header files [PREFIX/include]
1642  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1643  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1644  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1645  --infodir=DIR           info documentation [DATAROOTDIR/info]
1646  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1647  --mandir=DIR            man documentation [DATAROOTDIR/man]
1648  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1649  --htmldir=DIR           html documentation [DOCDIR]
1650  --dvidir=DIR            dvi documentation [DOCDIR]
1651  --pdfdir=DIR            pdf documentation [DOCDIR]
1652  --psdir=DIR             ps documentation [DOCDIR]
1653_ACEOF
1654
1655  cat <<\_ACEOF
1656
1657X features:
1658  --x-includes=DIR    X include files are in DIR
1659  --x-libraries=DIR   X library files are in DIR
1660
1661System types:
1662  --build=BUILD     configure for building on BUILD [guessed]
1663  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1664  --target=TARGET   configure for building compilers for TARGET [HOST]
1665_ACEOF
1666fi
1667
1668if test -n "$ac_init_help"; then
1669  case $ac_init_help in
1670     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1671   esac
1672  cat <<\_ACEOF
1673
1674Optional Features:
1675  --disable-option-checking  ignore unrecognized --enable/--with options
1676  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1677  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1678  --enable-openjdk-only   suppress building custom source even if present
1679                          [disabled]
1680  --enable-debug          set the debug level to fastdebug (shorthand for
1681                          --with-debug-level=fastdebug) [disabled]
1682  --disable-headful       disable building headful support (graphical UI
1683                          support) [enabled]
1684  --enable-hotspot-test-in-build
1685                          run the Queens test after Hotspot build [disabled]
1686  --enable-unlimited-crypto
1687                          Enable unlimited crypto policy [disabled]
1688  --disable-debug-symbols disable generation of debug symbols [enabled]
1689  --disable-zip-debug-info
1690                          disable zipping of debug-info files [enabled]
1691  --disable-macosx-runtime-support
1692                          disable the use of MacOSX Java runtime support
1693                          framework [enabled]
1694  --enable-sjavac         use sjavac to do fast incremental compiles
1695                          [disabled]
1696  --disable-precompiled-headers
1697                          disable using precompiled headers when compiling C++
1698                          [enabled]
1699  --disable-ccache        disable using ccache to speed up recompilations
1700                          [enabled]
1701
1702Optional Packages:
1703  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1704  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1705  --with-custom-make-dir  use this directory for custom build/make files
1706  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1707                          support it), e.g. --with-target-bits=32 [guessed]
1708  --with-sys-root         pass this sys-root to the compilers and tools (for
1709                          cross-compiling)
1710  --with-tools-dir        search this directory for compilers and tools (for
1711                          cross-compiling)
1712  --with-devkit           use this directory as base for tools-dir and
1713                          sys-root (for cross-compiling)
1714  --with-jdk-variant      JDK variant to build (normal) [normal]
1715  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1716                          client, minimal1, kernel, zero, zeroshark) [server]
1717  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1718                          [release]
1719  --with-conf-name        use this as the name of the configuration [generated
1720                          from important configuration options]
1721  --with-builddeps-conf   use this configuration file for the builddeps
1722  --with-builddeps-server download and use build dependencies from this server
1723                          url
1724  --with-builddeps-dir    store downloaded build dependencies here
1725                          [/localhome/builddeps]
1726  --with-builddeps-group  chgrp the downloaded build dependencies to this
1727                          group
1728  --with-cacerts-file     specify alternative cacerts file
1729  --with-milestone        Set milestone value for build [internal]
1730  --with-build-number     Set build number value for build [b00]
1731  --with-user-release-suffix
1732                          Add a custom string to the version string if build
1733                          number isn't set.[username_builddateb00]
1734  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1735  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1736                          invocations of the Boot JDK, overriding the default
1737                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1738                          -enableassertions"
1739  --with-add-source-root  for each and every source directory, look in this
1740                          additional source root for the same directory; if it
1741                          exists and have files in it, include it in the build
1742  --with-override-source-root
1743                          for each and every source directory, look in this
1744                          override source root for the same directory; if it
1745                          exists, use that directory instead and ignore the
1746                          directory in the original source root
1747  --with-adds-and-overrides
1748                          use the subdirs 'adds' and 'overrides' in the
1749                          specified directory as add-source-root and
1750                          override-source-root
1751  --with-override-langtools
1752                          use this langtools dir for the build
1753  --with-override-corba   use this corba dir for the build
1754  --with-override-jaxp    use this jaxp dir for the build
1755  --with-override-jaxws   use this jaxws dir for the build
1756  --with-override-hotspot use this hotspot dir for the build
1757  --with-override-jdk     use this jdk dir for the build
1758  --with-import-hotspot   import hotspot binaries from this jdk image or
1759                          hotspot build dist dir instead of building from
1760                          source
1761  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1762                          only) [probed]
1763  --with-dxsdk            the DirectX SDK (Windows only) [probed]
1764  --with-dxsdk-lib        the DirectX SDK lib directory (Windows only)
1765                          [probed]
1766  --with-dxsdk-include    the DirectX SDK include directory (Windows only)
1767                          [probed]
1768  --with-jtreg            Regression Test Harness [probed]
1769  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1770  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1771  --with-extra-ldflags    extra flags to be used when linking jdk
1772  --with-x                use the X Window System
1773  --with-cups             specify prefix directory for the cups package
1774                          (expecting the headers under PATH/include)
1775  --with-cups-include     specify directory for the cups include files
1776  --with-freetype         specify prefix directory for the freetype2 package
1777                          (expecting the libraries under PATH/lib and the
1778                          headers under PATH/include)
1779  --with-alsa             specify prefix directory for the alsa package
1780                          (expecting the libraries under PATH/lib and the
1781                          headers under PATH/include)
1782  --with-alsa-include     specify directory for the alsa include files
1783  --with-alsa-lib         specify directory for the alsa library
1784  --with-giflib           use giflib from build system or OpenJDK source
1785                          (system, bundled) [bundled]
1786  --with-zlib             use zlib from build system or OpenJDK source
1787                          (system, bundled) [bundled]
1788  --with-stdc++lib=<static>,<dynamic>,<default>
1789                          force linking of the C++ runtime on Linux to either
1790                          static or dynamic, default is static with dynamic as
1791                          fallback
1792  --with-num-cores        number of cores in the build system, e.g.
1793                          --with-num-cores=8 [probed]
1794  --with-memory-size      memory (in MB) available in the build system, e.g.
1795                          --with-memory-size=1024 [probed]
1796  --with-jobs             number of parallel jobs to let make run [calculated
1797                          based on cores and memory]
1798  --with-sjavac-server-java
1799                          use this java binary for running the sjavac
1800                          background server [Boot JDK java]
1801  --with-ccache-dir       where to store ccache files [~/.ccache]
1802
1803Some influential environment variables:
1804  PKG_CONFIG  path to pkg-config utility
1805  CC          C compiler command
1806  CFLAGS      C compiler flags
1807  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1808              nonstandard directory <lib dir>
1809  LIBS        libraries to pass to the linker, e.g. -l<library>
1810  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1811              you have headers in a nonstandard directory <include dir>
1812  CXX         C++ compiler command
1813  CXXFLAGS    C++ compiler flags
1814  OBJC        Objective C compiler command
1815  OBJCFLAGS   Objective C compiler flags
1816  CPP         C preprocessor
1817  CXXCPP      C++ preprocessor
1818  XMKMF       Path to xmkmf, Makefile generator for X Window System
1819  FREETYPE2_CFLAGS
1820              C compiler flags for FREETYPE2, overriding pkg-config
1821  FREETYPE2_LIBS
1822              linker flags for FREETYPE2, overriding pkg-config
1823  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1824  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1825  LIBFFI_CFLAGS
1826              C compiler flags for LIBFFI, overriding pkg-config
1827  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1828
1829Use these variables to override the choices made by `configure' or to help
1830it to find libraries and programs with nonstandard names/locations.
1831
1832Report bugs to <build-dev@openjdk.java.net>.
1833OpenJDK home page: <http://openjdk.java.net>.
1834_ACEOF
1835ac_status=$?
1836fi
1837
1838if test "$ac_init_help" = "recursive"; then
1839  # If there are subdirs, report their specific --help.
1840  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1841    test -d "$ac_dir" ||
1842      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1843      continue
1844    ac_builddir=.
1845
1846case "$ac_dir" in
1847.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1848*)
1849  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1850  # A ".." for each directory in $ac_dir_suffix.
1851  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1852  case $ac_top_builddir_sub in
1853  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1854  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1855  esac ;;
1856esac
1857ac_abs_top_builddir=$ac_pwd
1858ac_abs_builddir=$ac_pwd$ac_dir_suffix
1859# for backward compatibility:
1860ac_top_builddir=$ac_top_build_prefix
1861
1862case $srcdir in
1863  .)  # We are building in place.
1864    ac_srcdir=.
1865    ac_top_srcdir=$ac_top_builddir_sub
1866    ac_abs_top_srcdir=$ac_pwd ;;
1867  [\\/]* | ?:[\\/]* )  # Absolute name.
1868    ac_srcdir=$srcdir$ac_dir_suffix;
1869    ac_top_srcdir=$srcdir
1870    ac_abs_top_srcdir=$srcdir ;;
1871  *) # Relative name.
1872    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1873    ac_top_srcdir=$ac_top_build_prefix$srcdir
1874    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1875esac
1876ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1877
1878    cd "$ac_dir" || { ac_status=$?; continue; }
1879    # Check for guested configure.
1880    if test -f "$ac_srcdir/configure.gnu"; then
1881      echo &&
1882      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1883    elif test -f "$ac_srcdir/configure"; then
1884      echo &&
1885      $SHELL "$ac_srcdir/configure" --help=recursive
1886    else
1887      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1888    fi || ac_status=$?
1889    cd "$ac_pwd" || { ac_status=$?; break; }
1890  done
1891fi
1892
1893test -n "$ac_init_help" && exit $ac_status
1894if $ac_init_version; then
1895  cat <<\_ACEOF
1896OpenJDK configure jdk8
1897generated by GNU Autoconf 2.67
1898
1899Copyright (C) 2010 Free Software Foundation, Inc.
1900This configure script is free software; the Free Software Foundation
1901gives unlimited permission to copy, distribute and modify it.
1902_ACEOF
1903  exit
1904fi
1905
1906## ------------------------ ##
1907## Autoconf initialization. ##
1908## ------------------------ ##
1909
1910# ac_fn_c_try_compile LINENO
1911# --------------------------
1912# Try to compile conftest.$ac_ext, and return whether this succeeded.
1913ac_fn_c_try_compile ()
1914{
1915  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1916  rm -f conftest.$ac_objext
1917  if { { ac_try="$ac_compile"
1918case "(($ac_try" in
1919  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1920  *) ac_try_echo=$ac_try;;
1921esac
1922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1923$as_echo "$ac_try_echo"; } >&5
1924  (eval "$ac_compile") 2>conftest.err
1925  ac_status=$?
1926  if test -s conftest.err; then
1927    grep -v '^ *+' conftest.err >conftest.er1
1928    cat conftest.er1 >&5
1929    mv -f conftest.er1 conftest.err
1930  fi
1931  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1932  test $ac_status = 0; } && {
1933	 test -z "$ac_c_werror_flag" ||
1934	 test ! -s conftest.err
1935       } && test -s conftest.$ac_objext; then :
1936  ac_retval=0
1937else
1938  $as_echo "$as_me: failed program was:" >&5
1939sed 's/^/| /' conftest.$ac_ext >&5
1940
1941	ac_retval=1
1942fi
1943  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1944  as_fn_set_status $ac_retval
1945
1946} # ac_fn_c_try_compile
1947
1948# ac_fn_cxx_try_compile LINENO
1949# ----------------------------
1950# Try to compile conftest.$ac_ext, and return whether this succeeded.
1951ac_fn_cxx_try_compile ()
1952{
1953  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1954  rm -f conftest.$ac_objext
1955  if { { ac_try="$ac_compile"
1956case "(($ac_try" in
1957  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958  *) ac_try_echo=$ac_try;;
1959esac
1960eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961$as_echo "$ac_try_echo"; } >&5
1962  (eval "$ac_compile") 2>conftest.err
1963  ac_status=$?
1964  if test -s conftest.err; then
1965    grep -v '^ *+' conftest.err >conftest.er1
1966    cat conftest.er1 >&5
1967    mv -f conftest.er1 conftest.err
1968  fi
1969  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1970  test $ac_status = 0; } && {
1971	 test -z "$ac_cxx_werror_flag" ||
1972	 test ! -s conftest.err
1973       } && test -s conftest.$ac_objext; then :
1974  ac_retval=0
1975else
1976  $as_echo "$as_me: failed program was:" >&5
1977sed 's/^/| /' conftest.$ac_ext >&5
1978
1979	ac_retval=1
1980fi
1981  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
1982  as_fn_set_status $ac_retval
1983
1984} # ac_fn_cxx_try_compile
1985
1986# ac_fn_objc_try_compile LINENO
1987# -----------------------------
1988# Try to compile conftest.$ac_ext, and return whether this succeeded.
1989ac_fn_objc_try_compile ()
1990{
1991  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992  rm -f conftest.$ac_objext
1993  if { { ac_try="$ac_compile"
1994case "(($ac_try" in
1995  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1996  *) ac_try_echo=$ac_try;;
1997esac
1998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1999$as_echo "$ac_try_echo"; } >&5
2000  (eval "$ac_compile") 2>conftest.err
2001  ac_status=$?
2002  if test -s conftest.err; then
2003    grep -v '^ *+' conftest.err >conftest.er1
2004    cat conftest.er1 >&5
2005    mv -f conftest.er1 conftest.err
2006  fi
2007  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2008  test $ac_status = 0; } && {
2009	 test -z "$ac_objc_werror_flag" ||
2010	 test ! -s conftest.err
2011       } && test -s conftest.$ac_objext; then :
2012  ac_retval=0
2013else
2014  $as_echo "$as_me: failed program was:" >&5
2015sed 's/^/| /' conftest.$ac_ext >&5
2016
2017	ac_retval=1
2018fi
2019  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2020  as_fn_set_status $ac_retval
2021
2022} # ac_fn_objc_try_compile
2023
2024# ac_fn_c_try_cpp LINENO
2025# ----------------------
2026# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2027ac_fn_c_try_cpp ()
2028{
2029  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030  if { { ac_try="$ac_cpp conftest.$ac_ext"
2031case "(($ac_try" in
2032  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2033  *) ac_try_echo=$ac_try;;
2034esac
2035eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2036$as_echo "$ac_try_echo"; } >&5
2037  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2038  ac_status=$?
2039  if test -s conftest.err; then
2040    grep -v '^ *+' conftest.err >conftest.er1
2041    cat conftest.er1 >&5
2042    mv -f conftest.er1 conftest.err
2043  fi
2044  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2045  test $ac_status = 0; } > conftest.i && {
2046	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2047	 test ! -s conftest.err
2048       }; then :
2049  ac_retval=0
2050else
2051  $as_echo "$as_me: failed program was:" >&5
2052sed 's/^/| /' conftest.$ac_ext >&5
2053
2054    ac_retval=1
2055fi
2056  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2057  as_fn_set_status $ac_retval
2058
2059} # ac_fn_c_try_cpp
2060
2061# ac_fn_cxx_try_cpp LINENO
2062# ------------------------
2063# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2064ac_fn_cxx_try_cpp ()
2065{
2066  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2067  if { { ac_try="$ac_cpp conftest.$ac_ext"
2068case "(($ac_try" in
2069  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2070  *) ac_try_echo=$ac_try;;
2071esac
2072eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2073$as_echo "$ac_try_echo"; } >&5
2074  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2075  ac_status=$?
2076  if test -s conftest.err; then
2077    grep -v '^ *+' conftest.err >conftest.er1
2078    cat conftest.er1 >&5
2079    mv -f conftest.er1 conftest.err
2080  fi
2081  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2082  test $ac_status = 0; } > conftest.i && {
2083	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2084	 test ! -s conftest.err
2085       }; then :
2086  ac_retval=0
2087else
2088  $as_echo "$as_me: failed program was:" >&5
2089sed 's/^/| /' conftest.$ac_ext >&5
2090
2091    ac_retval=1
2092fi
2093  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2094  as_fn_set_status $ac_retval
2095
2096} # ac_fn_cxx_try_cpp
2097
2098# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2099# ---------------------------------------------------------
2100# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2101# the include files in INCLUDES and setting the cache variable VAR
2102# accordingly.
2103ac_fn_cxx_check_header_mongrel ()
2104{
2105  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2106  if eval "test \"\${$3+set}\"" = set; then :
2107  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2108$as_echo_n "checking for $2... " >&6; }
2109if eval "test \"\${$3+set}\"" = set; then :
2110  $as_echo_n "(cached) " >&6
2111fi
2112eval ac_res=\$$3
2113	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2114$as_echo "$ac_res" >&6; }
2115else
2116  # Is the header compilable?
2117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2118$as_echo_n "checking $2 usability... " >&6; }
2119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h.  */
2121$4
2122#include <$2>
2123_ACEOF
2124if ac_fn_cxx_try_compile "$LINENO"; then :
2125  ac_header_compiler=yes
2126else
2127  ac_header_compiler=no
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2131$as_echo "$ac_header_compiler" >&6; }
2132
2133# Is the header present?
2134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2135$as_echo_n "checking $2 presence... " >&6; }
2136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2137/* end confdefs.h.  */
2138#include <$2>
2139_ACEOF
2140if ac_fn_cxx_try_cpp "$LINENO"; then :
2141  ac_header_preproc=yes
2142else
2143  ac_header_preproc=no
2144fi
2145rm -f conftest.err conftest.i conftest.$ac_ext
2146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2147$as_echo "$ac_header_preproc" >&6; }
2148
2149# So?  What about this header?
2150case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2151  yes:no: )
2152    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2153$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2154    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2155$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2156    ;;
2157  no:yes:* )
2158    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2159$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2160    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2161$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2162    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2163$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2164    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2165$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2166    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2167$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2168( $as_echo "## ----------------------------------------- ##
2169## Report this to build-dev@openjdk.java.net ##
2170## ----------------------------------------- ##"
2171     ) | sed "s/^/$as_me: WARNING:     /" >&2
2172    ;;
2173esac
2174  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2175$as_echo_n "checking for $2... " >&6; }
2176if eval "test \"\${$3+set}\"" = set; then :
2177  $as_echo_n "(cached) " >&6
2178else
2179  eval "$3=\$ac_header_compiler"
2180fi
2181eval ac_res=\$$3
2182	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2183$as_echo "$ac_res" >&6; }
2184fi
2185  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2186
2187} # ac_fn_cxx_check_header_mongrel
2188
2189# ac_fn_cxx_try_run LINENO
2190# ------------------------
2191# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2192# that executables *can* be run.
2193ac_fn_cxx_try_run ()
2194{
2195  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2196  if { { ac_try="$ac_link"
2197case "(($ac_try" in
2198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2199  *) ac_try_echo=$ac_try;;
2200esac
2201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2202$as_echo "$ac_try_echo"; } >&5
2203  (eval "$ac_link") 2>&5
2204  ac_status=$?
2205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2206  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2207  { { case "(($ac_try" in
2208  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2209  *) ac_try_echo=$ac_try;;
2210esac
2211eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2212$as_echo "$ac_try_echo"; } >&5
2213  (eval "$ac_try") 2>&5
2214  ac_status=$?
2215  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2216  test $ac_status = 0; }; }; then :
2217  ac_retval=0
2218else
2219  $as_echo "$as_me: program exited with status $ac_status" >&5
2220       $as_echo "$as_me: failed program was:" >&5
2221sed 's/^/| /' conftest.$ac_ext >&5
2222
2223       ac_retval=$ac_status
2224fi
2225  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2226  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2227  as_fn_set_status $ac_retval
2228
2229} # ac_fn_cxx_try_run
2230
2231# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2232# ---------------------------------------------------------
2233# Tests whether HEADER exists and can be compiled using the include files in
2234# INCLUDES, setting the cache variable VAR accordingly.
2235ac_fn_cxx_check_header_compile ()
2236{
2237  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2238  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2239$as_echo_n "checking for $2... " >&6; }
2240if eval "test \"\${$3+set}\"" = set; then :
2241  $as_echo_n "(cached) " >&6
2242else
2243  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244/* end confdefs.h.  */
2245$4
2246#include <$2>
2247_ACEOF
2248if ac_fn_cxx_try_compile "$LINENO"; then :
2249  eval "$3=yes"
2250else
2251  eval "$3=no"
2252fi
2253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2254fi
2255eval ac_res=\$$3
2256	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2257$as_echo "$ac_res" >&6; }
2258  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2259
2260} # ac_fn_cxx_check_header_compile
2261
2262# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2263# ----------------------------------------------
2264# Tries to find the compile-time value of EXPR in a program that includes
2265# INCLUDES, setting VAR accordingly. Returns whether the value could be
2266# computed
2267ac_fn_cxx_compute_int ()
2268{
2269  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270  if test "$cross_compiling" = yes; then
2271    # Depending upon the size, compute the lo and hi bounds.
2272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h.  */
2274$4
2275int
2276main ()
2277{
2278static int test_array [1 - 2 * !(($2) >= 0)];
2279test_array [0] = 0
2280
2281  ;
2282  return 0;
2283}
2284_ACEOF
2285if ac_fn_cxx_try_compile "$LINENO"; then :
2286  ac_lo=0 ac_mid=0
2287  while :; do
2288    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289/* end confdefs.h.  */
2290$4
2291int
2292main ()
2293{
2294static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2295test_array [0] = 0
2296
2297  ;
2298  return 0;
2299}
2300_ACEOF
2301if ac_fn_cxx_try_compile "$LINENO"; then :
2302  ac_hi=$ac_mid; break
2303else
2304  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2305			if test $ac_lo -le $ac_mid; then
2306			  ac_lo= ac_hi=
2307			  break
2308			fi
2309			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2310fi
2311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2312  done
2313else
2314  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315/* end confdefs.h.  */
2316$4
2317int
2318main ()
2319{
2320static int test_array [1 - 2 * !(($2) < 0)];
2321test_array [0] = 0
2322
2323  ;
2324  return 0;
2325}
2326_ACEOF
2327if ac_fn_cxx_try_compile "$LINENO"; then :
2328  ac_hi=-1 ac_mid=-1
2329  while :; do
2330    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331/* end confdefs.h.  */
2332$4
2333int
2334main ()
2335{
2336static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2337test_array [0] = 0
2338
2339  ;
2340  return 0;
2341}
2342_ACEOF
2343if ac_fn_cxx_try_compile "$LINENO"; then :
2344  ac_lo=$ac_mid; break
2345else
2346  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2347			if test $ac_mid -le $ac_hi; then
2348			  ac_lo= ac_hi=
2349			  break
2350			fi
2351			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2352fi
2353rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2354  done
2355else
2356  ac_lo= ac_hi=
2357fi
2358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2359fi
2360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361# Binary search between lo and hi bounds.
2362while test "x$ac_lo" != "x$ac_hi"; do
2363  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h.  */
2366$4
2367int
2368main ()
2369{
2370static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2371test_array [0] = 0
2372
2373  ;
2374  return 0;
2375}
2376_ACEOF
2377if ac_fn_cxx_try_compile "$LINENO"; then :
2378  ac_hi=$ac_mid
2379else
2380  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2381fi
2382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2383done
2384case $ac_lo in #((
2385?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2386'') ac_retval=1 ;;
2387esac
2388  else
2389    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2390/* end confdefs.h.  */
2391$4
2392static long int longval () { return $2; }
2393static unsigned long int ulongval () { return $2; }
2394#include <stdio.h>
2395#include <stdlib.h>
2396int
2397main ()
2398{
2399
2400  FILE *f = fopen ("conftest.val", "w");
2401  if (! f)
2402    return 1;
2403  if (($2) < 0)
2404    {
2405      long int i = longval ();
2406      if (i != ($2))
2407	return 1;
2408      fprintf (f, "%ld", i);
2409    }
2410  else
2411    {
2412      unsigned long int i = ulongval ();
2413      if (i != ($2))
2414	return 1;
2415      fprintf (f, "%lu", i);
2416    }
2417  /* Do not output a trailing newline, as this causes \r\n confusion
2418     on some platforms.  */
2419  return ferror (f) || fclose (f) != 0;
2420
2421  ;
2422  return 0;
2423}
2424_ACEOF
2425if ac_fn_cxx_try_run "$LINENO"; then :
2426  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2427else
2428  ac_retval=1
2429fi
2430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2431  conftest.$ac_objext conftest.beam conftest.$ac_ext
2432rm -f conftest.val
2433
2434  fi
2435  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2436  as_fn_set_status $ac_retval
2437
2438} # ac_fn_cxx_compute_int
2439
2440# ac_fn_cxx_try_link LINENO
2441# -------------------------
2442# Try to link conftest.$ac_ext, and return whether this succeeded.
2443ac_fn_cxx_try_link ()
2444{
2445  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2446  rm -f conftest.$ac_objext conftest$ac_exeext
2447  if { { ac_try="$ac_link"
2448case "(($ac_try" in
2449  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2450  *) ac_try_echo=$ac_try;;
2451esac
2452eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2453$as_echo "$ac_try_echo"; } >&5
2454  (eval "$ac_link") 2>conftest.err
2455  ac_status=$?
2456  if test -s conftest.err; then
2457    grep -v '^ *+' conftest.err >conftest.er1
2458    cat conftest.er1 >&5
2459    mv -f conftest.er1 conftest.err
2460  fi
2461  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2462  test $ac_status = 0; } && {
2463	 test -z "$ac_cxx_werror_flag" ||
2464	 test ! -s conftest.err
2465       } && test -s conftest$ac_exeext && {
2466	 test "$cross_compiling" = yes ||
2467	 $as_test_x conftest$ac_exeext
2468       }; then :
2469  ac_retval=0
2470else
2471  $as_echo "$as_me: failed program was:" >&5
2472sed 's/^/| /' conftest.$ac_ext >&5
2473
2474	ac_retval=1
2475fi
2476  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2477  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2478  # interfere with the next link command; also delete a directory that is
2479  # left behind by Apple's compiler.  We do this before executing the actions.
2480  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2481  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2482  as_fn_set_status $ac_retval
2483
2484} # ac_fn_cxx_try_link
2485
2486# ac_fn_cxx_check_func LINENO FUNC VAR
2487# ------------------------------------
2488# Tests whether FUNC exists, setting the cache variable VAR accordingly
2489ac_fn_cxx_check_func ()
2490{
2491  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2492  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2493$as_echo_n "checking for $2... " >&6; }
2494if eval "test \"\${$3+set}\"" = set; then :
2495  $as_echo_n "(cached) " >&6
2496else
2497  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2498/* end confdefs.h.  */
2499/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2500   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2501#define $2 innocuous_$2
2502
2503/* System header to define __stub macros and hopefully few prototypes,
2504    which can conflict with char $2 (); below.
2505    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2506    <limits.h> exists even on freestanding compilers.  */
2507
2508#ifdef __STDC__
2509# include <limits.h>
2510#else
2511# include <assert.h>
2512#endif
2513
2514#undef $2
2515
2516/* Override any GCC internal prototype to avoid an error.
2517   Use char because int might match the return type of a GCC
2518   builtin and then its argument prototype would still apply.  */
2519#ifdef __cplusplus
2520extern "C"
2521#endif
2522char $2 ();
2523/* The GNU C library defines this for functions which it implements
2524    to always fail with ENOSYS.  Some functions are actually named
2525    something starting with __ and the normal name is an alias.  */
2526#if defined __stub_$2 || defined __stub___$2
2527choke me
2528#endif
2529
2530int
2531main ()
2532{
2533return $2 ();
2534  ;
2535  return 0;
2536}
2537_ACEOF
2538if ac_fn_cxx_try_link "$LINENO"; then :
2539  eval "$3=yes"
2540else
2541  eval "$3=no"
2542fi
2543rm -f core conftest.err conftest.$ac_objext \
2544    conftest$ac_exeext conftest.$ac_ext
2545fi
2546eval ac_res=\$$3
2547	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2548$as_echo "$ac_res" >&6; }
2549  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2550
2551} # ac_fn_cxx_check_func
2552
2553# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2554# -------------------------------------------------------
2555# Tests whether HEADER exists and can be compiled using the include files in
2556# INCLUDES, setting the cache variable VAR accordingly.
2557ac_fn_c_check_header_compile ()
2558{
2559  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2561$as_echo_n "checking for $2... " >&6; }
2562if eval "test \"\${$3+set}\"" = set; then :
2563  $as_echo_n "(cached) " >&6
2564else
2565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2566/* end confdefs.h.  */
2567$4
2568#include <$2>
2569_ACEOF
2570if ac_fn_c_try_compile "$LINENO"; then :
2571  eval "$3=yes"
2572else
2573  eval "$3=no"
2574fi
2575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2576fi
2577eval ac_res=\$$3
2578	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2579$as_echo "$ac_res" >&6; }
2580  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
2581
2582} # ac_fn_c_check_header_compile
2583cat >config.log <<_ACEOF
2584This file contains any messages produced by compilers while
2585running configure, to aid debugging if configure makes a mistake.
2586
2587It was created by OpenJDK $as_me jdk8, which was
2588generated by GNU Autoconf 2.67.  Invocation command line was
2589
2590  $ $0 $@
2591
2592_ACEOF
2593exec 5>>config.log
2594{
2595cat <<_ASUNAME
2596## --------- ##
2597## Platform. ##
2598## --------- ##
2599
2600hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2601uname -m = `(uname -m) 2>/dev/null || echo unknown`
2602uname -r = `(uname -r) 2>/dev/null || echo unknown`
2603uname -s = `(uname -s) 2>/dev/null || echo unknown`
2604uname -v = `(uname -v) 2>/dev/null || echo unknown`
2605
2606/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2607/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2608
2609/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2610/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2611/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2612/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2613/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2614/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2615/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2616
2617_ASUNAME
2618
2619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2620for as_dir in $PATH
2621do
2622  IFS=$as_save_IFS
2623  test -z "$as_dir" && as_dir=.
2624    $as_echo "PATH: $as_dir"
2625  done
2626IFS=$as_save_IFS
2627
2628} >&5
2629
2630cat >&5 <<_ACEOF
2631
2632
2633## ----------- ##
2634## Core tests. ##
2635## ----------- ##
2636
2637_ACEOF
2638
2639
2640# Keep a trace of the command line.
2641# Strip out --no-create and --no-recursion so they do not pile up.
2642# Strip out --silent because we don't want to record it for future runs.
2643# Also quote any args containing shell meta-characters.
2644# Make two passes to allow for proper duplicate-argument suppression.
2645ac_configure_args=
2646ac_configure_args0=
2647ac_configure_args1=
2648ac_must_keep_next=false
2649for ac_pass in 1 2
2650do
2651  for ac_arg
2652  do
2653    case $ac_arg in
2654    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2655    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2656    | -silent | --silent | --silen | --sile | --sil)
2657      continue ;;
2658    *\'*)
2659      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2660    esac
2661    case $ac_pass in
2662    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2663    2)
2664      as_fn_append ac_configure_args1 " '$ac_arg'"
2665      if test $ac_must_keep_next = true; then
2666	ac_must_keep_next=false # Got value, back to normal.
2667      else
2668	case $ac_arg in
2669	  *=* | --config-cache | -C | -disable-* | --disable-* \
2670	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2671	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2672	  | -with-* | --with-* | -without-* | --without-* | --x)
2673	    case "$ac_configure_args0 " in
2674	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2675	    esac
2676	    ;;
2677	  -* ) ac_must_keep_next=true ;;
2678	esac
2679      fi
2680      as_fn_append ac_configure_args " '$ac_arg'"
2681      ;;
2682    esac
2683  done
2684done
2685{ ac_configure_args0=; unset ac_configure_args0;}
2686{ ac_configure_args1=; unset ac_configure_args1;}
2687
2688# When interrupted or exit'd, cleanup temporary files, and complete
2689# config.log.  We remove comments because anyway the quotes in there
2690# would cause problems or look ugly.
2691# WARNING: Use '\'' to represent an apostrophe within the trap.
2692# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2693trap 'exit_status=$?
2694  # Save into config.log some information that might help in debugging.
2695  {
2696    echo
2697
2698    $as_echo "## ---------------- ##
2699## Cache variables. ##
2700## ---------------- ##"
2701    echo
2702    # The following way of writing the cache mishandles newlines in values,
2703(
2704  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2705    eval ac_val=\$$ac_var
2706    case $ac_val in #(
2707    *${as_nl}*)
2708      case $ac_var in #(
2709      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2710$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2711      esac
2712      case $ac_var in #(
2713      _ | IFS | as_nl) ;; #(
2714      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2715      *) { eval $ac_var=; unset $ac_var;} ;;
2716      esac ;;
2717    esac
2718  done
2719  (set) 2>&1 |
2720    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2721    *${as_nl}ac_space=\ *)
2722      sed -n \
2723	"s/'\''/'\''\\\\'\'''\''/g;
2724	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2725      ;; #(
2726    *)
2727      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2728      ;;
2729    esac |
2730    sort
2731)
2732    echo
2733
2734    $as_echo "## ----------------- ##
2735## Output variables. ##
2736## ----------------- ##"
2737    echo
2738    for ac_var in $ac_subst_vars
2739    do
2740      eval ac_val=\$$ac_var
2741      case $ac_val in
2742      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2743      esac
2744      $as_echo "$ac_var='\''$ac_val'\''"
2745    done | sort
2746    echo
2747
2748    if test -n "$ac_subst_files"; then
2749      $as_echo "## ------------------- ##
2750## File substitutions. ##
2751## ------------------- ##"
2752      echo
2753      for ac_var in $ac_subst_files
2754      do
2755	eval ac_val=\$$ac_var
2756	case $ac_val in
2757	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2758	esac
2759	$as_echo "$ac_var='\''$ac_val'\''"
2760      done | sort
2761      echo
2762    fi
2763
2764    if test -s confdefs.h; then
2765      $as_echo "## ----------- ##
2766## confdefs.h. ##
2767## ----------- ##"
2768      echo
2769      cat confdefs.h
2770      echo
2771    fi
2772    test "$ac_signal" != 0 &&
2773      $as_echo "$as_me: caught signal $ac_signal"
2774    $as_echo "$as_me: exit $exit_status"
2775  } >&5
2776  rm -f core *.core core.conftest.* &&
2777    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2778    exit $exit_status
2779' 0
2780for ac_signal in 1 2 13 15; do
2781  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2782done
2783ac_signal=0
2784
2785# confdefs.h avoids OS command line length limits that DEFS can exceed.
2786rm -f -r conftest* confdefs.h
2787
2788$as_echo "/* confdefs.h */" > confdefs.h
2789
2790# Predefined preprocessor variables.
2791
2792cat >>confdefs.h <<_ACEOF
2793#define PACKAGE_NAME "$PACKAGE_NAME"
2794_ACEOF
2795
2796cat >>confdefs.h <<_ACEOF
2797#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2798_ACEOF
2799
2800cat >>confdefs.h <<_ACEOF
2801#define PACKAGE_VERSION "$PACKAGE_VERSION"
2802_ACEOF
2803
2804cat >>confdefs.h <<_ACEOF
2805#define PACKAGE_STRING "$PACKAGE_STRING"
2806_ACEOF
2807
2808cat >>confdefs.h <<_ACEOF
2809#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2810_ACEOF
2811
2812cat >>confdefs.h <<_ACEOF
2813#define PACKAGE_URL "$PACKAGE_URL"
2814_ACEOF
2815
2816
2817# Let the site file select an alternate cache file if it wants to.
2818# Prefer an explicitly selected file to automatically selected ones.
2819ac_site_file1=NONE
2820ac_site_file2=NONE
2821if test -n "$CONFIG_SITE"; then
2822  # We do not want a PATH search for config.site.
2823  case $CONFIG_SITE in #((
2824    -*)  ac_site_file1=./$CONFIG_SITE;;
2825    */*) ac_site_file1=$CONFIG_SITE;;
2826    *)   ac_site_file1=./$CONFIG_SITE;;
2827  esac
2828elif test "x$prefix" != xNONE; then
2829  ac_site_file1=$prefix/share/config.site
2830  ac_site_file2=$prefix/etc/config.site
2831else
2832  ac_site_file1=$ac_default_prefix/share/config.site
2833  ac_site_file2=$ac_default_prefix/etc/config.site
2834fi
2835for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2836do
2837  test "x$ac_site_file" = xNONE && continue
2838  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2839    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2840$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2841    sed 's/^/| /' "$ac_site_file" >&5
2842    . "$ac_site_file" \
2843      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2845as_fn_error $? "failed to load site script $ac_site_file
2846See \`config.log' for more details" "$LINENO" 5; }
2847  fi
2848done
2849
2850if test -r "$cache_file"; then
2851  # Some versions of bash will fail to source /dev/null (special files
2852  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2853  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2854    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2855$as_echo "$as_me: loading cache $cache_file" >&6;}
2856    case $cache_file in
2857      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2858      *)                      . "./$cache_file";;
2859    esac
2860  fi
2861else
2862  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2863$as_echo "$as_me: creating cache $cache_file" >&6;}
2864  >$cache_file
2865fi
2866
2867# Check that the precious variables saved in the cache have kept the same
2868# value.
2869ac_cache_corrupted=false
2870for ac_var in $ac_precious_vars; do
2871  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2872  eval ac_new_set=\$ac_env_${ac_var}_set
2873  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2874  eval ac_new_val=\$ac_env_${ac_var}_value
2875  case $ac_old_set,$ac_new_set in
2876    set,)
2877      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2878$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2879      ac_cache_corrupted=: ;;
2880    ,set)
2881      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2882$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2883      ac_cache_corrupted=: ;;
2884    ,);;
2885    *)
2886      if test "x$ac_old_val" != "x$ac_new_val"; then
2887	# differences in whitespace do not lead to failure.
2888	ac_old_val_w=`echo x $ac_old_val`
2889	ac_new_val_w=`echo x $ac_new_val`
2890	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2891	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2892$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2893	  ac_cache_corrupted=:
2894	else
2895	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2896$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2897	  eval $ac_var=\$ac_old_val
2898	fi
2899	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2900$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2901	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2902$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2903      fi;;
2904  esac
2905  # Pass precious variables to config.status.
2906  if test "$ac_new_set" = set; then
2907    case $ac_new_val in
2908    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2909    *) ac_arg=$ac_var=$ac_new_val ;;
2910    esac
2911    case " $ac_configure_args " in
2912      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2913      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2914    esac
2915  fi
2916done
2917if $ac_cache_corrupted; then
2918  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2919$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2920  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2921$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2922  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2923fi
2924## -------------------- ##
2925## Main body of script. ##
2926## -------------------- ##
2927
2928ac_ext=c
2929ac_cpp='$CPP $CPPFLAGS'
2930ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2931ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2932ac_compiler_gnu=$ac_cv_c_compiler_gnu
2933
2934
2935
2936ac_aux_dir=
2937for ac_dir in build-aux "$srcdir"/build-aux; do
2938  if test -f "$ac_dir/install-sh"; then
2939    ac_aux_dir=$ac_dir
2940    ac_install_sh="$ac_aux_dir/install-sh -c"
2941    break
2942  elif test -f "$ac_dir/install.sh"; then
2943    ac_aux_dir=$ac_dir
2944    ac_install_sh="$ac_aux_dir/install.sh -c"
2945    break
2946  elif test -f "$ac_dir/shtool"; then
2947    ac_aux_dir=$ac_dir
2948    ac_install_sh="$ac_aux_dir/shtool install -c"
2949    break
2950  fi
2951done
2952if test -z "$ac_aux_dir"; then
2953  as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
2954fi
2955
2956# These three variables are undocumented and unsupported,
2957# and are intended to be withdrawn in a future Autoconf release.
2958# They can cause serious problems if a builder's source tree is in a directory
2959# whose full name contains unusual characters.
2960ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2961ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2962ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2963
2964
2965# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
2966
2967#
2968# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
2969# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2970#
2971# This code is free software; you can redistribute it and/or modify it
2972# under the terms of the GNU General Public License version 2 only, as
2973# published by the Free Software Foundation.  Oracle designates this
2974# particular file as subject to the "Classpath" exception as provided
2975# by Oracle in the LICENSE file that accompanied this code.
2976#
2977# This code is distributed in the hope that it will be useful, but WITHOUT
2978# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2979# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2980# version 2 for more details (a copy is included in the LICENSE file that
2981# accompanied this code).
2982#
2983# You should have received a copy of the GNU General Public License version
2984# 2 along with this work; if not, write to the Free Software Foundation,
2985# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2986#
2987# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2988# or visit www.oracle.com if you need additional information or have any
2989# questions.
2990#
2991
2992#
2993# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
2994#
2995# This program is free software; you can redistribute it and/or modify
2996# it under the terms of the GNU General Public License as published by
2997# the Free Software Foundation; either version 2 of the License, or
2998# (at your option) any later version.
2999#
3000# This program is distributed in the hope that it will be useful, but
3001# WITHOUT ANY WARRANTY; without even the implied warranty of
3002# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3003# General Public License for more details.
3004#
3005# You should have received a copy of the GNU General Public License
3006# along with this program; if not, write to the Free Software
3007# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3008#
3009# As a special exception to the GNU General Public License, if you
3010# distribute this file as part of a program that contains a
3011# configuration script generated by Autoconf, you may include it under
3012# the same distribution terms that you use for the rest of that program.
3013
3014# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3015# ----------------------------------
3016# PKG_PROG_PKG_CONFIG
3017
3018# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3019#
3020# Check to see whether a particular set of modules exists.  Similar
3021# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3022#
3023#
3024# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3025# this or PKG_CHECK_MODULES is called, or make sure to call
3026# PKG_CHECK_EXISTS manually
3027# --------------------------------------------------------------
3028
3029
3030
3031# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3032# ---------------------------------------------
3033# _PKG_CONFIG
3034
3035# _PKG_SHORT_ERRORS_SUPPORTED
3036# -----------------------------
3037# _PKG_SHORT_ERRORS_SUPPORTED
3038
3039
3040# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3041# [ACTION-IF-NOT-FOUND])
3042#
3043#
3044# Note that if there is a possibility the first call to
3045# PKG_CHECK_MODULES might not happen, you should be sure to include an
3046# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3047#
3048#
3049# --------------------------------------------------------------
3050# PKG_CHECK_MODULES
3051
3052
3053# Include these first...
3054#
3055# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3056# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3057#
3058# This code is free software; you can redistribute it and/or modify it
3059# under the terms of the GNU General Public License version 2 only, as
3060# published by the Free Software Foundation.  Oracle designates this
3061# particular file as subject to the "Classpath" exception as provided
3062# by Oracle in the LICENSE file that accompanied this code.
3063#
3064# This code is distributed in the hope that it will be useful, but WITHOUT
3065# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3066# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3067# version 2 for more details (a copy is included in the LICENSE file that
3068# accompanied this code).
3069#
3070# You should have received a copy of the GNU General Public License version
3071# 2 along with this work; if not, write to the Free Software Foundation,
3072# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3073#
3074# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3075# or visit www.oracle.com if you need additional information or have any
3076# questions.
3077#
3078
3079# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3080# If so, then append $1 to $2\
3081# Also set JVM_ARG_OK to true/false depending on outcome.
3082
3083
3084# This will make sure the given variable points to a full and proper
3085# path. This means:
3086# 1) There will be no spaces in the path. On posix platforms,
3087#    spaces in the path will result in an error. On Windows,
3088#    the path will be rewritten using short-style to be space-free.
3089# 2) The path will be absolute, and it will be in unix-style (on
3090#     cygwin).
3091# $1: The name of the variable to fix
3092
3093
3094# This will make sure the given variable points to a executable
3095# with a full and proper path. This means:
3096# 1) There will be no spaces in the path. On posix platforms,
3097#    spaces in the path will result in an error. On Windows,
3098#    the path will be rewritten using short-style to be space-free.
3099# 2) The path will be absolute, and it will be in unix-style (on
3100#     cygwin).
3101# Any arguments given to the executable is preserved.
3102# If the input variable does not have a directory specification, then
3103# it need to be in the PATH.
3104# $1: The name of the variable to fix
3105
3106
3107
3108
3109
3110
3111# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3112# $1: variable to check
3113# $2: executable name to print in warning (optional)
3114
3115
3116# Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
3117# Arguments as AC_PATH_PROG:
3118# $1: variable to set
3119# $2: executable name to look for
3120
3121
3122# Setup the most fundamental tools that relies on not much else to set up,
3123# but is used by much of the early bootstrap code.
3124
3125
3126# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3127
3128
3129
3130
3131
3132
3133
3134#%%% Simple tools %%%
3135
3136# Check if we have found a usable version of make
3137# $1: the path to a potential make binary (or empty)
3138# $2: the description on how we found this
3139
3140
3141# Goes looking for a usable version of GNU make.
3142
3143
3144
3145
3146
3147
3148# Check if build directory is on local disk. If not possible to determine,
3149# we prefer to claim it's local.
3150# Argument 1: directory to test
3151# Argument 2: what to do if it is on local disk
3152# Argument 3: what to do otherwise (remote disk or failure)
3153
3154
3155# Check that source files have basic read permissions set. This might
3156# not be the case in cygwin in certain conditions.
3157
3158
3159
3160
3161#
3162# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3163# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3164#
3165# This code is free software; you can redistribute it and/or modify it
3166# under the terms of the GNU General Public License version 2 only, as
3167# published by the Free Software Foundation.  Oracle designates this
3168# particular file as subject to the "Classpath" exception as provided
3169# by Oracle in the LICENSE file that accompanied this code.
3170#
3171# This code is distributed in the hope that it will be useful, but WITHOUT
3172# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3173# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3174# version 2 for more details (a copy is included in the LICENSE file that
3175# accompanied this code).
3176#
3177# You should have received a copy of the GNU General Public License version
3178# 2 along with this work; if not, write to the Free Software Foundation,
3179# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3180#
3181# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3182# or visit www.oracle.com if you need additional information or have any
3183# questions.
3184#
3185
3186
3187
3188
3189
3190# Helper function which possibly converts a path using DOS-style short mode.
3191# If so, the updated path is stored in $new_path.
3192# $1: The path to check
3193
3194
3195# Helper function which possibly converts a path using DOS-style short mode.
3196# If so, the updated path is stored in $new_path.
3197# $1: The path to check
3198
3199
3200# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3201# and could probably be heavily simplified. However, all changes in this
3202# area tend to need lot of testing in different scenarios, and in lack of
3203# proper unit testing, cleaning this up has not been deemed worth the effort
3204# at the moment.
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3215
3216
3217
3218
3219#
3220# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3221# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3222#
3223# This code is free software; you can redistribute it and/or modify it
3224# under the terms of the GNU General Public License version 2 only, as
3225# published by the Free Software Foundation.  Oracle designates this
3226# particular file as subject to the "Classpath" exception as provided
3227# by Oracle in the LICENSE file that accompanied this code.
3228#
3229# This code is distributed in the hope that it will be useful, but WITHOUT
3230# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3231# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3232# version 2 for more details (a copy is included in the LICENSE file that
3233# accompanied this code).
3234#
3235# You should have received a copy of the GNU General Public License version
3236# 2 along with this work; if not, write to the Free Software Foundation,
3237# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3238#
3239# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3240# or visit www.oracle.com if you need additional information or have any
3241# questions.
3242#
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254# ... then the rest
3255#
3256# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3257# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3258#
3259# This code is free software; you can redistribute it and/or modify it
3260# under the terms of the GNU General Public License version 2 only, as
3261# published by the Free Software Foundation.  Oracle designates this
3262# particular file as subject to the "Classpath" exception as provided
3263# by Oracle in the LICENSE file that accompanied this code.
3264#
3265# This code is distributed in the hope that it will be useful, but WITHOUT
3266# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3267# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3268# version 2 for more details (a copy is included in the LICENSE file that
3269# accompanied this code).
3270#
3271# You should have received a copy of the GNU General Public License version
3272# 2 along with this work; if not, write to the Free Software Foundation,
3273# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3274#
3275# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3276# or visit www.oracle.com if you need additional information or have any
3277# questions.
3278#
3279
3280# Execute the check given as argument, and verify the result
3281# If the Boot JDK was previously found, do nothing
3282# $1 A command line (typically autoconf macro) to execute
3283
3284
3285# Test: Is bootjdk explicitely set by command line arguments?
3286
3287
3288# Test: Is bootjdk available from builddeps?
3289
3290
3291# Test: Is $JAVA_HOME set?
3292
3293
3294# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3295
3296
3297# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3298
3299
3300# Look for a jdk in the given path. If there are multiple, try to select the newest.
3301# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3302# $1 = Path to directory containing jdk installations.
3303# $2 = String to append to the found JDK directory to get the proper JDK home
3304
3305
3306# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3307# environmental variable as base for where to look.
3308# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3309
3310
3311# Test: Is there a JDK installed in default, well-known locations?
3312
3313
3314# Check that a command-line tool in the Boot JDK is correct
3315# $1 = name of variable to assign
3316# $2 = name of binary
3317
3318
3319###############################################################################
3320#
3321# We need a Boot JDK to bootstrap the build.
3322#
3323
3324
3325
3326
3327
3328#
3329# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3330# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3331#
3332# This code is free software; you can redistribute it and/or modify it
3333# under the terms of the GNU General Public License version 2 only, as
3334# published by the Free Software Foundation.  Oracle designates this
3335# particular file as subject to the "Classpath" exception as provided
3336# by Oracle in the LICENSE file that accompanied this code.
3337#
3338# This code is distributed in the hope that it will be useful, but WITHOUT
3339# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3340# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3341# version 2 for more details (a copy is included in the LICENSE file that
3342# accompanied this code).
3343#
3344# You should have received a copy of the GNU General Public License version
3345# 2 along with this work; if not, write to the Free Software Foundation,
3346# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3347#
3348# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3349# or visit www.oracle.com if you need additional information or have any
3350# questions.
3351#
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372#
3373# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3374# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3375#
3376# This code is free software; you can redistribute it and/or modify it
3377# under the terms of the GNU General Public License version 2 only, as
3378# published by the Free Software Foundation.  Oracle designates this
3379# particular file as subject to the "Classpath" exception as provided
3380# by Oracle in the LICENSE file that accompanied this code.
3381#
3382# This code is distributed in the hope that it will be useful, but WITHOUT
3383# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3384# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3385# version 2 for more details (a copy is included in the LICENSE file that
3386# accompanied this code).
3387#
3388# You should have received a copy of the GNU General Public License version
3389# 2 along with this work; if not, write to the Free Software Foundation,
3390# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3391#
3392# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3393# or visit www.oracle.com if you need additional information or have any
3394# questions.
3395#
3396
3397
3398
3399
3400
3401cygwin_help() {
3402    case $1 in
3403    unzip)
3404        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip" ;;
3405    zip)
3406        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P zip" ;;
3407    make)
3408        PKGHANDLER_COMMAND="cd <location of cygwin setup.exe> && cmd /c setup -q -P make" ;;
3409    * )
3410       break ;;
3411    esac
3412}
3413
3414apt_help() {
3415    case $1 in
3416    devkit)
3417        PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3418    openjdk)
3419        PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3420    alsa)
3421        PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3422    cups)
3423        PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3424    freetype2)
3425        PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3426    pulse)
3427        PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3428    x11)
3429        PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
3430    ccache)
3431        PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3432    * )
3433       break ;;
3434    esac
3435}
3436
3437yum_help() {
3438    case $1 in
3439    devkit)
3440        PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3441    openjdk)
3442        PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3443    alsa)
3444        PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3445    cups)
3446        PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3447    freetype2)
3448        PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
3449    pulse)
3450        PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3451    x11)
3452        PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
3453    ccache)
3454        PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3455    * )
3456       break ;;
3457    esac
3458}
3459
3460port_help() {
3461    PKGHANDLER_COMMAND=""
3462}
3463
3464pkgutil_help() {
3465    PKGHANDLER_COMMAND=""
3466}
3467
3468pkgadd_help() {
3469    PKGHANDLER_COMMAND=""
3470}
3471
3472
3473
3474#
3475# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3476# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3477#
3478# This code is free software; you can redistribute it and/or modify it
3479# under the terms of the GNU General Public License version 2 only, as
3480# published by the Free Software Foundation.  Oracle designates this
3481# particular file as subject to the "Classpath" exception as provided
3482# by Oracle in the LICENSE file that accompanied this code.
3483#
3484# This code is distributed in the hope that it will be useful, but WITHOUT
3485# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3486# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3487# version 2 for more details (a copy is included in the LICENSE file that
3488# accompanied this code).
3489#
3490# You should have received a copy of the GNU General Public License version
3491# 2 along with this work; if not, write to the Free Software Foundation,
3492# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3493#
3494# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3495# or visit www.oracle.com if you need additional information or have any
3496# questions.
3497#
3498
3499
3500
3501
3502
3503
3504
3505
3506###############################################################################
3507#
3508# Should we build only OpenJDK even if closed sources are present?
3509#
3510
3511
3512
3513
3514###############################################################################
3515#
3516# Setup version numbers
3517#
3518
3519
3520
3521
3522
3523
3524# Support for customization of the build process. Some build files
3525# will include counterparts from this location, if they exist. This allows
3526# for a degree of customization of the build targets and the rules/recipes
3527# to create them
3528
3529# Check whether --with-custom-make-dir was given.
3530if test "${with_custom_make_dir+set}" = set; then :
3531  withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
3532fi
3533
3534
3535
3536#
3537# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3538# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3539#
3540# This code is free software; you can redistribute it and/or modify it
3541# under the terms of the GNU General Public License version 2 only, as
3542# published by the Free Software Foundation.  Oracle designates this
3543# particular file as subject to the "Classpath" exception as provided
3544# by Oracle in the LICENSE file that accompanied this code.
3545#
3546# This code is distributed in the hope that it will be useful, but WITHOUT
3547# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3548# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3549# version 2 for more details (a copy is included in the LICENSE file that
3550# accompanied this code).
3551#
3552# You should have received a copy of the GNU General Public License version
3553# 2 along with this work; if not, write to the Free Software Foundation,
3554# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3555#
3556# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3557# or visit www.oracle.com if you need additional information or have any
3558# questions.
3559#
3560
3561
3562
3563
3564
3565
3566
3567
3568
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# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3601# Converts autoconf style CPU name to OpenJDK style, into
3602# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3603
3604
3605# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3606# Converts autoconf style OS name to OpenJDK style, into
3607# VAR_OS and VAR_OS_API.
3608
3609
3610# Expects $host_os $host_cpu $build_os and $build_cpu
3611# and $with_target_bits to have been setup!
3612#
3613# Translate the standard triplet(quadruplet) definition
3614# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
3615# OPENJDK_BUILD_OS, etc.
3616
3617
3618# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
3619# accordingly. Must be done after setting up build and target system, but before
3620# doing anything else with these values.
3621
3622
3623    # Setup the legacy variables, for controlling the old makefiles.
3624    #
3625
3626
3627
3628
3629#%%% Build and target systems %%%
3630
3631
3632
3633
3634# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
3635# Add -mX to various FLAGS variables.
3636
3637
3638
3639
3640
3641
3642#
3643# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3644# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3645#
3646# This code is free software; you can redistribute it and/or modify it
3647# under the terms of the GNU General Public License version 2 only, as
3648# published by the Free Software Foundation.  Oracle designates this
3649# particular file as subject to the "Classpath" exception as provided
3650# by Oracle in the LICENSE file that accompanied this code.
3651#
3652# This code is distributed in the hope that it will be useful, but WITHOUT
3653# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3654# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3655# version 2 for more details (a copy is included in the LICENSE file that
3656# accompanied this code).
3657#
3658# You should have received a copy of the GNU General Public License version
3659# 2 along with this work; if not, write to the Free Software Foundation,
3660# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3661#
3662# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3663# or visit www.oracle.com if you need additional information or have any
3664# questions.
3665#
3666
3667
3668
3669
3670
3671
3672
3673
3674#
3675# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3676# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3677#
3678# This code is free software; you can redistribute it and/or modify it
3679# under the terms of the GNU General Public License version 2 only, as
3680# published by the Free Software Foundation.  Oracle designates this
3681# particular file as subject to the "Classpath" exception as provided
3682# by Oracle in the LICENSE file that accompanied this code.
3683#
3684# This code is distributed in the hope that it will be useful, but WITHOUT
3685# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3686# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3687# version 2 for more details (a copy is included in the LICENSE file that
3688# accompanied this code).
3689#
3690# You should have received a copy of the GNU General Public License version
3691# 2 along with this work; if not, write to the Free Software Foundation,
3692# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3693#
3694# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3695# or visit www.oracle.com if you need additional information or have any
3696# questions.
3697#
3698
3699# $1 = compiler to test (CC or CXX)
3700# $2 = human readable name of compiler (C or C++)
3701
3702
3703
3704
3705
3706# $1 = compiler to test (CC or CXX)
3707# $2 = human readable name of compiler (C or C++)
3708# $3 = list of compiler names to search for
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3723#                                   [RUN-IF-FALSE])
3724# ------------------------------------------------------------
3725# Check that the c and c++ compilers support an argument
3726
3727
3728
3729
3730# Setup the JTREG paths
3731
3732
3733#
3734# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3735# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3736#
3737# This code is free software; you can redistribute it and/or modify it
3738# under the terms of the GNU General Public License version 2 only, as
3739# published by the Free Software Foundation.  Oracle designates this
3740# particular file as subject to the "Classpath" exception as provided
3741# by Oracle in the LICENSE file that accompanied this code.
3742#
3743# This code is distributed in the hope that it will be useful, but WITHOUT
3744# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3745# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3746# version 2 for more details (a copy is included in the LICENSE file that
3747# accompanied this code).
3748#
3749# You should have received a copy of the GNU General Public License version
3750# 2 along with this work; if not, write to the Free Software Foundation,
3751# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3752#
3753# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3754# or visit www.oracle.com if you need additional information or have any
3755# questions.
3756#
3757
3758
3759
3760
3761
3762
3763
3764# Check if the VS env variables were setup prior to running configure.
3765# If not, then find vcvarsall.bat and run it automatically, and integrate
3766# the set env variables into the spec file.
3767
3768
3769
3770# Setup the DXSDK paths
3771
3772
3773
3774
3775
3776
3777# This line needs to be here, verbatim, after all includes and the dummy hook
3778# definitions. It is replaced with custom functionality when building
3779# custom sources.
3780#CUSTOM_AUTOCONF_INCLUDE
3781
3782# Do not change or remove the following line, it is needed for consistency checks:
3783DATE_WHEN_GENERATED=1369764185
3784
3785###############################################################################
3786#
3787# Initialization / Boot-strapping
3788#
3789# The bootstrapping process needs to solve the "chicken or the egg" problem,
3790# thus it jumps back and forth, each time gaining something needed later on.
3791#
3792###############################################################################
3793
3794# Basic initialization that must happen first of all
3795
3796# Save the original command line. This is passed to us by the wrapper configure script.
3797
3798DATE_WHEN_CONFIGURED=`LANG=C date`
3799
3800{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3801$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3802{ $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3803$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
3804
3805
3806
3807# Start with tools that do not need have cross compilation support
3808# and can be expected to be found in the default PATH. These tools are
3809# used by configure. Nor are these tools expected to be found in the
3810# devkit from the builddeps server either, since they are
3811# needed to download the devkit.
3812
3813# First are all the simple required tools.
3814
3815    for ac_prog in basename
3816do
3817  # Extract the first word of "$ac_prog", so it can be a program name with args.
3818set dummy $ac_prog; ac_word=$2
3819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3820$as_echo_n "checking for $ac_word... " >&6; }
3821if test "${ac_cv_path_BASENAME+set}" = set; then :
3822  $as_echo_n "(cached) " >&6
3823else
3824  case $BASENAME in
3825  [\\/]* | ?:[\\/]*)
3826  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
3827  ;;
3828  *)
3829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832  IFS=$as_save_IFS
3833  test -z "$as_dir" && as_dir=.
3834    for ac_exec_ext in '' $ac_executable_extensions; do
3835  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3836    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
3837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3838    break 2
3839  fi
3840done
3841  done
3842IFS=$as_save_IFS
3843
3844  ;;
3845esac
3846fi
3847BASENAME=$ac_cv_path_BASENAME
3848if test -n "$BASENAME"; then
3849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
3850$as_echo "$BASENAME" >&6; }
3851else
3852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3853$as_echo "no" >&6; }
3854fi
3855
3856
3857  test -n "$BASENAME" && break
3858done
3859
3860
3861    if test "x$BASENAME" = x; then
3862        if test "xbasename" = x; then
3863          PROG_NAME=basename
3864        else
3865          PROG_NAME=basename
3866        fi
3867        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3868$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3869        as_fn_error $? "Cannot continue" "$LINENO" 5
3870    fi
3871
3872
3873
3874    for ac_prog in bash
3875do
3876  # Extract the first word of "$ac_prog", so it can be a program name with args.
3877set dummy $ac_prog; ac_word=$2
3878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3879$as_echo_n "checking for $ac_word... " >&6; }
3880if test "${ac_cv_path_BASH+set}" = set; then :
3881  $as_echo_n "(cached) " >&6
3882else
3883  case $BASH in
3884  [\\/]* | ?:[\\/]*)
3885  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
3886  ;;
3887  *)
3888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3889for as_dir in $PATH
3890do
3891  IFS=$as_save_IFS
3892  test -z "$as_dir" && as_dir=.
3893    for ac_exec_ext in '' $ac_executable_extensions; do
3894  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3895    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
3896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3897    break 2
3898  fi
3899done
3900  done
3901IFS=$as_save_IFS
3902
3903  ;;
3904esac
3905fi
3906BASH=$ac_cv_path_BASH
3907if test -n "$BASH"; then
3908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
3909$as_echo "$BASH" >&6; }
3910else
3911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3912$as_echo "no" >&6; }
3913fi
3914
3915
3916  test -n "$BASH" && break
3917done
3918
3919
3920    if test "x$BASH" = x; then
3921        if test "xbash" = x; then
3922          PROG_NAME=bash
3923        else
3924          PROG_NAME=bash
3925        fi
3926        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3927$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3928        as_fn_error $? "Cannot continue" "$LINENO" 5
3929    fi
3930
3931
3932
3933    for ac_prog in cat
3934do
3935  # Extract the first word of "$ac_prog", so it can be a program name with args.
3936set dummy $ac_prog; ac_word=$2
3937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3938$as_echo_n "checking for $ac_word... " >&6; }
3939if test "${ac_cv_path_CAT+set}" = set; then :
3940  $as_echo_n "(cached) " >&6
3941else
3942  case $CAT in
3943  [\\/]* | ?:[\\/]*)
3944  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
3945  ;;
3946  *)
3947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3948for as_dir in $PATH
3949do
3950  IFS=$as_save_IFS
3951  test -z "$as_dir" && as_dir=.
3952    for ac_exec_ext in '' $ac_executable_extensions; do
3953  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3954    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
3955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3956    break 2
3957  fi
3958done
3959  done
3960IFS=$as_save_IFS
3961
3962  ;;
3963esac
3964fi
3965CAT=$ac_cv_path_CAT
3966if test -n "$CAT"; then
3967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
3968$as_echo "$CAT" >&6; }
3969else
3970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3971$as_echo "no" >&6; }
3972fi
3973
3974
3975  test -n "$CAT" && break
3976done
3977
3978
3979    if test "x$CAT" = x; then
3980        if test "xcat" = x; then
3981          PROG_NAME=cat
3982        else
3983          PROG_NAME=cat
3984        fi
3985        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
3986$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
3987        as_fn_error $? "Cannot continue" "$LINENO" 5
3988    fi
3989
3990
3991
3992    for ac_prog in chmod
3993do
3994  # Extract the first word of "$ac_prog", so it can be a program name with args.
3995set dummy $ac_prog; ac_word=$2
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3997$as_echo_n "checking for $ac_word... " >&6; }
3998if test "${ac_cv_path_CHMOD+set}" = set; then :
3999  $as_echo_n "(cached) " >&6
4000else
4001  case $CHMOD in
4002  [\\/]* | ?:[\\/]*)
4003  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4004  ;;
4005  *)
4006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4007for as_dir in $PATH
4008do
4009  IFS=$as_save_IFS
4010  test -z "$as_dir" && as_dir=.
4011    for ac_exec_ext in '' $ac_executable_extensions; do
4012  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4013    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4015    break 2
4016  fi
4017done
4018  done
4019IFS=$as_save_IFS
4020
4021  ;;
4022esac
4023fi
4024CHMOD=$ac_cv_path_CHMOD
4025if test -n "$CHMOD"; then
4026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4027$as_echo "$CHMOD" >&6; }
4028else
4029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4030$as_echo "no" >&6; }
4031fi
4032
4033
4034  test -n "$CHMOD" && break
4035done
4036
4037
4038    if test "x$CHMOD" = x; then
4039        if test "xchmod" = x; then
4040          PROG_NAME=chmod
4041        else
4042          PROG_NAME=chmod
4043        fi
4044        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4045$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4046        as_fn_error $? "Cannot continue" "$LINENO" 5
4047    fi
4048
4049
4050
4051    for ac_prog in cmp
4052do
4053  # Extract the first word of "$ac_prog", so it can be a program name with args.
4054set dummy $ac_prog; ac_word=$2
4055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4056$as_echo_n "checking for $ac_word... " >&6; }
4057if test "${ac_cv_path_CMP+set}" = set; then :
4058  $as_echo_n "(cached) " >&6
4059else
4060  case $CMP in
4061  [\\/]* | ?:[\\/]*)
4062  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
4063  ;;
4064  *)
4065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4066for as_dir in $PATH
4067do
4068  IFS=$as_save_IFS
4069  test -z "$as_dir" && as_dir=.
4070    for ac_exec_ext in '' $ac_executable_extensions; do
4071  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4072    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
4073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4074    break 2
4075  fi
4076done
4077  done
4078IFS=$as_save_IFS
4079
4080  ;;
4081esac
4082fi
4083CMP=$ac_cv_path_CMP
4084if test -n "$CMP"; then
4085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
4086$as_echo "$CMP" >&6; }
4087else
4088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4089$as_echo "no" >&6; }
4090fi
4091
4092
4093  test -n "$CMP" && break
4094done
4095
4096
4097    if test "x$CMP" = x; then
4098        if test "xcmp" = x; then
4099          PROG_NAME=cmp
4100        else
4101          PROG_NAME=cmp
4102        fi
4103        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4104$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4105        as_fn_error $? "Cannot continue" "$LINENO" 5
4106    fi
4107
4108
4109
4110    for ac_prog in comm
4111do
4112  # Extract the first word of "$ac_prog", so it can be a program name with args.
4113set dummy $ac_prog; ac_word=$2
4114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4115$as_echo_n "checking for $ac_word... " >&6; }
4116if test "${ac_cv_path_COMM+set}" = set; then :
4117  $as_echo_n "(cached) " >&6
4118else
4119  case $COMM in
4120  [\\/]* | ?:[\\/]*)
4121  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
4122  ;;
4123  *)
4124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4125for as_dir in $PATH
4126do
4127  IFS=$as_save_IFS
4128  test -z "$as_dir" && as_dir=.
4129    for ac_exec_ext in '' $ac_executable_extensions; do
4130  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4131    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
4132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4133    break 2
4134  fi
4135done
4136  done
4137IFS=$as_save_IFS
4138
4139  ;;
4140esac
4141fi
4142COMM=$ac_cv_path_COMM
4143if test -n "$COMM"; then
4144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
4145$as_echo "$COMM" >&6; }
4146else
4147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4148$as_echo "no" >&6; }
4149fi
4150
4151
4152  test -n "$COMM" && break
4153done
4154
4155
4156    if test "x$COMM" = x; then
4157        if test "xcomm" = x; then
4158          PROG_NAME=comm
4159        else
4160          PROG_NAME=comm
4161        fi
4162        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4163$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4164        as_fn_error $? "Cannot continue" "$LINENO" 5
4165    fi
4166
4167
4168
4169    for ac_prog in cp
4170do
4171  # Extract the first word of "$ac_prog", so it can be a program name with args.
4172set dummy $ac_prog; ac_word=$2
4173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4174$as_echo_n "checking for $ac_word... " >&6; }
4175if test "${ac_cv_path_CP+set}" = set; then :
4176  $as_echo_n "(cached) " >&6
4177else
4178  case $CP in
4179  [\\/]* | ?:[\\/]*)
4180  ac_cv_path_CP="$CP" # Let the user override the test with a path.
4181  ;;
4182  *)
4183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4184for as_dir in $PATH
4185do
4186  IFS=$as_save_IFS
4187  test -z "$as_dir" && as_dir=.
4188    for ac_exec_ext in '' $ac_executable_extensions; do
4189  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4190    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
4191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4192    break 2
4193  fi
4194done
4195  done
4196IFS=$as_save_IFS
4197
4198  ;;
4199esac
4200fi
4201CP=$ac_cv_path_CP
4202if test -n "$CP"; then
4203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
4204$as_echo "$CP" >&6; }
4205else
4206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4207$as_echo "no" >&6; }
4208fi
4209
4210
4211  test -n "$CP" && break
4212done
4213
4214
4215    if test "x$CP" = x; then
4216        if test "xcp" = x; then
4217          PROG_NAME=cp
4218        else
4219          PROG_NAME=cp
4220        fi
4221        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4222$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4223        as_fn_error $? "Cannot continue" "$LINENO" 5
4224    fi
4225
4226
4227
4228    for ac_prog in cpio
4229do
4230  # Extract the first word of "$ac_prog", so it can be a program name with args.
4231set dummy $ac_prog; ac_word=$2
4232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4233$as_echo_n "checking for $ac_word... " >&6; }
4234if test "${ac_cv_path_CPIO+set}" = set; then :
4235  $as_echo_n "(cached) " >&6
4236else
4237  case $CPIO in
4238  [\\/]* | ?:[\\/]*)
4239  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
4240  ;;
4241  *)
4242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4243for as_dir in $PATH
4244do
4245  IFS=$as_save_IFS
4246  test -z "$as_dir" && as_dir=.
4247    for ac_exec_ext in '' $ac_executable_extensions; do
4248  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4249    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
4250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4251    break 2
4252  fi
4253done
4254  done
4255IFS=$as_save_IFS
4256
4257  ;;
4258esac
4259fi
4260CPIO=$ac_cv_path_CPIO
4261if test -n "$CPIO"; then
4262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
4263$as_echo "$CPIO" >&6; }
4264else
4265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4266$as_echo "no" >&6; }
4267fi
4268
4269
4270  test -n "$CPIO" && break
4271done
4272
4273
4274    if test "x$CPIO" = x; then
4275        if test "xcpio" = x; then
4276          PROG_NAME=cpio
4277        else
4278          PROG_NAME=cpio
4279        fi
4280        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4281$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4282        as_fn_error $? "Cannot continue" "$LINENO" 5
4283    fi
4284
4285
4286
4287    for ac_prog in cut
4288do
4289  # Extract the first word of "$ac_prog", so it can be a program name with args.
4290set dummy $ac_prog; ac_word=$2
4291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4292$as_echo_n "checking for $ac_word... " >&6; }
4293if test "${ac_cv_path_CUT+set}" = set; then :
4294  $as_echo_n "(cached) " >&6
4295else
4296  case $CUT in
4297  [\\/]* | ?:[\\/]*)
4298  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
4299  ;;
4300  *)
4301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4302for as_dir in $PATH
4303do
4304  IFS=$as_save_IFS
4305  test -z "$as_dir" && as_dir=.
4306    for ac_exec_ext in '' $ac_executable_extensions; do
4307  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4308    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
4309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4310    break 2
4311  fi
4312done
4313  done
4314IFS=$as_save_IFS
4315
4316  ;;
4317esac
4318fi
4319CUT=$ac_cv_path_CUT
4320if test -n "$CUT"; then
4321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
4322$as_echo "$CUT" >&6; }
4323else
4324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4325$as_echo "no" >&6; }
4326fi
4327
4328
4329  test -n "$CUT" && break
4330done
4331
4332
4333    if test "x$CUT" = x; then
4334        if test "xcut" = x; then
4335          PROG_NAME=cut
4336        else
4337          PROG_NAME=cut
4338        fi
4339        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4340$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4341        as_fn_error $? "Cannot continue" "$LINENO" 5
4342    fi
4343
4344
4345
4346    for ac_prog in date
4347do
4348  # Extract the first word of "$ac_prog", so it can be a program name with args.
4349set dummy $ac_prog; ac_word=$2
4350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4351$as_echo_n "checking for $ac_word... " >&6; }
4352if test "${ac_cv_path_DATE+set}" = set; then :
4353  $as_echo_n "(cached) " >&6
4354else
4355  case $DATE in
4356  [\\/]* | ?:[\\/]*)
4357  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
4358  ;;
4359  *)
4360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4361for as_dir in $PATH
4362do
4363  IFS=$as_save_IFS
4364  test -z "$as_dir" && as_dir=.
4365    for ac_exec_ext in '' $ac_executable_extensions; do
4366  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4367    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
4368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4369    break 2
4370  fi
4371done
4372  done
4373IFS=$as_save_IFS
4374
4375  ;;
4376esac
4377fi
4378DATE=$ac_cv_path_DATE
4379if test -n "$DATE"; then
4380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
4381$as_echo "$DATE" >&6; }
4382else
4383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4384$as_echo "no" >&6; }
4385fi
4386
4387
4388  test -n "$DATE" && break
4389done
4390
4391
4392    if test "x$DATE" = x; then
4393        if test "xdate" = x; then
4394          PROG_NAME=date
4395        else
4396          PROG_NAME=date
4397        fi
4398        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4399$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4400        as_fn_error $? "Cannot continue" "$LINENO" 5
4401    fi
4402
4403
4404
4405    for ac_prog in gdiff diff
4406do
4407  # Extract the first word of "$ac_prog", so it can be a program name with args.
4408set dummy $ac_prog; ac_word=$2
4409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4410$as_echo_n "checking for $ac_word... " >&6; }
4411if test "${ac_cv_path_DIFF+set}" = set; then :
4412  $as_echo_n "(cached) " >&6
4413else
4414  case $DIFF in
4415  [\\/]* | ?:[\\/]*)
4416  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
4417  ;;
4418  *)
4419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4420for as_dir in $PATH
4421do
4422  IFS=$as_save_IFS
4423  test -z "$as_dir" && as_dir=.
4424    for ac_exec_ext in '' $ac_executable_extensions; do
4425  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4426    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
4427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4428    break 2
4429  fi
4430done
4431  done
4432IFS=$as_save_IFS
4433
4434  ;;
4435esac
4436fi
4437DIFF=$ac_cv_path_DIFF
4438if test -n "$DIFF"; then
4439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
4440$as_echo "$DIFF" >&6; }
4441else
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4443$as_echo "no" >&6; }
4444fi
4445
4446
4447  test -n "$DIFF" && break
4448done
4449
4450
4451    if test "x$DIFF" = x; then
4452        if test "xgdiff diff" = x; then
4453          PROG_NAME=diff
4454        else
4455          PROG_NAME=gdiff diff
4456        fi
4457        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4458$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4459        as_fn_error $? "Cannot continue" "$LINENO" 5
4460    fi
4461
4462
4463
4464    for ac_prog in dirname
4465do
4466  # Extract the first word of "$ac_prog", so it can be a program name with args.
4467set dummy $ac_prog; ac_word=$2
4468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4469$as_echo_n "checking for $ac_word... " >&6; }
4470if test "${ac_cv_path_DIRNAME+set}" = set; then :
4471  $as_echo_n "(cached) " >&6
4472else
4473  case $DIRNAME in
4474  [\\/]* | ?:[\\/]*)
4475  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
4476  ;;
4477  *)
4478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4479for as_dir in $PATH
4480do
4481  IFS=$as_save_IFS
4482  test -z "$as_dir" && as_dir=.
4483    for ac_exec_ext in '' $ac_executable_extensions; do
4484  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4485    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
4486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4487    break 2
4488  fi
4489done
4490  done
4491IFS=$as_save_IFS
4492
4493  ;;
4494esac
4495fi
4496DIRNAME=$ac_cv_path_DIRNAME
4497if test -n "$DIRNAME"; then
4498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
4499$as_echo "$DIRNAME" >&6; }
4500else
4501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4502$as_echo "no" >&6; }
4503fi
4504
4505
4506  test -n "$DIRNAME" && break
4507done
4508
4509
4510    if test "x$DIRNAME" = x; then
4511        if test "xdirname" = x; then
4512          PROG_NAME=dirname
4513        else
4514          PROG_NAME=dirname
4515        fi
4516        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4517$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4518        as_fn_error $? "Cannot continue" "$LINENO" 5
4519    fi
4520
4521
4522
4523    for ac_prog in echo
4524do
4525  # Extract the first word of "$ac_prog", so it can be a program name with args.
4526set dummy $ac_prog; ac_word=$2
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4528$as_echo_n "checking for $ac_word... " >&6; }
4529if test "${ac_cv_path_ECHO+set}" = set; then :
4530  $as_echo_n "(cached) " >&6
4531else
4532  case $ECHO in
4533  [\\/]* | ?:[\\/]*)
4534  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
4535  ;;
4536  *)
4537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH
4539do
4540  IFS=$as_save_IFS
4541  test -z "$as_dir" && as_dir=.
4542    for ac_exec_ext in '' $ac_executable_extensions; do
4543  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4544    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
4545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4546    break 2
4547  fi
4548done
4549  done
4550IFS=$as_save_IFS
4551
4552  ;;
4553esac
4554fi
4555ECHO=$ac_cv_path_ECHO
4556if test -n "$ECHO"; then
4557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
4558$as_echo "$ECHO" >&6; }
4559else
4560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4561$as_echo "no" >&6; }
4562fi
4563
4564
4565  test -n "$ECHO" && break
4566done
4567
4568
4569    if test "x$ECHO" = x; then
4570        if test "xecho" = x; then
4571          PROG_NAME=echo
4572        else
4573          PROG_NAME=echo
4574        fi
4575        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4576$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4577        as_fn_error $? "Cannot continue" "$LINENO" 5
4578    fi
4579
4580
4581
4582    for ac_prog in expr
4583do
4584  # Extract the first word of "$ac_prog", so it can be a program name with args.
4585set dummy $ac_prog; ac_word=$2
4586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4587$as_echo_n "checking for $ac_word... " >&6; }
4588if test "${ac_cv_path_EXPR+set}" = set; then :
4589  $as_echo_n "(cached) " >&6
4590else
4591  case $EXPR in
4592  [\\/]* | ?:[\\/]*)
4593  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
4594  ;;
4595  *)
4596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597for as_dir in $PATH
4598do
4599  IFS=$as_save_IFS
4600  test -z "$as_dir" && as_dir=.
4601    for ac_exec_ext in '' $ac_executable_extensions; do
4602  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4603    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
4604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4605    break 2
4606  fi
4607done
4608  done
4609IFS=$as_save_IFS
4610
4611  ;;
4612esac
4613fi
4614EXPR=$ac_cv_path_EXPR
4615if test -n "$EXPR"; then
4616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
4617$as_echo "$EXPR" >&6; }
4618else
4619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620$as_echo "no" >&6; }
4621fi
4622
4623
4624  test -n "$EXPR" && break
4625done
4626
4627
4628    if test "x$EXPR" = x; then
4629        if test "xexpr" = x; then
4630          PROG_NAME=expr
4631        else
4632          PROG_NAME=expr
4633        fi
4634        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4635$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4636        as_fn_error $? "Cannot continue" "$LINENO" 5
4637    fi
4638
4639
4640
4641    for ac_prog in file
4642do
4643  # Extract the first word of "$ac_prog", so it can be a program name with args.
4644set dummy $ac_prog; ac_word=$2
4645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4646$as_echo_n "checking for $ac_word... " >&6; }
4647if test "${ac_cv_path_FILE+set}" = set; then :
4648  $as_echo_n "(cached) " >&6
4649else
4650  case $FILE in
4651  [\\/]* | ?:[\\/]*)
4652  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
4653  ;;
4654  *)
4655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4656for as_dir in $PATH
4657do
4658  IFS=$as_save_IFS
4659  test -z "$as_dir" && as_dir=.
4660    for ac_exec_ext in '' $ac_executable_extensions; do
4661  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4662    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
4663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4664    break 2
4665  fi
4666done
4667  done
4668IFS=$as_save_IFS
4669
4670  ;;
4671esac
4672fi
4673FILE=$ac_cv_path_FILE
4674if test -n "$FILE"; then
4675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
4676$as_echo "$FILE" >&6; }
4677else
4678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4679$as_echo "no" >&6; }
4680fi
4681
4682
4683  test -n "$FILE" && break
4684done
4685
4686
4687    if test "x$FILE" = x; then
4688        if test "xfile" = x; then
4689          PROG_NAME=file
4690        else
4691          PROG_NAME=file
4692        fi
4693        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4694$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4695        as_fn_error $? "Cannot continue" "$LINENO" 5
4696    fi
4697
4698
4699
4700    for ac_prog in find
4701do
4702  # Extract the first word of "$ac_prog", so it can be a program name with args.
4703set dummy $ac_prog; ac_word=$2
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4705$as_echo_n "checking for $ac_word... " >&6; }
4706if test "${ac_cv_path_FIND+set}" = set; then :
4707  $as_echo_n "(cached) " >&6
4708else
4709  case $FIND in
4710  [\\/]* | ?:[\\/]*)
4711  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
4712  ;;
4713  *)
4714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4715for as_dir in $PATH
4716do
4717  IFS=$as_save_IFS
4718  test -z "$as_dir" && as_dir=.
4719    for ac_exec_ext in '' $ac_executable_extensions; do
4720  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4721    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
4722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4723    break 2
4724  fi
4725done
4726  done
4727IFS=$as_save_IFS
4728
4729  ;;
4730esac
4731fi
4732FIND=$ac_cv_path_FIND
4733if test -n "$FIND"; then
4734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
4735$as_echo "$FIND" >&6; }
4736else
4737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4738$as_echo "no" >&6; }
4739fi
4740
4741
4742  test -n "$FIND" && break
4743done
4744
4745
4746    if test "x$FIND" = x; then
4747        if test "xfind" = x; then
4748          PROG_NAME=find
4749        else
4750          PROG_NAME=find
4751        fi
4752        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4753$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4754        as_fn_error $? "Cannot continue" "$LINENO" 5
4755    fi
4756
4757
4758
4759    for ac_prog in head
4760do
4761  # Extract the first word of "$ac_prog", so it can be a program name with args.
4762set dummy $ac_prog; ac_word=$2
4763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4764$as_echo_n "checking for $ac_word... " >&6; }
4765if test "${ac_cv_path_HEAD+set}" = set; then :
4766  $as_echo_n "(cached) " >&6
4767else
4768  case $HEAD in
4769  [\\/]* | ?:[\\/]*)
4770  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
4771  ;;
4772  *)
4773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4774for as_dir in $PATH
4775do
4776  IFS=$as_save_IFS
4777  test -z "$as_dir" && as_dir=.
4778    for ac_exec_ext in '' $ac_executable_extensions; do
4779  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4780    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
4781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4782    break 2
4783  fi
4784done
4785  done
4786IFS=$as_save_IFS
4787
4788  ;;
4789esac
4790fi
4791HEAD=$ac_cv_path_HEAD
4792if test -n "$HEAD"; then
4793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
4794$as_echo "$HEAD" >&6; }
4795else
4796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4797$as_echo "no" >&6; }
4798fi
4799
4800
4801  test -n "$HEAD" && break
4802done
4803
4804
4805    if test "x$HEAD" = x; then
4806        if test "xhead" = x; then
4807          PROG_NAME=head
4808        else
4809          PROG_NAME=head
4810        fi
4811        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4812$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4813        as_fn_error $? "Cannot continue" "$LINENO" 5
4814    fi
4815
4816
4817
4818    for ac_prog in ln
4819do
4820  # Extract the first word of "$ac_prog", so it can be a program name with args.
4821set dummy $ac_prog; ac_word=$2
4822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4823$as_echo_n "checking for $ac_word... " >&6; }
4824if test "${ac_cv_path_LN+set}" = set; then :
4825  $as_echo_n "(cached) " >&6
4826else
4827  case $LN in
4828  [\\/]* | ?:[\\/]*)
4829  ac_cv_path_LN="$LN" # Let the user override the test with a path.
4830  ;;
4831  *)
4832  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4833for as_dir in $PATH
4834do
4835  IFS=$as_save_IFS
4836  test -z "$as_dir" && as_dir=.
4837    for ac_exec_ext in '' $ac_executable_extensions; do
4838  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4839    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
4840    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4841    break 2
4842  fi
4843done
4844  done
4845IFS=$as_save_IFS
4846
4847  ;;
4848esac
4849fi
4850LN=$ac_cv_path_LN
4851if test -n "$LN"; then
4852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
4853$as_echo "$LN" >&6; }
4854else
4855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4856$as_echo "no" >&6; }
4857fi
4858
4859
4860  test -n "$LN" && break
4861done
4862
4863
4864    if test "x$LN" = x; then
4865        if test "xln" = x; then
4866          PROG_NAME=ln
4867        else
4868          PROG_NAME=ln
4869        fi
4870        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4871$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4872        as_fn_error $? "Cannot continue" "$LINENO" 5
4873    fi
4874
4875
4876
4877    for ac_prog in ls
4878do
4879  # Extract the first word of "$ac_prog", so it can be a program name with args.
4880set dummy $ac_prog; ac_word=$2
4881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4882$as_echo_n "checking for $ac_word... " >&6; }
4883if test "${ac_cv_path_LS+set}" = set; then :
4884  $as_echo_n "(cached) " >&6
4885else
4886  case $LS in
4887  [\\/]* | ?:[\\/]*)
4888  ac_cv_path_LS="$LS" # Let the user override the test with a path.
4889  ;;
4890  *)
4891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4892for as_dir in $PATH
4893do
4894  IFS=$as_save_IFS
4895  test -z "$as_dir" && as_dir=.
4896    for ac_exec_ext in '' $ac_executable_extensions; do
4897  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4898    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
4899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4900    break 2
4901  fi
4902done
4903  done
4904IFS=$as_save_IFS
4905
4906  ;;
4907esac
4908fi
4909LS=$ac_cv_path_LS
4910if test -n "$LS"; then
4911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
4912$as_echo "$LS" >&6; }
4913else
4914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4915$as_echo "no" >&6; }
4916fi
4917
4918
4919  test -n "$LS" && break
4920done
4921
4922
4923    if test "x$LS" = x; then
4924        if test "xls" = x; then
4925          PROG_NAME=ls
4926        else
4927          PROG_NAME=ls
4928        fi
4929        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4930$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4931        as_fn_error $? "Cannot continue" "$LINENO" 5
4932    fi
4933
4934
4935
4936    for ac_prog in mkdir
4937do
4938  # Extract the first word of "$ac_prog", so it can be a program name with args.
4939set dummy $ac_prog; ac_word=$2
4940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4941$as_echo_n "checking for $ac_word... " >&6; }
4942if test "${ac_cv_path_MKDIR+set}" = set; then :
4943  $as_echo_n "(cached) " >&6
4944else
4945  case $MKDIR in
4946  [\\/]* | ?:[\\/]*)
4947  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
4948  ;;
4949  *)
4950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951for as_dir in $PATH
4952do
4953  IFS=$as_save_IFS
4954  test -z "$as_dir" && as_dir=.
4955    for ac_exec_ext in '' $ac_executable_extensions; do
4956  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4957    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
4958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4959    break 2
4960  fi
4961done
4962  done
4963IFS=$as_save_IFS
4964
4965  ;;
4966esac
4967fi
4968MKDIR=$ac_cv_path_MKDIR
4969if test -n "$MKDIR"; then
4970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
4971$as_echo "$MKDIR" >&6; }
4972else
4973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4974$as_echo "no" >&6; }
4975fi
4976
4977
4978  test -n "$MKDIR" && break
4979done
4980
4981
4982    if test "x$MKDIR" = x; then
4983        if test "xmkdir" = x; then
4984          PROG_NAME=mkdir
4985        else
4986          PROG_NAME=mkdir
4987        fi
4988        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
4989$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
4990        as_fn_error $? "Cannot continue" "$LINENO" 5
4991    fi
4992
4993
4994
4995    for ac_prog in mktemp
4996do
4997  # Extract the first word of "$ac_prog", so it can be a program name with args.
4998set dummy $ac_prog; ac_word=$2
4999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5000$as_echo_n "checking for $ac_word... " >&6; }
5001if test "${ac_cv_path_MKTEMP+set}" = set; then :
5002  $as_echo_n "(cached) " >&6
5003else
5004  case $MKTEMP in
5005  [\\/]* | ?:[\\/]*)
5006  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
5007  ;;
5008  *)
5009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012  IFS=$as_save_IFS
5013  test -z "$as_dir" && as_dir=.
5014    for ac_exec_ext in '' $ac_executable_extensions; do
5015  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5016    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
5017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5018    break 2
5019  fi
5020done
5021  done
5022IFS=$as_save_IFS
5023
5024  ;;
5025esac
5026fi
5027MKTEMP=$ac_cv_path_MKTEMP
5028if test -n "$MKTEMP"; then
5029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
5030$as_echo "$MKTEMP" >&6; }
5031else
5032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5033$as_echo "no" >&6; }
5034fi
5035
5036
5037  test -n "$MKTEMP" && break
5038done
5039
5040
5041    if test "x$MKTEMP" = x; then
5042        if test "xmktemp" = x; then
5043          PROG_NAME=mktemp
5044        else
5045          PROG_NAME=mktemp
5046        fi
5047        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5048$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5049        as_fn_error $? "Cannot continue" "$LINENO" 5
5050    fi
5051
5052
5053
5054    for ac_prog in mv
5055do
5056  # Extract the first word of "$ac_prog", so it can be a program name with args.
5057set dummy $ac_prog; ac_word=$2
5058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5059$as_echo_n "checking for $ac_word... " >&6; }
5060if test "${ac_cv_path_MV+set}" = set; then :
5061  $as_echo_n "(cached) " >&6
5062else
5063  case $MV in
5064  [\\/]* | ?:[\\/]*)
5065  ac_cv_path_MV="$MV" # Let the user override the test with a path.
5066  ;;
5067  *)
5068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5069for as_dir in $PATH
5070do
5071  IFS=$as_save_IFS
5072  test -z "$as_dir" && as_dir=.
5073    for ac_exec_ext in '' $ac_executable_extensions; do
5074  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5075    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
5076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5077    break 2
5078  fi
5079done
5080  done
5081IFS=$as_save_IFS
5082
5083  ;;
5084esac
5085fi
5086MV=$ac_cv_path_MV
5087if test -n "$MV"; then
5088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
5089$as_echo "$MV" >&6; }
5090else
5091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5092$as_echo "no" >&6; }
5093fi
5094
5095
5096  test -n "$MV" && break
5097done
5098
5099
5100    if test "x$MV" = x; then
5101        if test "xmv" = x; then
5102          PROG_NAME=mv
5103        else
5104          PROG_NAME=mv
5105        fi
5106        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5107$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5108        as_fn_error $? "Cannot continue" "$LINENO" 5
5109    fi
5110
5111
5112
5113    for ac_prog in printf
5114do
5115  # Extract the first word of "$ac_prog", so it can be a program name with args.
5116set dummy $ac_prog; ac_word=$2
5117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5118$as_echo_n "checking for $ac_word... " >&6; }
5119if test "${ac_cv_path_PRINTF+set}" = set; then :
5120  $as_echo_n "(cached) " >&6
5121else
5122  case $PRINTF in
5123  [\\/]* | ?:[\\/]*)
5124  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
5125  ;;
5126  *)
5127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5128for as_dir in $PATH
5129do
5130  IFS=$as_save_IFS
5131  test -z "$as_dir" && as_dir=.
5132    for ac_exec_ext in '' $ac_executable_extensions; do
5133  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5134    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
5135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5136    break 2
5137  fi
5138done
5139  done
5140IFS=$as_save_IFS
5141
5142  ;;
5143esac
5144fi
5145PRINTF=$ac_cv_path_PRINTF
5146if test -n "$PRINTF"; then
5147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
5148$as_echo "$PRINTF" >&6; }
5149else
5150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5151$as_echo "no" >&6; }
5152fi
5153
5154
5155  test -n "$PRINTF" && break
5156done
5157
5158
5159    if test "x$PRINTF" = x; then
5160        if test "xprintf" = x; then
5161          PROG_NAME=printf
5162        else
5163          PROG_NAME=printf
5164        fi
5165        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5166$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5167        as_fn_error $? "Cannot continue" "$LINENO" 5
5168    fi
5169
5170
5171
5172    for ac_prog in pwd
5173do
5174  # Extract the first word of "$ac_prog", so it can be a program name with args.
5175set dummy $ac_prog; ac_word=$2
5176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5177$as_echo_n "checking for $ac_word... " >&6; }
5178if test "${ac_cv_path_THEPWDCMD+set}" = set; then :
5179  $as_echo_n "(cached) " >&6
5180else
5181  case $THEPWDCMD in
5182  [\\/]* | ?:[\\/]*)
5183  ac_cv_path_THEPWDCMD="$THEPWDCMD" # Let the user override the test with a path.
5184  ;;
5185  *)
5186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5187for as_dir in $PATH
5188do
5189  IFS=$as_save_IFS
5190  test -z "$as_dir" && as_dir=.
5191    for ac_exec_ext in '' $ac_executable_extensions; do
5192  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5193    ac_cv_path_THEPWDCMD="$as_dir/$ac_word$ac_exec_ext"
5194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5195    break 2
5196  fi
5197done
5198  done
5199IFS=$as_save_IFS
5200
5201  ;;
5202esac
5203fi
5204THEPWDCMD=$ac_cv_path_THEPWDCMD
5205if test -n "$THEPWDCMD"; then
5206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $THEPWDCMD" >&5
5207$as_echo "$THEPWDCMD" >&6; }
5208else
5209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5210$as_echo "no" >&6; }
5211fi
5212
5213
5214  test -n "$THEPWDCMD" && break
5215done
5216
5217
5218    if test "x$THEPWDCMD" = x; then
5219        if test "xpwd" = x; then
5220          PROG_NAME=thepwdcmd
5221        else
5222          PROG_NAME=pwd
5223        fi
5224        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5225$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5226        as_fn_error $? "Cannot continue" "$LINENO" 5
5227    fi
5228
5229
5230
5231    for ac_prog in rm
5232do
5233  # Extract the first word of "$ac_prog", so it can be a program name with args.
5234set dummy $ac_prog; ac_word=$2
5235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5236$as_echo_n "checking for $ac_word... " >&6; }
5237if test "${ac_cv_path_RM+set}" = set; then :
5238  $as_echo_n "(cached) " >&6
5239else
5240  case $RM in
5241  [\\/]* | ?:[\\/]*)
5242  ac_cv_path_RM="$RM" # Let the user override the test with a path.
5243  ;;
5244  *)
5245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5246for as_dir in $PATH
5247do
5248  IFS=$as_save_IFS
5249  test -z "$as_dir" && as_dir=.
5250    for ac_exec_ext in '' $ac_executable_extensions; do
5251  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5252    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
5253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5254    break 2
5255  fi
5256done
5257  done
5258IFS=$as_save_IFS
5259
5260  ;;
5261esac
5262fi
5263RM=$ac_cv_path_RM
5264if test -n "$RM"; then
5265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
5266$as_echo "$RM" >&6; }
5267else
5268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5269$as_echo "no" >&6; }
5270fi
5271
5272
5273  test -n "$RM" && break
5274done
5275
5276
5277    if test "x$RM" = x; then
5278        if test "xrm" = x; then
5279          PROG_NAME=rm
5280        else
5281          PROG_NAME=rm
5282        fi
5283        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5284$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5285        as_fn_error $? "Cannot continue" "$LINENO" 5
5286    fi
5287
5288
5289
5290    for ac_prog in sh
5291do
5292  # Extract the first word of "$ac_prog", so it can be a program name with args.
5293set dummy $ac_prog; ac_word=$2
5294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5295$as_echo_n "checking for $ac_word... " >&6; }
5296if test "${ac_cv_path_SH+set}" = set; then :
5297  $as_echo_n "(cached) " >&6
5298else
5299  case $SH in
5300  [\\/]* | ?:[\\/]*)
5301  ac_cv_path_SH="$SH" # Let the user override the test with a path.
5302  ;;
5303  *)
5304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5305for as_dir in $PATH
5306do
5307  IFS=$as_save_IFS
5308  test -z "$as_dir" && as_dir=.
5309    for ac_exec_ext in '' $ac_executable_extensions; do
5310  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5311    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5313    break 2
5314  fi
5315done
5316  done
5317IFS=$as_save_IFS
5318
5319  ;;
5320esac
5321fi
5322SH=$ac_cv_path_SH
5323if test -n "$SH"; then
5324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5325$as_echo "$SH" >&6; }
5326else
5327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5328$as_echo "no" >&6; }
5329fi
5330
5331
5332  test -n "$SH" && break
5333done
5334
5335
5336    if test "x$SH" = x; then
5337        if test "xsh" = x; then
5338          PROG_NAME=sh
5339        else
5340          PROG_NAME=sh
5341        fi
5342        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5343$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5344        as_fn_error $? "Cannot continue" "$LINENO" 5
5345    fi
5346
5347
5348
5349    for ac_prog in sort
5350do
5351  # Extract the first word of "$ac_prog", so it can be a program name with args.
5352set dummy $ac_prog; ac_word=$2
5353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5354$as_echo_n "checking for $ac_word... " >&6; }
5355if test "${ac_cv_path_SORT+set}" = set; then :
5356  $as_echo_n "(cached) " >&6
5357else
5358  case $SORT in
5359  [\\/]* | ?:[\\/]*)
5360  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
5361  ;;
5362  *)
5363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5364for as_dir in $PATH
5365do
5366  IFS=$as_save_IFS
5367  test -z "$as_dir" && as_dir=.
5368    for ac_exec_ext in '' $ac_executable_extensions; do
5369  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5370    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
5371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5372    break 2
5373  fi
5374done
5375  done
5376IFS=$as_save_IFS
5377
5378  ;;
5379esac
5380fi
5381SORT=$ac_cv_path_SORT
5382if test -n "$SORT"; then
5383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
5384$as_echo "$SORT" >&6; }
5385else
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5387$as_echo "no" >&6; }
5388fi
5389
5390
5391  test -n "$SORT" && break
5392done
5393
5394
5395    if test "x$SORT" = x; then
5396        if test "xsort" = x; then
5397          PROG_NAME=sort
5398        else
5399          PROG_NAME=sort
5400        fi
5401        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5402$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5403        as_fn_error $? "Cannot continue" "$LINENO" 5
5404    fi
5405
5406
5407
5408    for ac_prog in tail
5409do
5410  # Extract the first word of "$ac_prog", so it can be a program name with args.
5411set dummy $ac_prog; ac_word=$2
5412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5413$as_echo_n "checking for $ac_word... " >&6; }
5414if test "${ac_cv_path_TAIL+set}" = set; then :
5415  $as_echo_n "(cached) " >&6
5416else
5417  case $TAIL in
5418  [\\/]* | ?:[\\/]*)
5419  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
5420  ;;
5421  *)
5422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5423for as_dir in $PATH
5424do
5425  IFS=$as_save_IFS
5426  test -z "$as_dir" && as_dir=.
5427    for ac_exec_ext in '' $ac_executable_extensions; do
5428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5429    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
5430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5431    break 2
5432  fi
5433done
5434  done
5435IFS=$as_save_IFS
5436
5437  ;;
5438esac
5439fi
5440TAIL=$ac_cv_path_TAIL
5441if test -n "$TAIL"; then
5442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
5443$as_echo "$TAIL" >&6; }
5444else
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5446$as_echo "no" >&6; }
5447fi
5448
5449
5450  test -n "$TAIL" && break
5451done
5452
5453
5454    if test "x$TAIL" = x; then
5455        if test "xtail" = x; then
5456          PROG_NAME=tail
5457        else
5458          PROG_NAME=tail
5459        fi
5460        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5461$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5462        as_fn_error $? "Cannot continue" "$LINENO" 5
5463    fi
5464
5465
5466
5467    for ac_prog in tar
5468do
5469  # Extract the first word of "$ac_prog", so it can be a program name with args.
5470set dummy $ac_prog; ac_word=$2
5471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5472$as_echo_n "checking for $ac_word... " >&6; }
5473if test "${ac_cv_path_TAR+set}" = set; then :
5474  $as_echo_n "(cached) " >&6
5475else
5476  case $TAR in
5477  [\\/]* | ?:[\\/]*)
5478  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
5479  ;;
5480  *)
5481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5482for as_dir in $PATH
5483do
5484  IFS=$as_save_IFS
5485  test -z "$as_dir" && as_dir=.
5486    for ac_exec_ext in '' $ac_executable_extensions; do
5487  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5488    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
5489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5490    break 2
5491  fi
5492done
5493  done
5494IFS=$as_save_IFS
5495
5496  ;;
5497esac
5498fi
5499TAR=$ac_cv_path_TAR
5500if test -n "$TAR"; then
5501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
5502$as_echo "$TAR" >&6; }
5503else
5504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5505$as_echo "no" >&6; }
5506fi
5507
5508
5509  test -n "$TAR" && break
5510done
5511
5512
5513    if test "x$TAR" = x; then
5514        if test "xtar" = x; then
5515          PROG_NAME=tar
5516        else
5517          PROG_NAME=tar
5518        fi
5519        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5520$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5521        as_fn_error $? "Cannot continue" "$LINENO" 5
5522    fi
5523
5524
5525
5526    for ac_prog in tee
5527do
5528  # Extract the first word of "$ac_prog", so it can be a program name with args.
5529set dummy $ac_prog; ac_word=$2
5530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5531$as_echo_n "checking for $ac_word... " >&6; }
5532if test "${ac_cv_path_TEE+set}" = set; then :
5533  $as_echo_n "(cached) " >&6
5534else
5535  case $TEE in
5536  [\\/]* | ?:[\\/]*)
5537  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
5538  ;;
5539  *)
5540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5541for as_dir in $PATH
5542do
5543  IFS=$as_save_IFS
5544  test -z "$as_dir" && as_dir=.
5545    for ac_exec_ext in '' $ac_executable_extensions; do
5546  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5547    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
5548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5549    break 2
5550  fi
5551done
5552  done
5553IFS=$as_save_IFS
5554
5555  ;;
5556esac
5557fi
5558TEE=$ac_cv_path_TEE
5559if test -n "$TEE"; then
5560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
5561$as_echo "$TEE" >&6; }
5562else
5563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5564$as_echo "no" >&6; }
5565fi
5566
5567
5568  test -n "$TEE" && break
5569done
5570
5571
5572    if test "x$TEE" = x; then
5573        if test "xtee" = x; then
5574          PROG_NAME=tee
5575        else
5576          PROG_NAME=tee
5577        fi
5578        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5579$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5580        as_fn_error $? "Cannot continue" "$LINENO" 5
5581    fi
5582
5583
5584
5585    for ac_prog in touch
5586do
5587  # Extract the first word of "$ac_prog", so it can be a program name with args.
5588set dummy $ac_prog; ac_word=$2
5589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5590$as_echo_n "checking for $ac_word... " >&6; }
5591if test "${ac_cv_path_TOUCH+set}" = set; then :
5592  $as_echo_n "(cached) " >&6
5593else
5594  case $TOUCH in
5595  [\\/]* | ?:[\\/]*)
5596  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
5597  ;;
5598  *)
5599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5600for as_dir in $PATH
5601do
5602  IFS=$as_save_IFS
5603  test -z "$as_dir" && as_dir=.
5604    for ac_exec_ext in '' $ac_executable_extensions; do
5605  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5606    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
5607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5608    break 2
5609  fi
5610done
5611  done
5612IFS=$as_save_IFS
5613
5614  ;;
5615esac
5616fi
5617TOUCH=$ac_cv_path_TOUCH
5618if test -n "$TOUCH"; then
5619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
5620$as_echo "$TOUCH" >&6; }
5621else
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5623$as_echo "no" >&6; }
5624fi
5625
5626
5627  test -n "$TOUCH" && break
5628done
5629
5630
5631    if test "x$TOUCH" = x; then
5632        if test "xtouch" = x; then
5633          PROG_NAME=touch
5634        else
5635          PROG_NAME=touch
5636        fi
5637        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5638$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5639        as_fn_error $? "Cannot continue" "$LINENO" 5
5640    fi
5641
5642
5643
5644    for ac_prog in tr
5645do
5646  # Extract the first word of "$ac_prog", so it can be a program name with args.
5647set dummy $ac_prog; ac_word=$2
5648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5649$as_echo_n "checking for $ac_word... " >&6; }
5650if test "${ac_cv_path_TR+set}" = set; then :
5651  $as_echo_n "(cached) " >&6
5652else
5653  case $TR in
5654  [\\/]* | ?:[\\/]*)
5655  ac_cv_path_TR="$TR" # Let the user override the test with a path.
5656  ;;
5657  *)
5658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5659for as_dir in $PATH
5660do
5661  IFS=$as_save_IFS
5662  test -z "$as_dir" && as_dir=.
5663    for ac_exec_ext in '' $ac_executable_extensions; do
5664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5665    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
5666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5667    break 2
5668  fi
5669done
5670  done
5671IFS=$as_save_IFS
5672
5673  ;;
5674esac
5675fi
5676TR=$ac_cv_path_TR
5677if test -n "$TR"; then
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
5679$as_echo "$TR" >&6; }
5680else
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5682$as_echo "no" >&6; }
5683fi
5684
5685
5686  test -n "$TR" && break
5687done
5688
5689
5690    if test "x$TR" = x; then
5691        if test "xtr" = x; then
5692          PROG_NAME=tr
5693        else
5694          PROG_NAME=tr
5695        fi
5696        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5697$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5698        as_fn_error $? "Cannot continue" "$LINENO" 5
5699    fi
5700
5701
5702
5703    for ac_prog in uname
5704do
5705  # Extract the first word of "$ac_prog", so it can be a program name with args.
5706set dummy $ac_prog; ac_word=$2
5707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5708$as_echo_n "checking for $ac_word... " >&6; }
5709if test "${ac_cv_path_UNAME+set}" = set; then :
5710  $as_echo_n "(cached) " >&6
5711else
5712  case $UNAME in
5713  [\\/]* | ?:[\\/]*)
5714  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
5715  ;;
5716  *)
5717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5718for as_dir in $PATH
5719do
5720  IFS=$as_save_IFS
5721  test -z "$as_dir" && as_dir=.
5722    for ac_exec_ext in '' $ac_executable_extensions; do
5723  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5724    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
5725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5726    break 2
5727  fi
5728done
5729  done
5730IFS=$as_save_IFS
5731
5732  ;;
5733esac
5734fi
5735UNAME=$ac_cv_path_UNAME
5736if test -n "$UNAME"; then
5737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
5738$as_echo "$UNAME" >&6; }
5739else
5740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5741$as_echo "no" >&6; }
5742fi
5743
5744
5745  test -n "$UNAME" && break
5746done
5747
5748
5749    if test "x$UNAME" = x; then
5750        if test "xuname" = x; then
5751          PROG_NAME=uname
5752        else
5753          PROG_NAME=uname
5754        fi
5755        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5756$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5757        as_fn_error $? "Cannot continue" "$LINENO" 5
5758    fi
5759
5760
5761
5762    for ac_prog in uniq
5763do
5764  # Extract the first word of "$ac_prog", so it can be a program name with args.
5765set dummy $ac_prog; ac_word=$2
5766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5767$as_echo_n "checking for $ac_word... " >&6; }
5768if test "${ac_cv_path_UNIQ+set}" = set; then :
5769  $as_echo_n "(cached) " >&6
5770else
5771  case $UNIQ in
5772  [\\/]* | ?:[\\/]*)
5773  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
5774  ;;
5775  *)
5776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5777for as_dir in $PATH
5778do
5779  IFS=$as_save_IFS
5780  test -z "$as_dir" && as_dir=.
5781    for ac_exec_ext in '' $ac_executable_extensions; do
5782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5783    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
5784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5785    break 2
5786  fi
5787done
5788  done
5789IFS=$as_save_IFS
5790
5791  ;;
5792esac
5793fi
5794UNIQ=$ac_cv_path_UNIQ
5795if test -n "$UNIQ"; then
5796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
5797$as_echo "$UNIQ" >&6; }
5798else
5799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5800$as_echo "no" >&6; }
5801fi
5802
5803
5804  test -n "$UNIQ" && break
5805done
5806
5807
5808    if test "x$UNIQ" = x; then
5809        if test "xuniq" = x; then
5810          PROG_NAME=uniq
5811        else
5812          PROG_NAME=uniq
5813        fi
5814        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5815$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5816        as_fn_error $? "Cannot continue" "$LINENO" 5
5817    fi
5818
5819
5820
5821    for ac_prog in wc
5822do
5823  # Extract the first word of "$ac_prog", so it can be a program name with args.
5824set dummy $ac_prog; ac_word=$2
5825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5826$as_echo_n "checking for $ac_word... " >&6; }
5827if test "${ac_cv_path_WC+set}" = set; then :
5828  $as_echo_n "(cached) " >&6
5829else
5830  case $WC in
5831  [\\/]* | ?:[\\/]*)
5832  ac_cv_path_WC="$WC" # Let the user override the test with a path.
5833  ;;
5834  *)
5835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5836for as_dir in $PATH
5837do
5838  IFS=$as_save_IFS
5839  test -z "$as_dir" && as_dir=.
5840    for ac_exec_ext in '' $ac_executable_extensions; do
5841  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5842    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
5843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5844    break 2
5845  fi
5846done
5847  done
5848IFS=$as_save_IFS
5849
5850  ;;
5851esac
5852fi
5853WC=$ac_cv_path_WC
5854if test -n "$WC"; then
5855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
5856$as_echo "$WC" >&6; }
5857else
5858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5859$as_echo "no" >&6; }
5860fi
5861
5862
5863  test -n "$WC" && break
5864done
5865
5866
5867    if test "x$WC" = x; then
5868        if test "xwc" = x; then
5869          PROG_NAME=wc
5870        else
5871          PROG_NAME=wc
5872        fi
5873        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5874$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5875        as_fn_error $? "Cannot continue" "$LINENO" 5
5876    fi
5877
5878
5879
5880    for ac_prog in which
5881do
5882  # Extract the first word of "$ac_prog", so it can be a program name with args.
5883set dummy $ac_prog; ac_word=$2
5884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5885$as_echo_n "checking for $ac_word... " >&6; }
5886if test "${ac_cv_path_WHICH+set}" = set; then :
5887  $as_echo_n "(cached) " >&6
5888else
5889  case $WHICH in
5890  [\\/]* | ?:[\\/]*)
5891  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
5892  ;;
5893  *)
5894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5895for as_dir in $PATH
5896do
5897  IFS=$as_save_IFS
5898  test -z "$as_dir" && as_dir=.
5899    for ac_exec_ext in '' $ac_executable_extensions; do
5900  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5901    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
5902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5903    break 2
5904  fi
5905done
5906  done
5907IFS=$as_save_IFS
5908
5909  ;;
5910esac
5911fi
5912WHICH=$ac_cv_path_WHICH
5913if test -n "$WHICH"; then
5914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
5915$as_echo "$WHICH" >&6; }
5916else
5917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5918$as_echo "no" >&6; }
5919fi
5920
5921
5922  test -n "$WHICH" && break
5923done
5924
5925
5926    if test "x$WHICH" = x; then
5927        if test "xwhich" = x; then
5928          PROG_NAME=which
5929        else
5930          PROG_NAME=which
5931        fi
5932        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5933$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5934        as_fn_error $? "Cannot continue" "$LINENO" 5
5935    fi
5936
5937
5938
5939    for ac_prog in xargs
5940do
5941  # Extract the first word of "$ac_prog", so it can be a program name with args.
5942set dummy $ac_prog; ac_word=$2
5943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5944$as_echo_n "checking for $ac_word... " >&6; }
5945if test "${ac_cv_path_XARGS+set}" = set; then :
5946  $as_echo_n "(cached) " >&6
5947else
5948  case $XARGS in
5949  [\\/]* | ?:[\\/]*)
5950  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
5951  ;;
5952  *)
5953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5954for as_dir in $PATH
5955do
5956  IFS=$as_save_IFS
5957  test -z "$as_dir" && as_dir=.
5958    for ac_exec_ext in '' $ac_executable_extensions; do
5959  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5960    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
5961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5962    break 2
5963  fi
5964done
5965  done
5966IFS=$as_save_IFS
5967
5968  ;;
5969esac
5970fi
5971XARGS=$ac_cv_path_XARGS
5972if test -n "$XARGS"; then
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
5974$as_echo "$XARGS" >&6; }
5975else
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
5978fi
5979
5980
5981  test -n "$XARGS" && break
5982done
5983
5984
5985    if test "x$XARGS" = x; then
5986        if test "xxargs" = x; then
5987          PROG_NAME=xargs
5988        else
5989          PROG_NAME=xargs
5990        fi
5991        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
5992$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
5993        as_fn_error $? "Cannot continue" "$LINENO" 5
5994    fi
5995
5996
5997
5998# Then required tools that require some special treatment.
5999for ac_prog in gawk mawk nawk awk
6000do
6001  # Extract the first word of "$ac_prog", so it can be a program name with args.
6002set dummy $ac_prog; ac_word=$2
6003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6004$as_echo_n "checking for $ac_word... " >&6; }
6005if test "${ac_cv_prog_AWK+set}" = set; then :
6006  $as_echo_n "(cached) " >&6
6007else
6008  if test -n "$AWK"; then
6009  ac_cv_prog_AWK="$AWK" # Let the user override the test.
6010else
6011as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6012for as_dir in $PATH
6013do
6014  IFS=$as_save_IFS
6015  test -z "$as_dir" && as_dir=.
6016    for ac_exec_ext in '' $ac_executable_extensions; do
6017  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6018    ac_cv_prog_AWK="$ac_prog"
6019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6020    break 2
6021  fi
6022done
6023  done
6024IFS=$as_save_IFS
6025
6026fi
6027fi
6028AWK=$ac_cv_prog_AWK
6029if test -n "$AWK"; then
6030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
6031$as_echo "$AWK" >&6; }
6032else
6033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6034$as_echo "no" >&6; }
6035fi
6036
6037
6038  test -n "$AWK" && break
6039done
6040
6041
6042    if test "x$AWK" = x; then
6043        if test "x" = x; then
6044          PROG_NAME=awk
6045        else
6046          PROG_NAME=
6047        fi
6048        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6049$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6050        as_fn_error $? "Cannot continue" "$LINENO" 5
6051    fi
6052
6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
6054$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
6055if test "${ac_cv_path_GREP+set}" = set; then :
6056  $as_echo_n "(cached) " >&6
6057else
6058  if test -z "$GREP"; then
6059  ac_path_GREP_found=false
6060  # Loop through the user's path and test for each of PROGNAME-LIST
6061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6062for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6063do
6064  IFS=$as_save_IFS
6065  test -z "$as_dir" && as_dir=.
6066    for ac_prog in grep ggrep; do
6067    for ac_exec_ext in '' $ac_executable_extensions; do
6068      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
6069      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
6070# Check for GNU ac_path_GREP and select it if it is found.
6071  # Check for GNU $ac_path_GREP
6072case `"$ac_path_GREP" --version 2>&1` in
6073*GNU*)
6074  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
6075*)
6076  ac_count=0
6077  $as_echo_n 0123456789 >"conftest.in"
6078  while :
6079  do
6080    cat "conftest.in" "conftest.in" >"conftest.tmp"
6081    mv "conftest.tmp" "conftest.in"
6082    cp "conftest.in" "conftest.nl"
6083    $as_echo 'GREP' >> "conftest.nl"
6084    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6085    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6086    as_fn_arith $ac_count + 1 && ac_count=$as_val
6087    if test $ac_count -gt ${ac_path_GREP_max-0}; then
6088      # Best one so far, save it but keep looking for a better one
6089      ac_cv_path_GREP="$ac_path_GREP"
6090      ac_path_GREP_max=$ac_count
6091    fi
6092    # 10*(2^10) chars as input seems more than enough
6093    test $ac_count -gt 10 && break
6094  done
6095  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6096esac
6097
6098      $ac_path_GREP_found && break 3
6099    done
6100  done
6101  done
6102IFS=$as_save_IFS
6103  if test -z "$ac_cv_path_GREP"; then
6104    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6105  fi
6106else
6107  ac_cv_path_GREP=$GREP
6108fi
6109
6110fi
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
6112$as_echo "$ac_cv_path_GREP" >&6; }
6113 GREP="$ac_cv_path_GREP"
6114
6115
6116
6117    if test "x$GREP" = x; then
6118        if test "x" = x; then
6119          PROG_NAME=grep
6120        else
6121          PROG_NAME=
6122        fi
6123        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6124$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6125        as_fn_error $? "Cannot continue" "$LINENO" 5
6126    fi
6127
6128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
6129$as_echo_n "checking for egrep... " >&6; }
6130if test "${ac_cv_path_EGREP+set}" = set; then :
6131  $as_echo_n "(cached) " >&6
6132else
6133  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
6134   then ac_cv_path_EGREP="$GREP -E"
6135   else
6136     if test -z "$EGREP"; then
6137  ac_path_EGREP_found=false
6138  # Loop through the user's path and test for each of PROGNAME-LIST
6139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6140for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6141do
6142  IFS=$as_save_IFS
6143  test -z "$as_dir" && as_dir=.
6144    for ac_prog in egrep; do
6145    for ac_exec_ext in '' $ac_executable_extensions; do
6146      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
6147      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
6148# Check for GNU ac_path_EGREP and select it if it is found.
6149  # Check for GNU $ac_path_EGREP
6150case `"$ac_path_EGREP" --version 2>&1` in
6151*GNU*)
6152  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
6153*)
6154  ac_count=0
6155  $as_echo_n 0123456789 >"conftest.in"
6156  while :
6157  do
6158    cat "conftest.in" "conftest.in" >"conftest.tmp"
6159    mv "conftest.tmp" "conftest.in"
6160    cp "conftest.in" "conftest.nl"
6161    $as_echo 'EGREP' >> "conftest.nl"
6162    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
6163    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6164    as_fn_arith $ac_count + 1 && ac_count=$as_val
6165    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
6166      # Best one so far, save it but keep looking for a better one
6167      ac_cv_path_EGREP="$ac_path_EGREP"
6168      ac_path_EGREP_max=$ac_count
6169    fi
6170    # 10*(2^10) chars as input seems more than enough
6171    test $ac_count -gt 10 && break
6172  done
6173  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6174esac
6175
6176      $ac_path_EGREP_found && break 3
6177    done
6178  done
6179  done
6180IFS=$as_save_IFS
6181  if test -z "$ac_cv_path_EGREP"; then
6182    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6183  fi
6184else
6185  ac_cv_path_EGREP=$EGREP
6186fi
6187
6188   fi
6189fi
6190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
6191$as_echo "$ac_cv_path_EGREP" >&6; }
6192 EGREP="$ac_cv_path_EGREP"
6193
6194
6195
6196    if test "x$EGREP" = x; then
6197        if test "x" = x; then
6198          PROG_NAME=egrep
6199        else
6200          PROG_NAME=
6201        fi
6202        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6203$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6204        as_fn_error $? "Cannot continue" "$LINENO" 5
6205    fi
6206
6207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
6208$as_echo_n "checking for fgrep... " >&6; }
6209if test "${ac_cv_path_FGREP+set}" = set; then :
6210  $as_echo_n "(cached) " >&6
6211else
6212  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
6213   then ac_cv_path_FGREP="$GREP -F"
6214   else
6215     if test -z "$FGREP"; then
6216  ac_path_FGREP_found=false
6217  # Loop through the user's path and test for each of PROGNAME-LIST
6218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6219for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
6220do
6221  IFS=$as_save_IFS
6222  test -z "$as_dir" && as_dir=.
6223    for ac_prog in fgrep; do
6224    for ac_exec_ext in '' $ac_executable_extensions; do
6225      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
6226      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
6227# Check for GNU ac_path_FGREP and select it if it is found.
6228  # Check for GNU $ac_path_FGREP
6229case `"$ac_path_FGREP" --version 2>&1` in
6230*GNU*)
6231  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
6232*)
6233  ac_count=0
6234  $as_echo_n 0123456789 >"conftest.in"
6235  while :
6236  do
6237    cat "conftest.in" "conftest.in" >"conftest.tmp"
6238    mv "conftest.tmp" "conftest.in"
6239    cp "conftest.in" "conftest.nl"
6240    $as_echo 'FGREP' >> "conftest.nl"
6241    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
6242    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6243    as_fn_arith $ac_count + 1 && ac_count=$as_val
6244    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
6245      # Best one so far, save it but keep looking for a better one
6246      ac_cv_path_FGREP="$ac_path_FGREP"
6247      ac_path_FGREP_max=$ac_count
6248    fi
6249    # 10*(2^10) chars as input seems more than enough
6250    test $ac_count -gt 10 && break
6251  done
6252  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6253esac
6254
6255      $ac_path_FGREP_found && break 3
6256    done
6257  done
6258  done
6259IFS=$as_save_IFS
6260  if test -z "$ac_cv_path_FGREP"; then
6261    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
6262  fi
6263else
6264  ac_cv_path_FGREP=$FGREP
6265fi
6266
6267   fi
6268fi
6269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
6270$as_echo "$ac_cv_path_FGREP" >&6; }
6271 FGREP="$ac_cv_path_FGREP"
6272
6273
6274
6275    if test "x$FGREP" = x; then
6276        if test "x" = x; then
6277          PROG_NAME=fgrep
6278        else
6279          PROG_NAME=
6280        fi
6281        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6282$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6283        as_fn_error $? "Cannot continue" "$LINENO" 5
6284    fi
6285
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
6287$as_echo_n "checking for a sed that does not truncate output... " >&6; }
6288if test "${ac_cv_path_SED+set}" = set; then :
6289  $as_echo_n "(cached) " >&6
6290else
6291            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
6292     for ac_i in 1 2 3 4 5 6 7; do
6293       ac_script="$ac_script$as_nl$ac_script"
6294     done
6295     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
6296     { ac_script=; unset ac_script;}
6297     if test -z "$SED"; then
6298  ac_path_SED_found=false
6299  # Loop through the user's path and test for each of PROGNAME-LIST
6300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301for as_dir in $PATH
6302do
6303  IFS=$as_save_IFS
6304  test -z "$as_dir" && as_dir=.
6305    for ac_prog in sed gsed; do
6306    for ac_exec_ext in '' $ac_executable_extensions; do
6307      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
6308      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
6309# Check for GNU ac_path_SED and select it if it is found.
6310  # Check for GNU $ac_path_SED
6311case `"$ac_path_SED" --version 2>&1` in
6312*GNU*)
6313  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
6314*)
6315  ac_count=0
6316  $as_echo_n 0123456789 >"conftest.in"
6317  while :
6318  do
6319    cat "conftest.in" "conftest.in" >"conftest.tmp"
6320    mv "conftest.tmp" "conftest.in"
6321    cp "conftest.in" "conftest.nl"
6322    $as_echo '' >> "conftest.nl"
6323    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
6324    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
6325    as_fn_arith $ac_count + 1 && ac_count=$as_val
6326    if test $ac_count -gt ${ac_path_SED_max-0}; then
6327      # Best one so far, save it but keep looking for a better one
6328      ac_cv_path_SED="$ac_path_SED"
6329      ac_path_SED_max=$ac_count
6330    fi
6331    # 10*(2^10) chars as input seems more than enough
6332    test $ac_count -gt 10 && break
6333  done
6334  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
6335esac
6336
6337      $ac_path_SED_found && break 3
6338    done
6339  done
6340  done
6341IFS=$as_save_IFS
6342  if test -z "$ac_cv_path_SED"; then
6343    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
6344  fi
6345else
6346  ac_cv_path_SED=$SED
6347fi
6348
6349fi
6350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
6351$as_echo "$ac_cv_path_SED" >&6; }
6352 SED="$ac_cv_path_SED"
6353  rm -f conftest.sed
6354
6355
6356    if test "x$SED" = x; then
6357        if test "x" = x; then
6358          PROG_NAME=sed
6359        else
6360          PROG_NAME=
6361        fi
6362        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6363$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6364        as_fn_error $? "Cannot continue" "$LINENO" 5
6365    fi
6366
6367
6368for ac_prog in nawk gawk awk
6369do
6370  # Extract the first word of "$ac_prog", so it can be a program name with args.
6371set dummy $ac_prog; ac_word=$2
6372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6373$as_echo_n "checking for $ac_word... " >&6; }
6374if test "${ac_cv_path_NAWK+set}" = set; then :
6375  $as_echo_n "(cached) " >&6
6376else
6377  case $NAWK in
6378  [\\/]* | ?:[\\/]*)
6379  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
6380  ;;
6381  *)
6382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6383for as_dir in $PATH
6384do
6385  IFS=$as_save_IFS
6386  test -z "$as_dir" && as_dir=.
6387    for ac_exec_ext in '' $ac_executable_extensions; do
6388  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6389    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
6390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6391    break 2
6392  fi
6393done
6394  done
6395IFS=$as_save_IFS
6396
6397  ;;
6398esac
6399fi
6400NAWK=$ac_cv_path_NAWK
6401if test -n "$NAWK"; then
6402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
6403$as_echo "$NAWK" >&6; }
6404else
6405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; }
6407fi
6408
6409
6410  test -n "$NAWK" && break
6411done
6412
6413
6414    if test "x$NAWK" = x; then
6415        if test "x" = x; then
6416          PROG_NAME=nawk
6417        else
6418          PROG_NAME=
6419        fi
6420        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
6421$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
6422        as_fn_error $? "Cannot continue" "$LINENO" 5
6423    fi
6424
6425
6426# Always force rm.
6427RM="$RM -f"
6428
6429# These are not required on all platforms
6430# Extract the first word of "cygpath", so it can be a program name with args.
6431set dummy cygpath; ac_word=$2
6432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6433$as_echo_n "checking for $ac_word... " >&6; }
6434if test "${ac_cv_path_CYGPATH+set}" = set; then :
6435  $as_echo_n "(cached) " >&6
6436else
6437  case $CYGPATH in
6438  [\\/]* | ?:[\\/]*)
6439  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
6440  ;;
6441  *)
6442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6443for as_dir in $PATH
6444do
6445  IFS=$as_save_IFS
6446  test -z "$as_dir" && as_dir=.
6447    for ac_exec_ext in '' $ac_executable_extensions; do
6448  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6449    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
6450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6451    break 2
6452  fi
6453done
6454  done
6455IFS=$as_save_IFS
6456
6457  ;;
6458esac
6459fi
6460CYGPATH=$ac_cv_path_CYGPATH
6461if test -n "$CYGPATH"; then
6462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
6463$as_echo "$CYGPATH" >&6; }
6464else
6465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; }
6467fi
6468
6469
6470# Extract the first word of "readlink", so it can be a program name with args.
6471set dummy readlink; ac_word=$2
6472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6473$as_echo_n "checking for $ac_word... " >&6; }
6474if test "${ac_cv_path_READLINK+set}" = set; then :
6475  $as_echo_n "(cached) " >&6
6476else
6477  case $READLINK in
6478  [\\/]* | ?:[\\/]*)
6479  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
6480  ;;
6481  *)
6482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6483for as_dir in $PATH
6484do
6485  IFS=$as_save_IFS
6486  test -z "$as_dir" && as_dir=.
6487    for ac_exec_ext in '' $ac_executable_extensions; do
6488  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6489    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
6490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6491    break 2
6492  fi
6493done
6494  done
6495IFS=$as_save_IFS
6496
6497  ;;
6498esac
6499fi
6500READLINK=$ac_cv_path_READLINK
6501if test -n "$READLINK"; then
6502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
6503$as_echo "$READLINK" >&6; }
6504else
6505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6506$as_echo "no" >&6; }
6507fi
6508
6509
6510# Extract the first word of "df", so it can be a program name with args.
6511set dummy df; ac_word=$2
6512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6513$as_echo_n "checking for $ac_word... " >&6; }
6514if test "${ac_cv_path_DF+set}" = set; then :
6515  $as_echo_n "(cached) " >&6
6516else
6517  case $DF in
6518  [\\/]* | ?:[\\/]*)
6519  ac_cv_path_DF="$DF" # Let the user override the test with a path.
6520  ;;
6521  *)
6522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6523for as_dir in $PATH
6524do
6525  IFS=$as_save_IFS
6526  test -z "$as_dir" && as_dir=.
6527    for ac_exec_ext in '' $ac_executable_extensions; do
6528  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6529    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
6530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6531    break 2
6532  fi
6533done
6534  done
6535IFS=$as_save_IFS
6536
6537  ;;
6538esac
6539fi
6540DF=$ac_cv_path_DF
6541if test -n "$DF"; then
6542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
6543$as_echo "$DF" >&6; }
6544else
6545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546$as_echo "no" >&6; }
6547fi
6548
6549
6550# Extract the first word of "SetFile", so it can be a program name with args.
6551set dummy SetFile; ac_word=$2
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6553$as_echo_n "checking for $ac_word... " >&6; }
6554if test "${ac_cv_path_SETFILE+set}" = set; then :
6555  $as_echo_n "(cached) " >&6
6556else
6557  case $SETFILE in
6558  [\\/]* | ?:[\\/]*)
6559  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
6560  ;;
6561  *)
6562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in $PATH
6564do
6565  IFS=$as_save_IFS
6566  test -z "$as_dir" && as_dir=.
6567    for ac_exec_ext in '' $ac_executable_extensions; do
6568  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6569    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
6570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6571    break 2
6572  fi
6573done
6574  done
6575IFS=$as_save_IFS
6576
6577  ;;
6578esac
6579fi
6580SETFILE=$ac_cv_path_SETFILE
6581if test -n "$SETFILE"; then
6582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
6583$as_echo "$SETFILE" >&6; }
6584else
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
6587fi
6588
6589
6590
6591
6592# Now we can determine OpenJDK build and target platforms. This is required to
6593# have early on.
6594# Make sure we can run config.sub.
6595$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
6596  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
6597
6598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6599$as_echo_n "checking build system type... " >&6; }
6600if test "${ac_cv_build+set}" = set; then :
6601  $as_echo_n "(cached) " >&6
6602else
6603  ac_build_alias=$build_alias
6604test "x$ac_build_alias" = x &&
6605  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
6606test "x$ac_build_alias" = x &&
6607  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6608ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
6609  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
6610
6611fi
6612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6613$as_echo "$ac_cv_build" >&6; }
6614case $ac_cv_build in
6615*-*-*) ;;
6616*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6617esac
6618build=$ac_cv_build
6619ac_save_IFS=$IFS; IFS='-'
6620set x $ac_cv_build
6621shift
6622build_cpu=$1
6623build_vendor=$2
6624shift; shift
6625# Remember, the first character of IFS is used to create $*,
6626# except with old shells:
6627build_os=$*
6628IFS=$ac_save_IFS
6629case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6630
6631
6632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6633$as_echo_n "checking host system type... " >&6; }
6634if test "${ac_cv_host+set}" = set; then :
6635  $as_echo_n "(cached) " >&6
6636else
6637  if test "x$host_alias" = x; then
6638  ac_cv_host=$ac_cv_build
6639else
6640  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
6641    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
6642fi
6643
6644fi
6645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6646$as_echo "$ac_cv_host" >&6; }
6647case $ac_cv_host in
6648*-*-*) ;;
6649*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6650esac
6651host=$ac_cv_host
6652ac_save_IFS=$IFS; IFS='-'
6653set x $ac_cv_host
6654shift
6655host_cpu=$1
6656host_vendor=$2
6657shift; shift
6658# Remember, the first character of IFS is used to create $*,
6659# except with old shells:
6660host_os=$*
6661IFS=$ac_save_IFS
6662case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6663
6664
6665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6666$as_echo_n "checking target system type... " >&6; }
6667if test "${ac_cv_target+set}" = set; then :
6668  $as_echo_n "(cached) " >&6
6669else
6670  if test "x$target_alias" = x; then
6671  ac_cv_target=$ac_cv_host
6672else
6673  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6674    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6675fi
6676
6677fi
6678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6679$as_echo "$ac_cv_target" >&6; }
6680case $ac_cv_target in
6681*-*-*) ;;
6682*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6683esac
6684target=$ac_cv_target
6685ac_save_IFS=$IFS; IFS='-'
6686set x $ac_cv_target
6687shift
6688target_cpu=$1
6689target_vendor=$2
6690shift; shift
6691# Remember, the first character of IFS is used to create $*,
6692# except with old shells:
6693target_os=$*
6694IFS=$ac_save_IFS
6695case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6696
6697
6698# The aliases save the names the user supplied, while $host etc.
6699# will get canonicalized.
6700test -n "$target_alias" &&
6701  test "$program_prefix$program_suffix$program_transform_name" = \
6702    NONENONEs,x,x, &&
6703  program_prefix=${target_alias}-
6704
6705# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
6706# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
6707# product you're building. The target of this build is called "host". Since this is confusing to most people, we
6708# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
6709# to use the configure naming style.
6710
6711
6712
6713
6714
6715    # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
6716    # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
6717    # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
6718    # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
6719    OPENJDK_TARGET_AUTOCONF_NAME="$host"
6720    OPENJDK_BUILD_AUTOCONF_NAME="$build"
6721
6722
6723
6724    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6725
6726  case "$build_os" in
6727    *linux*)
6728      VAR_OS=linux
6729      VAR_OS_API=posix
6730      VAR_OS_ENV=linux
6731      ;;
6732    *solaris*)
6733      VAR_OS=solaris
6734      VAR_OS_API=posix
6735      VAR_OS_ENV=solaris
6736      ;;
6737    *darwin*)
6738      VAR_OS=macosx
6739      VAR_OS_API=posix
6740      VAR_OS_ENV=macosx
6741      ;;
6742    *bsd*)
6743      VAR_OS=bsd
6744      VAR_OS_API=posix
6745      VAR_OS_ENV=bsd
6746      ;;
6747    *cygwin*)
6748      VAR_OS=windows
6749      VAR_OS_API=winapi
6750      VAR_OS_ENV=windows.cygwin
6751      ;;
6752    *mingw*)
6753      VAR_OS=windows
6754      VAR_OS_API=winapi
6755      VAR_OS_ENV=windows.msys
6756      ;;
6757    *)
6758      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
6759      ;;
6760  esac
6761
6762
6763  # First argument is the cpu name from the trip/quad
6764  case "$build_cpu" in
6765    x86_64)
6766      VAR_CPU=x86_64
6767      VAR_CPU_ARCH=x86
6768      VAR_CPU_BITS=64
6769      VAR_CPU_ENDIAN=little
6770      ;;
6771    i?86)
6772      VAR_CPU=x86
6773      VAR_CPU_ARCH=x86
6774      VAR_CPU_BITS=32
6775      VAR_CPU_ENDIAN=little
6776      ;;
6777    arm*)
6778      VAR_CPU=arm
6779      VAR_CPU_ARCH=arm
6780      VAR_CPU_BITS=32
6781      VAR_CPU_ENDIAN=little
6782      ;;
6783    powerpc)
6784      VAR_CPU=ppc
6785      VAR_CPU_ARCH=ppc
6786      VAR_CPU_BITS=32
6787      VAR_CPU_ENDIAN=big
6788       ;;
6789    powerpc64)
6790      VAR_CPU=ppc64
6791      VAR_CPU_ARCH=ppc
6792      VAR_CPU_BITS=64
6793      VAR_CPU_ENDIAN=big
6794       ;;
6795    sparc)
6796      VAR_CPU=sparc
6797      VAR_CPU_ARCH=sparc
6798      VAR_CPU_BITS=32
6799      VAR_CPU_ENDIAN=big
6800       ;;
6801    sparcv9)
6802      VAR_CPU=sparcv9
6803      VAR_CPU_ARCH=sparc
6804      VAR_CPU_BITS=64
6805      VAR_CPU_ENDIAN=big
6806       ;;
6807    *)
6808      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
6809      ;;
6810  esac
6811
6812    # ..and setup our own variables. (Do this explicitely to facilitate searching)
6813    OPENJDK_BUILD_OS="$VAR_OS"
6814    OPENJDK_BUILD_OS_API="$VAR_OS_API"
6815    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
6816    OPENJDK_BUILD_CPU="$VAR_CPU"
6817    OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
6818    OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
6819    OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6820
6821
6822
6823
6824
6825
6826
6827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
6828$as_echo_n "checking openjdk-build os-cpu... " >&6; }
6829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
6830$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
6831
6832    # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
6833
6834  case "$host_os" in
6835    *linux*)
6836      VAR_OS=linux
6837      VAR_OS_API=posix
6838      VAR_OS_ENV=linux
6839      ;;
6840    *solaris*)
6841      VAR_OS=solaris
6842      VAR_OS_API=posix
6843      VAR_OS_ENV=solaris
6844      ;;
6845    *darwin*)
6846      VAR_OS=macosx
6847      VAR_OS_API=posix
6848      VAR_OS_ENV=macosx
6849      ;;
6850    *bsd*)
6851      VAR_OS=bsd
6852      VAR_OS_API=posix
6853      VAR_OS_ENV=bsd
6854      ;;
6855    *cygwin*)
6856      VAR_OS=windows
6857      VAR_OS_API=winapi
6858      VAR_OS_ENV=windows.cygwin
6859      ;;
6860    *mingw*)
6861      VAR_OS=windows
6862      VAR_OS_API=winapi
6863      VAR_OS_ENV=windows.msys
6864      ;;
6865    *)
6866      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
6867      ;;
6868  esac
6869
6870
6871  # First argument is the cpu name from the trip/quad
6872  case "$host_cpu" in
6873    x86_64)
6874      VAR_CPU=x86_64
6875      VAR_CPU_ARCH=x86
6876      VAR_CPU_BITS=64
6877      VAR_CPU_ENDIAN=little
6878      ;;
6879    i?86)
6880      VAR_CPU=x86
6881      VAR_CPU_ARCH=x86
6882      VAR_CPU_BITS=32
6883      VAR_CPU_ENDIAN=little
6884      ;;
6885    arm*)
6886      VAR_CPU=arm
6887      VAR_CPU_ARCH=arm
6888      VAR_CPU_BITS=32
6889      VAR_CPU_ENDIAN=little
6890      ;;
6891    powerpc)
6892      VAR_CPU=ppc
6893      VAR_CPU_ARCH=ppc
6894      VAR_CPU_BITS=32
6895      VAR_CPU_ENDIAN=big
6896       ;;
6897    powerpc64)
6898      VAR_CPU=ppc64
6899      VAR_CPU_ARCH=ppc
6900      VAR_CPU_BITS=64
6901      VAR_CPU_ENDIAN=big
6902       ;;
6903    sparc)
6904      VAR_CPU=sparc
6905      VAR_CPU_ARCH=sparc
6906      VAR_CPU_BITS=32
6907      VAR_CPU_ENDIAN=big
6908       ;;
6909    sparcv9)
6910      VAR_CPU=sparcv9
6911      VAR_CPU_ARCH=sparc
6912      VAR_CPU_BITS=64
6913      VAR_CPU_ENDIAN=big
6914       ;;
6915    *)
6916      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
6917      ;;
6918  esac
6919
6920    # ... and setup our own variables. (Do this explicitely to facilitate searching)
6921    OPENJDK_TARGET_OS="$VAR_OS"
6922    OPENJDK_TARGET_OS_API="$VAR_OS_API"
6923    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
6924    OPENJDK_TARGET_CPU="$VAR_CPU"
6925    OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
6926    OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
6927    OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6928
6929
6930
6931
6932
6933
6934
6935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
6936$as_echo_n "checking openjdk-target os-cpu... " >&6; }
6937    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
6938$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
6939
6940
6941
6942# Check whether --with-target-bits was given.
6943if test "${with_target_bits+set}" = set; then :
6944  withval=$with_target_bits;
6945fi
6946
6947
6948  # We have three types of compiles:
6949  # native  == normal compilation, target system == build system
6950  # cross   == traditional cross compilation, target system != build system; special toolchain needed
6951  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
6952  #
6953  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
6954    # We're doing a proper cross-compilation
6955    COMPILE_TYPE="cross"
6956  else
6957    COMPILE_TYPE="native"
6958  fi
6959
6960  if test "x$with_target_bits" != x; then
6961    if test "x$COMPILE_TYPE" = "xcross"; then
6962      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
6963    fi
6964
6965    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
6966      # A reduced build is requested
6967      COMPILE_TYPE="reduced"
6968      OPENJDK_TARGET_CPU_BITS=32
6969      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
6970        OPENJDK_TARGET_CPU=x86
6971      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
6972        OPENJDK_TARGET_CPU=sparc
6973      else
6974        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
6975      fi
6976    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
6977      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
6978    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
6979      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
6980$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
6981    else
6982      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
6983    fi
6984  fi
6985
6986
6987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
6988$as_echo_n "checking compilation type... " >&6; }
6989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
6990$as_echo "$COMPILE_TYPE" >&6; }
6991
6992
6993    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
6994       REQUIRED_OS_NAME=SunOS
6995       REQUIRED_OS_VERSION=5.10
6996    fi
6997    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
6998       REQUIRED_OS_NAME=Linux
6999       REQUIRED_OS_VERSION=2.6
7000    fi
7001    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7002        REQUIRED_OS_NAME=Windows
7003        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
7004            REQUIRED_OS_VERSION=5.2
7005        else
7006            REQUIRED_OS_VERSION=5.1
7007        fi
7008    fi
7009    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7010        REQUIRED_OS_NAME=Darwin
7011        REQUIRED_OS_VERSION=11.2
7012    fi
7013
7014
7015
7016
7017
7018    # Also store the legacy naming of the cpu.
7019    # Ie i586 and amd64 instead of x86 and x86_64
7020    OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
7021    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7022      OPENJDK_TARGET_CPU_LEGACY="i586"
7023    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7024      # On all platforms except MacOSX replace x86_64 with amd64.
7025      OPENJDK_TARGET_CPU_LEGACY="amd64"
7026    fi
7027
7028
7029    # And the second legacy naming of the cpu.
7030    # Ie i386 and amd64 instead of x86 and x86_64.
7031    OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
7032    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7033      OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
7034    elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7035      OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
7036    fi
7037
7038
7039    # This is the name of the cpu (but using i386 and amd64 instead of
7040    # x86 and x86_64, respectively), preceeded by a /, to be used when
7041    # locating libraries. On macosx, it's empty, though.
7042    OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
7043    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
7044        OPENJDK_TARGET_CPU_LIBDIR=""
7045    fi
7046
7047
7048    # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
7049    # /amd64 or /sparcv9. This string is appended to some library paths, like this:
7050    # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
7051    OPENJDK_TARGET_CPU_ISADIR=""
7052    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7053      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7054          OPENJDK_TARGET_CPU_ISADIR="/amd64"
7055      elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
7056          OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
7057      fi
7058    fi
7059
7060
7061    # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
7062    OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
7063    if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
7064      # On linux only, we replace x86 with i386.
7065      OPENJDK_TARGET_CPU_OSARCH="i386"
7066    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7067      # On all platforms except macosx, we replace x86_64 with amd64.
7068      OPENJDK_TARGET_CPU_OSARCH="amd64"
7069    fi
7070
7071
7072    OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
7073    if test "x$OPENJDK_TARGET_CPU" = xx86; then
7074      OPENJDK_TARGET_CPU_JLI="i386"
7075    elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
7076      # On all platforms except macosx, we replace x86_64 with amd64.
7077      OPENJDK_TARGET_CPU_JLI="amd64"
7078    fi
7079    # Now setup the -D flags for building libjli.
7080    OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
7081    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
7082      if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
7083        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
7084      elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
7085        OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
7086      fi
7087    fi
7088
7089
7090    # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
7091    if test "x$OPENJDK_TARGET_OS_API" = xposix; then
7092        OPENJDK_TARGET_OS_API_DIR="solaris"
7093    fi
7094    if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
7095        OPENJDK_TARGET_OS_API_DIR="windows"
7096    fi
7097
7098
7099    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7100        A_LP64="LP64:="
7101        # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7102        # unpack200.exe
7103        if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7104            ADD_LP64="-D_LP64=1"
7105        fi
7106    fi
7107    LP64=$A_LP64
7108
7109
7110    if test "x$COMPILE_TYPE" = "xcross"; then
7111      # FIXME: ... or should this include reduced builds..?
7112      DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7113    else
7114      DEFINE_CROSS_COMPILE_ARCH=""
7115    fi
7116
7117
7118    # ZERO_ARCHDEF is used to enable architecture-specific code
7119    case "${OPENJDK_TARGET_CPU}" in
7120      ppc*)    ZERO_ARCHDEF=PPC   ;;
7121      s390*)   ZERO_ARCHDEF=S390  ;;
7122      sparc*)  ZERO_ARCHDEF=SPARC ;;
7123      x86_64*) ZERO_ARCHDEF=AMD64 ;;
7124      x86)     ZERO_ARCHDEF=IA32  ;;
7125      *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7126    esac
7127
7128
7129
7130
7131
7132# Continue setting up basic stuff. Most remaining code require fundamental tools.
7133
7134# Locate the directory of this script.
7135SCRIPT="$0"
7136
7137    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7138        # Follow a chain of symbolic links. Use readlink
7139        # where it exists, else fall back to horribly
7140        # complicated shell code.
7141        if test "x$READLINK_TESTED" != yes; then
7142            # On MacOSX there is a readlink tool with a different
7143            # purpose than the GNU readlink tool. Check the found readlink.
7144            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7145            if test "x$ISGNU" = x; then
7146                 # A readlink that we do not know how to use.
7147                 # Are there other non-GNU readlinks out there?
7148                 READLINK_TESTED=yes
7149                 READLINK=
7150            fi
7151        fi
7152
7153        if test "x$READLINK" != x; then
7154            SCRIPT=`$READLINK -f $SCRIPT`
7155        else
7156            # Save the current directory for restoring afterwards
7157            STARTDIR=$PWD
7158            COUNTER=0
7159            sym_link_dir=`$DIRNAME $SCRIPT`
7160            sym_link_file=`$BASENAME $SCRIPT`
7161            # Use the system pwd and not the shell builtin to resolve directory symlinks
7162            cd $sym_link_dir
7163            cd `$THEPWDCMD`
7164            sym_link_dir=`$THEPWDCMD`
7165            # Resolve file symlinks
7166            while test $COUNTER -lt 20; do
7167                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7168                if test "x$ISLINK" == x; then
7169                    # This is not a symbolic link! We are done!
7170                    break
7171                fi
7172                # Again resolve directory symlinks since the target of the just found
7173                # link could be in a different directory
7174                cd `$DIRNAME $ISLINK`
7175                sym_link_dir=`$THEPWDCMD`
7176                sym_link_file=`$BASENAME $ISLINK`
7177                let COUNTER=COUNTER+1
7178            done
7179            cd $STARTDIR
7180            SCRIPT=$sym_link_dir/$sym_link_file
7181        fi
7182    fi
7183
7184AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
7185
7186# Where is the source? It is located two levels above the configure script.
7187CURDIR="$PWD"
7188cd "$AUTOCONF_DIR/../.."
7189SRC_ROOT="`$THEPWDCMD`"
7190
7191if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
7192  PATH_SEP=";"
7193
7194  SRC_ROOT_LENGTH=`$THEPWDCMD|$WC -m`
7195  if test $SRC_ROOT_LENGTH -gt 100; then
7196      as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
7197  fi
7198
7199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7200    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
7201$as_echo_n "checking cygwin release... " >&6; }
7202    CYGWIN_VERSION=`$UNAME -r`
7203    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
7204$as_echo "$CYGWIN_VERSION" >&6; }
7205    WINDOWS_ENV_VENDOR='cygwin'
7206    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
7207
7208    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
7209    if test "x$CYGWIN_VERSION_OK" = x; then
7210      { $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
7211$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;}
7212      as_fn_error $? "Cannot continue" "$LINENO" 5
7213    fi
7214    if test "x$CYGPATH" = x; then
7215        as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
7216    fi
7217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
7218$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7219    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7220    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7221    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
7222    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
7223    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
7224$as_echo "$CYGWIN_ROOT_PATH" >&6; }
7225    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
7226    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
7227    if test "x$test_cygdrive_prefix" = x; then
7228        as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
7229    fi
7230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
7232$as_echo_n "checking msys release... " >&6; }
7233    MSYS_VERSION=`$UNAME -r`
7234    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
7235$as_echo "$MSYS_VERSION" >&6; }
7236
7237    WINDOWS_ENV_VENDOR='msys'
7238    WINDOWS_ENV_VERSION="$MSYS_VERSION"
7239
7240    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
7241$as_echo_n "checking msys root directory as unix-style path... " >&6; }
7242    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7243    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
7244
7245  windows_path="$MSYS_ROOT_PATH"
7246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7247    unix_path=`$CYGPATH -u "$windows_path"`
7248    MSYS_ROOT_PATH="$unix_path"
7249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7251    MSYS_ROOT_PATH="$unix_path"
7252  fi
7253
7254    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
7255$as_echo "$MSYS_ROOT_PATH" >&6; }
7256    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
7257  else
7258    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
7259  fi
7260
7261  # Test if windows or unix (cygwin/msys) find is first in path.
7262  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
7263$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
7264  FIND_BINARY_OUTPUT=`find --version 2>&1`
7265  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
7266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
7267$as_echo "unix style" >&6; }
7268  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
7269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
7270$as_echo "Windows" >&6; }
7271    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
7272$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
7273    { $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
7274$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
7275    as_fn_error $? "Cannot continue" "$LINENO" 5
7276  else
7277    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
7278$as_echo "unknown" >&6; }
7279    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
7280$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
7281  fi
7282
7283else
7284  PATH_SEP=":"
7285fi
7286
7287
7288
7289cd "$CURDIR"
7290
7291
7292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7293
7294  # Input might be given as Windows format, start by converting to
7295  # unix format.
7296  path="$SRC_ROOT"
7297  new_path=`$CYGPATH -u "$path"`
7298
7299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7302  # "foo.exe" is OK but "foo" is an error.
7303  #
7304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7305  # It is also a way to make sure we got the proper file name for the real test later on.
7306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7307  if test "x$test_shortpath" = x; then
7308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7309$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7310    as_fn_error $? "Cannot locate the the path of SRC_ROOT" "$LINENO" 5
7311  fi
7312
7313  # Call helper function which possibly converts this using DOS-style short mode.
7314  # If so, the updated path is stored in $new_path.
7315
7316  input_path="$new_path"
7317  # Check if we need to convert this using DOS-style short mode. If the path
7318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7319  # take no chances and rewrite it.
7320  # Note: m4 eats our [], so we need to use [ and ] instead.
7321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7322  if test "x$has_forbidden_chars" != x; then
7323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7327      # Going to short mode and back again did indeed matter. Since short mode is
7328      # case insensitive, let's make it lowercase to improve readability.
7329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7330      # Now convert it back to Unix-stile (cygpath)
7331      input_path=`$CYGPATH -u "$shortmode_path"`
7332      new_path="$input_path"
7333    fi
7334  fi
7335
7336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7337  if test "x$test_cygdrive_prefix" = x; then
7338    # As a simple fix, exclude /usr/bin since it's not a real path.
7339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7341      # a path prefixed by /cygdrive for fixpath to work.
7342      new_path="$CYGWIN_ROOT_PATH$input_path"
7343    fi
7344  fi
7345
7346
7347  if test "x$path" != "x$new_path"; then
7348    SRC_ROOT="$new_path"
7349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7350$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7351  fi
7352
7353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7354
7355  path="$SRC_ROOT"
7356  has_colon=`$ECHO $path | $GREP ^.:`
7357  new_path="$path"
7358  if test "x$has_colon" = x; then
7359    # Not in mixed or Windows style, start by that.
7360    new_path=`cmd //c echo $path`
7361  fi
7362
7363
7364  input_path="$new_path"
7365  # Check if we need to convert this using DOS-style short mode. If the path
7366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7367  # take no chances and rewrite it.
7368  # Note: m4 eats our [], so we need to use [ and ] instead.
7369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7370  if test "x$has_forbidden_chars" != x; then
7371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7373  fi
7374
7375
7376  windows_path="$new_path"
7377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7378    unix_path=`$CYGPATH -u "$windows_path"`
7379    new_path="$unix_path"
7380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7382    new_path="$unix_path"
7383  fi
7384
7385  if test "x$path" != "x$new_path"; then
7386    SRC_ROOT="$new_path"
7387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting SRC_ROOT to \"$new_path\"" >&5
7388$as_echo "$as_me: Rewriting SRC_ROOT to \"$new_path\"" >&6;}
7389  fi
7390
7391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7393
7394  else
7395    # We're on a posix platform. Hooray! :)
7396    path="$SRC_ROOT"
7397    has_space=`$ECHO "$path" | $GREP " "`
7398    if test "x$has_space" != x; then
7399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&5
7400$as_echo "$as_me: The path of SRC_ROOT, which resolves as \"$path\", is invalid." >&6;}
7401      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7402    fi
7403
7404    # Use eval to expand a potential ~
7405    eval path="$path"
7406    if test ! -f "$path" && test ! -d "$path"; then
7407      as_fn_error $? "The path of SRC_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
7408    fi
7409
7410    SRC_ROOT="`cd "$path"; $THEPWDCMD`"
7411  fi
7412
7413
7414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7415
7416  # Input might be given as Windows format, start by converting to
7417  # unix format.
7418  path="$CURDIR"
7419  new_path=`$CYGPATH -u "$path"`
7420
7421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
7422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
7423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
7424  # "foo.exe" is OK but "foo" is an error.
7425  #
7426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
7427  # It is also a way to make sure we got the proper file name for the real test later on.
7428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
7429  if test "x$test_shortpath" = x; then
7430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7431$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7432    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
7433  fi
7434
7435  # Call helper function which possibly converts this using DOS-style short mode.
7436  # If so, the updated path is stored in $new_path.
7437
7438  input_path="$new_path"
7439  # Check if we need to convert this using DOS-style short mode. If the path
7440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7441  # take no chances and rewrite it.
7442  # Note: m4 eats our [], so we need to use [ and ] instead.
7443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
7444  if test "x$has_forbidden_chars" != x; then
7445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
7447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
7448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
7449      # Going to short mode and back again did indeed matter. Since short mode is
7450      # case insensitive, let's make it lowercase to improve readability.
7451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7452      # Now convert it back to Unix-stile (cygpath)
7453      input_path=`$CYGPATH -u "$shortmode_path"`
7454      new_path="$input_path"
7455    fi
7456  fi
7457
7458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
7459  if test "x$test_cygdrive_prefix" = x; then
7460    # As a simple fix, exclude /usr/bin since it's not a real path.
7461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
7462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
7463      # a path prefixed by /cygdrive for fixpath to work.
7464      new_path="$CYGWIN_ROOT_PATH$input_path"
7465    fi
7466  fi
7467
7468
7469  if test "x$path" != "x$new_path"; then
7470    CURDIR="$new_path"
7471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7472$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7473  fi
7474
7475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7476
7477  path="$CURDIR"
7478  has_colon=`$ECHO $path | $GREP ^.:`
7479  new_path="$path"
7480  if test "x$has_colon" = x; then
7481    # Not in mixed or Windows style, start by that.
7482    new_path=`cmd //c echo $path`
7483  fi
7484
7485
7486  input_path="$new_path"
7487  # Check if we need to convert this using DOS-style short mode. If the path
7488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
7489  # take no chances and rewrite it.
7490  # Note: m4 eats our [], so we need to use [ and ] instead.
7491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
7492  if test "x$has_forbidden_chars" != x; then
7493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
7494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
7495  fi
7496
7497
7498  windows_path="$new_path"
7499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
7500    unix_path=`$CYGPATH -u "$windows_path"`
7501    new_path="$unix_path"
7502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
7503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
7504    new_path="$unix_path"
7505  fi
7506
7507  if test "x$path" != "x$new_path"; then
7508    CURDIR="$new_path"
7509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
7510$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
7511  fi
7512
7513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
7514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
7515
7516  else
7517    # We're on a posix platform. Hooray! :)
7518    path="$CURDIR"
7519    has_space=`$ECHO "$path" | $GREP " "`
7520    if test "x$has_space" != x; then
7521      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
7522$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
7523      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
7524    fi
7525
7526    # Use eval to expand a potential ~
7527    eval path="$path"
7528    if test ! -f "$path" && test ! -d "$path"; then
7529      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
7530    fi
7531
7532    CURDIR="`cd "$path"; $THEPWDCMD`"
7533  fi
7534
7535
7536if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
7537    # Add extra search paths on solaris for utilities like ar and as etc...
7538    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
7539fi
7540
7541# You can force the sys-root if the sys-root encoded into the cross compiler tools
7542# is not correct.
7543
7544# Check whether --with-sys-root was given.
7545if test "${with_sys_root+set}" = set; then :
7546  withval=$with_sys_root;
7547fi
7548
7549
7550if test "x$with_sys_root" != x; then
7551  SYS_ROOT=$with_sys_root
7552else
7553  SYS_ROOT=/
7554fi
7555
7556
7557
7558# Check whether --with-tools-dir was given.
7559if test "${with_tools_dir+set}" = set; then :
7560  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
7561fi
7562
7563
7564
7565# Check whether --with-devkit was given.
7566if test "${with_devkit+set}" = set; then :
7567  withval=$with_devkit;
7568    if test "x$with_sys_root" != x; then
7569      as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
7570    fi
7571    if test "x$with_tools_dir" != x; then
7572      as_fn_error $? "Cannot specify both --with-devkit and --with-tools-dir at the same time" "$LINENO" 5
7573    fi
7574    TOOLS_DIR=$with_devkit/bin
7575    SYS_ROOT=$with_devkit/$host_alias/libc
7576
7577fi
7578
7579
7580
7581
7582# Setup default logging of stdout and stderr to build.log in the output root.
7583BUILD_LOG='$(OUTPUT_ROOT)/build.log'
7584BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
7585BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
7586
7587
7588
7589
7590
7591# Check if it's a pure open build or if custom sources are to be used.
7592
7593  # Check whether --enable-openjdk-only was given.
7594if test "${enable_openjdk_only+set}" = set; then :
7595  enableval=$enable_openjdk_only;
7596else
7597  enable_openjdk_only="no"
7598fi
7599
7600
7601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
7602$as_echo_n "checking for presence of closed sources... " >&6; }
7603  if test -d "$SRC_ROOT/jdk/src/closed"; then
7604    CLOSED_SOURCE_PRESENT=yes
7605  else
7606    CLOSED_SOURCE_PRESENT=no
7607  fi
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
7609$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
7610
7611  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
7612$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
7613  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
7614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
7615$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
7616
7617  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
7618    OPENJDK=true
7619    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7620      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
7621$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
7622    fi
7623  else
7624    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
7625      OPENJDK=true
7626    else
7627      OPENJDK=false
7628    fi
7629  fi
7630
7631  if test "x$OPENJDK" = "xtrue"; then
7632    SET_OPENJDK="OPENJDK=true"
7633  fi
7634
7635
7636
7637
7638# These are needed to be able to create a configuration name (and thus the output directory)
7639
7640###############################################################################
7641#
7642# Check which variant of the JDK that we want to build.
7643# Currently we have:
7644#    normal:   standard edition
7645# but the custom make system may add other variants
7646#
7647# Effectively the JDK variant gives a name to a specific set of
7648# modules to compile into the JDK. In the future, these modules
7649# might even be Jigsaw modules.
7650#
7651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
7652$as_echo_n "checking which variant of the JDK to build... " >&6; }
7653
7654# Check whether --with-jdk-variant was given.
7655if test "${with_jdk_variant+set}" = set; then :
7656  withval=$with_jdk_variant;
7657fi
7658
7659
7660if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
7661    JDK_VARIANT="normal"
7662else
7663    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
7664fi
7665
7666
7667
7668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
7669$as_echo "$JDK_VARIANT" >&6; }
7670
7671
7672
7673###############################################################################
7674#
7675# Check which variants of the JVM that we want to build.
7676# Currently we have:
7677#    server: normal interpreter and a tiered C1/C2 compiler
7678#    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
7679#    minimal1: reduced form of client with optional VM services and features stripped out
7680#    kernel: kernel footprint JVM that passes the TCK without major performance problems,
7681#             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
7682#    zero: no machine code interpreter, no compiler
7683#    zeroshark: zero interpreter and shark/llvm compiler backend
7684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
7685$as_echo_n "checking which variants of the JVM to build... " >&6; }
7686
7687# Check whether --with-jvm-variants was given.
7688if test "${with_jvm_variants+set}" = set; then :
7689  withval=$with_jvm_variants;
7690fi
7691
7692
7693if test "x$with_jvm_variants" = x; then
7694     with_jvm_variants="server"
7695fi
7696
7697JVM_VARIANTS=",$with_jvm_variants,"
7698TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//'  -e 's/minimal1,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'`
7699
7700if test "x$TEST_VARIANTS" != "x,"; then
7701   as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark" "$LINENO" 5
7702fi
7703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
7704$as_echo "$with_jvm_variants" >&6; }
7705
7706JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
7707JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
7708JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
7709JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
7710JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
7711JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
7712
7713if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7714    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7715        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
7716    fi
7717fi
7718if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7719    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7720        as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
7721    fi
7722fi
7723if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7724    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7725        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
7726    fi
7727fi
7728
7729# Replace the commas with AND for use in the build directory name.
7730ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7731COUNT_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/'`
7732if test "x$COUNT_VARIANTS" != "x,1"; then
7733    BUILDING_MULTIPLE_JVM_VARIANTS=yes
7734else
7735    BUILDING_MULTIPLE_JVM_VARIANTS=no
7736fi
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746INCLUDE_SA=true
7747if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7748    INCLUDE_SA=false
7749fi
7750if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7751    INCLUDE_SA=false
7752fi
7753
7754
7755if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7756   MACOSX_UNIVERSAL="true"
7757fi
7758
7759
7760
7761
7762
7763###############################################################################
7764#
7765# Set the debug level
7766#    release: no debug information, all optimizations, no asserts.
7767#    fastdebug: debug information (-g), all optimizations, all asserts
7768#    slowdebug: debug information (-g), no optimizations, all asserts
7769#
7770DEBUG_LEVEL="release"
7771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7772$as_echo_n "checking which debug level to use... " >&6; }
7773# Check whether --enable-debug was given.
7774if test "${enable_debug+set}" = set; then :
7775  enableval=$enable_debug;
7776        ENABLE_DEBUG="${enableval}"
7777        DEBUG_LEVEL="fastdebug"
7778
7779else
7780  ENABLE_DEBUG="no"
7781fi
7782
7783
7784
7785# Check whether --with-debug-level was given.
7786if test "${with_debug_level+set}" = set; then :
7787  withval=$with_debug_level;
7788        DEBUG_LEVEL="${withval}"
7789        if test "x$ENABLE_DEBUG" = xyes; then
7790			as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
7791        fi
7792
7793fi
7794
7795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
7796$as_echo "$DEBUG_LEVEL" >&6; }
7797
7798if test "x$DEBUG_LEVEL" != xrelease && \
7799   test "x$DEBUG_LEVEL" != xfastdebug && \
7800   test "x$DEBUG_LEVEL" != xslowdebug; then
7801   as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
7802fi
7803
7804
7805###############################################################################
7806#
7807# Setup legacy vars/targets and new vars to deal with different debug levels.
7808#
7809
7810case $DEBUG_LEVEL in
7811      release )
7812          VARIANT="OPT"
7813          FASTDEBUG="false"
7814          DEBUG_CLASSFILES="false"
7815          BUILD_VARIANT_RELEASE=""
7816          HOTSPOT_DEBUG_LEVEL="product"
7817          HOTSPOT_EXPORT="product"
7818           ;;
7819      fastdebug )
7820          VARIANT="DBG"
7821          FASTDEBUG="true"
7822          DEBUG_CLASSFILES="true"
7823          BUILD_VARIANT_RELEASE="-fastdebug"
7824          HOTSPOT_DEBUG_LEVEL="fastdebug"
7825          HOTSPOT_EXPORT="fastdebug"
7826           ;;
7827      slowdebug )
7828          VARIANT="DBG"
7829          FASTDEBUG="false"
7830          DEBUG_CLASSFILES="true"
7831          BUILD_VARIANT_RELEASE="-debug"
7832          HOTSPOT_DEBUG_LEVEL="jvmg"
7833          HOTSPOT_EXPORT="debug"
7834           ;;
7835esac
7836
7837#####
7838# Generate the legacy makefile targets for hotspot.
7839# The hotspot api for selecting the build artifacts, really, needs to be improved.
7840# JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
7841# determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
7842# But until then ...
7843HOTSPOT_TARGET=""
7844
7845if test "x$JVM_VARIANT_SERVER" = xtrue; then
7846    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
7847fi
7848
7849if test "x$JVM_VARIANT_CLIENT" = xtrue; then
7850    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
7851fi
7852
7853if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
7854    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
7855fi
7856
7857if test "x$JVM_VARIANT_KERNEL" = xtrue; then
7858    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
7859fi
7860
7861if test "x$JVM_VARIANT_ZERO" = xtrue; then
7862    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
7863fi
7864
7865if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
7866    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
7867fi
7868
7869HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
7870
7871# On Macosx universal binaries are produced, but they only contain
7872# 64 bit intel. This invalidates control of which jvms are built
7873# from configure, but only server is valid anyway. Fix this
7874# when hotspot makefiles are rewritten.
7875if test "x$MACOSX_UNIVERSAL" = xtrue; then
7876    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
7877fi
7878
7879#####
7880
7881
7882
7883
7884
7885
7886
7887
7888# With basic setup done, call the custom early hook.
7889
7890
7891# To properly create a configuration name, we need to have the OpenJDK target
7892# and options (variants and debug level) parsed.
7893
7894
7895
7896# Check whether --with-conf-name was given.
7897if test "${with_conf_name+set}" = set; then :
7898  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
7899fi
7900
7901
7902# Test from where we are running configure, in or outside of src root.
7903# To enable comparison of directories, CURDIR needs to be symlink free
7904# just like SRC_ROOT already is
7905NOSYM_CURDIR="$CURDIR"
7906
7907    if test "x$OPENJDK_BUILD_OS" != xwindows; then
7908        # Follow a chain of symbolic links. Use readlink
7909        # where it exists, else fall back to horribly
7910        # complicated shell code.
7911        if test "x$READLINK_TESTED" != yes; then
7912            # On MacOSX there is a readlink tool with a different
7913            # purpose than the GNU readlink tool. Check the found readlink.
7914            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7915            if test "x$ISGNU" = x; then
7916                 # A readlink that we do not know how to use.
7917                 # Are there other non-GNU readlinks out there?
7918                 READLINK_TESTED=yes
7919                 READLINK=
7920            fi
7921        fi
7922
7923        if test "x$READLINK" != x; then
7924            NOSYM_CURDIR=`$READLINK -f $NOSYM_CURDIR`
7925        else
7926            # Save the current directory for restoring afterwards
7927            STARTDIR=$PWD
7928            COUNTER=0
7929            sym_link_dir=`$DIRNAME $NOSYM_CURDIR`
7930            sym_link_file=`$BASENAME $NOSYM_CURDIR`
7931            # Use the system pwd and not the shell builtin to resolve directory symlinks
7932            cd $sym_link_dir
7933            cd `$THEPWDCMD`
7934            sym_link_dir=`$THEPWDCMD`
7935            # Resolve file symlinks
7936            while test $COUNTER -lt 20; do
7937                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
7938                if test "x$ISLINK" == x; then
7939                    # This is not a symbolic link! We are done!
7940                    break
7941                fi
7942                # Again resolve directory symlinks since the target of the just found
7943                # link could be in a different directory
7944                cd `$DIRNAME $ISLINK`
7945                sym_link_dir=`$THEPWDCMD`
7946                sym_link_file=`$BASENAME $ISLINK`
7947                let COUNTER=COUNTER+1
7948            done
7949            cd $STARTDIR
7950            NOSYM_CURDIR=$sym_link_dir/$sym_link_file
7951        fi
7952    fi
7953
7954if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
7955        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
7956        || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
7957    # We are running configure from the src root.
7958    # Create a default ./build/target-variant-debuglevel output root.
7959    if test "x${CONF_NAME}" = x; then
7960        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
7961    fi
7962    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
7963    $MKDIR -p "$OUTPUT_ROOT"
7964    if test ! -d "$OUTPUT_ROOT"; then
7965        as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
7966    fi
7967else
7968    # We are running configure from outside of the src dir.
7969    # Then use the current directory as output dir!
7970    # If configuration is situated in normal build directory, just use the build
7971    # directory name as configuration name, otherwise use the complete path.
7972    if test "x${CONF_NAME}" = x; then
7973        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
7974    fi
7975    OUTPUT_ROOT="$CURDIR"
7976
7977    # WARNING: This might be a bad thing to do. You need to be sure you want to
7978    # have a configuration in this directory. Do some sanity checks!
7979
7980    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
7981      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
7982      # other files
7983      files_present=`$LS $OUTPUT_ROOT`
7984      # Configure has already touched config.log and confdefs.h in the current dir when this check
7985      # is performed.
7986      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
7987                                             | $TR -d '\n'`
7988      if test "x$filtered_files" != x; then
7989        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
7990$as_echo "$as_me: Current directory is $CURDIR." >&6;}
7991        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
7992$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
7993        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
7994$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
7995        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
7996$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
7997        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
7998$as_echo "$as_me: seriously mess up just about everything." >&6;}
7999        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
8000$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
8001        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
8002$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
8003        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
8004      fi
8005    fi
8006fi
8007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
8008$as_echo_n "checking what configuration name to use... " >&6; }
8009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
8010$as_echo "$CONF_NAME" >&6; }
8011
8012
8013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8014
8015  # Input might be given as Windows format, start by converting to
8016  # unix format.
8017  path="$OUTPUT_ROOT"
8018  new_path=`$CYGPATH -u "$path"`
8019
8020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8023  # "foo.exe" is OK but "foo" is an error.
8024  #
8025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8026  # It is also a way to make sure we got the proper file name for the real test later on.
8027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8028  if test "x$test_shortpath" = x; then
8029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8030$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8031    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
8032  fi
8033
8034  # Call helper function which possibly converts this using DOS-style short mode.
8035  # If so, the updated path is stored in $new_path.
8036
8037  input_path="$new_path"
8038  # Check if we need to convert this using DOS-style short mode. If the path
8039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8040  # take no chances and rewrite it.
8041  # Note: m4 eats our [], so we need to use [ and ] instead.
8042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8043  if test "x$has_forbidden_chars" != x; then
8044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8048      # Going to short mode and back again did indeed matter. Since short mode is
8049      # case insensitive, let's make it lowercase to improve readability.
8050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8051      # Now convert it back to Unix-stile (cygpath)
8052      input_path=`$CYGPATH -u "$shortmode_path"`
8053      new_path="$input_path"
8054    fi
8055  fi
8056
8057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8058  if test "x$test_cygdrive_prefix" = x; then
8059    # As a simple fix, exclude /usr/bin since it's not a real path.
8060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
8061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8062      # a path prefixed by /cygdrive for fixpath to work.
8063      new_path="$CYGWIN_ROOT_PATH$input_path"
8064    fi
8065  fi
8066
8067
8068  if test "x$path" != "x$new_path"; then
8069    OUTPUT_ROOT="$new_path"
8070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8071$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8072  fi
8073
8074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8075
8076  path="$OUTPUT_ROOT"
8077  has_colon=`$ECHO $path | $GREP ^.:`
8078  new_path="$path"
8079  if test "x$has_colon" = x; then
8080    # Not in mixed or Windows style, start by that.
8081    new_path=`cmd //c echo $path`
8082  fi
8083
8084
8085  input_path="$new_path"
8086  # Check if we need to convert this using DOS-style short mode. If the path
8087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8088  # take no chances and rewrite it.
8089  # Note: m4 eats our [], so we need to use [ and ] instead.
8090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8091  if test "x$has_forbidden_chars" != x; then
8092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8094  fi
8095
8096
8097  windows_path="$new_path"
8098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8099    unix_path=`$CYGPATH -u "$windows_path"`
8100    new_path="$unix_path"
8101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8103    new_path="$unix_path"
8104  fi
8105
8106  if test "x$path" != "x$new_path"; then
8107    OUTPUT_ROOT="$new_path"
8108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
8109$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
8110  fi
8111
8112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
8113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8114
8115  else
8116    # We're on a posix platform. Hooray! :)
8117    path="$OUTPUT_ROOT"
8118    has_space=`$ECHO "$path" | $GREP " "`
8119    if test "x$has_space" != x; then
8120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
8121$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
8122      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
8123    fi
8124
8125    # Use eval to expand a potential ~
8126    eval path="$path"
8127    if test ! -f "$path" && test ! -d "$path"; then
8128      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
8129    fi
8130
8131    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD`"
8132  fi
8133
8134
8135SPEC=$OUTPUT_ROOT/spec.gmk
8136
8137CONF_NAME=$CONF_NAME
8138
8139OUTPUT_ROOT=$OUTPUT_ROOT
8140
8141
8142# Most of the probed defines are put into config.h
8143ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
8144
8145# The spec.gmk file contains all variables for the make system.
8146ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
8147
8148# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
8149ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
8150
8151# The bootcycle-spec.gmk file contains support for boot cycle builds.
8152ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
8153
8154# The compare.sh is used to compare the build output to other builds.
8155ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
8156
8157# Spec.sh is currently used by compare-objects.sh
8158ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
8159
8160# The generated Makefile knows where the spec.gmk is and where the source is.
8161# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
8162# which will look for generated configurations
8163ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
8164
8165
8166# Save the arguments given to us
8167echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
8168
8169
8170# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
8171
8172    for ac_prog in apt-get yum port pkgutil pkgadd
8173do
8174  # Extract the first word of "$ac_prog", so it can be a program name with args.
8175set dummy $ac_prog; ac_word=$2
8176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8177$as_echo_n "checking for $ac_word... " >&6; }
8178if test "${ac_cv_prog_PKGHANDLER+set}" = set; then :
8179  $as_echo_n "(cached) " >&6
8180else
8181  if test -n "$PKGHANDLER"; then
8182  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
8183else
8184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8185for as_dir in $PATH
8186do
8187  IFS=$as_save_IFS
8188  test -z "$as_dir" && as_dir=.
8189    for ac_exec_ext in '' $ac_executable_extensions; do
8190  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8191    ac_cv_prog_PKGHANDLER="$ac_prog"
8192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8193    break 2
8194  fi
8195done
8196  done
8197IFS=$as_save_IFS
8198
8199fi
8200fi
8201PKGHANDLER=$ac_cv_prog_PKGHANDLER
8202if test -n "$PKGHANDLER"; then
8203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
8204$as_echo "$PKGHANDLER" >&6; }
8205else
8206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8207$as_echo "no" >&6; }
8208fi
8209
8210
8211  test -n "$PKGHANDLER" && break
8212done
8213
8214
8215
8216# Setup tools that requires more complex handling, or that is not needed by the configure script.
8217
8218
8219  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
8220  if test "x$MAKE" != x; then
8221    # User has supplied a make, test it.
8222    if test ! -f "$MAKE"; then
8223      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
8224    fi
8225
8226  MAKE_CANDIDATE=""$MAKE""
8227  DESCRIPTION="user supplied MAKE=$MAKE"
8228  if test "x$MAKE_CANDIDATE" != x; then
8229    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8230$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8231    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8232    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8233    if test "x$IS_GNU_MAKE" = x; then
8234      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8235$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8236    else
8237      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8238      if test "x$IS_MODERN_MAKE" = x; then
8239        { $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
8240$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;}
8241      else
8242        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8243          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8244            MAKE_EXPECTED_ENV='cygwin'
8245          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8246            MAKE_EXPECTED_ENV='msys'
8247          else
8248            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8249          fi
8250          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8251          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8252        else
8253          # Not relevant for non-Windows
8254          IS_MAKE_CORRECT_ENV=true
8255        fi
8256        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8257          { $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
8258$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;}
8259        else
8260          FOUND_MAKE=$MAKE_CANDIDATE
8261
8262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8263
8264  # First separate the path from the arguments. This will split at the first
8265  # space.
8266  complete="$FOUND_MAKE"
8267  path="${complete%% *}"
8268  tmp="$complete EOL"
8269  arguments="${tmp#* }"
8270
8271  # Input might be given as Windows format, start by converting to
8272  # unix format.
8273  new_path=`$CYGPATH -u "$path"`
8274
8275  # Now try to locate executable using which
8276  new_path=`$WHICH "$new_path" 2> /dev/null`
8277  # bat and cmd files are not always considered executable in cygwin causing which
8278  # to not find them
8279  if test "x$new_path" = x \
8280           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8281           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8282    new_path=`$CYGPATH -u "$path"`
8283  fi
8284  if test "x$new_path" = x; then
8285    # Oops. Which didn't find the executable.
8286    # The splitting of arguments from the executable at a space might have been incorrect,
8287    # since paths with space are more likely in Windows. Give it another try with the whole
8288    # argument.
8289    path="$complete"
8290    arguments="EOL"
8291    new_path=`$CYGPATH -u "$path"`
8292    new_path=`$WHICH "$new_path" 2> /dev/null`
8293    # bat and cmd files are not always considered executable in cygwin causing which
8294    # to not find them
8295    if test "x$new_path" = x \
8296             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8297             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8298      new_path=`$CYGPATH -u "$path"`
8299    fi
8300    if test "x$new_path" = x; then
8301      # It's still not found. Now this is an unrecoverable error.
8302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8303$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8304      has_space=`$ECHO "$complete" | $GREP " "`
8305      if test "x$has_space" != x; then
8306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8308      fi
8309      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8310    fi
8311  fi
8312
8313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8316  # "foo.exe" is OK but "foo" is an error.
8317  #
8318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8319  # It is also a way to make sure we got the proper file name for the real test later on.
8320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8321  if test "x$test_shortpath" = x; then
8322    # Short path failed, file does not exist as specified.
8323    # Try adding .exe or .cmd
8324    if test -f "${new_path}.exe"; then
8325       input_to_shortpath="${new_path}.exe"
8326    elif test -f "${new_path}.cmd"; then
8327       input_to_shortpath="${new_path}.cmd"
8328    else
8329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8330$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8333      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8334    fi
8335  else
8336    input_to_shortpath="$new_path"
8337  fi
8338
8339  # Call helper function which possibly converts this using DOS-style short mode.
8340  # If so, the updated path is stored in $new_path.
8341  new_path="$input_to_shortpath"
8342
8343  input_path="$input_to_shortpath"
8344  # Check if we need to convert this using DOS-style short mode. If the path
8345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8346  # take no chances and rewrite it.
8347  # Note: m4 eats our [], so we need to use [ and ] instead.
8348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8349  if test "x$has_forbidden_chars" != x; then
8350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8354      # Going to short mode and back again did indeed matter. Since short mode is
8355      # case insensitive, let's make it lowercase to improve readability.
8356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8357      # Now convert it back to Unix-stile (cygpath)
8358      input_path=`$CYGPATH -u "$shortmode_path"`
8359      new_path="$input_path"
8360    fi
8361  fi
8362
8363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8364  if test "x$test_cygdrive_prefix" = x; then
8365    # As a simple fix, exclude /usr/bin since it's not a real path.
8366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8368      # a path prefixed by /cygdrive for fixpath to work.
8369      new_path="$CYGWIN_ROOT_PATH$input_path"
8370    fi
8371  fi
8372
8373  # remove trailing .exe if any
8374  new_path="${new_path/%.exe/}"
8375
8376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8377
8378  # First separate the path from the arguments. This will split at the first
8379  # space.
8380  complete="$FOUND_MAKE"
8381  path="${complete%% *}"
8382  tmp="$complete EOL"
8383  arguments="${tmp#* }"
8384
8385  # Input might be given as Windows format, start by converting to
8386  # unix format.
8387  new_path="$path"
8388
8389  windows_path="$new_path"
8390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8391    unix_path=`$CYGPATH -u "$windows_path"`
8392    new_path="$unix_path"
8393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8395    new_path="$unix_path"
8396  fi
8397
8398
8399  # Now try to locate executable using which
8400  new_path=`$WHICH "$new_path" 2> /dev/null`
8401
8402  if test "x$new_path" = x; then
8403    # Oops. Which didn't find the executable.
8404    # The splitting of arguments from the executable at a space might have been incorrect,
8405    # since paths with space are more likely in Windows. Give it another try with the whole
8406    # argument.
8407    path="$complete"
8408    arguments="EOL"
8409    new_path="$path"
8410
8411  windows_path="$new_path"
8412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8413    unix_path=`$CYGPATH -u "$windows_path"`
8414    new_path="$unix_path"
8415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8417    new_path="$unix_path"
8418  fi
8419
8420
8421    new_path=`$WHICH "$new_path" 2> /dev/null`
8422
8423    if test "x$new_path" = x; then
8424      # It's still not found. Now this is an unrecoverable error.
8425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8426$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8427      has_space=`$ECHO "$complete" | $GREP " "`
8428      if test "x$has_space" != x; then
8429        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8430$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8431      fi
8432      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8433    fi
8434  fi
8435
8436  # Now new_path has a complete unix path to the binary
8437  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8438    # Keep paths in /bin as-is, but remove trailing .exe if any
8439    new_path="${new_path/%.exe/}"
8440    # Do not save /bin paths to all_fixpath_prefixes!
8441  else
8442    # Not in mixed or Windows style, start by that.
8443    new_path=`cmd //c echo $new_path`
8444
8445  input_path="$new_path"
8446  # Check if we need to convert this using DOS-style short mode. If the path
8447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8448  # take no chances and rewrite it.
8449  # Note: m4 eats our [], so we need to use [ and ] instead.
8450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8451  if test "x$has_forbidden_chars" != x; then
8452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8454  fi
8455
8456    # Output is in $new_path
8457
8458  windows_path="$new_path"
8459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8460    unix_path=`$CYGPATH -u "$windows_path"`
8461    new_path="$unix_path"
8462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8464    new_path="$unix_path"
8465  fi
8466
8467    # remove trailing .exe if any
8468    new_path="${new_path/%.exe/}"
8469
8470    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8471    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8472  fi
8473
8474  else
8475    # We're on a posix platform. Hooray! :)
8476    # First separate the path from the arguments. This will split at the first
8477    # space.
8478    complete="$FOUND_MAKE"
8479    path="${complete%% *}"
8480    tmp="$complete EOL"
8481    arguments="${tmp#* }"
8482
8483    # Cannot rely on the command "which" here since it doesn't always work.
8484    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8485    if test -z "$is_absolute_path"; then
8486      # Path to executable is not absolute. Find it.
8487      IFS_save="$IFS"
8488      IFS=:
8489      for p in $PATH; do
8490        if test -f "$p/$path" && test -x "$p/$path"; then
8491          new_path="$p/$path"
8492          break
8493        fi
8494      done
8495      IFS="$IFS_save"
8496    else
8497      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8498$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8499      new_path="$path"
8500    fi
8501
8502    if test "x$new_path" = x; then
8503        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8504$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8505        has_space=`$ECHO "$complete" | $GREP " "`
8506        if test "x$has_space" != x; then
8507          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8508$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8509        fi
8510        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8511      fi
8512  fi
8513
8514      # Now join together the path and the arguments once again
8515      if test "x$arguments" != xEOL; then
8516        new_complete="$new_path ${arguments% *}"
8517      else
8518        new_complete="$new_path"
8519      fi
8520
8521  if test "x$complete" != "x$new_complete"; then
8522      FOUND_MAKE="$new_complete"
8523      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8524$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8525    fi
8526
8527        fi
8528      fi
8529    fi
8530  fi
8531
8532    if test "x$FOUND_MAKE" = x; then
8533      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
8534    fi
8535  else
8536    # Try our hardest to locate a correct version of GNU make
8537    for ac_prog in gmake
8538do
8539  # Extract the first word of "$ac_prog", so it can be a program name with args.
8540set dummy $ac_prog; ac_word=$2
8541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8542$as_echo_n "checking for $ac_word... " >&6; }
8543if test "${ac_cv_path_CHECK_GMAKE+set}" = set; then :
8544  $as_echo_n "(cached) " >&6
8545else
8546  case $CHECK_GMAKE in
8547  [\\/]* | ?:[\\/]*)
8548  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
8549  ;;
8550  *)
8551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8552for as_dir in $PATH
8553do
8554  IFS=$as_save_IFS
8555  test -z "$as_dir" && as_dir=.
8556    for ac_exec_ext in '' $ac_executable_extensions; do
8557  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8558    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
8559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8560    break 2
8561  fi
8562done
8563  done
8564IFS=$as_save_IFS
8565
8566  ;;
8567esac
8568fi
8569CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
8570if test -n "$CHECK_GMAKE"; then
8571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
8572$as_echo "$CHECK_GMAKE" >&6; }
8573else
8574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8575$as_echo "no" >&6; }
8576fi
8577
8578
8579  test -n "$CHECK_GMAKE" && break
8580done
8581
8582
8583  MAKE_CANDIDATE=""$CHECK_GMAKE""
8584  DESCRIPTION="gmake in PATH"
8585  if test "x$MAKE_CANDIDATE" != x; then
8586    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8587$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8588    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8589    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8590    if test "x$IS_GNU_MAKE" = x; then
8591      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8592$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8593    else
8594      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8595      if test "x$IS_MODERN_MAKE" = x; then
8596        { $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
8597$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;}
8598      else
8599        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8600          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8601            MAKE_EXPECTED_ENV='cygwin'
8602          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8603            MAKE_EXPECTED_ENV='msys'
8604          else
8605            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8606          fi
8607          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8608          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8609        else
8610          # Not relevant for non-Windows
8611          IS_MAKE_CORRECT_ENV=true
8612        fi
8613        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8614          { $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
8615$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;}
8616        else
8617          FOUND_MAKE=$MAKE_CANDIDATE
8618
8619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8620
8621  # First separate the path from the arguments. This will split at the first
8622  # space.
8623  complete="$FOUND_MAKE"
8624  path="${complete%% *}"
8625  tmp="$complete EOL"
8626  arguments="${tmp#* }"
8627
8628  # Input might be given as Windows format, start by converting to
8629  # unix format.
8630  new_path=`$CYGPATH -u "$path"`
8631
8632  # Now try to locate executable using which
8633  new_path=`$WHICH "$new_path" 2> /dev/null`
8634  # bat and cmd files are not always considered executable in cygwin causing which
8635  # to not find them
8636  if test "x$new_path" = x \
8637           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8638           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8639    new_path=`$CYGPATH -u "$path"`
8640  fi
8641  if test "x$new_path" = x; then
8642    # Oops. Which didn't find the executable.
8643    # The splitting of arguments from the executable at a space might have been incorrect,
8644    # since paths with space are more likely in Windows. Give it another try with the whole
8645    # argument.
8646    path="$complete"
8647    arguments="EOL"
8648    new_path=`$CYGPATH -u "$path"`
8649    new_path=`$WHICH "$new_path" 2> /dev/null`
8650    # bat and cmd files are not always considered executable in cygwin causing which
8651    # to not find them
8652    if test "x$new_path" = x \
8653             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8654             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8655      new_path=`$CYGPATH -u "$path"`
8656    fi
8657    if test "x$new_path" = x; then
8658      # It's still not found. Now this is an unrecoverable error.
8659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8660$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8661      has_space=`$ECHO "$complete" | $GREP " "`
8662      if test "x$has_space" != x; then
8663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8665      fi
8666      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8667    fi
8668  fi
8669
8670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
8671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
8672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
8673  # "foo.exe" is OK but "foo" is an error.
8674  #
8675  # This test is therefore slightly more accurate than "test -f" to check for file precense.
8676  # It is also a way to make sure we got the proper file name for the real test later on.
8677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
8678  if test "x$test_shortpath" = x; then
8679    # Short path failed, file does not exist as specified.
8680    # Try adding .exe or .cmd
8681    if test -f "${new_path}.exe"; then
8682       input_to_shortpath="${new_path}.exe"
8683    elif test -f "${new_path}.cmd"; then
8684       input_to_shortpath="${new_path}.cmd"
8685    else
8686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
8687$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
8688      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
8689$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
8690      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8691    fi
8692  else
8693    input_to_shortpath="$new_path"
8694  fi
8695
8696  # Call helper function which possibly converts this using DOS-style short mode.
8697  # If so, the updated path is stored in $new_path.
8698  new_path="$input_to_shortpath"
8699
8700  input_path="$input_to_shortpath"
8701  # Check if we need to convert this using DOS-style short mode. If the path
8702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8703  # take no chances and rewrite it.
8704  # Note: m4 eats our [], so we need to use [ and ] instead.
8705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
8706  if test "x$has_forbidden_chars" != x; then
8707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
8709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
8710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
8711      # Going to short mode and back again did indeed matter. Since short mode is
8712      # case insensitive, let's make it lowercase to improve readability.
8713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8714      # Now convert it back to Unix-stile (cygpath)
8715      input_path=`$CYGPATH -u "$shortmode_path"`
8716      new_path="$input_path"
8717    fi
8718  fi
8719
8720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
8721  if test "x$test_cygdrive_prefix" = x; then
8722    # As a simple fix, exclude /usr/bin since it's not a real path.
8723    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
8724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
8725      # a path prefixed by /cygdrive for fixpath to work.
8726      new_path="$CYGWIN_ROOT_PATH$input_path"
8727    fi
8728  fi
8729
8730  # remove trailing .exe if any
8731  new_path="${new_path/%.exe/}"
8732
8733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8734
8735  # First separate the path from the arguments. This will split at the first
8736  # space.
8737  complete="$FOUND_MAKE"
8738  path="${complete%% *}"
8739  tmp="$complete EOL"
8740  arguments="${tmp#* }"
8741
8742  # Input might be given as Windows format, start by converting to
8743  # unix format.
8744  new_path="$path"
8745
8746  windows_path="$new_path"
8747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8748    unix_path=`$CYGPATH -u "$windows_path"`
8749    new_path="$unix_path"
8750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8752    new_path="$unix_path"
8753  fi
8754
8755
8756  # Now try to locate executable using which
8757  new_path=`$WHICH "$new_path" 2> /dev/null`
8758
8759  if test "x$new_path" = x; then
8760    # Oops. Which didn't find the executable.
8761    # The splitting of arguments from the executable at a space might have been incorrect,
8762    # since paths with space are more likely in Windows. Give it another try with the whole
8763    # argument.
8764    path="$complete"
8765    arguments="EOL"
8766    new_path="$path"
8767
8768  windows_path="$new_path"
8769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8770    unix_path=`$CYGPATH -u "$windows_path"`
8771    new_path="$unix_path"
8772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8774    new_path="$unix_path"
8775  fi
8776
8777
8778    new_path=`$WHICH "$new_path" 2> /dev/null`
8779
8780    if test "x$new_path" = x; then
8781      # It's still not found. Now this is an unrecoverable error.
8782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8783$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8784      has_space=`$ECHO "$complete" | $GREP " "`
8785      if test "x$has_space" != x; then
8786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
8787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
8788      fi
8789      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8790    fi
8791  fi
8792
8793  # Now new_path has a complete unix path to the binary
8794  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
8795    # Keep paths in /bin as-is, but remove trailing .exe if any
8796    new_path="${new_path/%.exe/}"
8797    # Do not save /bin paths to all_fixpath_prefixes!
8798  else
8799    # Not in mixed or Windows style, start by that.
8800    new_path=`cmd //c echo $new_path`
8801
8802  input_path="$new_path"
8803  # Check if we need to convert this using DOS-style short mode. If the path
8804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
8805  # take no chances and rewrite it.
8806  # Note: m4 eats our [], so we need to use [ and ] instead.
8807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
8808  if test "x$has_forbidden_chars" != x; then
8809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
8810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
8811  fi
8812
8813    # Output is in $new_path
8814
8815  windows_path="$new_path"
8816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8817    unix_path=`$CYGPATH -u "$windows_path"`
8818    new_path="$unix_path"
8819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
8821    new_path="$unix_path"
8822  fi
8823
8824    # remove trailing .exe if any
8825    new_path="${new_path/%.exe/}"
8826
8827    # Save the first 10 bytes of this path to the storage, so fixpath can work.
8828    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
8829  fi
8830
8831  else
8832    # We're on a posix platform. Hooray! :)
8833    # First separate the path from the arguments. This will split at the first
8834    # space.
8835    complete="$FOUND_MAKE"
8836    path="${complete%% *}"
8837    tmp="$complete EOL"
8838    arguments="${tmp#* }"
8839
8840    # Cannot rely on the command "which" here since it doesn't always work.
8841    is_absolute_path=`$ECHO "$path" | $GREP ^/`
8842    if test -z "$is_absolute_path"; then
8843      # Path to executable is not absolute. Find it.
8844      IFS_save="$IFS"
8845      IFS=:
8846      for p in $PATH; do
8847        if test -f "$p/$path" && test -x "$p/$path"; then
8848          new_path="$p/$path"
8849          break
8850        fi
8851      done
8852      IFS="$IFS_save"
8853    else
8854      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
8855$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
8856      new_path="$path"
8857    fi
8858
8859    if test "x$new_path" = x; then
8860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
8861$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
8862        has_space=`$ECHO "$complete" | $GREP " "`
8863        if test "x$has_space" != x; then
8864          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
8865$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
8866        fi
8867        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
8868      fi
8869  fi
8870
8871      # Now join together the path and the arguments once again
8872      if test "x$arguments" != xEOL; then
8873        new_complete="$new_path ${arguments% *}"
8874      else
8875        new_complete="$new_path"
8876      fi
8877
8878  if test "x$complete" != "x$new_complete"; then
8879      FOUND_MAKE="$new_complete"
8880      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
8881$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
8882    fi
8883
8884        fi
8885      fi
8886    fi
8887  fi
8888
8889
8890    if test "x$FOUND_MAKE" = x; then
8891      for ac_prog in make
8892do
8893  # Extract the first word of "$ac_prog", so it can be a program name with args.
8894set dummy $ac_prog; ac_word=$2
8895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8896$as_echo_n "checking for $ac_word... " >&6; }
8897if test "${ac_cv_path_CHECK_MAKE+set}" = set; then :
8898  $as_echo_n "(cached) " >&6
8899else
8900  case $CHECK_MAKE in
8901  [\\/]* | ?:[\\/]*)
8902  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
8903  ;;
8904  *)
8905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8906for as_dir in $PATH
8907do
8908  IFS=$as_save_IFS
8909  test -z "$as_dir" && as_dir=.
8910    for ac_exec_ext in '' $ac_executable_extensions; do
8911  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8912    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
8913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8914    break 2
8915  fi
8916done
8917  done
8918IFS=$as_save_IFS
8919
8920  ;;
8921esac
8922fi
8923CHECK_MAKE=$ac_cv_path_CHECK_MAKE
8924if test -n "$CHECK_MAKE"; then
8925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
8926$as_echo "$CHECK_MAKE" >&6; }
8927else
8928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8929$as_echo "no" >&6; }
8930fi
8931
8932
8933  test -n "$CHECK_MAKE" && break
8934done
8935
8936
8937  MAKE_CANDIDATE=""$CHECK_MAKE""
8938  DESCRIPTION="make in PATH"
8939  if test "x$MAKE_CANDIDATE" != x; then
8940    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
8941$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
8942    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
8943    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
8944    if test "x$IS_GNU_MAKE" = x; then
8945      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
8946$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
8947    else
8948      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
8949      if test "x$IS_MODERN_MAKE" = x; then
8950        { $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
8951$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;}
8952      else
8953        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
8954          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8955            MAKE_EXPECTED_ENV='cygwin'
8956          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
8957            MAKE_EXPECTED_ENV='msys'
8958          else
8959            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
8960          fi
8961          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
8962          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
8963        else
8964          # Not relevant for non-Windows
8965          IS_MAKE_CORRECT_ENV=true
8966        fi
8967        if test "x$IS_MAKE_CORRECT_ENV" = x; then
8968          { $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
8969$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;}
8970        else
8971          FOUND_MAKE=$MAKE_CANDIDATE
8972
8973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
8974
8975  # First separate the path from the arguments. This will split at the first
8976  # space.
8977  complete="$FOUND_MAKE"
8978  path="${complete%% *}"
8979  tmp="$complete EOL"
8980  arguments="${tmp#* }"
8981
8982  # Input might be given as Windows format, start by converting to
8983  # unix format.
8984  new_path=`$CYGPATH -u "$path"`
8985
8986  # Now try to locate executable using which
8987  new_path=`$WHICH "$new_path" 2> /dev/null`
8988  # bat and cmd files are not always considered executable in cygwin causing which
8989  # to not find them
8990  if test "x$new_path" = x \
8991           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
8992           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
8993    new_path=`$CYGPATH -u "$path"`
8994  fi
8995  if test "x$new_path" = x; then
8996    # Oops. Which didn't find the executable.
8997    # The splitting of arguments from the executable at a space might have been incorrect,
8998    # since paths with space are more likely in Windows. Give it another try with the whole
8999    # argument.
9000    path="$complete"
9001    arguments="EOL"
9002    new_path=`$CYGPATH -u "$path"`
9003    new_path=`$WHICH "$new_path" 2> /dev/null`
9004    # bat and cmd files are not always considered executable in cygwin causing which
9005    # to not find them
9006    if test "x$new_path" = x \
9007             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9008             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9009      new_path=`$CYGPATH -u "$path"`
9010    fi
9011    if test "x$new_path" = x; then
9012      # It's still not found. Now this is an unrecoverable error.
9013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9014$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9015      has_space=`$ECHO "$complete" | $GREP " "`
9016      if test "x$has_space" != x; then
9017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9019      fi
9020      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9021    fi
9022  fi
9023
9024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9027  # "foo.exe" is OK but "foo" is an error.
9028  #
9029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9030  # It is also a way to make sure we got the proper file name for the real test later on.
9031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9032  if test "x$test_shortpath" = x; then
9033    # Short path failed, file does not exist as specified.
9034    # Try adding .exe or .cmd
9035    if test -f "${new_path}.exe"; then
9036       input_to_shortpath="${new_path}.exe"
9037    elif test -f "${new_path}.cmd"; then
9038       input_to_shortpath="${new_path}.cmd"
9039    else
9040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9041$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9042      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9043$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9044      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9045    fi
9046  else
9047    input_to_shortpath="$new_path"
9048  fi
9049
9050  # Call helper function which possibly converts this using DOS-style short mode.
9051  # If so, the updated path is stored in $new_path.
9052  new_path="$input_to_shortpath"
9053
9054  input_path="$input_to_shortpath"
9055  # Check if we need to convert this using DOS-style short mode. If the path
9056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9057  # take no chances and rewrite it.
9058  # Note: m4 eats our [], so we need to use [ and ] instead.
9059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9060  if test "x$has_forbidden_chars" != x; then
9061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9065      # Going to short mode and back again did indeed matter. Since short mode is
9066      # case insensitive, let's make it lowercase to improve readability.
9067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9068      # Now convert it back to Unix-stile (cygpath)
9069      input_path=`$CYGPATH -u "$shortmode_path"`
9070      new_path="$input_path"
9071    fi
9072  fi
9073
9074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9075  if test "x$test_cygdrive_prefix" = x; then
9076    # As a simple fix, exclude /usr/bin since it's not a real path.
9077    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9079      # a path prefixed by /cygdrive for fixpath to work.
9080      new_path="$CYGWIN_ROOT_PATH$input_path"
9081    fi
9082  fi
9083
9084  # remove trailing .exe if any
9085  new_path="${new_path/%.exe/}"
9086
9087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9088
9089  # First separate the path from the arguments. This will split at the first
9090  # space.
9091  complete="$FOUND_MAKE"
9092  path="${complete%% *}"
9093  tmp="$complete EOL"
9094  arguments="${tmp#* }"
9095
9096  # Input might be given as Windows format, start by converting to
9097  # unix format.
9098  new_path="$path"
9099
9100  windows_path="$new_path"
9101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9102    unix_path=`$CYGPATH -u "$windows_path"`
9103    new_path="$unix_path"
9104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9106    new_path="$unix_path"
9107  fi
9108
9109
9110  # Now try to locate executable using which
9111  new_path=`$WHICH "$new_path" 2> /dev/null`
9112
9113  if test "x$new_path" = x; then
9114    # Oops. Which didn't find the executable.
9115    # The splitting of arguments from the executable at a space might have been incorrect,
9116    # since paths with space are more likely in Windows. Give it another try with the whole
9117    # argument.
9118    path="$complete"
9119    arguments="EOL"
9120    new_path="$path"
9121
9122  windows_path="$new_path"
9123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9124    unix_path=`$CYGPATH -u "$windows_path"`
9125    new_path="$unix_path"
9126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9128    new_path="$unix_path"
9129  fi
9130
9131
9132    new_path=`$WHICH "$new_path" 2> /dev/null`
9133
9134    if test "x$new_path" = x; then
9135      # It's still not found. Now this is an unrecoverable error.
9136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9137$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9138      has_space=`$ECHO "$complete" | $GREP " "`
9139      if test "x$has_space" != x; then
9140        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9141$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9142      fi
9143      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9144    fi
9145  fi
9146
9147  # Now new_path has a complete unix path to the binary
9148  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9149    # Keep paths in /bin as-is, but remove trailing .exe if any
9150    new_path="${new_path/%.exe/}"
9151    # Do not save /bin paths to all_fixpath_prefixes!
9152  else
9153    # Not in mixed or Windows style, start by that.
9154    new_path=`cmd //c echo $new_path`
9155
9156  input_path="$new_path"
9157  # Check if we need to convert this using DOS-style short mode. If the path
9158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9159  # take no chances and rewrite it.
9160  # Note: m4 eats our [], so we need to use [ and ] instead.
9161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9162  if test "x$has_forbidden_chars" != x; then
9163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9165  fi
9166
9167    # Output is in $new_path
9168
9169  windows_path="$new_path"
9170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9171    unix_path=`$CYGPATH -u "$windows_path"`
9172    new_path="$unix_path"
9173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9175    new_path="$unix_path"
9176  fi
9177
9178    # remove trailing .exe if any
9179    new_path="${new_path/%.exe/}"
9180
9181    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9182    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9183  fi
9184
9185  else
9186    # We're on a posix platform. Hooray! :)
9187    # First separate the path from the arguments. This will split at the first
9188    # space.
9189    complete="$FOUND_MAKE"
9190    path="${complete%% *}"
9191    tmp="$complete EOL"
9192    arguments="${tmp#* }"
9193
9194    # Cannot rely on the command "which" here since it doesn't always work.
9195    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9196    if test -z "$is_absolute_path"; then
9197      # Path to executable is not absolute. Find it.
9198      IFS_save="$IFS"
9199      IFS=:
9200      for p in $PATH; do
9201        if test -f "$p/$path" && test -x "$p/$path"; then
9202          new_path="$p/$path"
9203          break
9204        fi
9205      done
9206      IFS="$IFS_save"
9207    else
9208      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9209$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9210      new_path="$path"
9211    fi
9212
9213    if test "x$new_path" = x; then
9214        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9215$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9216        has_space=`$ECHO "$complete" | $GREP " "`
9217        if test "x$has_space" != x; then
9218          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9219$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9220        fi
9221        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9222      fi
9223  fi
9224
9225      # Now join together the path and the arguments once again
9226      if test "x$arguments" != xEOL; then
9227        new_complete="$new_path ${arguments% *}"
9228      else
9229        new_complete="$new_path"
9230      fi
9231
9232  if test "x$complete" != "x$new_complete"; then
9233      FOUND_MAKE="$new_complete"
9234      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9235$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9236    fi
9237
9238        fi
9239      fi
9240    fi
9241  fi
9242
9243    fi
9244
9245    if test "x$FOUND_MAKE" = x; then
9246      if test "x$TOOLS_DIR" != x; then
9247        # We have a tools-dir, check that as well before giving up.
9248        OLD_PATH=$PATH
9249        PATH=$TOOLS_DIR:$PATH
9250        for ac_prog in gmake
9251do
9252  # Extract the first word of "$ac_prog", so it can be a program name with args.
9253set dummy $ac_prog; ac_word=$2
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9255$as_echo_n "checking for $ac_word... " >&6; }
9256if test "${ac_cv_path_CHECK_TOOLSDIR_GMAKE+set}" = set; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  case $CHECK_TOOLSDIR_GMAKE in
9260  [\\/]* | ?:[\\/]*)
9261  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
9262  ;;
9263  *)
9264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9265for as_dir in $PATH
9266do
9267  IFS=$as_save_IFS
9268  test -z "$as_dir" && as_dir=.
9269    for ac_exec_ext in '' $ac_executable_extensions; do
9270  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9271    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
9272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9273    break 2
9274  fi
9275done
9276  done
9277IFS=$as_save_IFS
9278
9279  ;;
9280esac
9281fi
9282CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
9283if test -n "$CHECK_TOOLSDIR_GMAKE"; then
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
9285$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
9286else
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
9289fi
9290
9291
9292  test -n "$CHECK_TOOLSDIR_GMAKE" && break
9293done
9294
9295
9296  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
9297  DESCRIPTION="gmake in tools-dir"
9298  if test "x$MAKE_CANDIDATE" != x; then
9299    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9300$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9301    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9302    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9303    if test "x$IS_GNU_MAKE" = x; then
9304      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9305$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9306    else
9307      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9308      if test "x$IS_MODERN_MAKE" = x; then
9309        { $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
9310$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;}
9311      else
9312        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9313          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9314            MAKE_EXPECTED_ENV='cygwin'
9315          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9316            MAKE_EXPECTED_ENV='msys'
9317          else
9318            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9319          fi
9320          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9321          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9322        else
9323          # Not relevant for non-Windows
9324          IS_MAKE_CORRECT_ENV=true
9325        fi
9326        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9327          { $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
9328$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;}
9329        else
9330          FOUND_MAKE=$MAKE_CANDIDATE
9331
9332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9333
9334  # First separate the path from the arguments. This will split at the first
9335  # space.
9336  complete="$FOUND_MAKE"
9337  path="${complete%% *}"
9338  tmp="$complete EOL"
9339  arguments="${tmp#* }"
9340
9341  # Input might be given as Windows format, start by converting to
9342  # unix format.
9343  new_path=`$CYGPATH -u "$path"`
9344
9345  # Now try to locate executable using which
9346  new_path=`$WHICH "$new_path" 2> /dev/null`
9347  # bat and cmd files are not always considered executable in cygwin causing which
9348  # to not find them
9349  if test "x$new_path" = x \
9350           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9351           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9352    new_path=`$CYGPATH -u "$path"`
9353  fi
9354  if test "x$new_path" = x; then
9355    # Oops. Which didn't find the executable.
9356    # The splitting of arguments from the executable at a space might have been incorrect,
9357    # since paths with space are more likely in Windows. Give it another try with the whole
9358    # argument.
9359    path="$complete"
9360    arguments="EOL"
9361    new_path=`$CYGPATH -u "$path"`
9362    new_path=`$WHICH "$new_path" 2> /dev/null`
9363    # bat and cmd files are not always considered executable in cygwin causing which
9364    # to not find them
9365    if test "x$new_path" = x \
9366             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9367             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9368      new_path=`$CYGPATH -u "$path"`
9369    fi
9370    if test "x$new_path" = x; then
9371      # It's still not found. Now this is an unrecoverable error.
9372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9373$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9374      has_space=`$ECHO "$complete" | $GREP " "`
9375      if test "x$has_space" != x; then
9376        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9377$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9378      fi
9379      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9380    fi
9381  fi
9382
9383  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9384  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9385  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9386  # "foo.exe" is OK but "foo" is an error.
9387  #
9388  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9389  # It is also a way to make sure we got the proper file name for the real test later on.
9390  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9391  if test "x$test_shortpath" = x; then
9392    # Short path failed, file does not exist as specified.
9393    # Try adding .exe or .cmd
9394    if test -f "${new_path}.exe"; then
9395       input_to_shortpath="${new_path}.exe"
9396    elif test -f "${new_path}.cmd"; then
9397       input_to_shortpath="${new_path}.cmd"
9398    else
9399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9400$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9401      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9402$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9403      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9404    fi
9405  else
9406    input_to_shortpath="$new_path"
9407  fi
9408
9409  # Call helper function which possibly converts this using DOS-style short mode.
9410  # If so, the updated path is stored in $new_path.
9411  new_path="$input_to_shortpath"
9412
9413  input_path="$input_to_shortpath"
9414  # Check if we need to convert this using DOS-style short mode. If the path
9415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9416  # take no chances and rewrite it.
9417  # Note: m4 eats our [], so we need to use [ and ] instead.
9418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9419  if test "x$has_forbidden_chars" != x; then
9420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9424      # Going to short mode and back again did indeed matter. Since short mode is
9425      # case insensitive, let's make it lowercase to improve readability.
9426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9427      # Now convert it back to Unix-stile (cygpath)
9428      input_path=`$CYGPATH -u "$shortmode_path"`
9429      new_path="$input_path"
9430    fi
9431  fi
9432
9433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9434  if test "x$test_cygdrive_prefix" = x; then
9435    # As a simple fix, exclude /usr/bin since it's not a real path.
9436    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9438      # a path prefixed by /cygdrive for fixpath to work.
9439      new_path="$CYGWIN_ROOT_PATH$input_path"
9440    fi
9441  fi
9442
9443  # remove trailing .exe if any
9444  new_path="${new_path/%.exe/}"
9445
9446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9447
9448  # First separate the path from the arguments. This will split at the first
9449  # space.
9450  complete="$FOUND_MAKE"
9451  path="${complete%% *}"
9452  tmp="$complete EOL"
9453  arguments="${tmp#* }"
9454
9455  # Input might be given as Windows format, start by converting to
9456  # unix format.
9457  new_path="$path"
9458
9459  windows_path="$new_path"
9460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9461    unix_path=`$CYGPATH -u "$windows_path"`
9462    new_path="$unix_path"
9463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9465    new_path="$unix_path"
9466  fi
9467
9468
9469  # Now try to locate executable using which
9470  new_path=`$WHICH "$new_path" 2> /dev/null`
9471
9472  if test "x$new_path" = x; then
9473    # Oops. Which didn't find the executable.
9474    # The splitting of arguments from the executable at a space might have been incorrect,
9475    # since paths with space are more likely in Windows. Give it another try with the whole
9476    # argument.
9477    path="$complete"
9478    arguments="EOL"
9479    new_path="$path"
9480
9481  windows_path="$new_path"
9482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9483    unix_path=`$CYGPATH -u "$windows_path"`
9484    new_path="$unix_path"
9485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9487    new_path="$unix_path"
9488  fi
9489
9490
9491    new_path=`$WHICH "$new_path" 2> /dev/null`
9492
9493    if test "x$new_path" = x; then
9494      # It's still not found. Now this is an unrecoverable error.
9495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9496$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9497      has_space=`$ECHO "$complete" | $GREP " "`
9498      if test "x$has_space" != x; then
9499        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9500$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9501      fi
9502      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9503    fi
9504  fi
9505
9506  # Now new_path has a complete unix path to the binary
9507  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9508    # Keep paths in /bin as-is, but remove trailing .exe if any
9509    new_path="${new_path/%.exe/}"
9510    # Do not save /bin paths to all_fixpath_prefixes!
9511  else
9512    # Not in mixed or Windows style, start by that.
9513    new_path=`cmd //c echo $new_path`
9514
9515  input_path="$new_path"
9516  # Check if we need to convert this using DOS-style short mode. If the path
9517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9518  # take no chances and rewrite it.
9519  # Note: m4 eats our [], so we need to use [ and ] instead.
9520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9521  if test "x$has_forbidden_chars" != x; then
9522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9523    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9524  fi
9525
9526    # Output is in $new_path
9527
9528  windows_path="$new_path"
9529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9530    unix_path=`$CYGPATH -u "$windows_path"`
9531    new_path="$unix_path"
9532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9534    new_path="$unix_path"
9535  fi
9536
9537    # remove trailing .exe if any
9538    new_path="${new_path/%.exe/}"
9539
9540    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9541    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9542  fi
9543
9544  else
9545    # We're on a posix platform. Hooray! :)
9546    # First separate the path from the arguments. This will split at the first
9547    # space.
9548    complete="$FOUND_MAKE"
9549    path="${complete%% *}"
9550    tmp="$complete EOL"
9551    arguments="${tmp#* }"
9552
9553    # Cannot rely on the command "which" here since it doesn't always work.
9554    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9555    if test -z "$is_absolute_path"; then
9556      # Path to executable is not absolute. Find it.
9557      IFS_save="$IFS"
9558      IFS=:
9559      for p in $PATH; do
9560        if test -f "$p/$path" && test -x "$p/$path"; then
9561          new_path="$p/$path"
9562          break
9563        fi
9564      done
9565      IFS="$IFS_save"
9566    else
9567      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9568$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9569      new_path="$path"
9570    fi
9571
9572    if test "x$new_path" = x; then
9573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9574$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9575        has_space=`$ECHO "$complete" | $GREP " "`
9576        if test "x$has_space" != x; then
9577          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9579        fi
9580        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9581      fi
9582  fi
9583
9584      # Now join together the path and the arguments once again
9585      if test "x$arguments" != xEOL; then
9586        new_complete="$new_path ${arguments% *}"
9587      else
9588        new_complete="$new_path"
9589      fi
9590
9591  if test "x$complete" != "x$new_complete"; then
9592      FOUND_MAKE="$new_complete"
9593      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9594$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9595    fi
9596
9597        fi
9598      fi
9599    fi
9600  fi
9601
9602        if test "x$FOUND_MAKE" = x; then
9603          for ac_prog in make
9604do
9605  # Extract the first word of "$ac_prog", so it can be a program name with args.
9606set dummy $ac_prog; ac_word=$2
9607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9608$as_echo_n "checking for $ac_word... " >&6; }
9609if test "${ac_cv_path_CHECK_TOOLSDIR_MAKE+set}" = set; then :
9610  $as_echo_n "(cached) " >&6
9611else
9612  case $CHECK_TOOLSDIR_MAKE in
9613  [\\/]* | ?:[\\/]*)
9614  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
9615  ;;
9616  *)
9617  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9618for as_dir in $PATH
9619do
9620  IFS=$as_save_IFS
9621  test -z "$as_dir" && as_dir=.
9622    for ac_exec_ext in '' $ac_executable_extensions; do
9623  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9624    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
9625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9626    break 2
9627  fi
9628done
9629  done
9630IFS=$as_save_IFS
9631
9632  ;;
9633esac
9634fi
9635CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
9636if test -n "$CHECK_TOOLSDIR_MAKE"; then
9637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
9638$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
9639else
9640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9641$as_echo "no" >&6; }
9642fi
9643
9644
9645  test -n "$CHECK_TOOLSDIR_MAKE" && break
9646done
9647
9648
9649  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
9650  DESCRIPTION="make in tools-dir"
9651  if test "x$MAKE_CANDIDATE" != x; then
9652    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
9653$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
9654    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
9655    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
9656    if test "x$IS_GNU_MAKE" = x; then
9657      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
9658$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
9659    else
9660      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP '3.8[12346789]'`
9661      if test "x$IS_MODERN_MAKE" = x; then
9662        { $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
9663$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;}
9664      else
9665        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
9666          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9667            MAKE_EXPECTED_ENV='cygwin'
9668          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9669            MAKE_EXPECTED_ENV='msys'
9670          else
9671            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
9672          fi
9673          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
9674          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
9675        else
9676          # Not relevant for non-Windows
9677          IS_MAKE_CORRECT_ENV=true
9678        fi
9679        if test "x$IS_MAKE_CORRECT_ENV" = x; then
9680          { $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
9681$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;}
9682        else
9683          FOUND_MAKE=$MAKE_CANDIDATE
9684
9685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9686
9687  # First separate the path from the arguments. This will split at the first
9688  # space.
9689  complete="$FOUND_MAKE"
9690  path="${complete%% *}"
9691  tmp="$complete EOL"
9692  arguments="${tmp#* }"
9693
9694  # Input might be given as Windows format, start by converting to
9695  # unix format.
9696  new_path=`$CYGPATH -u "$path"`
9697
9698  # Now try to locate executable using which
9699  new_path=`$WHICH "$new_path" 2> /dev/null`
9700  # bat and cmd files are not always considered executable in cygwin causing which
9701  # to not find them
9702  if test "x$new_path" = x \
9703           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9704           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9705    new_path=`$CYGPATH -u "$path"`
9706  fi
9707  if test "x$new_path" = x; then
9708    # Oops. Which didn't find the executable.
9709    # The splitting of arguments from the executable at a space might have been incorrect,
9710    # since paths with space are more likely in Windows. Give it another try with the whole
9711    # argument.
9712    path="$complete"
9713    arguments="EOL"
9714    new_path=`$CYGPATH -u "$path"`
9715    new_path=`$WHICH "$new_path" 2> /dev/null`
9716    # bat and cmd files are not always considered executable in cygwin causing which
9717    # to not find them
9718    if test "x$new_path" = x \
9719             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
9720             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
9721      new_path=`$CYGPATH -u "$path"`
9722    fi
9723    if test "x$new_path" = x; then
9724      # It's still not found. Now this is an unrecoverable error.
9725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9726$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9727      has_space=`$ECHO "$complete" | $GREP " "`
9728      if test "x$has_space" != x; then
9729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9731      fi
9732      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9733    fi
9734  fi
9735
9736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
9737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
9738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
9739  # "foo.exe" is OK but "foo" is an error.
9740  #
9741  # This test is therefore slightly more accurate than "test -f" to check for file precense.
9742  # It is also a way to make sure we got the proper file name for the real test later on.
9743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
9744  if test "x$test_shortpath" = x; then
9745    # Short path failed, file does not exist as specified.
9746    # Try adding .exe or .cmd
9747    if test -f "${new_path}.exe"; then
9748       input_to_shortpath="${new_path}.exe"
9749    elif test -f "${new_path}.cmd"; then
9750       input_to_shortpath="${new_path}.cmd"
9751    else
9752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
9753$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
9754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
9755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
9756      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9757    fi
9758  else
9759    input_to_shortpath="$new_path"
9760  fi
9761
9762  # Call helper function which possibly converts this using DOS-style short mode.
9763  # If so, the updated path is stored in $new_path.
9764  new_path="$input_to_shortpath"
9765
9766  input_path="$input_to_shortpath"
9767  # Check if we need to convert this using DOS-style short mode. If the path
9768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9769  # take no chances and rewrite it.
9770  # Note: m4 eats our [], so we need to use [ and ] instead.
9771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
9772  if test "x$has_forbidden_chars" != x; then
9773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
9775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
9776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
9777      # Going to short mode and back again did indeed matter. Since short mode is
9778      # case insensitive, let's make it lowercase to improve readability.
9779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9780      # Now convert it back to Unix-stile (cygpath)
9781      input_path=`$CYGPATH -u "$shortmode_path"`
9782      new_path="$input_path"
9783    fi
9784  fi
9785
9786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
9787  if test "x$test_cygdrive_prefix" = x; then
9788    # As a simple fix, exclude /usr/bin since it's not a real path.
9789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
9790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
9791      # a path prefixed by /cygdrive for fixpath to work.
9792      new_path="$CYGWIN_ROOT_PATH$input_path"
9793    fi
9794  fi
9795
9796  # remove trailing .exe if any
9797  new_path="${new_path/%.exe/}"
9798
9799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9800
9801  # First separate the path from the arguments. This will split at the first
9802  # space.
9803  complete="$FOUND_MAKE"
9804  path="${complete%% *}"
9805  tmp="$complete EOL"
9806  arguments="${tmp#* }"
9807
9808  # Input might be given as Windows format, start by converting to
9809  # unix format.
9810  new_path="$path"
9811
9812  windows_path="$new_path"
9813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9814    unix_path=`$CYGPATH -u "$windows_path"`
9815    new_path="$unix_path"
9816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9818    new_path="$unix_path"
9819  fi
9820
9821
9822  # Now try to locate executable using which
9823  new_path=`$WHICH "$new_path" 2> /dev/null`
9824
9825  if test "x$new_path" = x; then
9826    # Oops. Which didn't find the executable.
9827    # The splitting of arguments from the executable at a space might have been incorrect,
9828    # since paths with space are more likely in Windows. Give it another try with the whole
9829    # argument.
9830    path="$complete"
9831    arguments="EOL"
9832    new_path="$path"
9833
9834  windows_path="$new_path"
9835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9836    unix_path=`$CYGPATH -u "$windows_path"`
9837    new_path="$unix_path"
9838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9840    new_path="$unix_path"
9841  fi
9842
9843
9844    new_path=`$WHICH "$new_path" 2> /dev/null`
9845
9846    if test "x$new_path" = x; then
9847      # It's still not found. Now this is an unrecoverable error.
9848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9849$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9850      has_space=`$ECHO "$complete" | $GREP " "`
9851      if test "x$has_space" != x; then
9852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
9853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
9854      fi
9855      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9856    fi
9857  fi
9858
9859  # Now new_path has a complete unix path to the binary
9860  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
9861    # Keep paths in /bin as-is, but remove trailing .exe if any
9862    new_path="${new_path/%.exe/}"
9863    # Do not save /bin paths to all_fixpath_prefixes!
9864  else
9865    # Not in mixed or Windows style, start by that.
9866    new_path=`cmd //c echo $new_path`
9867
9868  input_path="$new_path"
9869  # Check if we need to convert this using DOS-style short mode. If the path
9870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
9871  # take no chances and rewrite it.
9872  # Note: m4 eats our [], so we need to use [ and ] instead.
9873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
9874  if test "x$has_forbidden_chars" != x; then
9875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
9876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
9877  fi
9878
9879    # Output is in $new_path
9880
9881  windows_path="$new_path"
9882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
9883    unix_path=`$CYGPATH -u "$windows_path"`
9884    new_path="$unix_path"
9885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
9886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
9887    new_path="$unix_path"
9888  fi
9889
9890    # remove trailing .exe if any
9891    new_path="${new_path/%.exe/}"
9892
9893    # Save the first 10 bytes of this path to the storage, so fixpath can work.
9894    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
9895  fi
9896
9897  else
9898    # We're on a posix platform. Hooray! :)
9899    # First separate the path from the arguments. This will split at the first
9900    # space.
9901    complete="$FOUND_MAKE"
9902    path="${complete%% *}"
9903    tmp="$complete EOL"
9904    arguments="${tmp#* }"
9905
9906    # Cannot rely on the command "which" here since it doesn't always work.
9907    is_absolute_path=`$ECHO "$path" | $GREP ^/`
9908    if test -z "$is_absolute_path"; then
9909      # Path to executable is not absolute. Find it.
9910      IFS_save="$IFS"
9911      IFS=:
9912      for p in $PATH; do
9913        if test -f "$p/$path" && test -x "$p/$path"; then
9914          new_path="$p/$path"
9915          break
9916        fi
9917      done
9918      IFS="$IFS_save"
9919    else
9920      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&5
9921$as_echo "$as_me: Resolving FOUND_MAKE (as $path) failed, using $path directly." >&6;}
9922      new_path="$path"
9923    fi
9924
9925    if test "x$new_path" = x; then
9926        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
9927$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
9928        has_space=`$ECHO "$complete" | $GREP " "`
9929        if test "x$has_space" != x; then
9930          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
9931$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
9932        fi
9933        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
9934      fi
9935  fi
9936
9937      # Now join together the path and the arguments once again
9938      if test "x$arguments" != xEOL; then
9939        new_complete="$new_path ${arguments% *}"
9940      else
9941        new_complete="$new_path"
9942      fi
9943
9944  if test "x$complete" != "x$new_complete"; then
9945      FOUND_MAKE="$new_complete"
9946      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
9947$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
9948    fi
9949
9950        fi
9951      fi
9952    fi
9953  fi
9954
9955        fi
9956        PATH=$OLD_PATH
9957      fi
9958    fi
9959
9960    if test "x$FOUND_MAKE" = x; then
9961      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
9962    fi
9963  fi
9964
9965  MAKE=$FOUND_MAKE
9966
9967  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
9968$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
9969
9970
9971
9972    # Test if find supports -delete
9973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
9974$as_echo_n "checking if find supports -delete... " >&6; }
9975    FIND_DELETE="-delete"
9976
9977    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
9978
9979    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
9980
9981    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
9982    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
9983        # No, it does not.
9984        rm $DELETEDIR/TestIfFindSupportsDelete
9985        FIND_DELETE="-exec rm \{\} \+"
9986        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9987$as_echo "no" >&6; }
9988    else
9989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9990$as_echo "yes" >&6; }
9991    fi
9992    rmdir $DELETEDIR
9993
9994
9995
9996# These tools might not be installed by default,
9997# need hint on how to install them.
9998
9999    for ac_prog in unzip
10000do
10001  # Extract the first word of "$ac_prog", so it can be a program name with args.
10002set dummy $ac_prog; ac_word=$2
10003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10004$as_echo_n "checking for $ac_word... " >&6; }
10005if test "${ac_cv_path_UNZIP+set}" = set; then :
10006  $as_echo_n "(cached) " >&6
10007else
10008  case $UNZIP in
10009  [\\/]* | ?:[\\/]*)
10010  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
10011  ;;
10012  *)
10013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10014for as_dir in $PATH
10015do
10016  IFS=$as_save_IFS
10017  test -z "$as_dir" && as_dir=.
10018    for ac_exec_ext in '' $ac_executable_extensions; do
10019  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10020    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
10021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10022    break 2
10023  fi
10024done
10025  done
10026IFS=$as_save_IFS
10027
10028  ;;
10029esac
10030fi
10031UNZIP=$ac_cv_path_UNZIP
10032if test -n "$UNZIP"; then
10033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
10034$as_echo "$UNZIP" >&6; }
10035else
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10037$as_echo "no" >&6; }
10038fi
10039
10040
10041  test -n "$UNZIP" && break
10042done
10043
10044
10045    if test "x$UNZIP" = x; then
10046        if test "xunzip" = x; then
10047          PROG_NAME=unzip
10048        else
10049          PROG_NAME=unzip
10050        fi
10051        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10052$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10053        as_fn_error $? "Cannot continue" "$LINENO" 5
10054    fi
10055
10056
10057
10058    for ac_prog in zip
10059do
10060  # Extract the first word of "$ac_prog", so it can be a program name with args.
10061set dummy $ac_prog; ac_word=$2
10062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10063$as_echo_n "checking for $ac_word... " >&6; }
10064if test "${ac_cv_path_ZIP+set}" = set; then :
10065  $as_echo_n "(cached) " >&6
10066else
10067  case $ZIP in
10068  [\\/]* | ?:[\\/]*)
10069  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
10070  ;;
10071  *)
10072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10073for as_dir in $PATH
10074do
10075  IFS=$as_save_IFS
10076  test -z "$as_dir" && as_dir=.
10077    for ac_exec_ext in '' $ac_executable_extensions; do
10078  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10079    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
10080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10081    break 2
10082  fi
10083done
10084  done
10085IFS=$as_save_IFS
10086
10087  ;;
10088esac
10089fi
10090ZIP=$ac_cv_path_ZIP
10091if test -n "$ZIP"; then
10092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
10093$as_echo "$ZIP" >&6; }
10094else
10095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10096$as_echo "no" >&6; }
10097fi
10098
10099
10100  test -n "$ZIP" && break
10101done
10102
10103
10104    if test "x$ZIP" = x; then
10105        if test "xzip" = x; then
10106          PROG_NAME=zip
10107        else
10108          PROG_NAME=zip
10109        fi
10110        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10111$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10112        as_fn_error $? "Cannot continue" "$LINENO" 5
10113    fi
10114
10115
10116
10117# Non-required basic tools
10118
10119# Extract the first word of "ldd", so it can be a program name with args.
10120set dummy ldd; ac_word=$2
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10122$as_echo_n "checking for $ac_word... " >&6; }
10123if test "${ac_cv_path_LDD+set}" = set; then :
10124  $as_echo_n "(cached) " >&6
10125else
10126  case $LDD in
10127  [\\/]* | ?:[\\/]*)
10128  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
10129  ;;
10130  *)
10131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10132for as_dir in $PATH
10133do
10134  IFS=$as_save_IFS
10135  test -z "$as_dir" && as_dir=.
10136    for ac_exec_ext in '' $ac_executable_extensions; do
10137  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10138    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
10139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10140    break 2
10141  fi
10142done
10143  done
10144IFS=$as_save_IFS
10145
10146  ;;
10147esac
10148fi
10149LDD=$ac_cv_path_LDD
10150if test -n "$LDD"; then
10151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
10152$as_echo "$LDD" >&6; }
10153else
10154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10155$as_echo "no" >&6; }
10156fi
10157
10158
10159if test "x$LDD" = "x"; then
10160    # List shared lib dependencies is used for
10161    # debug output and checking for forbidden dependencies.
10162    # We can build without it.
10163    LDD="true"
10164fi
10165# Extract the first word of "otool", so it can be a program name with args.
10166set dummy otool; ac_word=$2
10167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10168$as_echo_n "checking for $ac_word... " >&6; }
10169if test "${ac_cv_path_OTOOL+set}" = set; then :
10170  $as_echo_n "(cached) " >&6
10171else
10172  case $OTOOL in
10173  [\\/]* | ?:[\\/]*)
10174  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
10175  ;;
10176  *)
10177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10178for as_dir in $PATH
10179do
10180  IFS=$as_save_IFS
10181  test -z "$as_dir" && as_dir=.
10182    for ac_exec_ext in '' $ac_executable_extensions; do
10183  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10184    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
10185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10186    break 2
10187  fi
10188done
10189  done
10190IFS=$as_save_IFS
10191
10192  ;;
10193esac
10194fi
10195OTOOL=$ac_cv_path_OTOOL
10196if test -n "$OTOOL"; then
10197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
10198$as_echo "$OTOOL" >&6; }
10199else
10200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10201$as_echo "no" >&6; }
10202fi
10203
10204
10205if test "x$OTOOL" = "x"; then
10206   OTOOL="true"
10207fi
10208for ac_prog in readelf greadelf
10209do
10210  # Extract the first word of "$ac_prog", so it can be a program name with args.
10211set dummy $ac_prog; ac_word=$2
10212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10213$as_echo_n "checking for $ac_word... " >&6; }
10214if test "${ac_cv_path_READELF+set}" = set; then :
10215  $as_echo_n "(cached) " >&6
10216else
10217  case $READELF in
10218  [\\/]* | ?:[\\/]*)
10219  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
10220  ;;
10221  *)
10222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10223for as_dir in $PATH
10224do
10225  IFS=$as_save_IFS
10226  test -z "$as_dir" && as_dir=.
10227    for ac_exec_ext in '' $ac_executable_extensions; do
10228  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10229    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
10230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10231    break 2
10232  fi
10233done
10234  done
10235IFS=$as_save_IFS
10236
10237  ;;
10238esac
10239fi
10240READELF=$ac_cv_path_READELF
10241if test -n "$READELF"; then
10242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
10243$as_echo "$READELF" >&6; }
10244else
10245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10246$as_echo "no" >&6; }
10247fi
10248
10249
10250  test -n "$READELF" && break
10251done
10252
10253# Extract the first word of "hg", so it can be a program name with args.
10254set dummy hg; ac_word=$2
10255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10256$as_echo_n "checking for $ac_word... " >&6; }
10257if test "${ac_cv_path_HG+set}" = set; then :
10258  $as_echo_n "(cached) " >&6
10259else
10260  case $HG in
10261  [\\/]* | ?:[\\/]*)
10262  ac_cv_path_HG="$HG" # Let the user override the test with a path.
10263  ;;
10264  *)
10265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10266for as_dir in $PATH
10267do
10268  IFS=$as_save_IFS
10269  test -z "$as_dir" && as_dir=.
10270    for ac_exec_ext in '' $ac_executable_extensions; do
10271  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10272    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
10273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10274    break 2
10275  fi
10276done
10277  done
10278IFS=$as_save_IFS
10279
10280  ;;
10281esac
10282fi
10283HG=$ac_cv_path_HG
10284if test -n "$HG"; then
10285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
10286$as_echo "$HG" >&6; }
10287else
10288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10289$as_echo "no" >&6; }
10290fi
10291
10292
10293# Extract the first word of "stat", so it can be a program name with args.
10294set dummy stat; ac_word=$2
10295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10296$as_echo_n "checking for $ac_word... " >&6; }
10297if test "${ac_cv_path_STAT+set}" = set; then :
10298  $as_echo_n "(cached) " >&6
10299else
10300  case $STAT in
10301  [\\/]* | ?:[\\/]*)
10302  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
10303  ;;
10304  *)
10305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10306for as_dir in $PATH
10307do
10308  IFS=$as_save_IFS
10309  test -z "$as_dir" && as_dir=.
10310    for ac_exec_ext in '' $ac_executable_extensions; do
10311  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10312    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
10313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10314    break 2
10315  fi
10316done
10317  done
10318IFS=$as_save_IFS
10319
10320  ;;
10321esac
10322fi
10323STAT=$ac_cv_path_STAT
10324if test -n "$STAT"; then
10325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
10326$as_echo "$STAT" >&6; }
10327else
10328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10329$as_echo "no" >&6; }
10330fi
10331
10332
10333# Extract the first word of "time", so it can be a program name with args.
10334set dummy time; ac_word=$2
10335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10336$as_echo_n "checking for $ac_word... " >&6; }
10337if test "${ac_cv_path_TIME+set}" = set; then :
10338  $as_echo_n "(cached) " >&6
10339else
10340  case $TIME in
10341  [\\/]* | ?:[\\/]*)
10342  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
10343  ;;
10344  *)
10345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10346for as_dir in $PATH
10347do
10348  IFS=$as_save_IFS
10349  test -z "$as_dir" && as_dir=.
10350    for ac_exec_ext in '' $ac_executable_extensions; do
10351  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10352    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
10353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10354    break 2
10355  fi
10356done
10357  done
10358IFS=$as_save_IFS
10359
10360  ;;
10361esac
10362fi
10363TIME=$ac_cv_path_TIME
10364if test -n "$TIME"; then
10365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
10366$as_echo "$TIME" >&6; }
10367else
10368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
10370fi
10371
10372
10373
10374if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
10375
10376    for ac_prog in comm
10377do
10378  # Extract the first word of "$ac_prog", so it can be a program name with args.
10379set dummy $ac_prog; ac_word=$2
10380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10381$as_echo_n "checking for $ac_word... " >&6; }
10382if test "${ac_cv_path_COMM+set}" = set; then :
10383  $as_echo_n "(cached) " >&6
10384else
10385  case $COMM in
10386  [\\/]* | ?:[\\/]*)
10387  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
10388  ;;
10389  *)
10390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10391for as_dir in $PATH
10392do
10393  IFS=$as_save_IFS
10394  test -z "$as_dir" && as_dir=.
10395    for ac_exec_ext in '' $ac_executable_extensions; do
10396  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10397    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
10398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10399    break 2
10400  fi
10401done
10402  done
10403IFS=$as_save_IFS
10404
10405  ;;
10406esac
10407fi
10408COMM=$ac_cv_path_COMM
10409if test -n "$COMM"; then
10410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
10411$as_echo "$COMM" >&6; }
10412else
10413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10414$as_echo "no" >&6; }
10415fi
10416
10417
10418  test -n "$COMM" && break
10419done
10420
10421
10422    if test "x$COMM" = x; then
10423        if test "xcomm" = x; then
10424          PROG_NAME=comm
10425        else
10426          PROG_NAME=comm
10427        fi
10428        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10429$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10430        as_fn_error $? "Cannot continue" "$LINENO" 5
10431    fi
10432
10433
10434fi
10435
10436if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
10437
10438    for ac_prog in xattr
10439do
10440  # Extract the first word of "$ac_prog", so it can be a program name with args.
10441set dummy $ac_prog; ac_word=$2
10442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10443$as_echo_n "checking for $ac_word... " >&6; }
10444if test "${ac_cv_path_XATTR+set}" = set; then :
10445  $as_echo_n "(cached) " >&6
10446else
10447  case $XATTR in
10448  [\\/]* | ?:[\\/]*)
10449  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
10450  ;;
10451  *)
10452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10453for as_dir in $PATH
10454do
10455  IFS=$as_save_IFS
10456  test -z "$as_dir" && as_dir=.
10457    for ac_exec_ext in '' $ac_executable_extensions; do
10458  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10459    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
10460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10461    break 2
10462  fi
10463done
10464  done
10465IFS=$as_save_IFS
10466
10467  ;;
10468esac
10469fi
10470XATTR=$ac_cv_path_XATTR
10471if test -n "$XATTR"; then
10472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
10473$as_echo "$XATTR" >&6; }
10474else
10475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10476$as_echo "no" >&6; }
10477fi
10478
10479
10480  test -n "$XATTR" && break
10481done
10482
10483
10484    if test "x$XATTR" = x; then
10485        if test "xxattr" = x; then
10486          PROG_NAME=xattr
10487        else
10488          PROG_NAME=xattr
10489        fi
10490        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $PROG_NAME!" >&5
10491$as_echo "$as_me: Could not find $PROG_NAME!" >&6;}
10492        as_fn_error $? "Cannot continue" "$LINENO" 5
10493    fi
10494
10495
10496fi
10497
10498
10499# Check if pkg-config is available.
10500
10501
10502if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10503	if test -n "$ac_tool_prefix"; then
10504  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10505set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10507$as_echo_n "checking for $ac_word... " >&6; }
10508if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
10509  $as_echo_n "(cached) " >&6
10510else
10511  case $PKG_CONFIG in
10512  [\\/]* | ?:[\\/]*)
10513  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10514  ;;
10515  *)
10516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10517for as_dir in $PATH
10518do
10519  IFS=$as_save_IFS
10520  test -z "$as_dir" && as_dir=.
10521    for ac_exec_ext in '' $ac_executable_extensions; do
10522  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10523    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10525    break 2
10526  fi
10527done
10528  done
10529IFS=$as_save_IFS
10530
10531  ;;
10532esac
10533fi
10534PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10535if test -n "$PKG_CONFIG"; then
10536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
10537$as_echo "$PKG_CONFIG" >&6; }
10538else
10539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10540$as_echo "no" >&6; }
10541fi
10542
10543
10544fi
10545if test -z "$ac_cv_path_PKG_CONFIG"; then
10546  ac_pt_PKG_CONFIG=$PKG_CONFIG
10547  # Extract the first word of "pkg-config", so it can be a program name with args.
10548set dummy pkg-config; ac_word=$2
10549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10550$as_echo_n "checking for $ac_word... " >&6; }
10551if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
10552  $as_echo_n "(cached) " >&6
10553else
10554  case $ac_pt_PKG_CONFIG in
10555  [\\/]* | ?:[\\/]*)
10556  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10557  ;;
10558  *)
10559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10560for as_dir in $PATH
10561do
10562  IFS=$as_save_IFS
10563  test -z "$as_dir" && as_dir=.
10564    for ac_exec_ext in '' $ac_executable_extensions; do
10565  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10566    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10568    break 2
10569  fi
10570done
10571  done
10572IFS=$as_save_IFS
10573
10574  ;;
10575esac
10576fi
10577ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10578if test -n "$ac_pt_PKG_CONFIG"; then
10579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
10580$as_echo "$ac_pt_PKG_CONFIG" >&6; }
10581else
10582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10583$as_echo "no" >&6; }
10584fi
10585
10586  if test "x$ac_pt_PKG_CONFIG" = x; then
10587    PKG_CONFIG=""
10588  else
10589    case $cross_compiling:$ac_tool_warned in
10590yes:)
10591{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10592$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10593ac_tool_warned=yes ;;
10594esac
10595    PKG_CONFIG=$ac_pt_PKG_CONFIG
10596  fi
10597else
10598  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10599fi
10600
10601fi
10602if test -n "$PKG_CONFIG"; then
10603	_pkg_min_version=0.9.0
10604	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10605$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10606	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10607		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10608$as_echo "yes" >&6; }
10609	else
10610		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10611$as_echo "no" >&6; }
10612		PKG_CONFIG=""
10613	fi
10614
10615fi
10616
10617# After basic tools have been setup, we can check build os specific details.
10618
10619###############################################################################
10620
10621# Note that this is the build platform OS version!
10622
10623OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
10624OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
10625OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
10626OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
10627
10628
10629
10630
10631
10632# Setup builddeps, for automatic downloading of tools we need.
10633# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
10634# boot-jdk setup, but we need to have basic tools setup first.
10635
10636
10637# Check whether --with-builddeps-conf was given.
10638if test "${with_builddeps_conf+set}" = set; then :
10639  withval=$with_builddeps_conf;
10640fi
10641
10642
10643
10644# Check whether --with-builddeps-server was given.
10645if test "${with_builddeps_server+set}" = set; then :
10646  withval=$with_builddeps_server;
10647fi
10648
10649
10650
10651# Check whether --with-builddeps-dir was given.
10652if test "${with_builddeps_dir+set}" = set; then :
10653  withval=$with_builddeps_dir;
10654else
10655  with_builddeps_dir=/localhome/builddeps
10656fi
10657
10658
10659
10660# Check whether --with-builddeps-group was given.
10661if test "${with_builddeps_group+set}" = set; then :
10662  withval=$with_builddeps_group;
10663fi
10664
10665
10666
10667
10668    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
10669        if test "x$with_builddeps_conf" != x; then
10670            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
10671$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
10672            builddepsfile=$with_builddeps_conf
10673            if test -s $builddepsfile; then
10674                . $builddepsfile
10675                { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
10676$as_echo "loaded!" >&6; }
10677            else
10678               as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
10679           fi
10680        else
10681            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
10682$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
10683            builddepsfile=`mktemp`
10684            touch $builddepsfile
10685            # Put all found confs into a single file.
10686            find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
10687            # Source the file to acquire the variables
10688            if test -s $builddepsfile; then
10689                . $builddepsfile
10690                { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
10691$as_echo "found at least one!" >&6; }
10692            else
10693               as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
10694           fi
10695        fi
10696        # Create build and target names that use _ instead of "-" and ".".
10697        # This is necessary to use them in variable names.
10698        build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10699        target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
10700        # Extract rewrite information for build and target
10701        eval rewritten_build=\${REWRITE_${build_var}}
10702        if test "x$rewritten_build" = x; then
10703            rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
10704            echo Build stays the same $rewritten_build
10705        else
10706            echo Rewriting build for builddeps into $rewritten_build
10707        fi
10708        eval rewritten_target=\${REWRITE_${target_var}}
10709        if test "x$rewritten_target" = x; then
10710            rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
10711            echo Target stays the same $rewritten_target
10712        else
10713            echo Rewriting target for builddeps into $rewritten_target
10714        fi
10715        rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
10716        rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
10717    fi
10718    for ac_prog in 7z unzip
10719do
10720  # Extract the first word of "$ac_prog", so it can be a program name with args.
10721set dummy $ac_prog; ac_word=$2
10722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10723$as_echo_n "checking for $ac_word... " >&6; }
10724if test "${ac_cv_prog_BDEPS_UNZIP+set}" = set; then :
10725  $as_echo_n "(cached) " >&6
10726else
10727  if test -n "$BDEPS_UNZIP"; then
10728  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
10729else
10730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10731for as_dir in $PATH
10732do
10733  IFS=$as_save_IFS
10734  test -z "$as_dir" && as_dir=.
10735    for ac_exec_ext in '' $ac_executable_extensions; do
10736  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10737    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
10738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10739    break 2
10740  fi
10741done
10742  done
10743IFS=$as_save_IFS
10744
10745fi
10746fi
10747BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
10748if test -n "$BDEPS_UNZIP"; then
10749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
10750$as_echo "$BDEPS_UNZIP" >&6; }
10751else
10752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10753$as_echo "no" >&6; }
10754fi
10755
10756
10757  test -n "$BDEPS_UNZIP" && break
10758done
10759
10760    if test "x$BDEPS_UNZIP" = x7z; then
10761        BDEPS_UNZIP="7z x"
10762    fi
10763
10764    for ac_prog in wget lftp ftp
10765do
10766  # Extract the first word of "$ac_prog", so it can be a program name with args.
10767set dummy $ac_prog; ac_word=$2
10768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10769$as_echo_n "checking for $ac_word... " >&6; }
10770if test "${ac_cv_prog_BDEPS_FTP+set}" = set; then :
10771  $as_echo_n "(cached) " >&6
10772else
10773  if test -n "$BDEPS_FTP"; then
10774  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
10775else
10776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10777for as_dir in $PATH
10778do
10779  IFS=$as_save_IFS
10780  test -z "$as_dir" && as_dir=.
10781    for ac_exec_ext in '' $ac_executable_extensions; do
10782  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10783    ac_cv_prog_BDEPS_FTP="$ac_prog"
10784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10785    break 2
10786  fi
10787done
10788  done
10789IFS=$as_save_IFS
10790
10791fi
10792fi
10793BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
10794if test -n "$BDEPS_FTP"; then
10795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
10796$as_echo "$BDEPS_FTP" >&6; }
10797else
10798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10799$as_echo "no" >&6; }
10800fi
10801
10802
10803  test -n "$BDEPS_FTP" && break
10804done
10805
10806
10807
10808###############################################################################
10809#
10810# Determine OpenJDK variants, options and version numbers.
10811#
10812###############################################################################
10813
10814# We need build & target for this.
10815
10816
10817###############################################################################
10818#
10819# Should we build a JDK/JVM with headful support (ie a graphical ui)?
10820# We always build headless support.
10821#
10822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
10823$as_echo_n "checking headful support... " >&6; }
10824# Check whether --enable-headful was given.
10825if test "${enable_headful+set}" = set; then :
10826  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
10827else
10828  SUPPORT_HEADFUL=yes
10829fi
10830
10831
10832SUPPORT_HEADLESS=yes
10833BUILD_HEADLESS="BUILD_HEADLESS:=true"
10834
10835if test "x$SUPPORT_HEADFUL" = xyes; then
10836    # We are building both headful and headless.
10837    headful_msg="inlude support for both headful and headless"
10838fi
10839
10840if test "x$SUPPORT_HEADFUL" = xno; then
10841    # Thus we are building headless only.
10842    BUILD_HEADLESS="BUILD_HEADLESS:=true"
10843    headful_msg="headless only"
10844fi
10845
10846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
10847$as_echo "$headful_msg" >&6; }
10848
10849
10850
10851
10852
10853# Control wether Hotspot runs Queens test after build.
10854# Check whether --enable-hotspot-test-in-build was given.
10855if test "${enable_hotspot_test_in_build+set}" = set; then :
10856  enableval=$enable_hotspot_test_in_build;
10857else
10858  enable_hotspot_test_in_build=no
10859fi
10860
10861if test "x$enable_hotspot_test_in_build" = "xyes"; then
10862    TEST_IN_BUILD=true
10863else
10864    TEST_IN_BUILD=false
10865fi
10866
10867
10868###############################################################################
10869#
10870# Choose cacerts source file
10871#
10872
10873# Check whether --with-cacerts-file was given.
10874if test "${with_cacerts_file+set}" = set; then :
10875  withval=$with_cacerts_file;
10876fi
10877
10878if test "x$with_cacerts_file" != x; then
10879    CACERTS_FILE=$with_cacerts_file
10880else
10881    if test "x$OPENJDK" = "xtrue"; then
10882        CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
10883    else
10884        CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal
10885    fi
10886fi
10887
10888
10889###############################################################################
10890#
10891# Enable or disable unlimited crypto
10892#
10893# Check whether --enable-unlimited-crypto was given.
10894if test "${enable_unlimited_crypto+set}" = set; then :
10895  enableval=$enable_unlimited_crypto;
10896else
10897  enable_unlimited_crypto=no
10898fi
10899
10900if test "x$enable_unlimited_crypto" = "xyes"; then
10901    UNLIMITED_CRYPTO=true
10902else
10903    UNLIMITED_CRYPTO=false
10904fi
10905
10906
10907###############################################################################
10908#
10909# Enable or disable the elliptic curve crypto implementation
10910#
10911
10912
10913###############################################################################
10914#
10915# Compress jars
10916#
10917COMPRESS_JARS=false
10918
10919
10920
10921
10922# Source the version numbers
10923. $AUTOCONF_DIR/version-numbers
10924
10925# Get the settings from parameters
10926
10927# Check whether --with-milestone was given.
10928if test "${with_milestone+set}" = set; then :
10929  withval=$with_milestone;
10930fi
10931
10932if test "x$with_milestone" = xyes; then
10933  as_fn_error $? "Milestone must have a value" "$LINENO" 5
10934elif test "x$with_milestone" != x; then
10935    MILESTONE="$with_milestone"
10936fi
10937if test "x$MILESTONE" = x; then
10938  MILESTONE=internal
10939fi
10940
10941
10942# Check whether --with-build-number was given.
10943if test "${with_build_number+set}" = set; then :
10944  withval=$with_build_number;
10945fi
10946
10947if test "x$with_build_number" = xyes; then
10948  as_fn_error $? "Build number must have a value" "$LINENO" 5
10949elif test "x$with_build_number" != x; then
10950  JDK_BUILD_NUMBER="$with_build_number"
10951fi
10952if test "x$JDK_BUILD_NUMBER" = x; then
10953  JDK_BUILD_NUMBER=b00
10954fi
10955
10956
10957# Check whether --with-user-release-suffix was given.
10958if test "${with_user_release_suffix+set}" = set; then :
10959  withval=$with_user_release_suffix;
10960fi
10961
10962if test "x$with_user_release_suffix" = xyes; then
10963  as_fn_error $? "Release suffix must have a value" "$LINENO" 5
10964elif test "x$with_user_release_suffix" != x; then
10965  USER_RELEASE_SUFFIX="$with_user_release_suffix"
10966else
10967  BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
10968  # Avoid [:alnum:] since it depends on the locale.
10969  CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'`
10970  USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
10971fi
10972
10973
10974# Now set the JDK version, milestone, build number etc.
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989COPYRIGHT_YEAR=`date +'%Y'`
10990
10991
10992if test "x$JDK_UPDATE_VERSION" != x; then
10993  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
10994else
10995  JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
10996fi
10997
10998
10999COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
11000
11001
11002
11003###############################################################################
11004#
11005# Setup BootJDK, used to bootstrap the build.
11006#
11007###############################################################################
11008
11009
11010BOOT_JDK_FOUND=no
11011
11012# Check whether --with-boot-jdk was given.
11013if test "${with_boot_jdk+set}" = set; then :
11014  withval=$with_boot_jdk;
11015fi
11016
11017
11018# We look for the Boot JDK through various means, going from more certain to
11019# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
11020# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
11021# must check if this is indeed valid; otherwise we'll continue looking.
11022
11023# Test: Is bootjdk explicitely set by command line arguments?
11024
11025  if test "x$BOOT_JDK_FOUND" = xno; then
11026    # Now execute the test
11027
11028if test "x$with_boot_jdk" != x; then
11029    BOOT_JDK=$with_boot_jdk
11030    BOOT_JDK_FOUND=maybe
11031    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
11032$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
11033fi
11034
11035
11036    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11037    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11038      # Do we have a bin/java?
11039      if test ! -x "$BOOT_JDK/bin/java"; then
11040        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11041$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11042        BOOT_JDK_FOUND=no
11043      else
11044        # Do we have a bin/javac?
11045        if test ! -x "$BOOT_JDK/bin/javac"; then
11046          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11048          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11049$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11050          BOOT_JDK_FOUND=no
11051        else
11052          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11053          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11054            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11055$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11056            BOOT_JDK_FOUND=no
11057          else
11058            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11059            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11060
11061            # Extra M4 quote needed to protect [] in grep expression.
11062            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11063            if test "x$FOUND_VERSION_78" = x; then
11064              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11065$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11066              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11067$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11068              BOOT_JDK_FOUND=no
11069            else
11070              # We're done! :-)
11071              BOOT_JDK_FOUND=yes
11072
11073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11074
11075  # Input might be given as Windows format, start by converting to
11076  # unix format.
11077  path="$BOOT_JDK"
11078  new_path=`$CYGPATH -u "$path"`
11079
11080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11083  # "foo.exe" is OK but "foo" is an error.
11084  #
11085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11086  # It is also a way to make sure we got the proper file name for the real test later on.
11087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11088  if test "x$test_shortpath" = x; then
11089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11090$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11091    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11092  fi
11093
11094  # Call helper function which possibly converts this using DOS-style short mode.
11095  # If so, the updated path is stored in $new_path.
11096
11097  input_path="$new_path"
11098  # Check if we need to convert this using DOS-style short mode. If the path
11099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11100  # take no chances and rewrite it.
11101  # Note: m4 eats our [], so we need to use [ and ] instead.
11102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11103  if test "x$has_forbidden_chars" != x; then
11104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11108      # Going to short mode and back again did indeed matter. Since short mode is
11109      # case insensitive, let's make it lowercase to improve readability.
11110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11111      # Now convert it back to Unix-stile (cygpath)
11112      input_path=`$CYGPATH -u "$shortmode_path"`
11113      new_path="$input_path"
11114    fi
11115  fi
11116
11117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11118  if test "x$test_cygdrive_prefix" = x; then
11119    # As a simple fix, exclude /usr/bin since it's not a real path.
11120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11122      # a path prefixed by /cygdrive for fixpath to work.
11123      new_path="$CYGWIN_ROOT_PATH$input_path"
11124    fi
11125  fi
11126
11127
11128  if test "x$path" != "x$new_path"; then
11129    BOOT_JDK="$new_path"
11130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11132  fi
11133
11134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11135
11136  path="$BOOT_JDK"
11137  has_colon=`$ECHO $path | $GREP ^.:`
11138  new_path="$path"
11139  if test "x$has_colon" = x; then
11140    # Not in mixed or Windows style, start by that.
11141    new_path=`cmd //c echo $path`
11142  fi
11143
11144
11145  input_path="$new_path"
11146  # Check if we need to convert this using DOS-style short mode. If the path
11147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11148  # take no chances and rewrite it.
11149  # Note: m4 eats our [], so we need to use [ and ] instead.
11150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11151  if test "x$has_forbidden_chars" != x; then
11152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11154  fi
11155
11156
11157  windows_path="$new_path"
11158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11159    unix_path=`$CYGPATH -u "$windows_path"`
11160    new_path="$unix_path"
11161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11163    new_path="$unix_path"
11164  fi
11165
11166  if test "x$path" != "x$new_path"; then
11167    BOOT_JDK="$new_path"
11168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11169$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11170  fi
11171
11172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11174
11175  else
11176    # We're on a posix platform. Hooray! :)
11177    path="$BOOT_JDK"
11178    has_space=`$ECHO "$path" | $GREP " "`
11179    if test "x$has_space" != x; then
11180      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11181$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11182      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11183    fi
11184
11185    # Use eval to expand a potential ~
11186    eval path="$path"
11187    if test ! -f "$path" && test ! -d "$path"; then
11188      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11189    fi
11190
11191    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
11192  fi
11193
11194              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11195$as_echo_n "checking for Boot JDK... " >&6; }
11196              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11197$as_echo "$BOOT_JDK" >&6; }
11198              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11199$as_echo_n "checking Boot JDK version... " >&6; }
11200              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11201              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11202$as_echo "$BOOT_JDK_VERSION" >&6; }
11203            fi # end check jdk version
11204          fi # end check rt.jar
11205        fi # end check javac
11206      fi # end check java
11207    fi # end check boot jdk found
11208  fi
11209
11210if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
11211  # Having specified an argument which is incorrect will produce an instant failure;
11212  # we should not go on looking
11213  as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
11214fi
11215
11216# Test: Is bootjdk available from builddeps?
11217
11218  if test "x$BOOT_JDK_FOUND" = xno; then
11219    # Now execute the test
11220
11221
11222
11223    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
11224        # Source the builddeps file again, to make sure it uses the latest variables!
11225        . $builddepsfile
11226        # Look for a target and build machine specific resource!
11227        eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
11228        if test "x$resource" = x; then
11229            # Ok, lets instead look for a target specific resource
11230            eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
11231        fi
11232        if test "x$resource" = x; then
11233            # Ok, lets instead look for a build specific resource
11234            eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
11235        fi
11236        if test "x$resource" = x; then
11237            # Ok, lets instead look for a generic resource
11238            # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
11239            resource=${builddep_bootjdk}
11240        fi
11241        if test "x$resource" != x; then
11242            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
11243$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
11244	    # If the resource in the builddeps.conf file is an existing directory,
11245	    # for example /java/linux/cups
11246	    if test -d ${resource}; then
11247	       depdir=${resource}
11248	    else
11249
11250# bootjdk is for example mymodule
11251# $resource is for example libs/general/libmymod_1_2_3.zip
11252# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
11253# $with_builddeps_dir is for example /localhome/builddeps
11254# depdir is the name of the variable into which we store the depdir, eg MYMOD
11255# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
11256# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
11257    filename=`basename $resource`
11258    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
11259    filebase=${filename%%.*}
11260    extension=${filename#*.}
11261    installdir=$with_builddeps_dir/$filebase
11262    if test ! -f $installdir/$filename.unpacked; then
11263        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
11264$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
11265        if test ! -d $installdir; then
11266            mkdir -p $installdir
11267        fi
11268        if test ! -d $installdir; then
11269            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
11270        fi
11271        tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
11272        touch $tmpfile
11273        if test ! -f $tmpfile; then
11274            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
11275        fi
11276
11277    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
11278    # $tmpfile is the local file name for the downloaded file.
11279    VALID_TOOL=no
11280    if test "x$BDEPS_FTP" = xwget; then
11281       VALID_TOOL=yes
11282       wget -O $tmpfile $with_builddeps_server/$resource
11283    fi
11284    if test "x$BDEPS_FTP" = xlftp; then
11285       VALID_TOOL=yes
11286       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
11287    fi
11288    if test "x$BDEPS_FTP" = xftp; then
11289        VALID_TOOL=yes
11290        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
11291        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
11292        FTPUSERPWD=${FTPSERVER%%@*}
11293        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
11294            FTPUSER=${userpwd%%:*}
11295            FTPPWD=${userpwd#*@}
11296            FTPSERVER=${FTPSERVER#*@}
11297        else
11298            FTPUSER=ftp
11299            FTPPWD=ftp
11300        fi
11301        # the "pass" command does not work on some
11302        # ftp clients (read ftp.exe) but if it works,
11303        # passive mode is better!
11304        (\
11305            echo "user $FTPUSER $FTPPWD"        ;\
11306            echo "pass"                         ;\
11307            echo "bin"                          ;\
11308            echo "get $FTPPATH $tmpfile"              ;\
11309        ) | ftp -in $FTPSERVER
11310    fi
11311    if test "x$VALID_TOOL" != xyes; then
11312       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
11313    fi
11314
11315        mv $tmpfile $installdir/$filename
11316        if test ! -s $installdir/$filename; then
11317            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
11318        fi
11319        case "$extension" in
11320            zip)  echo "Unzipping $installdir/$filename..."
11321               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
11322            ;;
11323            tar.gz) echo "Untaring $installdir/$filename..."
11324               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11325            ;;
11326            tgz) echo "Untaring $installdir/$filename..."
11327               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
11328            ;;
11329            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
11330            ;;
11331        esac
11332    fi
11333    if test -f $installdir/$filename.unpacked; then
11334        depdir=$installdir
11335    fi
11336
11337	    fi
11338            # Source the builddeps file again, because in the previous command, the depdir
11339            # was updated to point at the current build dependency install directory.
11340            . $builddepsfile
11341            # Now extract variables from the builddeps.conf files.
11342            theroot=${builddep_bootjdk_ROOT}
11343            thecflags=${builddep_bootjdk_CFLAGS}
11344            thelibs=${builddep_bootjdk_LIBS}
11345            if test "x$depdir" = x; then
11346                as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
11347            fi
11348            BOOT_JDK=$depdir
11349            if test "x$theroot" != x; then
11350               BOOT_JDK="$theroot"
11351            fi
11352            if test "x$thecflags" != x; then
11353               BOOT_JDK_CFLAGS="$thecflags"
11354            fi
11355            if test "x$thelibs" != x; then
11356               BOOT_JDK_LIBS="$thelibs"
11357            fi
11358            BOOT_JDK_FOUND=maybe
11359            else BOOT_JDK_FOUND=no
11360
11361        fi
11362        else BOOT_JDK_FOUND=no
11363
11364    fi
11365
11366
11367
11368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11370      # Do we have a bin/java?
11371      if test ! -x "$BOOT_JDK/bin/java"; then
11372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11374        BOOT_JDK_FOUND=no
11375      else
11376        # Do we have a bin/javac?
11377        if test ! -x "$BOOT_JDK/bin/javac"; then
11378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11382          BOOT_JDK_FOUND=no
11383        else
11384          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11385          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11386            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11388            BOOT_JDK_FOUND=no
11389          else
11390            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11391            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11392
11393            # Extra M4 quote needed to protect [] in grep expression.
11394            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11395            if test "x$FOUND_VERSION_78" = x; then
11396              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11398              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11399$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11400              BOOT_JDK_FOUND=no
11401            else
11402              # We're done! :-)
11403              BOOT_JDK_FOUND=yes
11404
11405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11406
11407  # Input might be given as Windows format, start by converting to
11408  # unix format.
11409  path="$BOOT_JDK"
11410  new_path=`$CYGPATH -u "$path"`
11411
11412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11415  # "foo.exe" is OK but "foo" is an error.
11416  #
11417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11418  # It is also a way to make sure we got the proper file name for the real test later on.
11419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11420  if test "x$test_shortpath" = x; then
11421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11422$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11423    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11424  fi
11425
11426  # Call helper function which possibly converts this using DOS-style short mode.
11427  # If so, the updated path is stored in $new_path.
11428
11429  input_path="$new_path"
11430  # Check if we need to convert this using DOS-style short mode. If the path
11431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11432  # take no chances and rewrite it.
11433  # Note: m4 eats our [], so we need to use [ and ] instead.
11434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11435  if test "x$has_forbidden_chars" != x; then
11436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11437    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11440      # Going to short mode and back again did indeed matter. Since short mode is
11441      # case insensitive, let's make it lowercase to improve readability.
11442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11443      # Now convert it back to Unix-stile (cygpath)
11444      input_path=`$CYGPATH -u "$shortmode_path"`
11445      new_path="$input_path"
11446    fi
11447  fi
11448
11449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11450  if test "x$test_cygdrive_prefix" = x; then
11451    # As a simple fix, exclude /usr/bin since it's not a real path.
11452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11454      # a path prefixed by /cygdrive for fixpath to work.
11455      new_path="$CYGWIN_ROOT_PATH$input_path"
11456    fi
11457  fi
11458
11459
11460  if test "x$path" != "x$new_path"; then
11461    BOOT_JDK="$new_path"
11462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11464  fi
11465
11466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11467
11468  path="$BOOT_JDK"
11469  has_colon=`$ECHO $path | $GREP ^.:`
11470  new_path="$path"
11471  if test "x$has_colon" = x; then
11472    # Not in mixed or Windows style, start by that.
11473    new_path=`cmd //c echo $path`
11474  fi
11475
11476
11477  input_path="$new_path"
11478  # Check if we need to convert this using DOS-style short mode. If the path
11479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11480  # take no chances and rewrite it.
11481  # Note: m4 eats our [], so we need to use [ and ] instead.
11482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11483  if test "x$has_forbidden_chars" != x; then
11484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11486  fi
11487
11488
11489  windows_path="$new_path"
11490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11491    unix_path=`$CYGPATH -u "$windows_path"`
11492    new_path="$unix_path"
11493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11495    new_path="$unix_path"
11496  fi
11497
11498  if test "x$path" != "x$new_path"; then
11499    BOOT_JDK="$new_path"
11500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11501$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11502  fi
11503
11504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11506
11507  else
11508    # We're on a posix platform. Hooray! :)
11509    path="$BOOT_JDK"
11510    has_space=`$ECHO "$path" | $GREP " "`
11511    if test "x$has_space" != x; then
11512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11513$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11514      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11515    fi
11516
11517    # Use eval to expand a potential ~
11518    eval path="$path"
11519    if test ! -f "$path" && test ! -d "$path"; then
11520      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11521    fi
11522
11523    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
11524  fi
11525
11526              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11527$as_echo_n "checking for Boot JDK... " >&6; }
11528              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11529$as_echo "$BOOT_JDK" >&6; }
11530              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11531$as_echo_n "checking Boot JDK version... " >&6; }
11532              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11533              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11534$as_echo "$BOOT_JDK_VERSION" >&6; }
11535            fi # end check jdk version
11536          fi # end check rt.jar
11537        fi # end check javac
11538      fi # end check java
11539    fi # end check boot jdk found
11540  fi
11541
11542
11543# Test: Is $JAVA_HOME set?
11544
11545  if test "x$BOOT_JDK_FOUND" = xno; then
11546    # Now execute the test
11547
11548    if test "x$JAVA_HOME" != x; then
11549        JAVA_HOME_PROCESSED="$JAVA_HOME"
11550
11551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11552
11553  # Input might be given as Windows format, start by converting to
11554  # unix format.
11555  path="$JAVA_HOME_PROCESSED"
11556  new_path=`$CYGPATH -u "$path"`
11557
11558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11561  # "foo.exe" is OK but "foo" is an error.
11562  #
11563  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11564  # It is also a way to make sure we got the proper file name for the real test later on.
11565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11566  if test "x$test_shortpath" = x; then
11567    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11568$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11569    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
11570  fi
11571
11572  # Call helper function which possibly converts this using DOS-style short mode.
11573  # If so, the updated path is stored in $new_path.
11574
11575  input_path="$new_path"
11576  # Check if we need to convert this using DOS-style short mode. If the path
11577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11578  # take no chances and rewrite it.
11579  # Note: m4 eats our [], so we need to use [ and ] instead.
11580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11581  if test "x$has_forbidden_chars" != x; then
11582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11586      # Going to short mode and back again did indeed matter. Since short mode is
11587      # case insensitive, let's make it lowercase to improve readability.
11588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11589      # Now convert it back to Unix-stile (cygpath)
11590      input_path=`$CYGPATH -u "$shortmode_path"`
11591      new_path="$input_path"
11592    fi
11593  fi
11594
11595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11596  if test "x$test_cygdrive_prefix" = x; then
11597    # As a simple fix, exclude /usr/bin since it's not a real path.
11598    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11600      # a path prefixed by /cygdrive for fixpath to work.
11601      new_path="$CYGWIN_ROOT_PATH$input_path"
11602    fi
11603  fi
11604
11605
11606  if test "x$path" != "x$new_path"; then
11607    JAVA_HOME_PROCESSED="$new_path"
11608    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11609$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11610  fi
11611
11612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11613
11614  path="$JAVA_HOME_PROCESSED"
11615  has_colon=`$ECHO $path | $GREP ^.:`
11616  new_path="$path"
11617  if test "x$has_colon" = x; then
11618    # Not in mixed or Windows style, start by that.
11619    new_path=`cmd //c echo $path`
11620  fi
11621
11622
11623  input_path="$new_path"
11624  # Check if we need to convert this using DOS-style short mode. If the path
11625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11626  # take no chances and rewrite it.
11627  # Note: m4 eats our [], so we need to use [ and ] instead.
11628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11629  if test "x$has_forbidden_chars" != x; then
11630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11631    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11632  fi
11633
11634
11635  windows_path="$new_path"
11636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11637    unix_path=`$CYGPATH -u "$windows_path"`
11638    new_path="$unix_path"
11639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11640    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11641    new_path="$unix_path"
11642  fi
11643
11644  if test "x$path" != "x$new_path"; then
11645    JAVA_HOME_PROCESSED="$new_path"
11646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
11647$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
11648  fi
11649
11650  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11651  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11652
11653  else
11654    # We're on a posix platform. Hooray! :)
11655    path="$JAVA_HOME_PROCESSED"
11656    has_space=`$ECHO "$path" | $GREP " "`
11657    if test "x$has_space" != x; then
11658      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
11659$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
11660      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11661    fi
11662
11663    # Use eval to expand a potential ~
11664    eval path="$path"
11665    if test ! -f "$path" && test ! -d "$path"; then
11666      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
11667    fi
11668
11669    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD`"
11670  fi
11671
11672        if test ! -d "$JAVA_HOME_PROCESSED"; then
11673            { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
11674$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
11675        else
11676          # Aha, the user has set a JAVA_HOME
11677          # let us use that as the Boot JDK.
11678          BOOT_JDK="$JAVA_HOME_PROCESSED"
11679          BOOT_JDK_FOUND=maybe
11680          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
11681$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
11682        fi
11683    fi
11684
11685
11686    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11687    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11688      # Do we have a bin/java?
11689      if test ! -x "$BOOT_JDK/bin/java"; then
11690        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11692        BOOT_JDK_FOUND=no
11693      else
11694        # Do we have a bin/javac?
11695        if test ! -x "$BOOT_JDK/bin/javac"; then
11696          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11698          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11699$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11700          BOOT_JDK_FOUND=no
11701        else
11702          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11703          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11704            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11705$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11706            BOOT_JDK_FOUND=no
11707          else
11708            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11709            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11710
11711            # Extra M4 quote needed to protect [] in grep expression.
11712            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11713            if test "x$FOUND_VERSION_78" = x; then
11714              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11716              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11717$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11718              BOOT_JDK_FOUND=no
11719            else
11720              # We're done! :-)
11721              BOOT_JDK_FOUND=yes
11722
11723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11724
11725  # Input might be given as Windows format, start by converting to
11726  # unix format.
11727  path="$BOOT_JDK"
11728  new_path=`$CYGPATH -u "$path"`
11729
11730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11733  # "foo.exe" is OK but "foo" is an error.
11734  #
11735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11736  # It is also a way to make sure we got the proper file name for the real test later on.
11737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11738  if test "x$test_shortpath" = x; then
11739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11740$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11741    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11742  fi
11743
11744  # Call helper function which possibly converts this using DOS-style short mode.
11745  # If so, the updated path is stored in $new_path.
11746
11747  input_path="$new_path"
11748  # Check if we need to convert this using DOS-style short mode. If the path
11749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11750  # take no chances and rewrite it.
11751  # Note: m4 eats our [], so we need to use [ and ] instead.
11752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11753  if test "x$has_forbidden_chars" != x; then
11754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11758      # Going to short mode and back again did indeed matter. Since short mode is
11759      # case insensitive, let's make it lowercase to improve readability.
11760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11761      # Now convert it back to Unix-stile (cygpath)
11762      input_path=`$CYGPATH -u "$shortmode_path"`
11763      new_path="$input_path"
11764    fi
11765  fi
11766
11767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11768  if test "x$test_cygdrive_prefix" = x; then
11769    # As a simple fix, exclude /usr/bin since it's not a real path.
11770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11772      # a path prefixed by /cygdrive for fixpath to work.
11773      new_path="$CYGWIN_ROOT_PATH$input_path"
11774    fi
11775  fi
11776
11777
11778  if test "x$path" != "x$new_path"; then
11779    BOOT_JDK="$new_path"
11780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11781$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11782  fi
11783
11784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11785
11786  path="$BOOT_JDK"
11787  has_colon=`$ECHO $path | $GREP ^.:`
11788  new_path="$path"
11789  if test "x$has_colon" = x; then
11790    # Not in mixed or Windows style, start by that.
11791    new_path=`cmd //c echo $path`
11792  fi
11793
11794
11795  input_path="$new_path"
11796  # Check if we need to convert this using DOS-style short mode. If the path
11797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11798  # take no chances and rewrite it.
11799  # Note: m4 eats our [], so we need to use [ and ] instead.
11800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11801  if test "x$has_forbidden_chars" != x; then
11802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11804  fi
11805
11806
11807  windows_path="$new_path"
11808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11809    unix_path=`$CYGPATH -u "$windows_path"`
11810    new_path="$unix_path"
11811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
11813    new_path="$unix_path"
11814  fi
11815
11816  if test "x$path" != "x$new_path"; then
11817    BOOT_JDK="$new_path"
11818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11820  fi
11821
11822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
11823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
11824
11825  else
11826    # We're on a posix platform. Hooray! :)
11827    path="$BOOT_JDK"
11828    has_space=`$ECHO "$path" | $GREP " "`
11829    if test "x$has_space" != x; then
11830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11831$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11832      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
11833    fi
11834
11835    # Use eval to expand a potential ~
11836    eval path="$path"
11837    if test ! -f "$path" && test ! -d "$path"; then
11838      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
11839    fi
11840
11841    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
11842  fi
11843
11844              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
11845$as_echo_n "checking for Boot JDK... " >&6; }
11846              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
11847$as_echo "$BOOT_JDK" >&6; }
11848              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
11849$as_echo_n "checking Boot JDK version... " >&6; }
11850              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
11851              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
11852$as_echo "$BOOT_JDK_VERSION" >&6; }
11853            fi # end check jdk version
11854          fi # end check rt.jar
11855        fi # end check javac
11856      fi # end check java
11857    fi # end check boot jdk found
11858  fi
11859
11860
11861# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
11862
11863  if test "x$BOOT_JDK_FOUND" = xno; then
11864    # Now execute the test
11865
11866    if test -x /usr/libexec/java_home; then
11867        BOOT_JDK=`/usr/libexec/java_home`
11868        BOOT_JDK_FOUND=maybe
11869        { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home" >&5
11870$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home" >&6;}
11871    fi
11872
11873
11874    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
11875    if test "x$BOOT_JDK_FOUND" = xmaybe; then
11876      # Do we have a bin/java?
11877      if test ! -x "$BOOT_JDK/bin/java"; then
11878        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
11879$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
11880        BOOT_JDK_FOUND=no
11881      else
11882        # Do we have a bin/javac?
11883        if test ! -x "$BOOT_JDK/bin/javac"; then
11884          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
11885$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
11886          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
11887$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
11888          BOOT_JDK_FOUND=no
11889        else
11890          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
11891          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
11892            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
11893$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
11894            BOOT_JDK_FOUND=no
11895          else
11896            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
11897            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
11898
11899            # Extra M4 quote needed to protect [] in grep expression.
11900            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
11901            if test "x$FOUND_VERSION_78" = x; then
11902              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
11903$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
11904              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
11905$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
11906              BOOT_JDK_FOUND=no
11907            else
11908              # We're done! :-)
11909              BOOT_JDK_FOUND=yes
11910
11911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11912
11913  # Input might be given as Windows format, start by converting to
11914  # unix format.
11915  path="$BOOT_JDK"
11916  new_path=`$CYGPATH -u "$path"`
11917
11918  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
11919  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
11920  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
11921  # "foo.exe" is OK but "foo" is an error.
11922  #
11923  # This test is therefore slightly more accurate than "test -f" to check for file precense.
11924  # It is also a way to make sure we got the proper file name for the real test later on.
11925  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
11926  if test "x$test_shortpath" = x; then
11927    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
11928$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
11929    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
11930  fi
11931
11932  # Call helper function which possibly converts this using DOS-style short mode.
11933  # If so, the updated path is stored in $new_path.
11934
11935  input_path="$new_path"
11936  # Check if we need to convert this using DOS-style short mode. If the path
11937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11938  # take no chances and rewrite it.
11939  # Note: m4 eats our [], so we need to use [ and ] instead.
11940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
11941  if test "x$has_forbidden_chars" != x; then
11942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11943    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
11944    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
11945    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
11946      # Going to short mode and back again did indeed matter. Since short mode is
11947      # case insensitive, let's make it lowercase to improve readability.
11948      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11949      # Now convert it back to Unix-stile (cygpath)
11950      input_path=`$CYGPATH -u "$shortmode_path"`
11951      new_path="$input_path"
11952    fi
11953  fi
11954
11955  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
11956  if test "x$test_cygdrive_prefix" = x; then
11957    # As a simple fix, exclude /usr/bin since it's not a real path.
11958    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
11959      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
11960      # a path prefixed by /cygdrive for fixpath to work.
11961      new_path="$CYGWIN_ROOT_PATH$input_path"
11962    fi
11963  fi
11964
11965
11966  if test "x$path" != "x$new_path"; then
11967    BOOT_JDK="$new_path"
11968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
11969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
11970  fi
11971
11972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
11973
11974  path="$BOOT_JDK"
11975  has_colon=`$ECHO $path | $GREP ^.:`
11976  new_path="$path"
11977  if test "x$has_colon" = x; then
11978    # Not in mixed or Windows style, start by that.
11979    new_path=`cmd //c echo $path`
11980  fi
11981
11982
11983  input_path="$new_path"
11984  # Check if we need to convert this using DOS-style short mode. If the path
11985  # contains just simple characters, use it. Otherwise (spaces, weird characters),
11986  # take no chances and rewrite it.
11987  # Note: m4 eats our [], so we need to use [ and ] instead.
11988  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
11989  if test "x$has_forbidden_chars" != x; then
11990    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
11991    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
11992  fi
11993
11994
11995  windows_path="$new_path"
11996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
11997    unix_path=`$CYGPATH -u "$windows_path"`
11998    new_path="$unix_path"
11999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12001    new_path="$unix_path"
12002  fi
12003
12004  if test "x$path" != "x$new_path"; then
12005    BOOT_JDK="$new_path"
12006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12007$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12008  fi
12009
12010  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12011  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12012
12013  else
12014    # We're on a posix platform. Hooray! :)
12015    path="$BOOT_JDK"
12016    has_space=`$ECHO "$path" | $GREP " "`
12017    if test "x$has_space" != x; then
12018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12020      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12021    fi
12022
12023    # Use eval to expand a potential ~
12024    eval path="$path"
12025    if test ! -f "$path" && test ! -d "$path"; then
12026      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12027    fi
12028
12029    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
12030  fi
12031
12032              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12033$as_echo_n "checking for Boot JDK... " >&6; }
12034              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12035$as_echo "$BOOT_JDK" >&6; }
12036              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12037$as_echo_n "checking Boot JDK version... " >&6; }
12038              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12039              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12040$as_echo "$BOOT_JDK_VERSION" >&6; }
12041            fi # end check jdk version
12042          fi # end check rt.jar
12043        fi # end check javac
12044      fi # end check java
12045    fi # end check boot jdk found
12046  fi
12047
12048
12049# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
12050
12051  if test "x$BOOT_JDK_FOUND" = xno; then
12052    # Now execute the test
12053
12054    # Extract the first word of "javac", so it can be a program name with args.
12055set dummy javac; ac_word=$2
12056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12057$as_echo_n "checking for $ac_word... " >&6; }
12058if test "${ac_cv_path_JAVAC_CHECK+set}" = set; then :
12059  $as_echo_n "(cached) " >&6
12060else
12061  case $JAVAC_CHECK in
12062  [\\/]* | ?:[\\/]*)
12063  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
12064  ;;
12065  *)
12066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12067for as_dir in $PATH
12068do
12069  IFS=$as_save_IFS
12070  test -z "$as_dir" && as_dir=.
12071    for ac_exec_ext in '' $ac_executable_extensions; do
12072  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12073    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
12074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12075    break 2
12076  fi
12077done
12078  done
12079IFS=$as_save_IFS
12080
12081  ;;
12082esac
12083fi
12084JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
12085if test -n "$JAVAC_CHECK"; then
12086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
12087$as_echo "$JAVAC_CHECK" >&6; }
12088else
12089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12090$as_echo "no" >&6; }
12091fi
12092
12093
12094    # Extract the first word of "java", so it can be a program name with args.
12095set dummy java; ac_word=$2
12096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12097$as_echo_n "checking for $ac_word... " >&6; }
12098if test "${ac_cv_path_JAVA_CHECK+set}" = set; then :
12099  $as_echo_n "(cached) " >&6
12100else
12101  case $JAVA_CHECK in
12102  [\\/]* | ?:[\\/]*)
12103  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
12104  ;;
12105  *)
12106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12107for as_dir in $PATH
12108do
12109  IFS=$as_save_IFS
12110  test -z "$as_dir" && as_dir=.
12111    for ac_exec_ext in '' $ac_executable_extensions; do
12112  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12113    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
12114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12115    break 2
12116  fi
12117done
12118  done
12119IFS=$as_save_IFS
12120
12121  ;;
12122esac
12123fi
12124JAVA_CHECK=$ac_cv_path_JAVA_CHECK
12125if test -n "$JAVA_CHECK"; then
12126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
12127$as_echo "$JAVA_CHECK" >&6; }
12128else
12129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12130$as_echo "no" >&6; }
12131fi
12132
12133
12134    BINARY="$JAVAC_CHECK"
12135    if test "x$JAVAC_CHECK" = x; then
12136        BINARY="$JAVA_CHECK"
12137    fi
12138    if test "x$BINARY" != x; then
12139        # So there is a java(c) binary, it might be part of a JDK.
12140        # Lets find the JDK/JRE directory by following symbolic links.
12141        # Linux/GNU systems often have links from /usr/bin/java to
12142        # /etc/alternatives/java to the real JDK binary.
12143
12144    if test "x$OPENJDK_BUILD_OS" != xwindows; then
12145        # Follow a chain of symbolic links. Use readlink
12146        # where it exists, else fall back to horribly
12147        # complicated shell code.
12148        if test "x$READLINK_TESTED" != yes; then
12149            # On MacOSX there is a readlink tool with a different
12150            # purpose than the GNU readlink tool. Check the found readlink.
12151            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
12152            if test "x$ISGNU" = x; then
12153                 # A readlink that we do not know how to use.
12154                 # Are there other non-GNU readlinks out there?
12155                 READLINK_TESTED=yes
12156                 READLINK=
12157            fi
12158        fi
12159
12160        if test "x$READLINK" != x; then
12161            BINARY=`$READLINK -f $BINARY`
12162        else
12163            # Save the current directory for restoring afterwards
12164            STARTDIR=$PWD
12165            COUNTER=0
12166            sym_link_dir=`$DIRNAME $BINARY`
12167            sym_link_file=`$BASENAME $BINARY`
12168            # Use the system pwd and not the shell builtin to resolve directory symlinks
12169            cd $sym_link_dir
12170            cd `$THEPWDCMD`
12171            sym_link_dir=`$THEPWDCMD`
12172            # Resolve file symlinks
12173            while test $COUNTER -lt 20; do
12174                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
12175                if test "x$ISLINK" == x; then
12176                    # This is not a symbolic link! We are done!
12177                    break
12178                fi
12179                # Again resolve directory symlinks since the target of the just found
12180                # link could be in a different directory
12181                cd `$DIRNAME $ISLINK`
12182                sym_link_dir=`$THEPWDCMD`
12183                sym_link_file=`$BASENAME $ISLINK`
12184                let COUNTER=COUNTER+1
12185            done
12186            cd $STARTDIR
12187            BINARY=$sym_link_dir/$sym_link_file
12188        fi
12189    fi
12190
12191        BOOT_JDK=`dirname "$BINARY"`
12192        BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
12193        if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
12194            # Looks like we found ourselves an JDK
12195            BOOT_JDK_FOUND=maybe
12196            { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
12197$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
12198        fi
12199    fi
12200
12201
12202    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12203    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12204      # Do we have a bin/java?
12205      if test ! -x "$BOOT_JDK/bin/java"; then
12206        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12208        BOOT_JDK_FOUND=no
12209      else
12210        # Do we have a bin/javac?
12211        if test ! -x "$BOOT_JDK/bin/javac"; then
12212          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12213$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12214          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12215$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12216          BOOT_JDK_FOUND=no
12217        else
12218          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12219          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12220            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12221$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12222            BOOT_JDK_FOUND=no
12223          else
12224            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12225            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12226
12227            # Extra M4 quote needed to protect [] in grep expression.
12228            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12229            if test "x$FOUND_VERSION_78" = x; then
12230              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12231$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12232              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12233$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12234              BOOT_JDK_FOUND=no
12235            else
12236              # We're done! :-)
12237              BOOT_JDK_FOUND=yes
12238
12239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12240
12241  # Input might be given as Windows format, start by converting to
12242  # unix format.
12243  path="$BOOT_JDK"
12244  new_path=`$CYGPATH -u "$path"`
12245
12246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12249  # "foo.exe" is OK but "foo" is an error.
12250  #
12251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12252  # It is also a way to make sure we got the proper file name for the real test later on.
12253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12254  if test "x$test_shortpath" = x; then
12255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12256$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12257    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12258  fi
12259
12260  # Call helper function which possibly converts this using DOS-style short mode.
12261  # If so, the updated path is stored in $new_path.
12262
12263  input_path="$new_path"
12264  # Check if we need to convert this using DOS-style short mode. If the path
12265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12266  # take no chances and rewrite it.
12267  # Note: m4 eats our [], so we need to use [ and ] instead.
12268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12269  if test "x$has_forbidden_chars" != x; then
12270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12274      # Going to short mode and back again did indeed matter. Since short mode is
12275      # case insensitive, let's make it lowercase to improve readability.
12276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12277      # Now convert it back to Unix-stile (cygpath)
12278      input_path=`$CYGPATH -u "$shortmode_path"`
12279      new_path="$input_path"
12280    fi
12281  fi
12282
12283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12284  if test "x$test_cygdrive_prefix" = x; then
12285    # As a simple fix, exclude /usr/bin since it's not a real path.
12286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12288      # a path prefixed by /cygdrive for fixpath to work.
12289      new_path="$CYGWIN_ROOT_PATH$input_path"
12290    fi
12291  fi
12292
12293
12294  if test "x$path" != "x$new_path"; then
12295    BOOT_JDK="$new_path"
12296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12297$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12298  fi
12299
12300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12301
12302  path="$BOOT_JDK"
12303  has_colon=`$ECHO $path | $GREP ^.:`
12304  new_path="$path"
12305  if test "x$has_colon" = x; then
12306    # Not in mixed or Windows style, start by that.
12307    new_path=`cmd //c echo $path`
12308  fi
12309
12310
12311  input_path="$new_path"
12312  # Check if we need to convert this using DOS-style short mode. If the path
12313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12314  # take no chances and rewrite it.
12315  # Note: m4 eats our [], so we need to use [ and ] instead.
12316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12317  if test "x$has_forbidden_chars" != x; then
12318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12320  fi
12321
12322
12323  windows_path="$new_path"
12324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12325    unix_path=`$CYGPATH -u "$windows_path"`
12326    new_path="$unix_path"
12327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12329    new_path="$unix_path"
12330  fi
12331
12332  if test "x$path" != "x$new_path"; then
12333    BOOT_JDK="$new_path"
12334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12335$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12336  fi
12337
12338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12340
12341  else
12342    # We're on a posix platform. Hooray! :)
12343    path="$BOOT_JDK"
12344    has_space=`$ECHO "$path" | $GREP " "`
12345    if test "x$has_space" != x; then
12346      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12347$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12348      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12349    fi
12350
12351    # Use eval to expand a potential ~
12352    eval path="$path"
12353    if test ! -f "$path" && test ! -d "$path"; then
12354      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12355    fi
12356
12357    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
12358  fi
12359
12360              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12361$as_echo_n "checking for Boot JDK... " >&6; }
12362              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12363$as_echo "$BOOT_JDK" >&6; }
12364              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12365$as_echo_n "checking Boot JDK version... " >&6; }
12366              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12367              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12368$as_echo "$BOOT_JDK_VERSION" >&6; }
12369            fi # end check jdk version
12370          fi # end check rt.jar
12371        fi # end check javac
12372      fi # end check java
12373    fi # end check boot jdk found
12374  fi
12375
12376
12377# Test: Is there a JDK installed in default, well-known locations?
12378
12379  if test "x$BOOT_JDK_FOUND" = xno; then
12380    # Now execute the test
12381
12382  if test "x$OPENJDK_TARGET_OS" = xwindows; then
12383
12384  if test "x$BOOT_JDK_FOUND" = xno; then
12385    # Now execute the test
12386
12387  if test "x$ProgramW6432" != x; then
12388    VIRTUAL_DIR="$ProgramW6432/Java"
12389
12390  windows_path="$VIRTUAL_DIR"
12391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12392    unix_path=`$CYGPATH -u "$windows_path"`
12393    VIRTUAL_DIR="$unix_path"
12394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12396    VIRTUAL_DIR="$unix_path"
12397  fi
12398
12399
12400  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12401  BOOT_JDK_SUFFIX=""
12402  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12403  if test "x$ALL_JDKS_FOUND" != x; then
12404    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12405
12406  if test "x$BOOT_JDK_FOUND" = xno; then
12407    # Now execute the test
12408
12409        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12410        if test -d "$BOOT_JDK"; then
12411          BOOT_JDK_FOUND=maybe
12412          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12413$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12414        fi
12415
12416
12417    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12418    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12419      # Do we have a bin/java?
12420      if test ! -x "$BOOT_JDK/bin/java"; then
12421        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12423        BOOT_JDK_FOUND=no
12424      else
12425        # Do we have a bin/javac?
12426        if test ! -x "$BOOT_JDK/bin/javac"; then
12427          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12429          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12430$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12431          BOOT_JDK_FOUND=no
12432        else
12433          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12434          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12435            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12436$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12437            BOOT_JDK_FOUND=no
12438          else
12439            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12440            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12441
12442            # Extra M4 quote needed to protect [] in grep expression.
12443            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12444            if test "x$FOUND_VERSION_78" = x; then
12445              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12447              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12448$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12449              BOOT_JDK_FOUND=no
12450            else
12451              # We're done! :-)
12452              BOOT_JDK_FOUND=yes
12453
12454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12455
12456  # Input might be given as Windows format, start by converting to
12457  # unix format.
12458  path="$BOOT_JDK"
12459  new_path=`$CYGPATH -u "$path"`
12460
12461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12464  # "foo.exe" is OK but "foo" is an error.
12465  #
12466  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12467  # It is also a way to make sure we got the proper file name for the real test later on.
12468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12469  if test "x$test_shortpath" = x; then
12470    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12471$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12472    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12473  fi
12474
12475  # Call helper function which possibly converts this using DOS-style short mode.
12476  # If so, the updated path is stored in $new_path.
12477
12478  input_path="$new_path"
12479  # Check if we need to convert this using DOS-style short mode. If the path
12480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12481  # take no chances and rewrite it.
12482  # Note: m4 eats our [], so we need to use [ and ] instead.
12483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12484  if test "x$has_forbidden_chars" != x; then
12485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12489      # Going to short mode and back again did indeed matter. Since short mode is
12490      # case insensitive, let's make it lowercase to improve readability.
12491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12492      # Now convert it back to Unix-stile (cygpath)
12493      input_path=`$CYGPATH -u "$shortmode_path"`
12494      new_path="$input_path"
12495    fi
12496  fi
12497
12498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12499  if test "x$test_cygdrive_prefix" = x; then
12500    # As a simple fix, exclude /usr/bin since it's not a real path.
12501    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12503      # a path prefixed by /cygdrive for fixpath to work.
12504      new_path="$CYGWIN_ROOT_PATH$input_path"
12505    fi
12506  fi
12507
12508
12509  if test "x$path" != "x$new_path"; then
12510    BOOT_JDK="$new_path"
12511    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12512$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12513  fi
12514
12515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12516
12517  path="$BOOT_JDK"
12518  has_colon=`$ECHO $path | $GREP ^.:`
12519  new_path="$path"
12520  if test "x$has_colon" = x; then
12521    # Not in mixed or Windows style, start by that.
12522    new_path=`cmd //c echo $path`
12523  fi
12524
12525
12526  input_path="$new_path"
12527  # Check if we need to convert this using DOS-style short mode. If the path
12528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12529  # take no chances and rewrite it.
12530  # Note: m4 eats our [], so we need to use [ and ] instead.
12531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12532  if test "x$has_forbidden_chars" != x; then
12533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12535  fi
12536
12537
12538  windows_path="$new_path"
12539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12540    unix_path=`$CYGPATH -u "$windows_path"`
12541    new_path="$unix_path"
12542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12544    new_path="$unix_path"
12545  fi
12546
12547  if test "x$path" != "x$new_path"; then
12548    BOOT_JDK="$new_path"
12549    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12550$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12551  fi
12552
12553  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12554  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12555
12556  else
12557    # We're on a posix platform. Hooray! :)
12558    path="$BOOT_JDK"
12559    has_space=`$ECHO "$path" | $GREP " "`
12560    if test "x$has_space" != x; then
12561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12562$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12563      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12564    fi
12565
12566    # Use eval to expand a potential ~
12567    eval path="$path"
12568    if test ! -f "$path" && test ! -d "$path"; then
12569      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12570    fi
12571
12572    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
12573  fi
12574
12575              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12576$as_echo_n "checking for Boot JDK... " >&6; }
12577              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12578$as_echo "$BOOT_JDK" >&6; }
12579              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12580$as_echo_n "checking Boot JDK version... " >&6; }
12581              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12582              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12583$as_echo "$BOOT_JDK_VERSION" >&6; }
12584            fi # end check jdk version
12585          fi # end check rt.jar
12586        fi # end check javac
12587      fi # end check java
12588    fi # end check boot jdk found
12589  fi
12590
12591    done
12592  fi
12593
12594  fi
12595
12596
12597    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12598    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12599      # Do we have a bin/java?
12600      if test ! -x "$BOOT_JDK/bin/java"; then
12601        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12603        BOOT_JDK_FOUND=no
12604      else
12605        # Do we have a bin/javac?
12606        if test ! -x "$BOOT_JDK/bin/javac"; then
12607          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12609          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12610$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12611          BOOT_JDK_FOUND=no
12612        else
12613          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12614          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12615            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12617            BOOT_JDK_FOUND=no
12618          else
12619            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12620            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12621
12622            # Extra M4 quote needed to protect [] in grep expression.
12623            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12624            if test "x$FOUND_VERSION_78" = x; then
12625              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12627              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12628$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12629              BOOT_JDK_FOUND=no
12630            else
12631              # We're done! :-)
12632              BOOT_JDK_FOUND=yes
12633
12634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12635
12636  # Input might be given as Windows format, start by converting to
12637  # unix format.
12638  path="$BOOT_JDK"
12639  new_path=`$CYGPATH -u "$path"`
12640
12641  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12642  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12643  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12644  # "foo.exe" is OK but "foo" is an error.
12645  #
12646  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12647  # It is also a way to make sure we got the proper file name for the real test later on.
12648  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12649  if test "x$test_shortpath" = x; then
12650    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12652    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12653  fi
12654
12655  # Call helper function which possibly converts this using DOS-style short mode.
12656  # If so, the updated path is stored in $new_path.
12657
12658  input_path="$new_path"
12659  # Check if we need to convert this using DOS-style short mode. If the path
12660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12661  # take no chances and rewrite it.
12662  # Note: m4 eats our [], so we need to use [ and ] instead.
12663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12664  if test "x$has_forbidden_chars" != x; then
12665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12666    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12667    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12668    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12669      # Going to short mode and back again did indeed matter. Since short mode is
12670      # case insensitive, let's make it lowercase to improve readability.
12671      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12672      # Now convert it back to Unix-stile (cygpath)
12673      input_path=`$CYGPATH -u "$shortmode_path"`
12674      new_path="$input_path"
12675    fi
12676  fi
12677
12678  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12679  if test "x$test_cygdrive_prefix" = x; then
12680    # As a simple fix, exclude /usr/bin since it's not a real path.
12681    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12682      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12683      # a path prefixed by /cygdrive for fixpath to work.
12684      new_path="$CYGWIN_ROOT_PATH$input_path"
12685    fi
12686  fi
12687
12688
12689  if test "x$path" != "x$new_path"; then
12690    BOOT_JDK="$new_path"
12691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12693  fi
12694
12695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12696
12697  path="$BOOT_JDK"
12698  has_colon=`$ECHO $path | $GREP ^.:`
12699  new_path="$path"
12700  if test "x$has_colon" = x; then
12701    # Not in mixed or Windows style, start by that.
12702    new_path=`cmd //c echo $path`
12703  fi
12704
12705
12706  input_path="$new_path"
12707  # Check if we need to convert this using DOS-style short mode. If the path
12708  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12709  # take no chances and rewrite it.
12710  # Note: m4 eats our [], so we need to use [ and ] instead.
12711  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12712  if test "x$has_forbidden_chars" != x; then
12713    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12714    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12715  fi
12716
12717
12718  windows_path="$new_path"
12719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12720    unix_path=`$CYGPATH -u "$windows_path"`
12721    new_path="$unix_path"
12722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12724    new_path="$unix_path"
12725  fi
12726
12727  if test "x$path" != "x$new_path"; then
12728    BOOT_JDK="$new_path"
12729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12730$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12731  fi
12732
12733  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12734  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12735
12736  else
12737    # We're on a posix platform. Hooray! :)
12738    path="$BOOT_JDK"
12739    has_space=`$ECHO "$path" | $GREP " "`
12740    if test "x$has_space" != x; then
12741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12742$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12743      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12744    fi
12745
12746    # Use eval to expand a potential ~
12747    eval path="$path"
12748    if test ! -f "$path" && test ! -d "$path"; then
12749      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12750    fi
12751
12752    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
12753  fi
12754
12755              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12756$as_echo_n "checking for Boot JDK... " >&6; }
12757              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12758$as_echo "$BOOT_JDK" >&6; }
12759              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12760$as_echo_n "checking Boot JDK version... " >&6; }
12761              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12762              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12763$as_echo "$BOOT_JDK_VERSION" >&6; }
12764            fi # end check jdk version
12765          fi # end check rt.jar
12766        fi # end check javac
12767      fi # end check java
12768    fi # end check boot jdk found
12769  fi
12770
12771
12772  if test "x$BOOT_JDK_FOUND" = xno; then
12773    # Now execute the test
12774
12775  if test "x$PROGRAMW6432" != x; then
12776    VIRTUAL_DIR="$PROGRAMW6432/Java"
12777
12778  windows_path="$VIRTUAL_DIR"
12779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12780    unix_path=`$CYGPATH -u "$windows_path"`
12781    VIRTUAL_DIR="$unix_path"
12782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12784    VIRTUAL_DIR="$unix_path"
12785  fi
12786
12787
12788  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
12789  BOOT_JDK_SUFFIX=""
12790  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
12791  if test "x$ALL_JDKS_FOUND" != x; then
12792    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
12793
12794  if test "x$BOOT_JDK_FOUND" = xno; then
12795    # Now execute the test
12796
12797        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
12798        if test -d "$BOOT_JDK"; then
12799          BOOT_JDK_FOUND=maybe
12800          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
12801$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
12802        fi
12803
12804
12805    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12806    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12807      # Do we have a bin/java?
12808      if test ! -x "$BOOT_JDK/bin/java"; then
12809        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12811        BOOT_JDK_FOUND=no
12812      else
12813        # Do we have a bin/javac?
12814        if test ! -x "$BOOT_JDK/bin/javac"; then
12815          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12817          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12818$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12819          BOOT_JDK_FOUND=no
12820        else
12821          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
12822          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
12823            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
12824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
12825            BOOT_JDK_FOUND=no
12826          else
12827            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
12828            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
12829
12830            # Extra M4 quote needed to protect [] in grep expression.
12831            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
12832            if test "x$FOUND_VERSION_78" = x; then
12833              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
12834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
12835              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
12836$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
12837              BOOT_JDK_FOUND=no
12838            else
12839              # We're done! :-)
12840              BOOT_JDK_FOUND=yes
12841
12842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12843
12844  # Input might be given as Windows format, start by converting to
12845  # unix format.
12846  path="$BOOT_JDK"
12847  new_path=`$CYGPATH -u "$path"`
12848
12849  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
12850  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
12851  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
12852  # "foo.exe" is OK but "foo" is an error.
12853  #
12854  # This test is therefore slightly more accurate than "test -f" to check for file precense.
12855  # It is also a way to make sure we got the proper file name for the real test later on.
12856  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
12857  if test "x$test_shortpath" = x; then
12858    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12860    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
12861  fi
12862
12863  # Call helper function which possibly converts this using DOS-style short mode.
12864  # If so, the updated path is stored in $new_path.
12865
12866  input_path="$new_path"
12867  # Check if we need to convert this using DOS-style short mode. If the path
12868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12869  # take no chances and rewrite it.
12870  # Note: m4 eats our [], so we need to use [ and ] instead.
12871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
12872  if test "x$has_forbidden_chars" != x; then
12873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12874    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
12875    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
12876    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
12877      # Going to short mode and back again did indeed matter. Since short mode is
12878      # case insensitive, let's make it lowercase to improve readability.
12879      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12880      # Now convert it back to Unix-stile (cygpath)
12881      input_path=`$CYGPATH -u "$shortmode_path"`
12882      new_path="$input_path"
12883    fi
12884  fi
12885
12886  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
12887  if test "x$test_cygdrive_prefix" = x; then
12888    # As a simple fix, exclude /usr/bin since it's not a real path.
12889    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
12890      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
12891      # a path prefixed by /cygdrive for fixpath to work.
12892      new_path="$CYGWIN_ROOT_PATH$input_path"
12893    fi
12894  fi
12895
12896
12897  if test "x$path" != "x$new_path"; then
12898    BOOT_JDK="$new_path"
12899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12900$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12901  fi
12902
12903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12904
12905  path="$BOOT_JDK"
12906  has_colon=`$ECHO $path | $GREP ^.:`
12907  new_path="$path"
12908  if test "x$has_colon" = x; then
12909    # Not in mixed or Windows style, start by that.
12910    new_path=`cmd //c echo $path`
12911  fi
12912
12913
12914  input_path="$new_path"
12915  # Check if we need to convert this using DOS-style short mode. If the path
12916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
12917  # take no chances and rewrite it.
12918  # Note: m4 eats our [], so we need to use [ and ] instead.
12919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
12920  if test "x$has_forbidden_chars" != x; then
12921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
12922    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
12923  fi
12924
12925
12926  windows_path="$new_path"
12927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
12928    unix_path=`$CYGPATH -u "$windows_path"`
12929    new_path="$unix_path"
12930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
12931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
12932    new_path="$unix_path"
12933  fi
12934
12935  if test "x$path" != "x$new_path"; then
12936    BOOT_JDK="$new_path"
12937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
12938$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
12939  fi
12940
12941  # Save the first 10 bytes of this path to the storage, so fixpath can work.
12942  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
12943
12944  else
12945    # We're on a posix platform. Hooray! :)
12946    path="$BOOT_JDK"
12947    has_space=`$ECHO "$path" | $GREP " "`
12948    if test "x$has_space" != x; then
12949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
12950$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
12951      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
12952    fi
12953
12954    # Use eval to expand a potential ~
12955    eval path="$path"
12956    if test ! -f "$path" && test ! -d "$path"; then
12957      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
12958    fi
12959
12960    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
12961  fi
12962
12963              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
12964$as_echo_n "checking for Boot JDK... " >&6; }
12965              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
12966$as_echo "$BOOT_JDK" >&6; }
12967              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
12968$as_echo_n "checking Boot JDK version... " >&6; }
12969              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
12970              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
12971$as_echo "$BOOT_JDK_VERSION" >&6; }
12972            fi # end check jdk version
12973          fi # end check rt.jar
12974        fi # end check javac
12975      fi # end check java
12976    fi # end check boot jdk found
12977  fi
12978
12979    done
12980  fi
12981
12982  fi
12983
12984
12985    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
12986    if test "x$BOOT_JDK_FOUND" = xmaybe; then
12987      # Do we have a bin/java?
12988      if test ! -x "$BOOT_JDK/bin/java"; then
12989        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
12990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
12991        BOOT_JDK_FOUND=no
12992      else
12993        # Do we have a bin/javac?
12994        if test ! -x "$BOOT_JDK/bin/javac"; then
12995          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
12996$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
12997          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
12998$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
12999          BOOT_JDK_FOUND=no
13000        else
13001          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13002          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13003            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13005            BOOT_JDK_FOUND=no
13006          else
13007            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13008            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13009
13010            # Extra M4 quote needed to protect [] in grep expression.
13011            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13012            if test "x$FOUND_VERSION_78" = x; then
13013              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13015              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13016$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13017              BOOT_JDK_FOUND=no
13018            else
13019              # We're done! :-)
13020              BOOT_JDK_FOUND=yes
13021
13022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13023
13024  # Input might be given as Windows format, start by converting to
13025  # unix format.
13026  path="$BOOT_JDK"
13027  new_path=`$CYGPATH -u "$path"`
13028
13029  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13030  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13031  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13032  # "foo.exe" is OK but "foo" is an error.
13033  #
13034  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13035  # It is also a way to make sure we got the proper file name for the real test later on.
13036  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13037  if test "x$test_shortpath" = x; then
13038    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13039$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13040    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13041  fi
13042
13043  # Call helper function which possibly converts this using DOS-style short mode.
13044  # If so, the updated path is stored in $new_path.
13045
13046  input_path="$new_path"
13047  # Check if we need to convert this using DOS-style short mode. If the path
13048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13049  # take no chances and rewrite it.
13050  # Note: m4 eats our [], so we need to use [ and ] instead.
13051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13052  if test "x$has_forbidden_chars" != x; then
13053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13057      # Going to short mode and back again did indeed matter. Since short mode is
13058      # case insensitive, let's make it lowercase to improve readability.
13059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13060      # Now convert it back to Unix-stile (cygpath)
13061      input_path=`$CYGPATH -u "$shortmode_path"`
13062      new_path="$input_path"
13063    fi
13064  fi
13065
13066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13067  if test "x$test_cygdrive_prefix" = x; then
13068    # As a simple fix, exclude /usr/bin since it's not a real path.
13069    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13071      # a path prefixed by /cygdrive for fixpath to work.
13072      new_path="$CYGWIN_ROOT_PATH$input_path"
13073    fi
13074  fi
13075
13076
13077  if test "x$path" != "x$new_path"; then
13078    BOOT_JDK="$new_path"
13079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13080$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13081  fi
13082
13083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13084
13085  path="$BOOT_JDK"
13086  has_colon=`$ECHO $path | $GREP ^.:`
13087  new_path="$path"
13088  if test "x$has_colon" = x; then
13089    # Not in mixed or Windows style, start by that.
13090    new_path=`cmd //c echo $path`
13091  fi
13092
13093
13094  input_path="$new_path"
13095  # Check if we need to convert this using DOS-style short mode. If the path
13096  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13097  # take no chances and rewrite it.
13098  # Note: m4 eats our [], so we need to use [ and ] instead.
13099  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13100  if test "x$has_forbidden_chars" != x; then
13101    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13102    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13103  fi
13104
13105
13106  windows_path="$new_path"
13107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13108    unix_path=`$CYGPATH -u "$windows_path"`
13109    new_path="$unix_path"
13110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13112    new_path="$unix_path"
13113  fi
13114
13115  if test "x$path" != "x$new_path"; then
13116    BOOT_JDK="$new_path"
13117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13119  fi
13120
13121  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13122  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13123
13124  else
13125    # We're on a posix platform. Hooray! :)
13126    path="$BOOT_JDK"
13127    has_space=`$ECHO "$path" | $GREP " "`
13128    if test "x$has_space" != x; then
13129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13131      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13132    fi
13133
13134    # Use eval to expand a potential ~
13135    eval path="$path"
13136    if test ! -f "$path" && test ! -d "$path"; then
13137      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13138    fi
13139
13140    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
13141  fi
13142
13143              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13144$as_echo_n "checking for Boot JDK... " >&6; }
13145              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13146$as_echo "$BOOT_JDK" >&6; }
13147              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13148$as_echo_n "checking Boot JDK version... " >&6; }
13149              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13150              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13151$as_echo "$BOOT_JDK_VERSION" >&6; }
13152            fi # end check jdk version
13153          fi # end check rt.jar
13154        fi # end check javac
13155      fi # end check java
13156    fi # end check boot jdk found
13157  fi
13158
13159
13160  if test "x$BOOT_JDK_FOUND" = xno; then
13161    # Now execute the test
13162
13163  if test "x$PROGRAMFILES" != x; then
13164    VIRTUAL_DIR="$PROGRAMFILES/Java"
13165
13166  windows_path="$VIRTUAL_DIR"
13167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13168    unix_path=`$CYGPATH -u "$windows_path"`
13169    VIRTUAL_DIR="$unix_path"
13170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13172    VIRTUAL_DIR="$unix_path"
13173  fi
13174
13175
13176  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13177  BOOT_JDK_SUFFIX=""
13178  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13179  if test "x$ALL_JDKS_FOUND" != x; then
13180    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13181
13182  if test "x$BOOT_JDK_FOUND" = xno; then
13183    # Now execute the test
13184
13185        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13186        if test -d "$BOOT_JDK"; then
13187          BOOT_JDK_FOUND=maybe
13188          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13189$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13190        fi
13191
13192
13193    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13194    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13195      # Do we have a bin/java?
13196      if test ! -x "$BOOT_JDK/bin/java"; then
13197        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13198$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13199        BOOT_JDK_FOUND=no
13200      else
13201        # Do we have a bin/javac?
13202        if test ! -x "$BOOT_JDK/bin/javac"; then
13203          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13205          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13206$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13207          BOOT_JDK_FOUND=no
13208        else
13209          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13210          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13211            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13212$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13213            BOOT_JDK_FOUND=no
13214          else
13215            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13216            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13217
13218            # Extra M4 quote needed to protect [] in grep expression.
13219            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13220            if test "x$FOUND_VERSION_78" = x; then
13221              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13222$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13223              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13224$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13225              BOOT_JDK_FOUND=no
13226            else
13227              # We're done! :-)
13228              BOOT_JDK_FOUND=yes
13229
13230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13231
13232  # Input might be given as Windows format, start by converting to
13233  # unix format.
13234  path="$BOOT_JDK"
13235  new_path=`$CYGPATH -u "$path"`
13236
13237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13240  # "foo.exe" is OK but "foo" is an error.
13241  #
13242  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13243  # It is also a way to make sure we got the proper file name for the real test later on.
13244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13245  if test "x$test_shortpath" = x; then
13246    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13247$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13248    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13249  fi
13250
13251  # Call helper function which possibly converts this using DOS-style short mode.
13252  # If so, the updated path is stored in $new_path.
13253
13254  input_path="$new_path"
13255  # Check if we need to convert this using DOS-style short mode. If the path
13256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13257  # take no chances and rewrite it.
13258  # Note: m4 eats our [], so we need to use [ and ] instead.
13259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13260  if test "x$has_forbidden_chars" != x; then
13261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13262    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13263    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13264    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13265      # Going to short mode and back again did indeed matter. Since short mode is
13266      # case insensitive, let's make it lowercase to improve readability.
13267      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13268      # Now convert it back to Unix-stile (cygpath)
13269      input_path=`$CYGPATH -u "$shortmode_path"`
13270      new_path="$input_path"
13271    fi
13272  fi
13273
13274  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13275  if test "x$test_cygdrive_prefix" = x; then
13276    # As a simple fix, exclude /usr/bin since it's not a real path.
13277    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13278      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13279      # a path prefixed by /cygdrive for fixpath to work.
13280      new_path="$CYGWIN_ROOT_PATH$input_path"
13281    fi
13282  fi
13283
13284
13285  if test "x$path" != "x$new_path"; then
13286    BOOT_JDK="$new_path"
13287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13289  fi
13290
13291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13292
13293  path="$BOOT_JDK"
13294  has_colon=`$ECHO $path | $GREP ^.:`
13295  new_path="$path"
13296  if test "x$has_colon" = x; then
13297    # Not in mixed or Windows style, start by that.
13298    new_path=`cmd //c echo $path`
13299  fi
13300
13301
13302  input_path="$new_path"
13303  # Check if we need to convert this using DOS-style short mode. If the path
13304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13305  # take no chances and rewrite it.
13306  # Note: m4 eats our [], so we need to use [ and ] instead.
13307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13308  if test "x$has_forbidden_chars" != x; then
13309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13310    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13311  fi
13312
13313
13314  windows_path="$new_path"
13315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13316    unix_path=`$CYGPATH -u "$windows_path"`
13317    new_path="$unix_path"
13318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13320    new_path="$unix_path"
13321  fi
13322
13323  if test "x$path" != "x$new_path"; then
13324    BOOT_JDK="$new_path"
13325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13326$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13327  fi
13328
13329  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13330  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13331
13332  else
13333    # We're on a posix platform. Hooray! :)
13334    path="$BOOT_JDK"
13335    has_space=`$ECHO "$path" | $GREP " "`
13336    if test "x$has_space" != x; then
13337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13338$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13339      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13340    fi
13341
13342    # Use eval to expand a potential ~
13343    eval path="$path"
13344    if test ! -f "$path" && test ! -d "$path"; then
13345      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13346    fi
13347
13348    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
13349  fi
13350
13351              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13352$as_echo_n "checking for Boot JDK... " >&6; }
13353              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13354$as_echo "$BOOT_JDK" >&6; }
13355              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13356$as_echo_n "checking Boot JDK version... " >&6; }
13357              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13358              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13359$as_echo "$BOOT_JDK_VERSION" >&6; }
13360            fi # end check jdk version
13361          fi # end check rt.jar
13362        fi # end check javac
13363      fi # end check java
13364    fi # end check boot jdk found
13365  fi
13366
13367    done
13368  fi
13369
13370  fi
13371
13372
13373    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13374    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13375      # Do we have a bin/java?
13376      if test ! -x "$BOOT_JDK/bin/java"; then
13377        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13378$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13379        BOOT_JDK_FOUND=no
13380      else
13381        # Do we have a bin/javac?
13382        if test ! -x "$BOOT_JDK/bin/javac"; then
13383          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13385          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13386$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13387          BOOT_JDK_FOUND=no
13388        else
13389          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13390          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13391            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13392$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13393            BOOT_JDK_FOUND=no
13394          else
13395            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13396            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13397
13398            # Extra M4 quote needed to protect [] in grep expression.
13399            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13400            if test "x$FOUND_VERSION_78" = x; then
13401              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13403              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13404$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13405              BOOT_JDK_FOUND=no
13406            else
13407              # We're done! :-)
13408              BOOT_JDK_FOUND=yes
13409
13410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13411
13412  # Input might be given as Windows format, start by converting to
13413  # unix format.
13414  path="$BOOT_JDK"
13415  new_path=`$CYGPATH -u "$path"`
13416
13417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13420  # "foo.exe" is OK but "foo" is an error.
13421  #
13422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13423  # It is also a way to make sure we got the proper file name for the real test later on.
13424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13425  if test "x$test_shortpath" = x; then
13426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13427$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13428    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13429  fi
13430
13431  # Call helper function which possibly converts this using DOS-style short mode.
13432  # If so, the updated path is stored in $new_path.
13433
13434  input_path="$new_path"
13435  # Check if we need to convert this using DOS-style short mode. If the path
13436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13437  # take no chances and rewrite it.
13438  # Note: m4 eats our [], so we need to use [ and ] instead.
13439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13440  if test "x$has_forbidden_chars" != x; then
13441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13445      # Going to short mode and back again did indeed matter. Since short mode is
13446      # case insensitive, let's make it lowercase to improve readability.
13447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13448      # Now convert it back to Unix-stile (cygpath)
13449      input_path=`$CYGPATH -u "$shortmode_path"`
13450      new_path="$input_path"
13451    fi
13452  fi
13453
13454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13455  if test "x$test_cygdrive_prefix" = x; then
13456    # As a simple fix, exclude /usr/bin since it's not a real path.
13457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13459      # a path prefixed by /cygdrive for fixpath to work.
13460      new_path="$CYGWIN_ROOT_PATH$input_path"
13461    fi
13462  fi
13463
13464
13465  if test "x$path" != "x$new_path"; then
13466    BOOT_JDK="$new_path"
13467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13468$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13469  fi
13470
13471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13472
13473  path="$BOOT_JDK"
13474  has_colon=`$ECHO $path | $GREP ^.:`
13475  new_path="$path"
13476  if test "x$has_colon" = x; then
13477    # Not in mixed or Windows style, start by that.
13478    new_path=`cmd //c echo $path`
13479  fi
13480
13481
13482  input_path="$new_path"
13483  # Check if we need to convert this using DOS-style short mode. If the path
13484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13485  # take no chances and rewrite it.
13486  # Note: m4 eats our [], so we need to use [ and ] instead.
13487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13488  if test "x$has_forbidden_chars" != x; then
13489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13491  fi
13492
13493
13494  windows_path="$new_path"
13495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13496    unix_path=`$CYGPATH -u "$windows_path"`
13497    new_path="$unix_path"
13498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13500    new_path="$unix_path"
13501  fi
13502
13503  if test "x$path" != "x$new_path"; then
13504    BOOT_JDK="$new_path"
13505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13506$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13507  fi
13508
13509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13511
13512  else
13513    # We're on a posix platform. Hooray! :)
13514    path="$BOOT_JDK"
13515    has_space=`$ECHO "$path" | $GREP " "`
13516    if test "x$has_space" != x; then
13517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13519      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13520    fi
13521
13522    # Use eval to expand a potential ~
13523    eval path="$path"
13524    if test ! -f "$path" && test ! -d "$path"; then
13525      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13526    fi
13527
13528    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
13529  fi
13530
13531              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13532$as_echo_n "checking for Boot JDK... " >&6; }
13533              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13534$as_echo "$BOOT_JDK" >&6; }
13535              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13536$as_echo_n "checking Boot JDK version... " >&6; }
13537              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13538              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13539$as_echo "$BOOT_JDK_VERSION" >&6; }
13540            fi # end check jdk version
13541          fi # end check rt.jar
13542        fi # end check javac
13543      fi # end check java
13544    fi # end check boot jdk found
13545  fi
13546
13547
13548  if test "x$BOOT_JDK_FOUND" = xno; then
13549    # Now execute the test
13550
13551  if test "x$ProgramFiles" != x; then
13552    VIRTUAL_DIR="$ProgramFiles/Java"
13553
13554  windows_path="$VIRTUAL_DIR"
13555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13556    unix_path=`$CYGPATH -u "$windows_path"`
13557    VIRTUAL_DIR="$unix_path"
13558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13560    VIRTUAL_DIR="$unix_path"
13561  fi
13562
13563
13564  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
13565  BOOT_JDK_SUFFIX=""
13566  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13567  if test "x$ALL_JDKS_FOUND" != x; then
13568    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13569
13570  if test "x$BOOT_JDK_FOUND" = xno; then
13571    # Now execute the test
13572
13573        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13574        if test -d "$BOOT_JDK"; then
13575          BOOT_JDK_FOUND=maybe
13576          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13577$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13578        fi
13579
13580
13581    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13582    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13583      # Do we have a bin/java?
13584      if test ! -x "$BOOT_JDK/bin/java"; then
13585        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13587        BOOT_JDK_FOUND=no
13588      else
13589        # Do we have a bin/javac?
13590        if test ! -x "$BOOT_JDK/bin/javac"; then
13591          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13593          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13594$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13595          BOOT_JDK_FOUND=no
13596        else
13597          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13598          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13599            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13600$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13601            BOOT_JDK_FOUND=no
13602          else
13603            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13604            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13605
13606            # Extra M4 quote needed to protect [] in grep expression.
13607            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13608            if test "x$FOUND_VERSION_78" = x; then
13609              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13610$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13611              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13612$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13613              BOOT_JDK_FOUND=no
13614            else
13615              # We're done! :-)
13616              BOOT_JDK_FOUND=yes
13617
13618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13619
13620  # Input might be given as Windows format, start by converting to
13621  # unix format.
13622  path="$BOOT_JDK"
13623  new_path=`$CYGPATH -u "$path"`
13624
13625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13628  # "foo.exe" is OK but "foo" is an error.
13629  #
13630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13631  # It is also a way to make sure we got the proper file name for the real test later on.
13632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13633  if test "x$test_shortpath" = x; then
13634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13635$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13636    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13637  fi
13638
13639  # Call helper function which possibly converts this using DOS-style short mode.
13640  # If so, the updated path is stored in $new_path.
13641
13642  input_path="$new_path"
13643  # Check if we need to convert this using DOS-style short mode. If the path
13644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13645  # take no chances and rewrite it.
13646  # Note: m4 eats our [], so we need to use [ and ] instead.
13647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13648  if test "x$has_forbidden_chars" != x; then
13649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13653      # Going to short mode and back again did indeed matter. Since short mode is
13654      # case insensitive, let's make it lowercase to improve readability.
13655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13656      # Now convert it back to Unix-stile (cygpath)
13657      input_path=`$CYGPATH -u "$shortmode_path"`
13658      new_path="$input_path"
13659    fi
13660  fi
13661
13662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13663  if test "x$test_cygdrive_prefix" = x; then
13664    # As a simple fix, exclude /usr/bin since it's not a real path.
13665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13667      # a path prefixed by /cygdrive for fixpath to work.
13668      new_path="$CYGWIN_ROOT_PATH$input_path"
13669    fi
13670  fi
13671
13672
13673  if test "x$path" != "x$new_path"; then
13674    BOOT_JDK="$new_path"
13675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13677  fi
13678
13679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13680
13681  path="$BOOT_JDK"
13682  has_colon=`$ECHO $path | $GREP ^.:`
13683  new_path="$path"
13684  if test "x$has_colon" = x; then
13685    # Not in mixed or Windows style, start by that.
13686    new_path=`cmd //c echo $path`
13687  fi
13688
13689
13690  input_path="$new_path"
13691  # Check if we need to convert this using DOS-style short mode. If the path
13692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13693  # take no chances and rewrite it.
13694  # Note: m4 eats our [], so we need to use [ and ] instead.
13695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13696  if test "x$has_forbidden_chars" != x; then
13697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13699  fi
13700
13701
13702  windows_path="$new_path"
13703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13704    unix_path=`$CYGPATH -u "$windows_path"`
13705    new_path="$unix_path"
13706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13708    new_path="$unix_path"
13709  fi
13710
13711  if test "x$path" != "x$new_path"; then
13712    BOOT_JDK="$new_path"
13713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13715  fi
13716
13717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13719
13720  else
13721    # We're on a posix platform. Hooray! :)
13722    path="$BOOT_JDK"
13723    has_space=`$ECHO "$path" | $GREP " "`
13724    if test "x$has_space" != x; then
13725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13727      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13728    fi
13729
13730    # Use eval to expand a potential ~
13731    eval path="$path"
13732    if test ! -f "$path" && test ! -d "$path"; then
13733      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13734    fi
13735
13736    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
13737  fi
13738
13739              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13740$as_echo_n "checking for Boot JDK... " >&6; }
13741              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13742$as_echo "$BOOT_JDK" >&6; }
13743              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13744$as_echo_n "checking Boot JDK version... " >&6; }
13745              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13746              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13747$as_echo "$BOOT_JDK_VERSION" >&6; }
13748            fi # end check jdk version
13749          fi # end check rt.jar
13750        fi # end check javac
13751      fi # end check java
13752    fi # end check boot jdk found
13753  fi
13754
13755    done
13756  fi
13757
13758  fi
13759
13760
13761    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13762    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13763      # Do we have a bin/java?
13764      if test ! -x "$BOOT_JDK/bin/java"; then
13765        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13767        BOOT_JDK_FOUND=no
13768      else
13769        # Do we have a bin/javac?
13770        if test ! -x "$BOOT_JDK/bin/javac"; then
13771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13773          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13774$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13775          BOOT_JDK_FOUND=no
13776        else
13777          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13778          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13779            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13781            BOOT_JDK_FOUND=no
13782          else
13783            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13784            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13785
13786            # Extra M4 quote needed to protect [] in grep expression.
13787            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13788            if test "x$FOUND_VERSION_78" = x; then
13789              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13791              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13792$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13793              BOOT_JDK_FOUND=no
13794            else
13795              # We're done! :-)
13796              BOOT_JDK_FOUND=yes
13797
13798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13799
13800  # Input might be given as Windows format, start by converting to
13801  # unix format.
13802  path="$BOOT_JDK"
13803  new_path=`$CYGPATH -u "$path"`
13804
13805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13808  # "foo.exe" is OK but "foo" is an error.
13809  #
13810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13811  # It is also a way to make sure we got the proper file name for the real test later on.
13812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13813  if test "x$test_shortpath" = x; then
13814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13815$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13816    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
13817  fi
13818
13819  # Call helper function which possibly converts this using DOS-style short mode.
13820  # If so, the updated path is stored in $new_path.
13821
13822  input_path="$new_path"
13823  # Check if we need to convert this using DOS-style short mode. If the path
13824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13825  # take no chances and rewrite it.
13826  # Note: m4 eats our [], so we need to use [ and ] instead.
13827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13828  if test "x$has_forbidden_chars" != x; then
13829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13833      # Going to short mode and back again did indeed matter. Since short mode is
13834      # case insensitive, let's make it lowercase to improve readability.
13835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13836      # Now convert it back to Unix-stile (cygpath)
13837      input_path=`$CYGPATH -u "$shortmode_path"`
13838      new_path="$input_path"
13839    fi
13840  fi
13841
13842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
13843  if test "x$test_cygdrive_prefix" = x; then
13844    # As a simple fix, exclude /usr/bin since it's not a real path.
13845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
13846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
13847      # a path prefixed by /cygdrive for fixpath to work.
13848      new_path="$CYGWIN_ROOT_PATH$input_path"
13849    fi
13850  fi
13851
13852
13853  if test "x$path" != "x$new_path"; then
13854    BOOT_JDK="$new_path"
13855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13856$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13857  fi
13858
13859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13860
13861  path="$BOOT_JDK"
13862  has_colon=`$ECHO $path | $GREP ^.:`
13863  new_path="$path"
13864  if test "x$has_colon" = x; then
13865    # Not in mixed or Windows style, start by that.
13866    new_path=`cmd //c echo $path`
13867  fi
13868
13869
13870  input_path="$new_path"
13871  # Check if we need to convert this using DOS-style short mode. If the path
13872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13873  # take no chances and rewrite it.
13874  # Note: m4 eats our [], so we need to use [ and ] instead.
13875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
13876  if test "x$has_forbidden_chars" != x; then
13877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13879  fi
13880
13881
13882  windows_path="$new_path"
13883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13884    unix_path=`$CYGPATH -u "$windows_path"`
13885    new_path="$unix_path"
13886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13888    new_path="$unix_path"
13889  fi
13890
13891  if test "x$path" != "x$new_path"; then
13892    BOOT_JDK="$new_path"
13893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
13894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
13895  fi
13896
13897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
13898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
13899
13900  else
13901    # We're on a posix platform. Hooray! :)
13902    path="$BOOT_JDK"
13903    has_space=`$ECHO "$path" | $GREP " "`
13904    if test "x$has_space" != x; then
13905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
13906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
13907      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
13908    fi
13909
13910    # Use eval to expand a potential ~
13911    eval path="$path"
13912    if test ! -f "$path" && test ! -d "$path"; then
13913      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
13914    fi
13915
13916    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
13917  fi
13918
13919              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
13920$as_echo_n "checking for Boot JDK... " >&6; }
13921              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
13922$as_echo "$BOOT_JDK" >&6; }
13923              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
13924$as_echo_n "checking Boot JDK version... " >&6; }
13925              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
13926              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
13927$as_echo "$BOOT_JDK_VERSION" >&6; }
13928            fi # end check jdk version
13929          fi # end check rt.jar
13930        fi # end check javac
13931      fi # end check java
13932    fi # end check boot jdk found
13933  fi
13934
13935
13936  if test "x$BOOT_JDK_FOUND" = xno; then
13937    # Now execute the test
13938
13939  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
13940  BOOT_JDK_SUFFIX=""
13941  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
13942  if test "x$ALL_JDKS_FOUND" != x; then
13943    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
13944
13945  if test "x$BOOT_JDK_FOUND" = xno; then
13946    # Now execute the test
13947
13948        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
13949        if test -d "$BOOT_JDK"; then
13950          BOOT_JDK_FOUND=maybe
13951          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
13952$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
13953        fi
13954
13955
13956    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
13957    if test "x$BOOT_JDK_FOUND" = xmaybe; then
13958      # Do we have a bin/java?
13959      if test ! -x "$BOOT_JDK/bin/java"; then
13960        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
13961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
13962        BOOT_JDK_FOUND=no
13963      else
13964        # Do we have a bin/javac?
13965        if test ! -x "$BOOT_JDK/bin/javac"; then
13966          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
13967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
13968          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
13969$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
13970          BOOT_JDK_FOUND=no
13971        else
13972          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
13973          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
13974            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
13975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
13976            BOOT_JDK_FOUND=no
13977          else
13978            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
13979            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
13980
13981            # Extra M4 quote needed to protect [] in grep expression.
13982            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
13983            if test "x$FOUND_VERSION_78" = x; then
13984              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
13985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
13986              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
13987$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
13988              BOOT_JDK_FOUND=no
13989            else
13990              # We're done! :-)
13991              BOOT_JDK_FOUND=yes
13992
13993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13994
13995  # Input might be given as Windows format, start by converting to
13996  # unix format.
13997  path="$BOOT_JDK"
13998  new_path=`$CYGPATH -u "$path"`
13999
14000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14003  # "foo.exe" is OK but "foo" is an error.
14004  #
14005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14006  # It is also a way to make sure we got the proper file name for the real test later on.
14007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14008  if test "x$test_shortpath" = x; then
14009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14011    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14012  fi
14013
14014  # Call helper function which possibly converts this using DOS-style short mode.
14015  # If so, the updated path is stored in $new_path.
14016
14017  input_path="$new_path"
14018  # Check if we need to convert this using DOS-style short mode. If the path
14019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14020  # take no chances and rewrite it.
14021  # Note: m4 eats our [], so we need to use [ and ] instead.
14022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14023  if test "x$has_forbidden_chars" != x; then
14024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14028      # Going to short mode and back again did indeed matter. Since short mode is
14029      # case insensitive, let's make it lowercase to improve readability.
14030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14031      # Now convert it back to Unix-stile (cygpath)
14032      input_path=`$CYGPATH -u "$shortmode_path"`
14033      new_path="$input_path"
14034    fi
14035  fi
14036
14037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14038  if test "x$test_cygdrive_prefix" = x; then
14039    # As a simple fix, exclude /usr/bin since it's not a real path.
14040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14042      # a path prefixed by /cygdrive for fixpath to work.
14043      new_path="$CYGWIN_ROOT_PATH$input_path"
14044    fi
14045  fi
14046
14047
14048  if test "x$path" != "x$new_path"; then
14049    BOOT_JDK="$new_path"
14050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14052  fi
14053
14054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14055
14056  path="$BOOT_JDK"
14057  has_colon=`$ECHO $path | $GREP ^.:`
14058  new_path="$path"
14059  if test "x$has_colon" = x; then
14060    # Not in mixed or Windows style, start by that.
14061    new_path=`cmd //c echo $path`
14062  fi
14063
14064
14065  input_path="$new_path"
14066  # Check if we need to convert this using DOS-style short mode. If the path
14067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14068  # take no chances and rewrite it.
14069  # Note: m4 eats our [], so we need to use [ and ] instead.
14070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14071  if test "x$has_forbidden_chars" != x; then
14072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14074  fi
14075
14076
14077  windows_path="$new_path"
14078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14079    unix_path=`$CYGPATH -u "$windows_path"`
14080    new_path="$unix_path"
14081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14083    new_path="$unix_path"
14084  fi
14085
14086  if test "x$path" != "x$new_path"; then
14087    BOOT_JDK="$new_path"
14088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14090  fi
14091
14092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14094
14095  else
14096    # We're on a posix platform. Hooray! :)
14097    path="$BOOT_JDK"
14098    has_space=`$ECHO "$path" | $GREP " "`
14099    if test "x$has_space" != x; then
14100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14102      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14103    fi
14104
14105    # Use eval to expand a potential ~
14106    eval path="$path"
14107    if test ! -f "$path" && test ! -d "$path"; then
14108      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14109    fi
14110
14111    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
14112  fi
14113
14114              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14115$as_echo_n "checking for Boot JDK... " >&6; }
14116              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14117$as_echo "$BOOT_JDK" >&6; }
14118              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14119$as_echo_n "checking Boot JDK version... " >&6; }
14120              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14121              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14122$as_echo "$BOOT_JDK_VERSION" >&6; }
14123            fi # end check jdk version
14124          fi # end check rt.jar
14125        fi # end check javac
14126      fi # end check java
14127    fi # end check boot jdk found
14128  fi
14129
14130    done
14131  fi
14132
14133
14134    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14135    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14136      # Do we have a bin/java?
14137      if test ! -x "$BOOT_JDK/bin/java"; then
14138        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14139$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14140        BOOT_JDK_FOUND=no
14141      else
14142        # Do we have a bin/javac?
14143        if test ! -x "$BOOT_JDK/bin/javac"; then
14144          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14145$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14146          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14147$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14148          BOOT_JDK_FOUND=no
14149        else
14150          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14151          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14152            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14154            BOOT_JDK_FOUND=no
14155          else
14156            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14158
14159            # Extra M4 quote needed to protect [] in grep expression.
14160            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14161            if test "x$FOUND_VERSION_78" = x; then
14162              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14164              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14165$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14166              BOOT_JDK_FOUND=no
14167            else
14168              # We're done! :-)
14169              BOOT_JDK_FOUND=yes
14170
14171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14172
14173  # Input might be given as Windows format, start by converting to
14174  # unix format.
14175  path="$BOOT_JDK"
14176  new_path=`$CYGPATH -u "$path"`
14177
14178  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14179  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14180  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14181  # "foo.exe" is OK but "foo" is an error.
14182  #
14183  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14184  # It is also a way to make sure we got the proper file name for the real test later on.
14185  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14186  if test "x$test_shortpath" = x; then
14187    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14188$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14189    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14190  fi
14191
14192  # Call helper function which possibly converts this using DOS-style short mode.
14193  # If so, the updated path is stored in $new_path.
14194
14195  input_path="$new_path"
14196  # Check if we need to convert this using DOS-style short mode. If the path
14197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14198  # take no chances and rewrite it.
14199  # Note: m4 eats our [], so we need to use [ and ] instead.
14200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14201  if test "x$has_forbidden_chars" != x; then
14202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14206      # Going to short mode and back again did indeed matter. Since short mode is
14207      # case insensitive, let's make it lowercase to improve readability.
14208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14209      # Now convert it back to Unix-stile (cygpath)
14210      input_path=`$CYGPATH -u "$shortmode_path"`
14211      new_path="$input_path"
14212    fi
14213  fi
14214
14215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14216  if test "x$test_cygdrive_prefix" = x; then
14217    # As a simple fix, exclude /usr/bin since it's not a real path.
14218    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14220      # a path prefixed by /cygdrive for fixpath to work.
14221      new_path="$CYGWIN_ROOT_PATH$input_path"
14222    fi
14223  fi
14224
14225
14226  if test "x$path" != "x$new_path"; then
14227    BOOT_JDK="$new_path"
14228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14230  fi
14231
14232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14233
14234  path="$BOOT_JDK"
14235  has_colon=`$ECHO $path | $GREP ^.:`
14236  new_path="$path"
14237  if test "x$has_colon" = x; then
14238    # Not in mixed or Windows style, start by that.
14239    new_path=`cmd //c echo $path`
14240  fi
14241
14242
14243  input_path="$new_path"
14244  # Check if we need to convert this using DOS-style short mode. If the path
14245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14246  # take no chances and rewrite it.
14247  # Note: m4 eats our [], so we need to use [ and ] instead.
14248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14249  if test "x$has_forbidden_chars" != x; then
14250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14251    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14252  fi
14253
14254
14255  windows_path="$new_path"
14256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14257    unix_path=`$CYGPATH -u "$windows_path"`
14258    new_path="$unix_path"
14259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14261    new_path="$unix_path"
14262  fi
14263
14264  if test "x$path" != "x$new_path"; then
14265    BOOT_JDK="$new_path"
14266    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14267$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14268  fi
14269
14270  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14271  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14272
14273  else
14274    # We're on a posix platform. Hooray! :)
14275    path="$BOOT_JDK"
14276    has_space=`$ECHO "$path" | $GREP " "`
14277    if test "x$has_space" != x; then
14278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14280      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14281    fi
14282
14283    # Use eval to expand a potential ~
14284    eval path="$path"
14285    if test ! -f "$path" && test ! -d "$path"; then
14286      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14287    fi
14288
14289    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
14290  fi
14291
14292              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14293$as_echo_n "checking for Boot JDK... " >&6; }
14294              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14295$as_echo "$BOOT_JDK" >&6; }
14296              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14297$as_echo_n "checking Boot JDK version... " >&6; }
14298              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14299              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14300$as_echo "$BOOT_JDK_VERSION" >&6; }
14301            fi # end check jdk version
14302          fi # end check rt.jar
14303        fi # end check javac
14304      fi # end check java
14305    fi # end check boot jdk found
14306  fi
14307
14308  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
14309
14310  if test "x$BOOT_JDK_FOUND" = xno; then
14311    # Now execute the test
14312
14313  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
14314  BOOT_JDK_SUFFIX="/Contents/Home"
14315  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14316  if test "x$ALL_JDKS_FOUND" != x; then
14317    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14318
14319  if test "x$BOOT_JDK_FOUND" = xno; then
14320    # Now execute the test
14321
14322        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14323        if test -d "$BOOT_JDK"; then
14324          BOOT_JDK_FOUND=maybe
14325          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14326$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14327        fi
14328
14329
14330    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14331    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14332      # Do we have a bin/java?
14333      if test ! -x "$BOOT_JDK/bin/java"; then
14334        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14336        BOOT_JDK_FOUND=no
14337      else
14338        # Do we have a bin/javac?
14339        if test ! -x "$BOOT_JDK/bin/javac"; then
14340          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14342          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14343$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14344          BOOT_JDK_FOUND=no
14345        else
14346          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14347          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14348            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14350            BOOT_JDK_FOUND=no
14351          else
14352            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14353            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14354
14355            # Extra M4 quote needed to protect [] in grep expression.
14356            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14357            if test "x$FOUND_VERSION_78" = x; then
14358              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14359$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14360              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14361$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14362              BOOT_JDK_FOUND=no
14363            else
14364              # We're done! :-)
14365              BOOT_JDK_FOUND=yes
14366
14367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14368
14369  # Input might be given as Windows format, start by converting to
14370  # unix format.
14371  path="$BOOT_JDK"
14372  new_path=`$CYGPATH -u "$path"`
14373
14374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14377  # "foo.exe" is OK but "foo" is an error.
14378  #
14379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14380  # It is also a way to make sure we got the proper file name for the real test later on.
14381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14382  if test "x$test_shortpath" = x; then
14383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14386  fi
14387
14388  # Call helper function which possibly converts this using DOS-style short mode.
14389  # If so, the updated path is stored in $new_path.
14390
14391  input_path="$new_path"
14392  # Check if we need to convert this using DOS-style short mode. If the path
14393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14394  # take no chances and rewrite it.
14395  # Note: m4 eats our [], so we need to use [ and ] instead.
14396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14397  if test "x$has_forbidden_chars" != x; then
14398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14402      # Going to short mode and back again did indeed matter. Since short mode is
14403      # case insensitive, let's make it lowercase to improve readability.
14404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14405      # Now convert it back to Unix-stile (cygpath)
14406      input_path=`$CYGPATH -u "$shortmode_path"`
14407      new_path="$input_path"
14408    fi
14409  fi
14410
14411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14412  if test "x$test_cygdrive_prefix" = x; then
14413    # As a simple fix, exclude /usr/bin since it's not a real path.
14414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14416      # a path prefixed by /cygdrive for fixpath to work.
14417      new_path="$CYGWIN_ROOT_PATH$input_path"
14418    fi
14419  fi
14420
14421
14422  if test "x$path" != "x$new_path"; then
14423    BOOT_JDK="$new_path"
14424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14426  fi
14427
14428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14429
14430  path="$BOOT_JDK"
14431  has_colon=`$ECHO $path | $GREP ^.:`
14432  new_path="$path"
14433  if test "x$has_colon" = x; then
14434    # Not in mixed or Windows style, start by that.
14435    new_path=`cmd //c echo $path`
14436  fi
14437
14438
14439  input_path="$new_path"
14440  # Check if we need to convert this using DOS-style short mode. If the path
14441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14442  # take no chances and rewrite it.
14443  # Note: m4 eats our [], so we need to use [ and ] instead.
14444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14445  if test "x$has_forbidden_chars" != x; then
14446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14448  fi
14449
14450
14451  windows_path="$new_path"
14452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14453    unix_path=`$CYGPATH -u "$windows_path"`
14454    new_path="$unix_path"
14455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14457    new_path="$unix_path"
14458  fi
14459
14460  if test "x$path" != "x$new_path"; then
14461    BOOT_JDK="$new_path"
14462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14464  fi
14465
14466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14468
14469  else
14470    # We're on a posix platform. Hooray! :)
14471    path="$BOOT_JDK"
14472    has_space=`$ECHO "$path" | $GREP " "`
14473    if test "x$has_space" != x; then
14474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14477    fi
14478
14479    # Use eval to expand a potential ~
14480    eval path="$path"
14481    if test ! -f "$path" && test ! -d "$path"; then
14482      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14483    fi
14484
14485    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
14486  fi
14487
14488              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14489$as_echo_n "checking for Boot JDK... " >&6; }
14490              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14491$as_echo "$BOOT_JDK" >&6; }
14492              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14493$as_echo_n "checking Boot JDK version... " >&6; }
14494              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14495              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14496$as_echo "$BOOT_JDK_VERSION" >&6; }
14497            fi # end check jdk version
14498          fi # end check rt.jar
14499        fi # end check javac
14500      fi # end check java
14501    fi # end check boot jdk found
14502  fi
14503
14504    done
14505  fi
14506
14507
14508    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14509    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14510      # Do we have a bin/java?
14511      if test ! -x "$BOOT_JDK/bin/java"; then
14512        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14513$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14514        BOOT_JDK_FOUND=no
14515      else
14516        # Do we have a bin/javac?
14517        if test ! -x "$BOOT_JDK/bin/javac"; then
14518          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14519$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14520          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14521$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14522          BOOT_JDK_FOUND=no
14523        else
14524          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14525          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14526            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14528            BOOT_JDK_FOUND=no
14529          else
14530            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14531            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14532
14533            # Extra M4 quote needed to protect [] in grep expression.
14534            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14535            if test "x$FOUND_VERSION_78" = x; then
14536              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14538              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14539$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14540              BOOT_JDK_FOUND=no
14541            else
14542              # We're done! :-)
14543              BOOT_JDK_FOUND=yes
14544
14545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14546
14547  # Input might be given as Windows format, start by converting to
14548  # unix format.
14549  path="$BOOT_JDK"
14550  new_path=`$CYGPATH -u "$path"`
14551
14552  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14553  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14554  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14555  # "foo.exe" is OK but "foo" is an error.
14556  #
14557  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14558  # It is also a way to make sure we got the proper file name for the real test later on.
14559  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14560  if test "x$test_shortpath" = x; then
14561    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14562$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14563    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14564  fi
14565
14566  # Call helper function which possibly converts this using DOS-style short mode.
14567  # If so, the updated path is stored in $new_path.
14568
14569  input_path="$new_path"
14570  # Check if we need to convert this using DOS-style short mode. If the path
14571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14572  # take no chances and rewrite it.
14573  # Note: m4 eats our [], so we need to use [ and ] instead.
14574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14575  if test "x$has_forbidden_chars" != x; then
14576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14577    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14578    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14579    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14580      # Going to short mode and back again did indeed matter. Since short mode is
14581      # case insensitive, let's make it lowercase to improve readability.
14582      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14583      # Now convert it back to Unix-stile (cygpath)
14584      input_path=`$CYGPATH -u "$shortmode_path"`
14585      new_path="$input_path"
14586    fi
14587  fi
14588
14589  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14590  if test "x$test_cygdrive_prefix" = x; then
14591    # As a simple fix, exclude /usr/bin since it's not a real path.
14592    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14593      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14594      # a path prefixed by /cygdrive for fixpath to work.
14595      new_path="$CYGWIN_ROOT_PATH$input_path"
14596    fi
14597  fi
14598
14599
14600  if test "x$path" != "x$new_path"; then
14601    BOOT_JDK="$new_path"
14602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14603$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14604  fi
14605
14606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14607
14608  path="$BOOT_JDK"
14609  has_colon=`$ECHO $path | $GREP ^.:`
14610  new_path="$path"
14611  if test "x$has_colon" = x; then
14612    # Not in mixed or Windows style, start by that.
14613    new_path=`cmd //c echo $path`
14614  fi
14615
14616
14617  input_path="$new_path"
14618  # Check if we need to convert this using DOS-style short mode. If the path
14619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14620  # take no chances and rewrite it.
14621  # Note: m4 eats our [], so we need to use [ and ] instead.
14622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14623  if test "x$has_forbidden_chars" != x; then
14624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14626  fi
14627
14628
14629  windows_path="$new_path"
14630  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14631    unix_path=`$CYGPATH -u "$windows_path"`
14632    new_path="$unix_path"
14633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14634    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14635    new_path="$unix_path"
14636  fi
14637
14638  if test "x$path" != "x$new_path"; then
14639    BOOT_JDK="$new_path"
14640    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14641$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14642  fi
14643
14644  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14645  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14646
14647  else
14648    # We're on a posix platform. Hooray! :)
14649    path="$BOOT_JDK"
14650    has_space=`$ECHO "$path" | $GREP " "`
14651    if test "x$has_space" != x; then
14652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14653$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14654      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14655    fi
14656
14657    # Use eval to expand a potential ~
14658    eval path="$path"
14659    if test ! -f "$path" && test ! -d "$path"; then
14660      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14661    fi
14662
14663    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
14664  fi
14665
14666              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14667$as_echo_n "checking for Boot JDK... " >&6; }
14668              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14669$as_echo "$BOOT_JDK" >&6; }
14670              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14671$as_echo_n "checking Boot JDK version... " >&6; }
14672              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14673              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14674$as_echo "$BOOT_JDK_VERSION" >&6; }
14675            fi # end check jdk version
14676          fi # end check rt.jar
14677        fi # end check javac
14678      fi # end check java
14679    fi # end check boot jdk found
14680  fi
14681
14682
14683  if test "x$BOOT_JDK_FOUND" = xno; then
14684    # Now execute the test
14685
14686  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
14687  BOOT_JDK_SUFFIX="/Contents/Home"
14688  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
14689  if test "x$ALL_JDKS_FOUND" != x; then
14690    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
14691
14692  if test "x$BOOT_JDK_FOUND" = xno; then
14693    # Now execute the test
14694
14695        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
14696        if test -d "$BOOT_JDK"; then
14697          BOOT_JDK_FOUND=maybe
14698          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
14699$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
14700        fi
14701
14702
14703    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14704    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14705      # Do we have a bin/java?
14706      if test ! -x "$BOOT_JDK/bin/java"; then
14707        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14709        BOOT_JDK_FOUND=no
14710      else
14711        # Do we have a bin/javac?
14712        if test ! -x "$BOOT_JDK/bin/javac"; then
14713          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14715          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14716$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14717          BOOT_JDK_FOUND=no
14718        else
14719          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14720          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14721            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14723            BOOT_JDK_FOUND=no
14724          else
14725            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14726            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14727
14728            # Extra M4 quote needed to protect [] in grep expression.
14729            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14730            if test "x$FOUND_VERSION_78" = x; then
14731              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14733              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14734$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14735              BOOT_JDK_FOUND=no
14736            else
14737              # We're done! :-)
14738              BOOT_JDK_FOUND=yes
14739
14740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14741
14742  # Input might be given as Windows format, start by converting to
14743  # unix format.
14744  path="$BOOT_JDK"
14745  new_path=`$CYGPATH -u "$path"`
14746
14747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14750  # "foo.exe" is OK but "foo" is an error.
14751  #
14752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14753  # It is also a way to make sure we got the proper file name for the real test later on.
14754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14755  if test "x$test_shortpath" = x; then
14756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14758    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14759  fi
14760
14761  # Call helper function which possibly converts this using DOS-style short mode.
14762  # If so, the updated path is stored in $new_path.
14763
14764  input_path="$new_path"
14765  # Check if we need to convert this using DOS-style short mode. If the path
14766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14767  # take no chances and rewrite it.
14768  # Note: m4 eats our [], so we need to use [ and ] instead.
14769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14770  if test "x$has_forbidden_chars" != x; then
14771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14775      # Going to short mode and back again did indeed matter. Since short mode is
14776      # case insensitive, let's make it lowercase to improve readability.
14777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14778      # Now convert it back to Unix-stile (cygpath)
14779      input_path=`$CYGPATH -u "$shortmode_path"`
14780      new_path="$input_path"
14781    fi
14782  fi
14783
14784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14785  if test "x$test_cygdrive_prefix" = x; then
14786    # As a simple fix, exclude /usr/bin since it's not a real path.
14787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14789      # a path prefixed by /cygdrive for fixpath to work.
14790      new_path="$CYGWIN_ROOT_PATH$input_path"
14791    fi
14792  fi
14793
14794
14795  if test "x$path" != "x$new_path"; then
14796    BOOT_JDK="$new_path"
14797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14799  fi
14800
14801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14802
14803  path="$BOOT_JDK"
14804  has_colon=`$ECHO $path | $GREP ^.:`
14805  new_path="$path"
14806  if test "x$has_colon" = x; then
14807    # Not in mixed or Windows style, start by that.
14808    new_path=`cmd //c echo $path`
14809  fi
14810
14811
14812  input_path="$new_path"
14813  # Check if we need to convert this using DOS-style short mode. If the path
14814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14815  # take no chances and rewrite it.
14816  # Note: m4 eats our [], so we need to use [ and ] instead.
14817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14818  if test "x$has_forbidden_chars" != x; then
14819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14821  fi
14822
14823
14824  windows_path="$new_path"
14825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14826    unix_path=`$CYGPATH -u "$windows_path"`
14827    new_path="$unix_path"
14828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14830    new_path="$unix_path"
14831  fi
14832
14833  if test "x$path" != "x$new_path"; then
14834    BOOT_JDK="$new_path"
14835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14836$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14837  fi
14838
14839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14841
14842  else
14843    # We're on a posix platform. Hooray! :)
14844    path="$BOOT_JDK"
14845    has_space=`$ECHO "$path" | $GREP " "`
14846    if test "x$has_space" != x; then
14847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14849      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14850    fi
14851
14852    # Use eval to expand a potential ~
14853    eval path="$path"
14854    if test ! -f "$path" && test ! -d "$path"; then
14855      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
14856    fi
14857
14858    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
14859  fi
14860
14861              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
14862$as_echo_n "checking for Boot JDK... " >&6; }
14863              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
14864$as_echo "$BOOT_JDK" >&6; }
14865              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
14866$as_echo_n "checking Boot JDK version... " >&6; }
14867              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
14868              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
14869$as_echo "$BOOT_JDK_VERSION" >&6; }
14870            fi # end check jdk version
14871          fi # end check rt.jar
14872        fi # end check javac
14873      fi # end check java
14874    fi # end check boot jdk found
14875  fi
14876
14877    done
14878  fi
14879
14880
14881    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
14882    if test "x$BOOT_JDK_FOUND" = xmaybe; then
14883      # Do we have a bin/java?
14884      if test ! -x "$BOOT_JDK/bin/java"; then
14885        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
14886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
14887        BOOT_JDK_FOUND=no
14888      else
14889        # Do we have a bin/javac?
14890        if test ! -x "$BOOT_JDK/bin/javac"; then
14891          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
14892$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
14893          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
14894$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
14895          BOOT_JDK_FOUND=no
14896        else
14897          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
14898          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
14899            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
14900$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
14901            BOOT_JDK_FOUND=no
14902          else
14903            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
14904            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
14905
14906            # Extra M4 quote needed to protect [] in grep expression.
14907            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
14908            if test "x$FOUND_VERSION_78" = x; then
14909              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
14910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
14911              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
14912$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
14913              BOOT_JDK_FOUND=no
14914            else
14915              # We're done! :-)
14916              BOOT_JDK_FOUND=yes
14917
14918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14919
14920  # Input might be given as Windows format, start by converting to
14921  # unix format.
14922  path="$BOOT_JDK"
14923  new_path=`$CYGPATH -u "$path"`
14924
14925  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14926  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14927  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14928  # "foo.exe" is OK but "foo" is an error.
14929  #
14930  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14931  # It is also a way to make sure we got the proper file name for the real test later on.
14932  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14933  if test "x$test_shortpath" = x; then
14934    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
14935$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
14936    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
14937  fi
14938
14939  # Call helper function which possibly converts this using DOS-style short mode.
14940  # If so, the updated path is stored in $new_path.
14941
14942  input_path="$new_path"
14943  # Check if we need to convert this using DOS-style short mode. If the path
14944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14945  # take no chances and rewrite it.
14946  # Note: m4 eats our [], so we need to use [ and ] instead.
14947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14948  if test "x$has_forbidden_chars" != x; then
14949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14950    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14951    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14952    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14953      # Going to short mode and back again did indeed matter. Since short mode is
14954      # case insensitive, let's make it lowercase to improve readability.
14955      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14956      # Now convert it back to Unix-stile (cygpath)
14957      input_path=`$CYGPATH -u "$shortmode_path"`
14958      new_path="$input_path"
14959    fi
14960  fi
14961
14962  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14963  if test "x$test_cygdrive_prefix" = x; then
14964    # As a simple fix, exclude /usr/bin since it's not a real path.
14965    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14966      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14967      # a path prefixed by /cygdrive for fixpath to work.
14968      new_path="$CYGWIN_ROOT_PATH$input_path"
14969    fi
14970  fi
14971
14972
14973  if test "x$path" != "x$new_path"; then
14974    BOOT_JDK="$new_path"
14975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
14976$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
14977  fi
14978
14979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14980
14981  path="$BOOT_JDK"
14982  has_colon=`$ECHO $path | $GREP ^.:`
14983  new_path="$path"
14984  if test "x$has_colon" = x; then
14985    # Not in mixed or Windows style, start by that.
14986    new_path=`cmd //c echo $path`
14987  fi
14988
14989
14990  input_path="$new_path"
14991  # Check if we need to convert this using DOS-style short mode. If the path
14992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14993  # take no chances and rewrite it.
14994  # Note: m4 eats our [], so we need to use [ and ] instead.
14995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14996  if test "x$has_forbidden_chars" != x; then
14997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14999  fi
15000
15001
15002  windows_path="$new_path"
15003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15004    unix_path=`$CYGPATH -u "$windows_path"`
15005    new_path="$unix_path"
15006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15008    new_path="$unix_path"
15009  fi
15010
15011  if test "x$path" != "x$new_path"; then
15012    BOOT_JDK="$new_path"
15013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15014$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15015  fi
15016
15017  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15018  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15019
15020  else
15021    # We're on a posix platform. Hooray! :)
15022    path="$BOOT_JDK"
15023    has_space=`$ECHO "$path" | $GREP " "`
15024    if test "x$has_space" != x; then
15025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15026$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15027      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15028    fi
15029
15030    # Use eval to expand a potential ~
15031    eval path="$path"
15032    if test ! -f "$path" && test ! -d "$path"; then
15033      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15034    fi
15035
15036    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
15037  fi
15038
15039              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15040$as_echo_n "checking for Boot JDK... " >&6; }
15041              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15042$as_echo "$BOOT_JDK" >&6; }
15043              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15044$as_echo_n "checking Boot JDK version... " >&6; }
15045              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15046              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15047$as_echo "$BOOT_JDK_VERSION" >&6; }
15048            fi # end check jdk version
15049          fi # end check rt.jar
15050        fi # end check javac
15051      fi # end check java
15052    fi # end check boot jdk found
15053  fi
15054
15055  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
15056
15057  if test "x$BOOT_JDK_FOUND" = xno; then
15058    # Now execute the test
15059
15060  BOOT_JDK_PREFIX="/usr/lib/jvm"
15061  BOOT_JDK_SUFFIX=""
15062  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
15063  if test "x$ALL_JDKS_FOUND" != x; then
15064    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
15065
15066  if test "x$BOOT_JDK_FOUND" = xno; then
15067    # Now execute the test
15068
15069        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
15070        if test -d "$BOOT_JDK"; then
15071          BOOT_JDK_FOUND=maybe
15072          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
15073$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
15074        fi
15075
15076
15077    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15078    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15079      # Do we have a bin/java?
15080      if test ! -x "$BOOT_JDK/bin/java"; then
15081        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15082$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15083        BOOT_JDK_FOUND=no
15084      else
15085        # Do we have a bin/javac?
15086        if test ! -x "$BOOT_JDK/bin/javac"; then
15087          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15088$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15089          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15090$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15091          BOOT_JDK_FOUND=no
15092        else
15093          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15094          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15095            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15096$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15097            BOOT_JDK_FOUND=no
15098          else
15099            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15100            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15101
15102            # Extra M4 quote needed to protect [] in grep expression.
15103            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15104            if test "x$FOUND_VERSION_78" = x; then
15105              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15106$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15107              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15108$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15109              BOOT_JDK_FOUND=no
15110            else
15111              # We're done! :-)
15112              BOOT_JDK_FOUND=yes
15113
15114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15115
15116  # Input might be given as Windows format, start by converting to
15117  # unix format.
15118  path="$BOOT_JDK"
15119  new_path=`$CYGPATH -u "$path"`
15120
15121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15124  # "foo.exe" is OK but "foo" is an error.
15125  #
15126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15127  # It is also a way to make sure we got the proper file name for the real test later on.
15128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15129  if test "x$test_shortpath" = x; then
15130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15132    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15133  fi
15134
15135  # Call helper function which possibly converts this using DOS-style short mode.
15136  # If so, the updated path is stored in $new_path.
15137
15138  input_path="$new_path"
15139  # Check if we need to convert this using DOS-style short mode. If the path
15140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15141  # take no chances and rewrite it.
15142  # Note: m4 eats our [], so we need to use [ and ] instead.
15143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15144  if test "x$has_forbidden_chars" != x; then
15145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15149      # Going to short mode and back again did indeed matter. Since short mode is
15150      # case insensitive, let's make it lowercase to improve readability.
15151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15152      # Now convert it back to Unix-stile (cygpath)
15153      input_path=`$CYGPATH -u "$shortmode_path"`
15154      new_path="$input_path"
15155    fi
15156  fi
15157
15158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15159  if test "x$test_cygdrive_prefix" = x; then
15160    # As a simple fix, exclude /usr/bin since it's not a real path.
15161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15163      # a path prefixed by /cygdrive for fixpath to work.
15164      new_path="$CYGWIN_ROOT_PATH$input_path"
15165    fi
15166  fi
15167
15168
15169  if test "x$path" != "x$new_path"; then
15170    BOOT_JDK="$new_path"
15171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15172$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15173  fi
15174
15175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15176
15177  path="$BOOT_JDK"
15178  has_colon=`$ECHO $path | $GREP ^.:`
15179  new_path="$path"
15180  if test "x$has_colon" = x; then
15181    # Not in mixed or Windows style, start by that.
15182    new_path=`cmd //c echo $path`
15183  fi
15184
15185
15186  input_path="$new_path"
15187  # Check if we need to convert this using DOS-style short mode. If the path
15188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15189  # take no chances and rewrite it.
15190  # Note: m4 eats our [], so we need to use [ and ] instead.
15191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15192  if test "x$has_forbidden_chars" != x; then
15193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15195  fi
15196
15197
15198  windows_path="$new_path"
15199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15200    unix_path=`$CYGPATH -u "$windows_path"`
15201    new_path="$unix_path"
15202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15204    new_path="$unix_path"
15205  fi
15206
15207  if test "x$path" != "x$new_path"; then
15208    BOOT_JDK="$new_path"
15209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15210$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15211  fi
15212
15213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15215
15216  else
15217    # We're on a posix platform. Hooray! :)
15218    path="$BOOT_JDK"
15219    has_space=`$ECHO "$path" | $GREP " "`
15220    if test "x$has_space" != x; then
15221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15222$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15223      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15224    fi
15225
15226    # Use eval to expand a potential ~
15227    eval path="$path"
15228    if test ! -f "$path" && test ! -d "$path"; then
15229      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15230    fi
15231
15232    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
15233  fi
15234
15235              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15236$as_echo_n "checking for Boot JDK... " >&6; }
15237              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15238$as_echo "$BOOT_JDK" >&6; }
15239              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15240$as_echo_n "checking Boot JDK version... " >&6; }
15241              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15242              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15243$as_echo "$BOOT_JDK_VERSION" >&6; }
15244            fi # end check jdk version
15245          fi # end check rt.jar
15246        fi # end check javac
15247      fi # end check java
15248    fi # end check boot jdk found
15249  fi
15250
15251    done
15252  fi
15253
15254
15255    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15256    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15257      # Do we have a bin/java?
15258      if test ! -x "$BOOT_JDK/bin/java"; then
15259        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15261        BOOT_JDK_FOUND=no
15262      else
15263        # Do we have a bin/javac?
15264        if test ! -x "$BOOT_JDK/bin/javac"; then
15265          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15266$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15267          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15268$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15269          BOOT_JDK_FOUND=no
15270        else
15271          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15272          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15273            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15275            BOOT_JDK_FOUND=no
15276          else
15277            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15278            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15279
15280            # Extra M4 quote needed to protect [] in grep expression.
15281            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15282            if test "x$FOUND_VERSION_78" = x; then
15283              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15285              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15286$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15287              BOOT_JDK_FOUND=no
15288            else
15289              # We're done! :-)
15290              BOOT_JDK_FOUND=yes
15291
15292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15293
15294  # Input might be given as Windows format, start by converting to
15295  # unix format.
15296  path="$BOOT_JDK"
15297  new_path=`$CYGPATH -u "$path"`
15298
15299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15302  # "foo.exe" is OK but "foo" is an error.
15303  #
15304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15305  # It is also a way to make sure we got the proper file name for the real test later on.
15306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15307  if test "x$test_shortpath" = x; then
15308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15309$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15310    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15311  fi
15312
15313  # Call helper function which possibly converts this using DOS-style short mode.
15314  # If so, the updated path is stored in $new_path.
15315
15316  input_path="$new_path"
15317  # Check if we need to convert this using DOS-style short mode. If the path
15318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15319  # take no chances and rewrite it.
15320  # Note: m4 eats our [], so we need to use [ and ] instead.
15321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15322  if test "x$has_forbidden_chars" != x; then
15323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15327      # Going to short mode and back again did indeed matter. Since short mode is
15328      # case insensitive, let's make it lowercase to improve readability.
15329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15330      # Now convert it back to Unix-stile (cygpath)
15331      input_path=`$CYGPATH -u "$shortmode_path"`
15332      new_path="$input_path"
15333    fi
15334  fi
15335
15336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15337  if test "x$test_cygdrive_prefix" = x; then
15338    # As a simple fix, exclude /usr/bin since it's not a real path.
15339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15341      # a path prefixed by /cygdrive for fixpath to work.
15342      new_path="$CYGWIN_ROOT_PATH$input_path"
15343    fi
15344  fi
15345
15346
15347  if test "x$path" != "x$new_path"; then
15348    BOOT_JDK="$new_path"
15349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15350$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15351  fi
15352
15353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15354
15355  path="$BOOT_JDK"
15356  has_colon=`$ECHO $path | $GREP ^.:`
15357  new_path="$path"
15358  if test "x$has_colon" = x; then
15359    # Not in mixed or Windows style, start by that.
15360    new_path=`cmd //c echo $path`
15361  fi
15362
15363
15364  input_path="$new_path"
15365  # Check if we need to convert this using DOS-style short mode. If the path
15366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15367  # take no chances and rewrite it.
15368  # Note: m4 eats our [], so we need to use [ and ] instead.
15369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15370  if test "x$has_forbidden_chars" != x; then
15371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15373  fi
15374
15375
15376  windows_path="$new_path"
15377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15378    unix_path=`$CYGPATH -u "$windows_path"`
15379    new_path="$unix_path"
15380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15382    new_path="$unix_path"
15383  fi
15384
15385  if test "x$path" != "x$new_path"; then
15386    BOOT_JDK="$new_path"
15387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15388$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15389  fi
15390
15391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15393
15394  else
15395    # We're on a posix platform. Hooray! :)
15396    path="$BOOT_JDK"
15397    has_space=`$ECHO "$path" | $GREP " "`
15398    if test "x$has_space" != x; then
15399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15400$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15401      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15402    fi
15403
15404    # Use eval to expand a potential ~
15405    eval path="$path"
15406    if test ! -f "$path" && test ! -d "$path"; then
15407      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15408    fi
15409
15410    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
15411  fi
15412
15413              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15414$as_echo_n "checking for Boot JDK... " >&6; }
15415              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15416$as_echo "$BOOT_JDK" >&6; }
15417              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15418$as_echo_n "checking Boot JDK version... " >&6; }
15419              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15420              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15421$as_echo "$BOOT_JDK_VERSION" >&6; }
15422            fi # end check jdk version
15423          fi # end check rt.jar
15424        fi # end check javac
15425      fi # end check java
15426    fi # end check boot jdk found
15427  fi
15428
15429  fi
15430
15431
15432    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
15433    if test "x$BOOT_JDK_FOUND" = xmaybe; then
15434      # Do we have a bin/java?
15435      if test ! -x "$BOOT_JDK/bin/java"; then
15436        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
15437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
15438        BOOT_JDK_FOUND=no
15439      else
15440        # Do we have a bin/javac?
15441        if test ! -x "$BOOT_JDK/bin/javac"; then
15442          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
15443$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
15444          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
15445$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
15446          BOOT_JDK_FOUND=no
15447        else
15448          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
15449          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
15450            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
15451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
15452            BOOT_JDK_FOUND=no
15453          else
15454            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
15455            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
15456
15457            # Extra M4 quote needed to protect [] in grep expression.
15458            FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep  '\"1\.[78]\.'`
15459            if test "x$FOUND_VERSION_78" = x; then
15460              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
15461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
15462              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7 or 8)" >&5
15463$as_echo "$as_me: (Your Boot JDK must be version 7 or 8)" >&6;}
15464              BOOT_JDK_FOUND=no
15465            else
15466              # We're done! :-)
15467              BOOT_JDK_FOUND=yes
15468
15469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15470
15471  # Input might be given as Windows format, start by converting to
15472  # unix format.
15473  path="$BOOT_JDK"
15474  new_path=`$CYGPATH -u "$path"`
15475
15476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15479  # "foo.exe" is OK but "foo" is an error.
15480  #
15481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15482  # It is also a way to make sure we got the proper file name for the real test later on.
15483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15484  if test "x$test_shortpath" = x; then
15485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15487    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
15488  fi
15489
15490  # Call helper function which possibly converts this using DOS-style short mode.
15491  # If so, the updated path is stored in $new_path.
15492
15493  input_path="$new_path"
15494  # Check if we need to convert this using DOS-style short mode. If the path
15495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15496  # take no chances and rewrite it.
15497  # Note: m4 eats our [], so we need to use [ and ] instead.
15498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15499  if test "x$has_forbidden_chars" != x; then
15500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15504      # Going to short mode and back again did indeed matter. Since short mode is
15505      # case insensitive, let's make it lowercase to improve readability.
15506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15507      # Now convert it back to Unix-stile (cygpath)
15508      input_path=`$CYGPATH -u "$shortmode_path"`
15509      new_path="$input_path"
15510    fi
15511  fi
15512
15513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15514  if test "x$test_cygdrive_prefix" = x; then
15515    # As a simple fix, exclude /usr/bin since it's not a real path.
15516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15518      # a path prefixed by /cygdrive for fixpath to work.
15519      new_path="$CYGWIN_ROOT_PATH$input_path"
15520    fi
15521  fi
15522
15523
15524  if test "x$path" != "x$new_path"; then
15525    BOOT_JDK="$new_path"
15526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15528  fi
15529
15530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15531
15532  path="$BOOT_JDK"
15533  has_colon=`$ECHO $path | $GREP ^.:`
15534  new_path="$path"
15535  if test "x$has_colon" = x; then
15536    # Not in mixed or Windows style, start by that.
15537    new_path=`cmd //c echo $path`
15538  fi
15539
15540
15541  input_path="$new_path"
15542  # Check if we need to convert this using DOS-style short mode. If the path
15543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15544  # take no chances and rewrite it.
15545  # Note: m4 eats our [], so we need to use [ and ] instead.
15546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15547  if test "x$has_forbidden_chars" != x; then
15548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15550  fi
15551
15552
15553  windows_path="$new_path"
15554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15555    unix_path=`$CYGPATH -u "$windows_path"`
15556    new_path="$unix_path"
15557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15559    new_path="$unix_path"
15560  fi
15561
15562  if test "x$path" != "x$new_path"; then
15563    BOOT_JDK="$new_path"
15564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
15565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
15566  fi
15567
15568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15570
15571  else
15572    # We're on a posix platform. Hooray! :)
15573    path="$BOOT_JDK"
15574    has_space=`$ECHO "$path" | $GREP " "`
15575    if test "x$has_space" != x; then
15576      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
15577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
15578      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15579    fi
15580
15581    # Use eval to expand a potential ~
15582    eval path="$path"
15583    if test ! -f "$path" && test ! -d "$path"; then
15584      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
15585    fi
15586
15587    BOOT_JDK="`cd "$path"; $THEPWDCMD`"
15588  fi
15589
15590              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
15591$as_echo_n "checking for Boot JDK... " >&6; }
15592              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
15593$as_echo "$BOOT_JDK" >&6; }
15594              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
15595$as_echo_n "checking Boot JDK version... " >&6; }
15596              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
15597              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
15598$as_echo "$BOOT_JDK_VERSION" >&6; }
15599            fi # end check jdk version
15600          fi # end check rt.jar
15601        fi # end check javac
15602      fi # end check java
15603    fi # end check boot jdk found
15604  fi
15605
15606
15607# If we haven't found anything yet, we've truly lost. Give up.
15608if test "x$BOOT_JDK_FOUND" = xno; then
15609
15610    # Print a helpful message on how to acquire the necessary build dependency.
15611    # openjdk is the help tag: freetyp2, cups, pulse, alsa etc
15612    MISSING_DEPENDENCY=openjdk
15613    PKGHANDLER_COMMAND=
15614
15615    case $PKGHANDLER in
15616	apt-get)
15617                apt_help     $MISSING_DEPENDENCY ;;
15618    yum)
15619                yum_help     $MISSING_DEPENDENCY ;;
15620	port)
15621                port_help    $MISSING_DEPENDENCY ;;
15622	pkgutil)
15623                pkgutil_help $MISSING_DEPENDENCY ;;
15624	pkgadd)
15625                pkgadd_help  $MISSING_DEPENDENCY ;;
15626    * )
15627      break ;;
15628    esac
15629
15630    if test "x$PKGHANDLER_COMMAND" != x; then
15631        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
15632    fi
15633
15634  { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
15635$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
15636  { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
15637$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15638  as_fn_error $? "Cannot continue" "$LINENO" 5
15639fi
15640
15641# Setup proper paths for what we found
15642BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
15643if test ! -f "$BOOT_RTJAR"; then
15644    # On MacOSX it is called classes.jar
15645    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
15646    if test -f "$BOOT_RTJAR"; then
15647      # Remove the ..
15648      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
15649    fi
15650fi
15651BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
15652BOOT_JDK="$BOOT_JDK"
15653
15654
15655
15656
15657# Setup tools from the Boot JDK.
15658
15659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
15660$as_echo_n "checking for java in Boot JDK... " >&6; }
15661  JAVA=$BOOT_JDK/bin/java
15662  if test ! -x $JAVA; then
15663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15664$as_echo "not found" >&6; }
15665      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15666$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15667      as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
15668  fi
15669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15670$as_echo "ok" >&6; }
15671
15672
15673  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
15674$as_echo_n "checking for javac in Boot JDK... " >&6; }
15675  JAVAC=$BOOT_JDK/bin/javac
15676  if test ! -x $JAVAC; then
15677      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15678$as_echo "not found" >&6; }
15679      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15680$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15681      as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
15682  fi
15683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15684$as_echo "ok" >&6; }
15685
15686
15687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
15688$as_echo_n "checking for javah in Boot JDK... " >&6; }
15689  JAVAH=$BOOT_JDK/bin/javah
15690  if test ! -x $JAVAH; then
15691      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15692$as_echo "not found" >&6; }
15693      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15694$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15695      as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
15696  fi
15697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15698$as_echo "ok" >&6; }
15699
15700
15701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javap in Boot JDK" >&5
15702$as_echo_n "checking for javap in Boot JDK... " >&6; }
15703  JAVAP=$BOOT_JDK/bin/javap
15704  if test ! -x $JAVAP; then
15705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15706$as_echo "not found" >&6; }
15707      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15708$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15709      as_fn_error $? "Could not find javap in the Boot JDK" "$LINENO" 5
15710  fi
15711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15712$as_echo "ok" >&6; }
15713
15714
15715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
15716$as_echo_n "checking for jar in Boot JDK... " >&6; }
15717  JAR=$BOOT_JDK/bin/jar
15718  if test ! -x $JAR; then
15719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15720$as_echo "not found" >&6; }
15721      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15722$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15723      as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
15724  fi
15725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15726$as_echo "ok" >&6; }
15727
15728
15729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rmic in Boot JDK" >&5
15730$as_echo_n "checking for rmic in Boot JDK... " >&6; }
15731  RMIC=$BOOT_JDK/bin/rmic
15732  if test ! -x $RMIC; then
15733      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15734$as_echo "not found" >&6; }
15735      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15736$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15737      as_fn_error $? "Could not find rmic in the Boot JDK" "$LINENO" 5
15738  fi
15739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15740$as_echo "ok" >&6; }
15741
15742
15743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
15744$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
15745  NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
15746  if test ! -x $NATIVE2ASCII; then
15747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15748$as_echo "not found" >&6; }
15749      { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
15750$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
15751      as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
15752  fi
15753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
15754$as_echo "ok" >&6; }
15755
15756
15757# Finally, set some other options...
15758
15759# When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
15760BOOT_JDK_SOURCETARGET="-source 7 -target 7"
15761
15762
15763
15764
15765##############################################################################
15766#
15767# Specify options for anything that is run with the Boot JDK.
15768#
15769
15770# Check whether --with-boot-jdk-jvmargs was given.
15771if test "${with_boot_jdk_jvmargs+set}" = set; then :
15772  withval=$with_boot_jdk_jvmargs;
15773fi
15774
15775
15776if test "x$with_boot_jdk_jvmargs" = x; then
15777    # Not all JVM:s accept the same arguments on the command line.
15778    # OpenJDK specific increase in thread stack for JDK build,
15779    # well more specifically, when running javac.
15780    if test "x$BUILD_NUM_BITS" = x32; then
15781       STACK_SIZE=768
15782    else
15783       # Running Javac on a JVM on a 64-bit machine, the stack takes more space
15784       # since 64-bit pointers are pushed on the stach. Apparently, we need
15785       # to increase the stack space when javacing the JDK....
15786       STACK_SIZE=1536
15787    fi
15788
15789    # Minimum amount of heap memory.
15790
15791    $ECHO "Check if jvm arg is ok: -Xms64M" >&5
15792    $ECHO "Command: $JAVA -Xms64M -version" >&5
15793    OUTPUT=`$JAVA -Xms64M -version 2>&1`
15794    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15795    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15796    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15797        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
15798	JVM_ARG_OK=true
15799    else
15800	$ECHO "Arg failed:" >&5
15801	$ECHO "$OUTPUT" >&5
15802	JVM_ARG_OK=false
15803    fi
15804
15805    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15806        # Why does macosx need more heap? Its the huge JDK batch.
15807
15808    $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
15809    $ECHO "Command: $JAVA -Xmx1600M -version" >&5
15810    OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
15811    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15812    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15813    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15814        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
15815	JVM_ARG_OK=true
15816    else
15817	$ECHO "Arg failed:" >&5
15818	$ECHO "$OUTPUT" >&5
15819	JVM_ARG_OK=false
15820    fi
15821
15822    else
15823
15824    $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
15825    $ECHO "Command: $JAVA -Xmx1100M -version" >&5
15826    OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
15827    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15828    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15829    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15830        boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
15831	JVM_ARG_OK=true
15832    else
15833	$ECHO "Arg failed:" >&5
15834	$ECHO "$OUTPUT" >&5
15835	JVM_ARG_OK=false
15836    fi
15837
15838    fi
15839    # When is adding -client something that speeds up the JVM?
15840    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
15841
15842    $ECHO "Check if jvm arg is ok: -XX:PermSize=32m" >&5
15843    $ECHO "Command: $JAVA -XX:PermSize=32m -version" >&5
15844    OUTPUT=`$JAVA -XX:PermSize=32m -version 2>&1`
15845    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15846    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15847    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15848        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:PermSize=32m"
15849	JVM_ARG_OK=true
15850    else
15851	$ECHO "Arg failed:" >&5
15852	$ECHO "$OUTPUT" >&5
15853	JVM_ARG_OK=false
15854    fi
15855
15856
15857    $ECHO "Check if jvm arg is ok: -XX:MaxPermSize=160m" >&5
15858    $ECHO "Command: $JAVA -XX:MaxPermSize=160m -version" >&5
15859    OUTPUT=`$JAVA -XX:MaxPermSize=160m -version 2>&1`
15860    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15861    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15862    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15863        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:MaxPermSize=160m"
15864	JVM_ARG_OK=true
15865    else
15866	$ECHO "Arg failed:" >&5
15867	$ECHO "$OUTPUT" >&5
15868	JVM_ARG_OK=false
15869    fi
15870
15871
15872    $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
15873    $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
15874    OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
15875    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15876    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15877    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15878        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
15879	JVM_ARG_OK=true
15880    else
15881	$ECHO "Arg failed:" >&5
15882	$ECHO "$OUTPUT" >&5
15883	JVM_ARG_OK=false
15884    fi
15885
15886    # Disable special log output when a debug build is used as Boot JDK...
15887
15888    $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
15889    $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
15890    OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
15891    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
15892    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
15893    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
15894        boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
15895	JVM_ARG_OK=true
15896    else
15897	$ECHO "Arg failed:" >&5
15898	$ECHO "$OUTPUT" >&5
15899	JVM_ARG_OK=false
15900    fi
15901
15902fi
15903
15904BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
15905
15906
15907
15908###############################################################################
15909#
15910# Configure the sources to use. We can add or override individual directories.
15911#
15912###############################################################################
15913
15914
15915
15916# Where are the sources. Any of these can be overridden
15917# using --with-override-corba and the likes.
15918LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
15919CORBA_TOPDIR="$SRC_ROOT/corba"
15920JAXP_TOPDIR="$SRC_ROOT/jaxp"
15921JAXWS_TOPDIR="$SRC_ROOT/jaxws"
15922HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
15923NASHORN_TOPDIR="$SRC_ROOT/nashorn"
15924JDK_TOPDIR="$SRC_ROOT/jdk"
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935###############################################################################
15936#
15937# Pickup additional source for a component from outside of the source root
15938# or override source for a component.
15939#
15940
15941# Check whether --with-add-source-root was given.
15942if test "${with_add_source_root+set}" = set; then :
15943  withval=$with_add_source_root;
15944fi
15945
15946
15947
15948# Check whether --with-override-source-root was given.
15949if test "${with_override_source_root+set}" = set; then :
15950  withval=$with_override_source_root;
15951fi
15952
15953
15954
15955# Check whether --with-adds-and-overrides was given.
15956if test "${with_adds_and_overrides+set}" = set; then :
15957  withval=$with_adds_and_overrides;
15958fi
15959
15960
15961if test "x$with_adds_and_overrides" != x; then
15962    with_add_source_root="$with_adds_and_overrides/adds"
15963    with_override_source_root="$with_adds_and_overrides/overrides"
15964fi
15965
15966if test "x$with_add_source_root" != x; then
15967    if ! test -d $with_add_source_root; then
15968       as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
15969    fi
15970    CURDIR="$PWD"
15971    cd "$with_add_source_root"
15972    ADD_SRC_ROOT="`pwd`"
15973    cd "$CURDIR"
15974    # Verify that the addon source root does not have any root makefiles.
15975    # If it does, then it is usually an error, prevent this.
15976    if test -f $with_add_source_root/langtools/makefiles/Makefile || \
15977       test -f $with_add_source_root/langtools/make/Makefile; then
15978        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
15979    fi
15980    if test -f $with_add_source_root/corba/makefiles/Makefile || \
15981       test -f $with_add_source_root/corba/make/Makefile; then
15982        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
15983    fi
15984    if test -f $with_add_source_root/jaxp/makefiles/Makefile || \
15985       test -f $with_add_source_root/jaxp/make/Makefile; then
15986        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
15987    fi
15988    if test -f $with_add_source_root/jaxws/makefiles/Makefile || \
15989       test -f $with_add_source_root/jaxws/make/Makefile; then
15990        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
15991    fi
15992    if test -f $with_add_source_root/hotspot/makefiles/Makefile || \
15993       test -f $with_add_source_root/hotspot/make/Makefile; then
15994        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
15995    fi
15996    if test -f $with_add_source_root/jdk/makefiles/Makefile || \
15997       test -f $with_add_source_root/jdk/make/Makefile; then
15998        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
15999    fi
16000fi
16001
16002
16003if test "x$with_override_source_root" != x; then
16004    if ! test -d $with_override_source_root; then
16005       as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
16006    fi
16007    CURDIR="$PWD"
16008    cd "$with_override_source_root"
16009    OVERRIDE_SRC_ROOT="`pwd`"
16010    cd "$CURDIR"
16011    if test -f $with_override_source_root/langtools/makefiles/Makefile || \
16012       test -f $with_override_source_root/langtools/make/Makefile; then
16013        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
16014    fi
16015    if test -f $with_override_source_root/corba/makefiles/Makefile || \
16016       test -f $with_override_source_root/corba/make/Makefile; then
16017        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
16018    fi
16019    if test -f $with_override_source_root/jaxp/makefiles/Makefile || \
16020       test -f $with_override_source_root/jaxp/make/Makefile; then
16021        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
16022    fi
16023    if test -f $with_override_source_root/jaxws/makefiles/Makefile || \
16024       test -f $with_override_source_root/jaxws/make/Makefile; then
16025        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
16026    fi
16027    if test -f $with_override_source_root/hotspot/makefiles/Makefile || \
16028       test -f $with_override_source_root/hotspot/make/Makefile; then
16029        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
16030    fi
16031    if test -f $with_override_source_root/jdk/makefiles/Makefile || \
16032       test -f $with_override_source_root/jdk/make/Makefile; then
16033        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
16034    fi
16035fi
16036
16037
16038###############################################################################
16039#
16040# Override a repo completely, this is used for example when you have 3 small
16041# development sandboxes of the langtools sources and want to avoid having 3 full
16042# OpenJDK sources checked out on disk.
16043#
16044# Assuming that the 3 langtools sandboxes are located here:
16045# /home/fredrik/sandbox1/langtools
16046# /home/fredrik/sandbox2/langtools
16047# /home/fredrik/sandbox3/langtools
16048#
16049# From the source root you create build subdirs manually:
16050#     mkdir -p build1 build2 build3
16051# in each build directory run:
16052#     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
16053#     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
16054#     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
16055#
16056
16057
16058# Check whether --with-override-langtools was given.
16059if test "${with_override_langtools+set}" = set; then :
16060  withval=$with_override_langtools;
16061fi
16062
16063
16064
16065# Check whether --with-override-corba was given.
16066if test "${with_override_corba+set}" = set; then :
16067  withval=$with_override_corba;
16068fi
16069
16070
16071
16072# Check whether --with-override-jaxp was given.
16073if test "${with_override_jaxp+set}" = set; then :
16074  withval=$with_override_jaxp;
16075fi
16076
16077
16078
16079# Check whether --with-override-jaxws was given.
16080if test "${with_override_jaxws+set}" = set; then :
16081  withval=$with_override_jaxws;
16082fi
16083
16084
16085
16086# Check whether --with-override-hotspot was given.
16087if test "${with_override_hotspot+set}" = set; then :
16088  withval=$with_override_hotspot;
16089fi
16090
16091
16092
16093# Check whether --with-override-jdk was given.
16094if test "${with_override_jdk+set}" = set; then :
16095  withval=$with_override_jdk;
16096fi
16097
16098
16099if test "x$with_override_langtools" != x; then
16100    CURDIR="$PWD"
16101    cd "$with_override_langtools"
16102    LANGTOOLS_TOPDIR="`pwd`"
16103    cd "$CURDIR"
16104    if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then
16105        as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
16106    fi
16107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
16108$as_echo_n "checking if langtools should be overridden... " >&6; }
16109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
16110$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
16111fi
16112if test "x$with_override_corba" != x; then
16113    CURDIR="$PWD"
16114    cd "$with_override_corba"
16115    CORBA_TOPDIR="`pwd`"
16116    cd "$CURDIR"
16117    if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then
16118        as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
16119    fi
16120    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
16121$as_echo_n "checking if corba should be overridden... " >&6; }
16122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
16123$as_echo "yes with $CORBA_TOPDIR" >&6; }
16124fi
16125if test "x$with_override_jaxp" != x; then
16126    CURDIR="$PWD"
16127    cd "$with_override_jaxp"
16128    JAXP_TOPDIR="`pwd`"
16129    cd "$CURDIR"
16130    if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then
16131        as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
16132    fi
16133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
16134$as_echo_n "checking if jaxp should be overridden... " >&6; }
16135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
16136$as_echo "yes with $JAXP_TOPDIR" >&6; }
16137fi
16138if test "x$with_override_jaxws" != x; then
16139    CURDIR="$PWD"
16140    cd "$with_override_jaxws"
16141    JAXWS_TOPDIR="`pwd`"
16142    cd "$CURDIR"
16143    if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then
16144        as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
16145    fi
16146    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
16147$as_echo_n "checking if jaxws should be overridden... " >&6; }
16148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
16149$as_echo "yes with $JAXWS_TOPDIR" >&6; }
16150fi
16151if test "x$with_override_hotspot" != x; then
16152    CURDIR="$PWD"
16153    cd "$with_override_hotspot"
16154    HOTSPOT_TOPDIR="`pwd`"
16155    cd "$CURDIR"
16156    if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \
16157       ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then
16158        as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
16159    fi
16160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
16161$as_echo_n "checking if hotspot should be overridden... " >&6; }
16162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
16163$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
16164fi
16165if test "x$with_override_nashorn" != x; then
16166    CURDIR="$PWD"
16167    cd "$with_override_nashorn"
16168    NASHORN_TOPDIR="`pwd`"
16169    cd "$CURDIR"
16170    if ! test -f $NASHORN_TOPDIR/makefiles/BuildNashorn.gmk; then
16171        as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
16172    fi
16173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
16174$as_echo_n "checking if nashorn should be overridden... " >&6; }
16175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
16176$as_echo "yes with $NASHORN_TOPDIR" >&6; }
16177fi
16178if test "x$with_override_jdk" != x; then
16179    CURDIR="$PWD"
16180    cd "$with_override_jdk"
16181    JDK_TOPDIR="`pwd`"
16182    cd "$CURDIR"
16183    if ! test -f $JDK_TOPDIR/makefiles/Makefile; then
16184        as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
16185    fi
16186    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
16187$as_echo_n "checking if JDK should be overridden... " >&6; }
16188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
16189$as_echo "yes with $JDK_TOPDIR" >&6; }
16190fi
16191
16192
16193
16194BUILD_OUTPUT="$OUTPUT_ROOT"
16195
16196
16197HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
16198BUILD_HOTSPOT=true
16199
16200
16201
16202# Check whether --with-import-hotspot was given.
16203if test "${with_import_hotspot+set}" = set; then :
16204  withval=$with_import_hotspot;
16205fi
16206
16207if test "x$with_import_hotspot" != x; then
16208    CURDIR="$PWD"
16209    cd "$with_import_hotspot"
16210    HOTSPOT_DIST="`pwd`"
16211    cd "$CURDIR"
16212    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
16213        as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
16214    fi
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
16216$as_echo_n "checking if hotspot should be imported... " >&6; }
16217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
16218$as_echo "yes from $HOTSPOT_DIST" >&6; }
16219    BUILD_HOTSPOT=false
16220fi
16221
16222JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
16223
16224
16225###############################################################################
16226#
16227# Setup the toolchain (compilers etc), i.e. the tools that need to be
16228# cross-compilation aware.
16229#
16230###############################################################################
16231
16232
16233###############################################################################
16234#
16235# Configure the development tool paths and potential sysroot.
16236#
16237ac_ext=cpp
16238ac_cpp='$CXXCPP $CPPFLAGS'
16239ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16240ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16241ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16242
16243
16244# The option used to specify the target .o,.a or .so file.
16245# When compiling, how to specify the to be created object file.
16246CC_OUT_OPTION='-o$(SPACE)'
16247# When linking, how to specify the to be created executable.
16248EXE_OUT_OPTION='-o$(SPACE)'
16249# When linking, how to specify the to be created dynamically linkable library.
16250LD_OUT_OPTION='-o$(SPACE)'
16251# When archiving, how to specify the to be create static archive for object files.
16252AR_OUT_OPTION='rcs$(SPACE)'
16253
16254
16255
16256
16257
16258# Locate the actual tools
16259
16260
16261# Check whether --with-jtreg was given.
16262if test "${with_jtreg+set}" = set; then :
16263  withval=$with_jtreg;
16264fi
16265
16266
16267  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTReg Regression Test Harness" >&5
16268$as_echo_n "checking for JTReg Regression Test Harness... " >&6; }
16269
16270  if test "x$with_jtreg" != x; then
16271    JT_HOME="$with_jtreg"
16272
16273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16274
16275  # Input might be given as Windows format, start by converting to
16276  # unix format.
16277  path="$JT_HOME"
16278  new_path=`$CYGPATH -u "$path"`
16279
16280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16283  # "foo.exe" is OK but "foo" is an error.
16284  #
16285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16286  # It is also a way to make sure we got the proper file name for the real test later on.
16287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16288  if test "x$test_shortpath" = x; then
16289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16290$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16291    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
16292  fi
16293
16294  # Call helper function which possibly converts this using DOS-style short mode.
16295  # If so, the updated path is stored in $new_path.
16296
16297  input_path="$new_path"
16298  # Check if we need to convert this using DOS-style short mode. If the path
16299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16300  # take no chances and rewrite it.
16301  # Note: m4 eats our [], so we need to use [ and ] instead.
16302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16303  if test "x$has_forbidden_chars" != x; then
16304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16308      # Going to short mode and back again did indeed matter. Since short mode is
16309      # case insensitive, let's make it lowercase to improve readability.
16310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16311      # Now convert it back to Unix-stile (cygpath)
16312      input_path=`$CYGPATH -u "$shortmode_path"`
16313      new_path="$input_path"
16314    fi
16315  fi
16316
16317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16318  if test "x$test_cygdrive_prefix" = x; then
16319    # As a simple fix, exclude /usr/bin since it's not a real path.
16320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16322      # a path prefixed by /cygdrive for fixpath to work.
16323      new_path="$CYGWIN_ROOT_PATH$input_path"
16324    fi
16325  fi
16326
16327
16328  if test "x$path" != "x$new_path"; then
16329    JT_HOME="$new_path"
16330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16331$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16332  fi
16333
16334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16335
16336  path="$JT_HOME"
16337  has_colon=`$ECHO $path | $GREP ^.:`
16338  new_path="$path"
16339  if test "x$has_colon" = x; then
16340    # Not in mixed or Windows style, start by that.
16341    new_path=`cmd //c echo $path`
16342  fi
16343
16344
16345  input_path="$new_path"
16346  # Check if we need to convert this using DOS-style short mode. If the path
16347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16348  # take no chances and rewrite it.
16349  # Note: m4 eats our [], so we need to use [ and ] instead.
16350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16351  if test "x$has_forbidden_chars" != x; then
16352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16354  fi
16355
16356
16357  windows_path="$new_path"
16358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16359    unix_path=`$CYGPATH -u "$windows_path"`
16360    new_path="$unix_path"
16361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16363    new_path="$unix_path"
16364  fi
16365
16366  if test "x$path" != "x$new_path"; then
16367    JT_HOME="$new_path"
16368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
16369$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
16370  fi
16371
16372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16374
16375  else
16376    # We're on a posix platform. Hooray! :)
16377    path="$JT_HOME"
16378    has_space=`$ECHO "$path" | $GREP " "`
16379    if test "x$has_space" != x; then
16380      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
16381$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
16382      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16383    fi
16384
16385    # Use eval to expand a potential ~
16386    eval path="$path"
16387    if test ! -f "$path" && test ! -d "$path"; then
16388      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
16389    fi
16390
16391    JT_HOME="`cd "$path"; $THEPWDCMD`"
16392  fi
16393
16394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
16395$as_echo "$JT_HOME" >&6; }
16396
16397    # jtreg win32 script works for everybody
16398    JTREGEXE="$JT_HOME/win32/bin/jtreg"
16399    if test ! -f "$JTREGEXE"; then
16400      as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
16401    fi
16402  else
16403    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16404$as_echo "no" >&6; }
16405  fi
16406
16407
16408
16409
16410
16411if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16412
16413  # Store path to cygwin link.exe to help excluding it when searching for
16414  # VS linker. This must be done before changing the PATH when looking for VS.
16415  # Extract the first word of "link", so it can be a program name with args.
16416set dummy link; ac_word=$2
16417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16418$as_echo_n "checking for $ac_word... " >&6; }
16419if test "${ac_cv_path_CYGWIN_LINK+set}" = set; then :
16420  $as_echo_n "(cached) " >&6
16421else
16422  case $CYGWIN_LINK in
16423  [\\/]* | ?:[\\/]*)
16424  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
16425  ;;
16426  *)
16427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16428for as_dir in $PATH
16429do
16430  IFS=$as_save_IFS
16431  test -z "$as_dir" && as_dir=.
16432    for ac_exec_ext in '' $ac_executable_extensions; do
16433  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16434    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
16435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16436    break 2
16437  fi
16438done
16439  done
16440IFS=$as_save_IFS
16441
16442  ;;
16443esac
16444fi
16445CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
16446if test -n "$CYGWIN_LINK"; then
16447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
16448$as_echo "$CYGWIN_LINK" >&6; }
16449else
16450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16451$as_echo "no" >&6; }
16452fi
16453
16454
16455  if test "x$CYGWIN_LINK" != x; then
16456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
16457$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
16458    "$CYGWIN_LINK" --version > /dev/null
16459    if test $? -eq 0 ; then
16460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16461$as_echo "yes" >&6; }
16462    else
16463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16464$as_echo "no" >&6; }
16465      # This might be the VS linker. Don't exclude it later on.
16466      CYGWIN_LINK=""
16467    fi
16468  fi
16469
16470  # First-hand choice is to locate and run the vsvars bat file.
16471
16472  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16473    VCVARSFILE="vc/bin/vcvars32.bat"
16474  else
16475    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
16476  fi
16477
16478  VS_ENV_CMD=""
16479  VS_ENV_ARGS=""
16480  if test "x$with_toolsdir" != x; then
16481
16482  if test "x$VS_ENV_CMD" = x; then
16483    VS100BASE="$with_toolsdir/../.."
16484    METHOD="--with-tools-dir"
16485
16486  windows_path="$VS100BASE"
16487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16488    unix_path=`$CYGPATH -u "$windows_path"`
16489    VS100BASE="$unix_path"
16490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16492    VS100BASE="$unix_path"
16493  fi
16494
16495    if test -d "$VS100BASE"; then
16496      if test -f "$VS100BASE/$VCVARSFILE"; then
16497        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16498$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16499        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16500      else
16501        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16502$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16503        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16504$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16505      fi
16506    fi
16507  fi
16508
16509  fi
16510
16511  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
16512    # Having specified an argument which is incorrect will produce an instant failure;
16513    # we should not go on looking
16514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
16515$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
16516    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
16517$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
16518    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
16519  fi
16520
16521  if test "x$ProgramW6432" != x; then
16522
16523  if test "x$VS_ENV_CMD" = x; then
16524    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
16525    METHOD="well-known name"
16526
16527  windows_path="$WIN_SDK_BASE"
16528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16529    unix_path=`$CYGPATH -u "$windows_path"`
16530    WIN_SDK_BASE="$unix_path"
16531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16533    WIN_SDK_BASE="$unix_path"
16534  fi
16535
16536    if test -d "$WIN_SDK_BASE"; then
16537      # There have been cases of partial or broken SDK installations. A missing
16538      # lib dir is not going to work.
16539      if test ! -d "$WIN_SDK_BASE/../lib"; then
16540        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16541$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16542        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16543$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16544      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16545        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16546$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16547        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16548        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16549          VS_ENV_ARGS="/x86"
16550        else
16551          VS_ENV_ARGS="/x64"
16552        fi
16553      else
16554        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16555$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16556        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16557$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16558      fi
16559    fi
16560  fi
16561
16562  fi
16563  if test "x$PROGRAMW6432" != x; then
16564
16565  if test "x$VS_ENV_CMD" = x; then
16566    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
16567    METHOD="well-known name"
16568
16569  windows_path="$WIN_SDK_BASE"
16570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16571    unix_path=`$CYGPATH -u "$windows_path"`
16572    WIN_SDK_BASE="$unix_path"
16573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16575    WIN_SDK_BASE="$unix_path"
16576  fi
16577
16578    if test -d "$WIN_SDK_BASE"; then
16579      # There have been cases of partial or broken SDK installations. A missing
16580      # lib dir is not going to work.
16581      if test ! -d "$WIN_SDK_BASE/../lib"; then
16582        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16583$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16584        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16585$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16586      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16587        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16588$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16589        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16590        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16591          VS_ENV_ARGS="/x86"
16592        else
16593          VS_ENV_ARGS="/x64"
16594        fi
16595      else
16596        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16597$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16598        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16599$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16600      fi
16601    fi
16602  fi
16603
16604  fi
16605  if test "x$PROGRAMFILES" != x; then
16606
16607  if test "x$VS_ENV_CMD" = x; then
16608    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
16609    METHOD="well-known name"
16610
16611  windows_path="$WIN_SDK_BASE"
16612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16613    unix_path=`$CYGPATH -u "$windows_path"`
16614    WIN_SDK_BASE="$unix_path"
16615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16617    WIN_SDK_BASE="$unix_path"
16618  fi
16619
16620    if test -d "$WIN_SDK_BASE"; then
16621      # There have been cases of partial or broken SDK installations. A missing
16622      # lib dir is not going to work.
16623      if test ! -d "$WIN_SDK_BASE/../lib"; then
16624        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16625$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16626        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16627$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16628      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16629        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16630$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16631        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16632        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16633          VS_ENV_ARGS="/x86"
16634        else
16635          VS_ENV_ARGS="/x64"
16636        fi
16637      else
16638        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16639$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16640        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16641$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16642      fi
16643    fi
16644  fi
16645
16646  fi
16647
16648  if test "x$VS_ENV_CMD" = x; then
16649    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
16650    METHOD="well-known name"
16651
16652  windows_path="$WIN_SDK_BASE"
16653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16654    unix_path=`$CYGPATH -u "$windows_path"`
16655    WIN_SDK_BASE="$unix_path"
16656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16658    WIN_SDK_BASE="$unix_path"
16659  fi
16660
16661    if test -d "$WIN_SDK_BASE"; then
16662      # There have been cases of partial or broken SDK installations. A missing
16663      # lib dir is not going to work.
16664      if test ! -d "$WIN_SDK_BASE/../lib"; then
16665        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16666$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16667        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16668$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16669      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16670        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16671$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16672        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16673        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16674          VS_ENV_ARGS="/x86"
16675        else
16676          VS_ENV_ARGS="/x64"
16677        fi
16678      else
16679        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16680$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16681        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16682$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16683      fi
16684    fi
16685  fi
16686
16687
16688  if test "x$VS_ENV_CMD" = x; then
16689    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
16690    METHOD="well-known name"
16691
16692  windows_path="$WIN_SDK_BASE"
16693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16694    unix_path=`$CYGPATH -u "$windows_path"`
16695    WIN_SDK_BASE="$unix_path"
16696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16698    WIN_SDK_BASE="$unix_path"
16699  fi
16700
16701    if test -d "$WIN_SDK_BASE"; then
16702      # There have been cases of partial or broken SDK installations. A missing
16703      # lib dir is not going to work.
16704      if test ! -d "$WIN_SDK_BASE/../lib"; then
16705        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16706$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16707        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
16708$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
16709      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
16710        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16711$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16712        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
16713        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16714          VS_ENV_ARGS="/x86"
16715        else
16716          VS_ENV_ARGS="/x64"
16717        fi
16718      else
16719        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
16720$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
16721        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
16722$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
16723      fi
16724    fi
16725  fi
16726
16727
16728  if test "x$VS100COMNTOOLS" != x; then
16729
16730  if test "x$VS_ENV_CMD" = x; then
16731    VS100BASE="$VS100COMNTOOLS/../.."
16732    METHOD="VS100COMNTOOLS variable"
16733
16734  windows_path="$VS100BASE"
16735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16736    unix_path=`$CYGPATH -u "$windows_path"`
16737    VS100BASE="$unix_path"
16738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16740    VS100BASE="$unix_path"
16741  fi
16742
16743    if test -d "$VS100BASE"; then
16744      if test -f "$VS100BASE/$VCVARSFILE"; then
16745        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16746$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16747        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16748      else
16749        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16750$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16751        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16752$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16753      fi
16754    fi
16755  fi
16756
16757  fi
16758  if test "x$PROGRAMFILES" != x; then
16759
16760  if test "x$VS_ENV_CMD" = x; then
16761    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
16762    METHOD="well-known name"
16763
16764  windows_path="$VS100BASE"
16765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16766    unix_path=`$CYGPATH -u "$windows_path"`
16767    VS100BASE="$unix_path"
16768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16770    VS100BASE="$unix_path"
16771  fi
16772
16773    if test -d "$VS100BASE"; then
16774      if test -f "$VS100BASE/$VCVARSFILE"; then
16775        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16776$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16777        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16778      else
16779        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16780$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16781        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16782$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16783      fi
16784    fi
16785  fi
16786
16787  fi
16788
16789  if test "x$VS_ENV_CMD" = x; then
16790    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
16791    METHOD="well-known name"
16792
16793  windows_path="$VS100BASE"
16794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16795    unix_path=`$CYGPATH -u "$windows_path"`
16796    VS100BASE="$unix_path"
16797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16799    VS100BASE="$unix_path"
16800  fi
16801
16802    if test -d "$VS100BASE"; then
16803      if test -f "$VS100BASE/$VCVARSFILE"; then
16804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16805$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16806        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16807      else
16808        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16809$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16810        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16811$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16812      fi
16813    fi
16814  fi
16815
16816
16817  if test "x$VS_ENV_CMD" = x; then
16818    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
16819    METHOD="well-known name"
16820
16821  windows_path="$VS100BASE"
16822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823    unix_path=`$CYGPATH -u "$windows_path"`
16824    VS100BASE="$unix_path"
16825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16827    VS100BASE="$unix_path"
16828  fi
16829
16830    if test -d "$VS100BASE"; then
16831      if test -f "$VS100BASE/$VCVARSFILE"; then
16832        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16833$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16834        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
16835      else
16836        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
16837$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
16838        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
16839$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
16840      fi
16841    fi
16842  fi
16843
16844
16845  if test "x$VS_ENV_CMD" != x; then
16846    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
16847
16848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16849
16850  # First separate the path from the arguments. This will split at the first
16851  # space.
16852  complete="$VS_ENV_CMD"
16853  path="${complete%% *}"
16854  tmp="$complete EOL"
16855  arguments="${tmp#* }"
16856
16857  # Input might be given as Windows format, start by converting to
16858  # unix format.
16859  new_path=`$CYGPATH -u "$path"`
16860
16861  # Now try to locate executable using which
16862  new_path=`$WHICH "$new_path" 2> /dev/null`
16863  # bat and cmd files are not always considered executable in cygwin causing which
16864  # to not find them
16865  if test "x$new_path" = x \
16866           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16867           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16868    new_path=`$CYGPATH -u "$path"`
16869  fi
16870  if test "x$new_path" = x; then
16871    # Oops. Which didn't find the executable.
16872    # The splitting of arguments from the executable at a space might have been incorrect,
16873    # since paths with space are more likely in Windows. Give it another try with the whole
16874    # argument.
16875    path="$complete"
16876    arguments="EOL"
16877    new_path=`$CYGPATH -u "$path"`
16878    new_path=`$WHICH "$new_path" 2> /dev/null`
16879    # bat and cmd files are not always considered executable in cygwin causing which
16880    # to not find them
16881    if test "x$new_path" = x \
16882             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16883             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16884      new_path=`$CYGPATH -u "$path"`
16885    fi
16886    if test "x$new_path" = x; then
16887      # It's still not found. Now this is an unrecoverable error.
16888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
16889$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
16890      has_space=`$ECHO "$complete" | $GREP " "`
16891      if test "x$has_space" != x; then
16892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16894      fi
16895      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16896    fi
16897  fi
16898
16899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16902  # "foo.exe" is OK but "foo" is an error.
16903  #
16904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16905  # It is also a way to make sure we got the proper file name for the real test later on.
16906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16907  if test "x$test_shortpath" = x; then
16908    # Short path failed, file does not exist as specified.
16909    # Try adding .exe or .cmd
16910    if test -f "${new_path}.exe"; then
16911       input_to_shortpath="${new_path}.exe"
16912    elif test -f "${new_path}.cmd"; then
16913       input_to_shortpath="${new_path}.cmd"
16914    else
16915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
16916$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
16917      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16918$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16919      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
16920    fi
16921  else
16922    input_to_shortpath="$new_path"
16923  fi
16924
16925  # Call helper function which possibly converts this using DOS-style short mode.
16926  # If so, the updated path is stored in $new_path.
16927  new_path="$input_to_shortpath"
16928
16929  input_path="$input_to_shortpath"
16930  # Check if we need to convert this using DOS-style short mode. If the path
16931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16932  # take no chances and rewrite it.
16933  # Note: m4 eats our [], so we need to use [ and ] instead.
16934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16935  if test "x$has_forbidden_chars" != x; then
16936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16940      # Going to short mode and back again did indeed matter. Since short mode is
16941      # case insensitive, let's make it lowercase to improve readability.
16942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16943      # Now convert it back to Unix-stile (cygpath)
16944      input_path=`$CYGPATH -u "$shortmode_path"`
16945      new_path="$input_path"
16946    fi
16947  fi
16948
16949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16950  if test "x$test_cygdrive_prefix" = x; then
16951    # As a simple fix, exclude /usr/bin since it's not a real path.
16952    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16954      # a path prefixed by /cygdrive for fixpath to work.
16955      new_path="$CYGWIN_ROOT_PATH$input_path"
16956    fi
16957  fi
16958
16959  # remove trailing .exe if any
16960  new_path="${new_path/%.exe/}"
16961
16962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16963
16964  # First separate the path from the arguments. This will split at the first
16965  # space.
16966  complete="$VS_ENV_CMD"
16967  path="${complete%% *}"
16968  tmp="$complete EOL"
16969  arguments="${tmp#* }"
16970
16971  # Input might be given as Windows format, start by converting to
16972  # unix format.
16973  new_path="$path"
16974
16975  windows_path="$new_path"
16976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16977    unix_path=`$CYGPATH -u "$windows_path"`
16978    new_path="$unix_path"
16979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16981    new_path="$unix_path"
16982  fi
16983
16984
16985  # Now try to locate executable using which
16986  new_path=`$WHICH "$new_path" 2> /dev/null`
16987
16988  if test "x$new_path" = x; then
16989    # Oops. Which didn't find the executable.
16990    # The splitting of arguments from the executable at a space might have been incorrect,
16991    # since paths with space are more likely in Windows. Give it another try with the whole
16992    # argument.
16993    path="$complete"
16994    arguments="EOL"
16995    new_path="$path"
16996
16997  windows_path="$new_path"
16998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16999    unix_path=`$CYGPATH -u "$windows_path"`
17000    new_path="$unix_path"
17001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17003    new_path="$unix_path"
17004  fi
17005
17006
17007    new_path=`$WHICH "$new_path" 2> /dev/null`
17008
17009    if test "x$new_path" = x; then
17010      # It's still not found. Now this is an unrecoverable error.
17011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17012$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17013      has_space=`$ECHO "$complete" | $GREP " "`
17014      if test "x$has_space" != x; then
17015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17017      fi
17018      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17019    fi
17020  fi
17021
17022  # Now new_path has a complete unix path to the binary
17023  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17024    # Keep paths in /bin as-is, but remove trailing .exe if any
17025    new_path="${new_path/%.exe/}"
17026    # Do not save /bin paths to all_fixpath_prefixes!
17027  else
17028    # Not in mixed or Windows style, start by that.
17029    new_path=`cmd //c echo $new_path`
17030
17031  input_path="$new_path"
17032  # Check if we need to convert this using DOS-style short mode. If the path
17033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17034  # take no chances and rewrite it.
17035  # Note: m4 eats our [], so we need to use [ and ] instead.
17036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17037  if test "x$has_forbidden_chars" != x; then
17038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17040  fi
17041
17042    # Output is in $new_path
17043
17044  windows_path="$new_path"
17045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17046    unix_path=`$CYGPATH -u "$windows_path"`
17047    new_path="$unix_path"
17048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17050    new_path="$unix_path"
17051  fi
17052
17053    # remove trailing .exe if any
17054    new_path="${new_path/%.exe/}"
17055
17056    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17057    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17058  fi
17059
17060  else
17061    # We're on a posix platform. Hooray! :)
17062    # First separate the path from the arguments. This will split at the first
17063    # space.
17064    complete="$VS_ENV_CMD"
17065    path="${complete%% *}"
17066    tmp="$complete EOL"
17067    arguments="${tmp#* }"
17068
17069    # Cannot rely on the command "which" here since it doesn't always work.
17070    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17071    if test -z "$is_absolute_path"; then
17072      # Path to executable is not absolute. Find it.
17073      IFS_save="$IFS"
17074      IFS=:
17075      for p in $PATH; do
17076        if test -f "$p/$path" && test -x "$p/$path"; then
17077          new_path="$p/$path"
17078          break
17079        fi
17080      done
17081      IFS="$IFS_save"
17082    else
17083      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&5
17084$as_echo "$as_me: Resolving VS_ENV_CMD (as $path) failed, using $path directly." >&6;}
17085      new_path="$path"
17086    fi
17087
17088    if test "x$new_path" = x; then
17089        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
17090$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
17091        has_space=`$ECHO "$complete" | $GREP " "`
17092        if test "x$has_space" != x; then
17093          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17094$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17095        fi
17096        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
17097      fi
17098  fi
17099
17100      # Now join together the path and the arguments once again
17101      if test "x$arguments" != xEOL; then
17102        new_complete="$new_path ${arguments% *}"
17103      else
17104        new_complete="$new_path"
17105      fi
17106
17107  if test "x$complete" != "x$new_complete"; then
17108      VS_ENV_CMD="$new_complete"
17109      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
17110$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
17111    fi
17112
17113
17114    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
17115    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
17116$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
17117    cd $OUTPUT_ROOT
17118    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
17119    # to autoconf standards.
17120
17121    #----
17122
17123    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
17124    # but calculate the difference in Cygwin environment before/after running it and then
17125    # apply the diff.
17126
17127    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
17128      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
17129      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
17130      _dosbash=`cygpath -a -w -s \`which bash\`.*`
17131    else
17132      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
17133      _dosbash=`cmd //c echo \`which bash\``
17134    fi
17135
17136    # generate the set of exported vars before/after the vs10 setup
17137    $ECHO "@echo off"                                           >  localdevenvtmp.bat
17138    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
17139    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
17140    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
17141
17142    # Now execute the newly created bat file.
17143    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
17144    cmd /c localdevenvtmp.bat | cat
17145
17146    # apply the diff (less some non-vs10 vars named by "!")
17147    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
17148    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
17149    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
17150
17151    # cleanup
17152    $RM localdevenvtmp*
17153    #----
17154    cd $CURDIR
17155    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
17156      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17157$as_echo "no" >&6; }
17158      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
17159$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
17160      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17161$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17162      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17163$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17164      as_fn_error $? "Cannot continue" "$LINENO" 5
17165    fi
17166
17167    # Now set all paths and other env variables. This will allow the rest of
17168    # the configure script to find and run the compiler in the proper way.
17169    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
17170$as_echo "$as_me: Setting extracted environment variables" >&6;}
17171    . $OUTPUT_ROOT/localdevenv.sh
17172  else
17173    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
17174    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
17175$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
17176  fi
17177
17178  # At this point, we should have corrent variables in the environment, or we can't continue.
17179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
17180$as_echo_n "checking for Visual Studio variables... " >&6; }
17181
17182  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
17183    if test "x$INCLUDE" = x || test "x$LIB" = x; then
17184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
17185$as_echo "present but broken" >&6; }
17186      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
17187    else
17188      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17189$as_echo "ok" >&6; }
17190      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
17191      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
17192      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
17193      VS_PATH="$PATH"
17194
17195
17196
17197    fi
17198  else
17199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17200$as_echo "not found" >&6; }
17201
17202    if test "x$VS_ENV_CMD" = x; then
17203      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
17204$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
17205      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
17206$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
17207    else
17208      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
17209$as_echo "$as_me: Running the extraction script failed." >&6;}
17210    fi
17211    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
17212$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
17213    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
17214$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
17215    as_fn_error $? "Cannot continue" "$LINENO" 5
17216  fi
17217
17218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
17219$as_echo_n "checking for msvcr100.dll... " >&6; }
17220
17221# Check whether --with-msvcr-dll was given.
17222if test "${with_msvcr_dll+set}" = set; then :
17223  withval=$with_msvcr_dll;
17224fi
17225
17226  if test "x$with_msvcr_dll" != x; then
17227    MSVCR_DLL="$with_msvcr_dll"
17228  else
17229    if test "x$VCINSTALLDIR" != x; then
17230      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17231        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x64 | head --lines 1`
17232      else
17233        MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1`
17234        if test "x$MSVCR_DLL" = x; then
17235          MSVCR_DLL=`find "$VCINSTALLDIR" -name msvcr100.dll | head --lines 1`
17236        fi
17237      fi
17238      if test "x$MSVCR_DLL" != x; then
17239        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17240$as_echo "$as_me: msvcr100.dll found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17241      else
17242        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&5
17243$as_echo "$as_me: Warning: msvcr100.dll not found in VCINSTALLDIR: $VCINSTALLDIR" >&6;}
17244      fi
17245    fi
17246    if test "x$MSVCR_DLL" = x; then
17247      if test -f "$SYSTEMROOT/system32/msvcr100.dll"; then
17248        { $as_echo "$as_me:${as_lineno-$LINENO}: msvcr100.dll found in $SYSTEMROOT/system32" >&5
17249$as_echo "$as_me: msvcr100.dll found in $SYSTEMROOT/system32" >&6;}
17250        MSVCR_DLL="$SYSTEMROOT/system32/msvcr100.dll"
17251      fi
17252    fi
17253  fi
17254  if test "x$MSVCR_DLL" = x; then
17255    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17256$as_echo "no" >&6; }
17257    as_fn_error $? "Could not find msvcr100.dll !" "$LINENO" 5
17258  fi
17259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
17260$as_echo "$MSVCR_DLL" >&6; }
17261
17262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17263
17264  # Input might be given as Windows format, start by converting to
17265  # unix format.
17266  path="$MSVCR_DLL"
17267  new_path=`$CYGPATH -u "$path"`
17268
17269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17272  # "foo.exe" is OK but "foo" is an error.
17273  #
17274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17275  # It is also a way to make sure we got the proper file name for the real test later on.
17276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17277  if test "x$test_shortpath" = x; then
17278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17279$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17280    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
17281  fi
17282
17283  # Call helper function which possibly converts this using DOS-style short mode.
17284  # If so, the updated path is stored in $new_path.
17285
17286  input_path="$new_path"
17287  # Check if we need to convert this using DOS-style short mode. If the path
17288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17289  # take no chances and rewrite it.
17290  # Note: m4 eats our [], so we need to use [ and ] instead.
17291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17292  if test "x$has_forbidden_chars" != x; then
17293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17297      # Going to short mode and back again did indeed matter. Since short mode is
17298      # case insensitive, let's make it lowercase to improve readability.
17299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17300      # Now convert it back to Unix-stile (cygpath)
17301      input_path=`$CYGPATH -u "$shortmode_path"`
17302      new_path="$input_path"
17303    fi
17304  fi
17305
17306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17307  if test "x$test_cygdrive_prefix" = x; then
17308    # As a simple fix, exclude /usr/bin since it's not a real path.
17309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17311      # a path prefixed by /cygdrive for fixpath to work.
17312      new_path="$CYGWIN_ROOT_PATH$input_path"
17313    fi
17314  fi
17315
17316
17317  if test "x$path" != "x$new_path"; then
17318    MSVCR_DLL="$new_path"
17319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17320$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17321  fi
17322
17323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17324
17325  path="$MSVCR_DLL"
17326  has_colon=`$ECHO $path | $GREP ^.:`
17327  new_path="$path"
17328  if test "x$has_colon" = x; then
17329    # Not in mixed or Windows style, start by that.
17330    new_path=`cmd //c echo $path`
17331  fi
17332
17333
17334  input_path="$new_path"
17335  # Check if we need to convert this using DOS-style short mode. If the path
17336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17337  # take no chances and rewrite it.
17338  # Note: m4 eats our [], so we need to use [ and ] instead.
17339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17340  if test "x$has_forbidden_chars" != x; then
17341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17343  fi
17344
17345
17346  windows_path="$new_path"
17347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17348    unix_path=`$CYGPATH -u "$windows_path"`
17349    new_path="$unix_path"
17350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17352    new_path="$unix_path"
17353  fi
17354
17355  if test "x$path" != "x$new_path"; then
17356    MSVCR_DLL="$new_path"
17357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
17358$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
17359  fi
17360
17361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17363
17364  else
17365    # We're on a posix platform. Hooray! :)
17366    path="$MSVCR_DLL"
17367    has_space=`$ECHO "$path" | $GREP " "`
17368    if test "x$has_space" != x; then
17369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
17370$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
17371      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17372    fi
17373
17374    # Use eval to expand a potential ~
17375    eval path="$path"
17376    if test ! -f "$path" && test ! -d "$path"; then
17377      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
17378    fi
17379
17380    MSVCR_DLL="`cd "$path"; $THEPWDCMD`"
17381  fi
17382
17383
17384
17385
17386# Check whether --with-dxsdk was given.
17387if test "${with_dxsdk+set}" = set; then :
17388  withval=$with_dxsdk;
17389fi
17390
17391
17392# Check whether --with-dxsdk-lib was given.
17393if test "${with_dxsdk_lib+set}" = set; then :
17394  withval=$with_dxsdk_lib;
17395fi
17396
17397
17398# Check whether --with-dxsdk-include was given.
17399if test "${with_dxsdk_include+set}" = set; then :
17400  withval=$with_dxsdk_include;
17401fi
17402
17403
17404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK" >&5
17405$as_echo_n "checking for DirectX SDK... " >&6; }
17406
17407  if test "x$with_dxsdk" != x; then
17408    dxsdk_path="$with_dxsdk"
17409  elif test "x$DXSDK_DIR" != x; then
17410    dxsdk_path="$DXSDK_DIR"
17411  elif test -d "C:/DXSDK"; then
17412    dxsdk_path="C:/DXSDK"
17413  else
17414    as_fn_error $? "Could not find the DirectX SDK" "$LINENO" 5
17415  fi
17416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dxsdk_path" >&5
17417$as_echo "$dxsdk_path" >&6; }
17418
17419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17420
17421  # Input might be given as Windows format, start by converting to
17422  # unix format.
17423  path="$dxsdk_path"
17424  new_path=`$CYGPATH -u "$path"`
17425
17426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17429  # "foo.exe" is OK but "foo" is an error.
17430  #
17431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17432  # It is also a way to make sure we got the proper file name for the real test later on.
17433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17434  if test "x$test_shortpath" = x; then
17435    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17436$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17437    as_fn_error $? "Cannot locate the the path of dxsdk_path" "$LINENO" 5
17438  fi
17439
17440  # Call helper function which possibly converts this using DOS-style short mode.
17441  # If so, the updated path is stored in $new_path.
17442
17443  input_path="$new_path"
17444  # Check if we need to convert this using DOS-style short mode. If the path
17445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17446  # take no chances and rewrite it.
17447  # Note: m4 eats our [], so we need to use [ and ] instead.
17448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17449  if test "x$has_forbidden_chars" != x; then
17450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17454      # Going to short mode and back again did indeed matter. Since short mode is
17455      # case insensitive, let's make it lowercase to improve readability.
17456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17457      # Now convert it back to Unix-stile (cygpath)
17458      input_path=`$CYGPATH -u "$shortmode_path"`
17459      new_path="$input_path"
17460    fi
17461  fi
17462
17463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17464  if test "x$test_cygdrive_prefix" = x; then
17465    # As a simple fix, exclude /usr/bin since it's not a real path.
17466    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17468      # a path prefixed by /cygdrive for fixpath to work.
17469      new_path="$CYGWIN_ROOT_PATH$input_path"
17470    fi
17471  fi
17472
17473
17474  if test "x$path" != "x$new_path"; then
17475    dxsdk_path="$new_path"
17476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17477$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17478  fi
17479
17480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17481
17482  path="$dxsdk_path"
17483  has_colon=`$ECHO $path | $GREP ^.:`
17484  new_path="$path"
17485  if test "x$has_colon" = x; then
17486    # Not in mixed or Windows style, start by that.
17487    new_path=`cmd //c echo $path`
17488  fi
17489
17490
17491  input_path="$new_path"
17492  # Check if we need to convert this using DOS-style short mode. If the path
17493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17494  # take no chances and rewrite it.
17495  # Note: m4 eats our [], so we need to use [ and ] instead.
17496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17497  if test "x$has_forbidden_chars" != x; then
17498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17500  fi
17501
17502
17503  windows_path="$new_path"
17504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17505    unix_path=`$CYGPATH -u "$windows_path"`
17506    new_path="$unix_path"
17507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17509    new_path="$unix_path"
17510  fi
17511
17512  if test "x$path" != "x$new_path"; then
17513    dxsdk_path="$new_path"
17514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting dxsdk_path to \"$new_path\"" >&5
17515$as_echo "$as_me: Rewriting dxsdk_path to \"$new_path\"" >&6;}
17516  fi
17517
17518  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17519  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17520
17521  else
17522    # We're on a posix platform. Hooray! :)
17523    path="$dxsdk_path"
17524    has_space=`$ECHO "$path" | $GREP " "`
17525    if test "x$has_space" != x; then
17526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&5
17527$as_echo "$as_me: The path of dxsdk_path, which resolves as \"$path\", is invalid." >&6;}
17528      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17529    fi
17530
17531    # Use eval to expand a potential ~
17532    eval path="$path"
17533    if test ! -f "$path" && test ! -d "$path"; then
17534      as_fn_error $? "The path of dxsdk_path, which resolves as \"$path\", is not found." "$LINENO" 5
17535    fi
17536
17537    dxsdk_path="`cd "$path"; $THEPWDCMD`"
17538  fi
17539
17540
17541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK lib dir" >&5
17542$as_echo_n "checking for DirectX SDK lib dir... " >&6; }
17543  if test "x$with_dxsdk_lib" != x; then
17544    DXSDK_LIB_PATH="$with_dxsdk_lib"
17545  elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
17546    DXSDK_LIB_PATH="$dxsdk_path/Lib/x64"
17547  else
17548    DXSDK_LIB_PATH="$dxsdk_path/Lib"
17549  fi
17550  # dsound.lib is linked to in jsoundds
17551  if test ! -f "$DXSDK_LIB_PATH/dsound.lib"; then
17552    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17553  fi
17554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_LIB_PATH" >&5
17555$as_echo "$DXSDK_LIB_PATH" >&6; }
17556
17557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17558
17559  # Input might be given as Windows format, start by converting to
17560  # unix format.
17561  path="$DXSDK_LIB_PATH"
17562  new_path=`$CYGPATH -u "$path"`
17563
17564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17567  # "foo.exe" is OK but "foo" is an error.
17568  #
17569  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17570  # It is also a way to make sure we got the proper file name for the real test later on.
17571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17572  if test "x$test_shortpath" = x; then
17573    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17574$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17575    as_fn_error $? "Cannot locate the the path of DXSDK_LIB_PATH" "$LINENO" 5
17576  fi
17577
17578  # Call helper function which possibly converts this using DOS-style short mode.
17579  # If so, the updated path is stored in $new_path.
17580
17581  input_path="$new_path"
17582  # Check if we need to convert this using DOS-style short mode. If the path
17583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17584  # take no chances and rewrite it.
17585  # Note: m4 eats our [], so we need to use [ and ] instead.
17586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17587  if test "x$has_forbidden_chars" != x; then
17588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17589    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17590    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17591    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17592      # Going to short mode and back again did indeed matter. Since short mode is
17593      # case insensitive, let's make it lowercase to improve readability.
17594      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17595      # Now convert it back to Unix-stile (cygpath)
17596      input_path=`$CYGPATH -u "$shortmode_path"`
17597      new_path="$input_path"
17598    fi
17599  fi
17600
17601  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17602  if test "x$test_cygdrive_prefix" = x; then
17603    # As a simple fix, exclude /usr/bin since it's not a real path.
17604    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17605      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17606      # a path prefixed by /cygdrive for fixpath to work.
17607      new_path="$CYGWIN_ROOT_PATH$input_path"
17608    fi
17609  fi
17610
17611
17612  if test "x$path" != "x$new_path"; then
17613    DXSDK_LIB_PATH="$new_path"
17614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17615$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17616  fi
17617
17618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17619
17620  path="$DXSDK_LIB_PATH"
17621  has_colon=`$ECHO $path | $GREP ^.:`
17622  new_path="$path"
17623  if test "x$has_colon" = x; then
17624    # Not in mixed or Windows style, start by that.
17625    new_path=`cmd //c echo $path`
17626  fi
17627
17628
17629  input_path="$new_path"
17630  # Check if we need to convert this using DOS-style short mode. If the path
17631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17632  # take no chances and rewrite it.
17633  # Note: m4 eats our [], so we need to use [ and ] instead.
17634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17635  if test "x$has_forbidden_chars" != x; then
17636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17638  fi
17639
17640
17641  windows_path="$new_path"
17642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17643    unix_path=`$CYGPATH -u "$windows_path"`
17644    new_path="$unix_path"
17645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17647    new_path="$unix_path"
17648  fi
17649
17650  if test "x$path" != "x$new_path"; then
17651    DXSDK_LIB_PATH="$new_path"
17652    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&5
17653$as_echo "$as_me: Rewriting DXSDK_LIB_PATH to \"$new_path\"" >&6;}
17654  fi
17655
17656  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17657  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17658
17659  else
17660    # We're on a posix platform. Hooray! :)
17661    path="$DXSDK_LIB_PATH"
17662    has_space=`$ECHO "$path" | $GREP " "`
17663    if test "x$has_space" != x; then
17664      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&5
17665$as_echo "$as_me: The path of DXSDK_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
17666      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17667    fi
17668
17669    # Use eval to expand a potential ~
17670    eval path="$path"
17671    if test ! -f "$path" && test ! -d "$path"; then
17672      as_fn_error $? "The path of DXSDK_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17673    fi
17674
17675    DXSDK_LIB_PATH="`cd "$path"; $THEPWDCMD`"
17676  fi
17677
17678
17679  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectX SDK include dir" >&5
17680$as_echo_n "checking for DirectX SDK include dir... " >&6; }
17681  if test "x$with_dxsdk_include" != x; then
17682    DXSDK_INCLUDE_PATH="$with_dxsdk_include"
17683  else
17684    DXSDK_INCLUDE_PATH="$dxsdk_path/Include"
17685  fi
17686  # dsound.h is included in jsoundds
17687  if test ! -f "$DXSDK_INCLUDE_PATH/dsound.h"; then
17688    as_fn_error $? "Invalid DirectX SDK lib dir" "$LINENO" 5
17689  fi
17690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DXSDK_INCLUDE_PATH" >&5
17691$as_echo "$DXSDK_INCLUDE_PATH" >&6; }
17692
17693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17694
17695  # Input might be given as Windows format, start by converting to
17696  # unix format.
17697  path="$DXSDK_INCLUDE_PATH"
17698  new_path=`$CYGPATH -u "$path"`
17699
17700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17703  # "foo.exe" is OK but "foo" is an error.
17704  #
17705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17706  # It is also a way to make sure we got the proper file name for the real test later on.
17707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17708  if test "x$test_shortpath" = x; then
17709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17710$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17711    as_fn_error $? "Cannot locate the the path of DXSDK_INCLUDE_PATH" "$LINENO" 5
17712  fi
17713
17714  # Call helper function which possibly converts this using DOS-style short mode.
17715  # If so, the updated path is stored in $new_path.
17716
17717  input_path="$new_path"
17718  # Check if we need to convert this using DOS-style short mode. If the path
17719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17720  # take no chances and rewrite it.
17721  # Note: m4 eats our [], so we need to use [ and ] instead.
17722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17723  if test "x$has_forbidden_chars" != x; then
17724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17728      # Going to short mode and back again did indeed matter. Since short mode is
17729      # case insensitive, let's make it lowercase to improve readability.
17730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17731      # Now convert it back to Unix-stile (cygpath)
17732      input_path=`$CYGPATH -u "$shortmode_path"`
17733      new_path="$input_path"
17734    fi
17735  fi
17736
17737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17738  if test "x$test_cygdrive_prefix" = x; then
17739    # As a simple fix, exclude /usr/bin since it's not a real path.
17740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17742      # a path prefixed by /cygdrive for fixpath to work.
17743      new_path="$CYGWIN_ROOT_PATH$input_path"
17744    fi
17745  fi
17746
17747
17748  if test "x$path" != "x$new_path"; then
17749    DXSDK_INCLUDE_PATH="$new_path"
17750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17751$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17752  fi
17753
17754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17755
17756  path="$DXSDK_INCLUDE_PATH"
17757  has_colon=`$ECHO $path | $GREP ^.:`
17758  new_path="$path"
17759  if test "x$has_colon" = x; then
17760    # Not in mixed or Windows style, start by that.
17761    new_path=`cmd //c echo $path`
17762  fi
17763
17764
17765  input_path="$new_path"
17766  # Check if we need to convert this using DOS-style short mode. If the path
17767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17768  # take no chances and rewrite it.
17769  # Note: m4 eats our [], so we need to use [ and ] instead.
17770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17771  if test "x$has_forbidden_chars" != x; then
17772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17774  fi
17775
17776
17777  windows_path="$new_path"
17778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17779    unix_path=`$CYGPATH -u "$windows_path"`
17780    new_path="$unix_path"
17781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17783    new_path="$unix_path"
17784  fi
17785
17786  if test "x$path" != "x$new_path"; then
17787    DXSDK_INCLUDE_PATH="$new_path"
17788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&5
17789$as_echo "$as_me: Rewriting DXSDK_INCLUDE_PATH to \"$new_path\"" >&6;}
17790  fi
17791
17792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17794
17795  else
17796    # We're on a posix platform. Hooray! :)
17797    path="$DXSDK_INCLUDE_PATH"
17798    has_space=`$ECHO "$path" | $GREP " "`
17799    if test "x$has_space" != x; then
17800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
17801$as_echo "$as_me: The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
17802      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17803    fi
17804
17805    # Use eval to expand a potential ~
17806    eval path="$path"
17807    if test ! -f "$path" && test ! -d "$path"; then
17808      as_fn_error $? "The path of DXSDK_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
17809    fi
17810
17811    DXSDK_INCLUDE_PATH="`cd "$path"; $THEPWDCMD`"
17812  fi
17813
17814
17815
17816
17817  LDFLAGS_JDK="$LDFLAGS_JDK -libpath:$DXSDK_LIB_PATH"
17818
17819fi
17820
17821
17822
17823# If --build AND --host is set, then the configure script will find any
17824# cross compilation tools in the PATH. Cross compilation tools
17825# follows the cross compilation standard where they are prefixed with ${host}.
17826# For example the binary i686-sun-solaris2.10-gcc
17827# will cross compile for i686-sun-solaris2.10
17828# If neither of build and host is not set, then build=host and the
17829# default compiler found in the path will be used.
17830# Setting only --host, does not seem to be really supported.
17831# Please set both --build and --host if you want to cross compile.
17832
17833if test "x$COMPILE_TYPE" = "xcross"; then
17834    # Now we to find a C/C++ compiler that can build executables for the build
17835    # platform. We can't use the AC_PROG_CC macro, since it can only be used
17836    # once. Also, we need to do this before adding a tools dir to the path,
17837    # otherwise we might pick up cross-compilers which don't use standard naming.
17838    # Otherwise, we'll set the BUILD_tools to the native tools, but that'll have
17839    # to wait until they are properly discovered.
17840    for ac_prog in cl cc gcc
17841do
17842  # Extract the first word of "$ac_prog", so it can be a program name with args.
17843set dummy $ac_prog; ac_word=$2
17844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17845$as_echo_n "checking for $ac_word... " >&6; }
17846if test "${ac_cv_path_BUILD_CC+set}" = set; then :
17847  $as_echo_n "(cached) " >&6
17848else
17849  case $BUILD_CC in
17850  [\\/]* | ?:[\\/]*)
17851  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
17852  ;;
17853  *)
17854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17855for as_dir in $PATH
17856do
17857  IFS=$as_save_IFS
17858  test -z "$as_dir" && as_dir=.
17859    for ac_exec_ext in '' $ac_executable_extensions; do
17860  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
17861    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
17862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17863    break 2
17864  fi
17865done
17866  done
17867IFS=$as_save_IFS
17868
17869  ;;
17870esac
17871fi
17872BUILD_CC=$ac_cv_path_BUILD_CC
17873if test -n "$BUILD_CC"; then
17874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
17875$as_echo "$BUILD_CC" >&6; }
17876else
17877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17878$as_echo "no" >&6; }
17879fi
17880
17881
17882  test -n "$BUILD_CC" && break
17883done
17884
17885
17886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17887
17888  # First separate the path from the arguments. This will split at the first
17889  # space.
17890  complete="$BUILD_CC"
17891  path="${complete%% *}"
17892  tmp="$complete EOL"
17893  arguments="${tmp#* }"
17894
17895  # Input might be given as Windows format, start by converting to
17896  # unix format.
17897  new_path=`$CYGPATH -u "$path"`
17898
17899  # Now try to locate executable using which
17900  new_path=`$WHICH "$new_path" 2> /dev/null`
17901  # bat and cmd files are not always considered executable in cygwin causing which
17902  # to not find them
17903  if test "x$new_path" = x \
17904           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17905           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17906    new_path=`$CYGPATH -u "$path"`
17907  fi
17908  if test "x$new_path" = x; then
17909    # Oops. Which didn't find the executable.
17910    # The splitting of arguments from the executable at a space might have been incorrect,
17911    # since paths with space are more likely in Windows. Give it another try with the whole
17912    # argument.
17913    path="$complete"
17914    arguments="EOL"
17915    new_path=`$CYGPATH -u "$path"`
17916    new_path=`$WHICH "$new_path" 2> /dev/null`
17917    # bat and cmd files are not always considered executable in cygwin causing which
17918    # to not find them
17919    if test "x$new_path" = x \
17920             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17921             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17922      new_path=`$CYGPATH -u "$path"`
17923    fi
17924    if test "x$new_path" = x; then
17925      # It's still not found. Now this is an unrecoverable error.
17926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
17927$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
17928      has_space=`$ECHO "$complete" | $GREP " "`
17929      if test "x$has_space" != x; then
17930        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17931$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17932      fi
17933      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17934    fi
17935  fi
17936
17937  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17938  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17939  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17940  # "foo.exe" is OK but "foo" is an error.
17941  #
17942  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17943  # It is also a way to make sure we got the proper file name for the real test later on.
17944  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17945  if test "x$test_shortpath" = x; then
17946    # Short path failed, file does not exist as specified.
17947    # Try adding .exe or .cmd
17948    if test -f "${new_path}.exe"; then
17949       input_to_shortpath="${new_path}.exe"
17950    elif test -f "${new_path}.cmd"; then
17951       input_to_shortpath="${new_path}.cmd"
17952    else
17953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
17954$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
17955      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17956$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17957      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
17958    fi
17959  else
17960    input_to_shortpath="$new_path"
17961  fi
17962
17963  # Call helper function which possibly converts this using DOS-style short mode.
17964  # If so, the updated path is stored in $new_path.
17965  new_path="$input_to_shortpath"
17966
17967  input_path="$input_to_shortpath"
17968  # Check if we need to convert this using DOS-style short mode. If the path
17969  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17970  # take no chances and rewrite it.
17971  # Note: m4 eats our [], so we need to use [ and ] instead.
17972  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17973  if test "x$has_forbidden_chars" != x; then
17974    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17975    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17976    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17977    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17978      # Going to short mode and back again did indeed matter. Since short mode is
17979      # case insensitive, let's make it lowercase to improve readability.
17980      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17981      # Now convert it back to Unix-stile (cygpath)
17982      input_path=`$CYGPATH -u "$shortmode_path"`
17983      new_path="$input_path"
17984    fi
17985  fi
17986
17987  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17988  if test "x$test_cygdrive_prefix" = x; then
17989    # As a simple fix, exclude /usr/bin since it's not a real path.
17990    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17991      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17992      # a path prefixed by /cygdrive for fixpath to work.
17993      new_path="$CYGWIN_ROOT_PATH$input_path"
17994    fi
17995  fi
17996
17997  # remove trailing .exe if any
17998  new_path="${new_path/%.exe/}"
17999
18000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18001
18002  # First separate the path from the arguments. This will split at the first
18003  # space.
18004  complete="$BUILD_CC"
18005  path="${complete%% *}"
18006  tmp="$complete EOL"
18007  arguments="${tmp#* }"
18008
18009  # Input might be given as Windows format, start by converting to
18010  # unix format.
18011  new_path="$path"
18012
18013  windows_path="$new_path"
18014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18015    unix_path=`$CYGPATH -u "$windows_path"`
18016    new_path="$unix_path"
18017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18019    new_path="$unix_path"
18020  fi
18021
18022
18023  # Now try to locate executable using which
18024  new_path=`$WHICH "$new_path" 2> /dev/null`
18025
18026  if test "x$new_path" = x; then
18027    # Oops. Which didn't find the executable.
18028    # The splitting of arguments from the executable at a space might have been incorrect,
18029    # since paths with space are more likely in Windows. Give it another try with the whole
18030    # argument.
18031    path="$complete"
18032    arguments="EOL"
18033    new_path="$path"
18034
18035  windows_path="$new_path"
18036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18037    unix_path=`$CYGPATH -u "$windows_path"`
18038    new_path="$unix_path"
18039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18041    new_path="$unix_path"
18042  fi
18043
18044
18045    new_path=`$WHICH "$new_path" 2> /dev/null`
18046
18047    if test "x$new_path" = x; then
18048      # It's still not found. Now this is an unrecoverable error.
18049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18050$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18051      has_space=`$ECHO "$complete" | $GREP " "`
18052      if test "x$has_space" != x; then
18053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18055      fi
18056      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18057    fi
18058  fi
18059
18060  # Now new_path has a complete unix path to the binary
18061  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18062    # Keep paths in /bin as-is, but remove trailing .exe if any
18063    new_path="${new_path/%.exe/}"
18064    # Do not save /bin paths to all_fixpath_prefixes!
18065  else
18066    # Not in mixed or Windows style, start by that.
18067    new_path=`cmd //c echo $new_path`
18068
18069  input_path="$new_path"
18070  # Check if we need to convert this using DOS-style short mode. If the path
18071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18072  # take no chances and rewrite it.
18073  # Note: m4 eats our [], so we need to use [ and ] instead.
18074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18075  if test "x$has_forbidden_chars" != x; then
18076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18078  fi
18079
18080    # Output is in $new_path
18081
18082  windows_path="$new_path"
18083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18084    unix_path=`$CYGPATH -u "$windows_path"`
18085    new_path="$unix_path"
18086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18088    new_path="$unix_path"
18089  fi
18090
18091    # remove trailing .exe if any
18092    new_path="${new_path/%.exe/}"
18093
18094    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18095    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18096  fi
18097
18098  else
18099    # We're on a posix platform. Hooray! :)
18100    # First separate the path from the arguments. This will split at the first
18101    # space.
18102    complete="$BUILD_CC"
18103    path="${complete%% *}"
18104    tmp="$complete EOL"
18105    arguments="${tmp#* }"
18106
18107    # Cannot rely on the command "which" here since it doesn't always work.
18108    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18109    if test -z "$is_absolute_path"; then
18110      # Path to executable is not absolute. Find it.
18111      IFS_save="$IFS"
18112      IFS=:
18113      for p in $PATH; do
18114        if test -f "$p/$path" && test -x "$p/$path"; then
18115          new_path="$p/$path"
18116          break
18117        fi
18118      done
18119      IFS="$IFS_save"
18120    else
18121      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CC (as $path) failed, using $path directly." >&5
18122$as_echo "$as_me: Resolving BUILD_CC (as $path) failed, using $path directly." >&6;}
18123      new_path="$path"
18124    fi
18125
18126    if test "x$new_path" = x; then
18127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
18128$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
18129        has_space=`$ECHO "$complete" | $GREP " "`
18130        if test "x$has_space" != x; then
18131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18133        fi
18134        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
18135      fi
18136  fi
18137
18138      # Now join together the path and the arguments once again
18139      if test "x$arguments" != xEOL; then
18140        new_complete="$new_path ${arguments% *}"
18141      else
18142        new_complete="$new_path"
18143      fi
18144
18145  if test "x$complete" != "x$new_complete"; then
18146      BUILD_CC="$new_complete"
18147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
18148$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
18149    fi
18150
18151    for ac_prog in cl CC g++
18152do
18153  # Extract the first word of "$ac_prog", so it can be a program name with args.
18154set dummy $ac_prog; ac_word=$2
18155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18156$as_echo_n "checking for $ac_word... " >&6; }
18157if test "${ac_cv_path_BUILD_CXX+set}" = set; then :
18158  $as_echo_n "(cached) " >&6
18159else
18160  case $BUILD_CXX in
18161  [\\/]* | ?:[\\/]*)
18162  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
18163  ;;
18164  *)
18165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18166for as_dir in $PATH
18167do
18168  IFS=$as_save_IFS
18169  test -z "$as_dir" && as_dir=.
18170    for ac_exec_ext in '' $ac_executable_extensions; do
18171  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18172    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
18173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18174    break 2
18175  fi
18176done
18177  done
18178IFS=$as_save_IFS
18179
18180  ;;
18181esac
18182fi
18183BUILD_CXX=$ac_cv_path_BUILD_CXX
18184if test -n "$BUILD_CXX"; then
18185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
18186$as_echo "$BUILD_CXX" >&6; }
18187else
18188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18189$as_echo "no" >&6; }
18190fi
18191
18192
18193  test -n "$BUILD_CXX" && break
18194done
18195
18196
18197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18198
18199  # First separate the path from the arguments. This will split at the first
18200  # space.
18201  complete="$BUILD_CXX"
18202  path="${complete%% *}"
18203  tmp="$complete EOL"
18204  arguments="${tmp#* }"
18205
18206  # Input might be given as Windows format, start by converting to
18207  # unix format.
18208  new_path=`$CYGPATH -u "$path"`
18209
18210  # Now try to locate executable using which
18211  new_path=`$WHICH "$new_path" 2> /dev/null`
18212  # bat and cmd files are not always considered executable in cygwin causing which
18213  # to not find them
18214  if test "x$new_path" = x \
18215           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18216           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18217    new_path=`$CYGPATH -u "$path"`
18218  fi
18219  if test "x$new_path" = x; then
18220    # Oops. Which didn't find the executable.
18221    # The splitting of arguments from the executable at a space might have been incorrect,
18222    # since paths with space are more likely in Windows. Give it another try with the whole
18223    # argument.
18224    path="$complete"
18225    arguments="EOL"
18226    new_path=`$CYGPATH -u "$path"`
18227    new_path=`$WHICH "$new_path" 2> /dev/null`
18228    # bat and cmd files are not always considered executable in cygwin causing which
18229    # to not find them
18230    if test "x$new_path" = x \
18231             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18232             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18233      new_path=`$CYGPATH -u "$path"`
18234    fi
18235    if test "x$new_path" = x; then
18236      # It's still not found. Now this is an unrecoverable error.
18237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18238$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18239      has_space=`$ECHO "$complete" | $GREP " "`
18240      if test "x$has_space" != x; then
18241        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18242$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18243      fi
18244      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18245    fi
18246  fi
18247
18248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18251  # "foo.exe" is OK but "foo" is an error.
18252  #
18253  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18254  # It is also a way to make sure we got the proper file name for the real test later on.
18255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18256  if test "x$test_shortpath" = x; then
18257    # Short path failed, file does not exist as specified.
18258    # Try adding .exe or .cmd
18259    if test -f "${new_path}.exe"; then
18260       input_to_shortpath="${new_path}.exe"
18261    elif test -f "${new_path}.cmd"; then
18262       input_to_shortpath="${new_path}.cmd"
18263    else
18264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
18265$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
18266      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18267$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18268      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18269    fi
18270  else
18271    input_to_shortpath="$new_path"
18272  fi
18273
18274  # Call helper function which possibly converts this using DOS-style short mode.
18275  # If so, the updated path is stored in $new_path.
18276  new_path="$input_to_shortpath"
18277
18278  input_path="$input_to_shortpath"
18279  # Check if we need to convert this using DOS-style short mode. If the path
18280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18281  # take no chances and rewrite it.
18282  # Note: m4 eats our [], so we need to use [ and ] instead.
18283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18284  if test "x$has_forbidden_chars" != x; then
18285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18289      # Going to short mode and back again did indeed matter. Since short mode is
18290      # case insensitive, let's make it lowercase to improve readability.
18291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18292      # Now convert it back to Unix-stile (cygpath)
18293      input_path=`$CYGPATH -u "$shortmode_path"`
18294      new_path="$input_path"
18295    fi
18296  fi
18297
18298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18299  if test "x$test_cygdrive_prefix" = x; then
18300    # As a simple fix, exclude /usr/bin since it's not a real path.
18301    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18303      # a path prefixed by /cygdrive for fixpath to work.
18304      new_path="$CYGWIN_ROOT_PATH$input_path"
18305    fi
18306  fi
18307
18308  # remove trailing .exe if any
18309  new_path="${new_path/%.exe/}"
18310
18311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18312
18313  # First separate the path from the arguments. This will split at the first
18314  # space.
18315  complete="$BUILD_CXX"
18316  path="${complete%% *}"
18317  tmp="$complete EOL"
18318  arguments="${tmp#* }"
18319
18320  # Input might be given as Windows format, start by converting to
18321  # unix format.
18322  new_path="$path"
18323
18324  windows_path="$new_path"
18325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18326    unix_path=`$CYGPATH -u "$windows_path"`
18327    new_path="$unix_path"
18328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18330    new_path="$unix_path"
18331  fi
18332
18333
18334  # Now try to locate executable using which
18335  new_path=`$WHICH "$new_path" 2> /dev/null`
18336
18337  if test "x$new_path" = x; then
18338    # Oops. Which didn't find the executable.
18339    # The splitting of arguments from the executable at a space might have been incorrect,
18340    # since paths with space are more likely in Windows. Give it another try with the whole
18341    # argument.
18342    path="$complete"
18343    arguments="EOL"
18344    new_path="$path"
18345
18346  windows_path="$new_path"
18347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18348    unix_path=`$CYGPATH -u "$windows_path"`
18349    new_path="$unix_path"
18350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18352    new_path="$unix_path"
18353  fi
18354
18355
18356    new_path=`$WHICH "$new_path" 2> /dev/null`
18357
18358    if test "x$new_path" = x; then
18359      # It's still not found. Now this is an unrecoverable error.
18360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18361$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18362      has_space=`$ECHO "$complete" | $GREP " "`
18363      if test "x$has_space" != x; then
18364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18366      fi
18367      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18368    fi
18369  fi
18370
18371  # Now new_path has a complete unix path to the binary
18372  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18373    # Keep paths in /bin as-is, but remove trailing .exe if any
18374    new_path="${new_path/%.exe/}"
18375    # Do not save /bin paths to all_fixpath_prefixes!
18376  else
18377    # Not in mixed or Windows style, start by that.
18378    new_path=`cmd //c echo $new_path`
18379
18380  input_path="$new_path"
18381  # Check if we need to convert this using DOS-style short mode. If the path
18382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18383  # take no chances and rewrite it.
18384  # Note: m4 eats our [], so we need to use [ and ] instead.
18385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18386  if test "x$has_forbidden_chars" != x; then
18387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18389  fi
18390
18391    # Output is in $new_path
18392
18393  windows_path="$new_path"
18394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18395    unix_path=`$CYGPATH -u "$windows_path"`
18396    new_path="$unix_path"
18397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18399    new_path="$unix_path"
18400  fi
18401
18402    # remove trailing .exe if any
18403    new_path="${new_path/%.exe/}"
18404
18405    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18406    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18407  fi
18408
18409  else
18410    # We're on a posix platform. Hooray! :)
18411    # First separate the path from the arguments. This will split at the first
18412    # space.
18413    complete="$BUILD_CXX"
18414    path="${complete%% *}"
18415    tmp="$complete EOL"
18416    arguments="${tmp#* }"
18417
18418    # Cannot rely on the command "which" here since it doesn't always work.
18419    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18420    if test -z "$is_absolute_path"; then
18421      # Path to executable is not absolute. Find it.
18422      IFS_save="$IFS"
18423      IFS=:
18424      for p in $PATH; do
18425        if test -f "$p/$path" && test -x "$p/$path"; then
18426          new_path="$p/$path"
18427          break
18428        fi
18429      done
18430      IFS="$IFS_save"
18431    else
18432      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_CXX (as $path) failed, using $path directly." >&5
18433$as_echo "$as_me: Resolving BUILD_CXX (as $path) failed, using $path directly." >&6;}
18434      new_path="$path"
18435    fi
18436
18437    if test "x$new_path" = x; then
18438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
18439$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
18440        has_space=`$ECHO "$complete" | $GREP " "`
18441        if test "x$has_space" != x; then
18442          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18443$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18444        fi
18445        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
18446      fi
18447  fi
18448
18449      # Now join together the path and the arguments once again
18450      if test "x$arguments" != xEOL; then
18451        new_complete="$new_path ${arguments% *}"
18452      else
18453        new_complete="$new_path"
18454      fi
18455
18456  if test "x$complete" != "x$new_complete"; then
18457      BUILD_CXX="$new_complete"
18458      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
18459$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
18460    fi
18461
18462    # Extract the first word of "ld", so it can be a program name with args.
18463set dummy ld; ac_word=$2
18464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18465$as_echo_n "checking for $ac_word... " >&6; }
18466if test "${ac_cv_path_BUILD_LD+set}" = set; then :
18467  $as_echo_n "(cached) " >&6
18468else
18469  case $BUILD_LD in
18470  [\\/]* | ?:[\\/]*)
18471  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
18472  ;;
18473  *)
18474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18475for as_dir in $PATH
18476do
18477  IFS=$as_save_IFS
18478  test -z "$as_dir" && as_dir=.
18479    for ac_exec_ext in '' $ac_executable_extensions; do
18480  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18481    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
18482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18483    break 2
18484  fi
18485done
18486  done
18487IFS=$as_save_IFS
18488
18489  ;;
18490esac
18491fi
18492BUILD_LD=$ac_cv_path_BUILD_LD
18493if test -n "$BUILD_LD"; then
18494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
18495$as_echo "$BUILD_LD" >&6; }
18496else
18497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18498$as_echo "no" >&6; }
18499fi
18500
18501
18502
18503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18504
18505  # First separate the path from the arguments. This will split at the first
18506  # space.
18507  complete="$BUILD_LD"
18508  path="${complete%% *}"
18509  tmp="$complete EOL"
18510  arguments="${tmp#* }"
18511
18512  # Input might be given as Windows format, start by converting to
18513  # unix format.
18514  new_path=`$CYGPATH -u "$path"`
18515
18516  # Now try to locate executable using which
18517  new_path=`$WHICH "$new_path" 2> /dev/null`
18518  # bat and cmd files are not always considered executable in cygwin causing which
18519  # to not find them
18520  if test "x$new_path" = x \
18521           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18522           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18523    new_path=`$CYGPATH -u "$path"`
18524  fi
18525  if test "x$new_path" = x; then
18526    # Oops. Which didn't find the executable.
18527    # The splitting of arguments from the executable at a space might have been incorrect,
18528    # since paths with space are more likely in Windows. Give it another try with the whole
18529    # argument.
18530    path="$complete"
18531    arguments="EOL"
18532    new_path=`$CYGPATH -u "$path"`
18533    new_path=`$WHICH "$new_path" 2> /dev/null`
18534    # bat and cmd files are not always considered executable in cygwin causing which
18535    # to not find them
18536    if test "x$new_path" = x \
18537             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18538             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18539      new_path=`$CYGPATH -u "$path"`
18540    fi
18541    if test "x$new_path" = x; then
18542      # It's still not found. Now this is an unrecoverable error.
18543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18544$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18545      has_space=`$ECHO "$complete" | $GREP " "`
18546      if test "x$has_space" != x; then
18547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18549      fi
18550      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18551    fi
18552  fi
18553
18554  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18555  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18556  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18557  # "foo.exe" is OK but "foo" is an error.
18558  #
18559  # This test is therefore slightly more accurate than "test -f" to check for file precense.
18560  # It is also a way to make sure we got the proper file name for the real test later on.
18561  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18562  if test "x$test_shortpath" = x; then
18563    # Short path failed, file does not exist as specified.
18564    # Try adding .exe or .cmd
18565    if test -f "${new_path}.exe"; then
18566       input_to_shortpath="${new_path}.exe"
18567    elif test -f "${new_path}.cmd"; then
18568       input_to_shortpath="${new_path}.cmd"
18569    else
18570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
18571$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
18572      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18573$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18574      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18575    fi
18576  else
18577    input_to_shortpath="$new_path"
18578  fi
18579
18580  # Call helper function which possibly converts this using DOS-style short mode.
18581  # If so, the updated path is stored in $new_path.
18582  new_path="$input_to_shortpath"
18583
18584  input_path="$input_to_shortpath"
18585  # Check if we need to convert this using DOS-style short mode. If the path
18586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18587  # take no chances and rewrite it.
18588  # Note: m4 eats our [], so we need to use [ and ] instead.
18589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18590  if test "x$has_forbidden_chars" != x; then
18591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18595      # Going to short mode and back again did indeed matter. Since short mode is
18596      # case insensitive, let's make it lowercase to improve readability.
18597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18598      # Now convert it back to Unix-stile (cygpath)
18599      input_path=`$CYGPATH -u "$shortmode_path"`
18600      new_path="$input_path"
18601    fi
18602  fi
18603
18604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18605  if test "x$test_cygdrive_prefix" = x; then
18606    # As a simple fix, exclude /usr/bin since it's not a real path.
18607    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18609      # a path prefixed by /cygdrive for fixpath to work.
18610      new_path="$CYGWIN_ROOT_PATH$input_path"
18611    fi
18612  fi
18613
18614  # remove trailing .exe if any
18615  new_path="${new_path/%.exe/}"
18616
18617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18618
18619  # First separate the path from the arguments. This will split at the first
18620  # space.
18621  complete="$BUILD_LD"
18622  path="${complete%% *}"
18623  tmp="$complete EOL"
18624  arguments="${tmp#* }"
18625
18626  # Input might be given as Windows format, start by converting to
18627  # unix format.
18628  new_path="$path"
18629
18630  windows_path="$new_path"
18631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18632    unix_path=`$CYGPATH -u "$windows_path"`
18633    new_path="$unix_path"
18634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18636    new_path="$unix_path"
18637  fi
18638
18639
18640  # Now try to locate executable using which
18641  new_path=`$WHICH "$new_path" 2> /dev/null`
18642
18643  if test "x$new_path" = x; then
18644    # Oops. Which didn't find the executable.
18645    # The splitting of arguments from the executable at a space might have been incorrect,
18646    # since paths with space are more likely in Windows. Give it another try with the whole
18647    # argument.
18648    path="$complete"
18649    arguments="EOL"
18650    new_path="$path"
18651
18652  windows_path="$new_path"
18653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18654    unix_path=`$CYGPATH -u "$windows_path"`
18655    new_path="$unix_path"
18656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18658    new_path="$unix_path"
18659  fi
18660
18661
18662    new_path=`$WHICH "$new_path" 2> /dev/null`
18663
18664    if test "x$new_path" = x; then
18665      # It's still not found. Now this is an unrecoverable error.
18666      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18667$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18668      has_space=`$ECHO "$complete" | $GREP " "`
18669      if test "x$has_space" != x; then
18670        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18671$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18672      fi
18673      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18674    fi
18675  fi
18676
18677  # Now new_path has a complete unix path to the binary
18678  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18679    # Keep paths in /bin as-is, but remove trailing .exe if any
18680    new_path="${new_path/%.exe/}"
18681    # Do not save /bin paths to all_fixpath_prefixes!
18682  else
18683    # Not in mixed or Windows style, start by that.
18684    new_path=`cmd //c echo $new_path`
18685
18686  input_path="$new_path"
18687  # Check if we need to convert this using DOS-style short mode. If the path
18688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18689  # take no chances and rewrite it.
18690  # Note: m4 eats our [], so we need to use [ and ] instead.
18691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18692  if test "x$has_forbidden_chars" != x; then
18693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18694    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18695  fi
18696
18697    # Output is in $new_path
18698
18699  windows_path="$new_path"
18700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18701    unix_path=`$CYGPATH -u "$windows_path"`
18702    new_path="$unix_path"
18703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18705    new_path="$unix_path"
18706  fi
18707
18708    # remove trailing .exe if any
18709    new_path="${new_path/%.exe/}"
18710
18711    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18712    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18713  fi
18714
18715  else
18716    # We're on a posix platform. Hooray! :)
18717    # First separate the path from the arguments. This will split at the first
18718    # space.
18719    complete="$BUILD_LD"
18720    path="${complete%% *}"
18721    tmp="$complete EOL"
18722    arguments="${tmp#* }"
18723
18724    # Cannot rely on the command "which" here since it doesn't always work.
18725    is_absolute_path=`$ECHO "$path" | $GREP ^/`
18726    if test -z "$is_absolute_path"; then
18727      # Path to executable is not absolute. Find it.
18728      IFS_save="$IFS"
18729      IFS=:
18730      for p in $PATH; do
18731        if test -f "$p/$path" && test -x "$p/$path"; then
18732          new_path="$p/$path"
18733          break
18734        fi
18735      done
18736      IFS="$IFS_save"
18737    else
18738      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving BUILD_LD (as $path) failed, using $path directly." >&5
18739$as_echo "$as_me: Resolving BUILD_LD (as $path) failed, using $path directly." >&6;}
18740      new_path="$path"
18741    fi
18742
18743    if test "x$new_path" = x; then
18744        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
18745$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
18746        has_space=`$ECHO "$complete" | $GREP " "`
18747        if test "x$has_space" != x; then
18748          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18749$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18750        fi
18751        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
18752      fi
18753  fi
18754
18755      # Now join together the path and the arguments once again
18756      if test "x$arguments" != xEOL; then
18757        new_complete="$new_path ${arguments% *}"
18758      else
18759        new_complete="$new_path"
18760      fi
18761
18762  if test "x$complete" != "x$new_complete"; then
18763      BUILD_LD="$new_complete"
18764      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
18765$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
18766    fi
18767
18768fi
18769
18770
18771
18772
18773# If a devkit is found on the builddeps server, then prepend its path to the
18774# PATH variable. If there are cross compilers available in the devkit, these
18775# will be found by AC_PROG_CC et al.
18776DEVKIT=
18777
18778
18779    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
18780        # Source the builddeps file again, to make sure it uses the latest variables!
18781        . $builddepsfile
18782        # Look for a target and build machine specific resource!
18783        eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
18784        if test "x$resource" = x; then
18785            # Ok, lets instead look for a target specific resource
18786            eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
18787        fi
18788        if test "x$resource" = x; then
18789            # Ok, lets instead look for a build specific resource
18790            eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
18791        fi
18792        if test "x$resource" = x; then
18793            # Ok, lets instead look for a generic resource
18794            # (The devkit comes from M4 and not the shell, thus no need for eval here.)
18795            resource=${builddep_devkit}
18796        fi
18797        if test "x$resource" != x; then
18798            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
18799$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
18800	    # If the resource in the builddeps.conf file is an existing directory,
18801	    # for example /java/linux/cups
18802	    if test -d ${resource}; then
18803	       depdir=${resource}
18804	    else
18805
18806# devkit is for example mymodule
18807# $resource is for example libs/general/libmymod_1_2_3.zip
18808# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
18809# $with_builddeps_dir is for example /localhome/builddeps
18810# depdir is the name of the variable into which we store the depdir, eg MYMOD
18811# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
18812# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
18813    filename=`basename $resource`
18814    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
18815    filebase=${filename%%.*}
18816    extension=${filename#*.}
18817    installdir=$with_builddeps_dir/$filebase
18818    if test ! -f $installdir/$filename.unpacked; then
18819        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
18820$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
18821        if test ! -d $installdir; then
18822            mkdir -p $installdir
18823        fi
18824        if test ! -d $installdir; then
18825            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
18826        fi
18827        tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
18828        touch $tmpfile
18829        if test ! -f $tmpfile; then
18830            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
18831        fi
18832
18833    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
18834    # $tmpfile is the local file name for the downloaded file.
18835    VALID_TOOL=no
18836    if test "x$BDEPS_FTP" = xwget; then
18837       VALID_TOOL=yes
18838       wget -O $tmpfile $with_builddeps_server/$resource
18839    fi
18840    if test "x$BDEPS_FTP" = xlftp; then
18841       VALID_TOOL=yes
18842       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
18843    fi
18844    if test "x$BDEPS_FTP" = xftp; then
18845        VALID_TOOL=yes
18846        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
18847        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
18848        FTPUSERPWD=${FTPSERVER%%@*}
18849        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
18850            FTPUSER=${userpwd%%:*}
18851            FTPPWD=${userpwd#*@}
18852            FTPSERVER=${FTPSERVER#*@}
18853        else
18854            FTPUSER=ftp
18855            FTPPWD=ftp
18856        fi
18857        # the "pass" command does not work on some
18858        # ftp clients (read ftp.exe) but if it works,
18859        # passive mode is better!
18860        (\
18861            echo "user $FTPUSER $FTPPWD"        ;\
18862            echo "pass"                         ;\
18863            echo "bin"                          ;\
18864            echo "get $FTPPATH $tmpfile"              ;\
18865        ) | ftp -in $FTPSERVER
18866    fi
18867    if test "x$VALID_TOOL" != xyes; then
18868       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
18869    fi
18870
18871        mv $tmpfile $installdir/$filename
18872        if test ! -s $installdir/$filename; then
18873            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
18874        fi
18875        case "$extension" in
18876            zip)  echo "Unzipping $installdir/$filename..."
18877               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
18878            ;;
18879            tar.gz) echo "Untaring $installdir/$filename..."
18880               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18881            ;;
18882            tgz) echo "Untaring $installdir/$filename..."
18883               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
18884            ;;
18885            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
18886            ;;
18887        esac
18888    fi
18889    if test -f $installdir/$filename.unpacked; then
18890        depdir=$installdir
18891    fi
18892
18893	    fi
18894            # Source the builddeps file again, because in the previous command, the depdir
18895            # was updated to point at the current build dependency install directory.
18896            . $builddepsfile
18897            # Now extract variables from the builddeps.conf files.
18898            theroot=${builddep_devkit_ROOT}
18899            thecflags=${builddep_devkit_CFLAGS}
18900            thelibs=${builddep_devkit_LIBS}
18901            if test "x$depdir" = x; then
18902                as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
18903            fi
18904            DEVKIT=$depdir
18905            if test "x$theroot" != x; then
18906               DEVKIT="$theroot"
18907            fi
18908            if test "x$thecflags" != x; then
18909               DEVKIT_CFLAGS="$thecflags"
18910            fi
18911            if test "x$thelibs" != x; then
18912               DEVKIT_LIBS="$thelibs"
18913            fi
18914            # Found devkit
18915                     PATH="$DEVKIT/bin:$PATH"
18916                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
18917                     if test "x$x_includes" = "xNONE"; then
18918                         x_includes="$SYS_ROOT/usr/include/X11"
18919                     fi
18920                     if test "x$x_libraries" = "xNONE"; then
18921                         x_libraries="$SYS_ROOT/usr/lib"
18922                     fi
18923
18924
18925        fi
18926
18927    fi
18928
18929
18930if test "x$SYS_ROOT" != "x/" ; then
18931    CFLAGS="--sysroot=$SYS_ROOT $CFLAGS"
18932    CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS"
18933    OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18934    OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS"
18935    CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS"
18936    LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS"
18937fi
18938
18939# Store the CFLAGS etal passed to the configure script.
18940ORG_CFLAGS="$CFLAGS"
18941ORG_CXXFLAGS="$CXXFLAGS"
18942ORG_OBJCFLAGS="$OBJCFLAGS"
18943
18944# autoconf magic only relies on PATH, so update it if tools dir is specified
18945OLD_PATH="$PATH"
18946if test "x$TOOLS_DIR" != x; then
18947  PATH=$TOOLS_DIR:$PATH
18948fi
18949
18950
18951### Locate C compiler (CC)
18952
18953# On windows, only cl.exe is supported.
18954# On Solaris, cc is preferred to gcc.
18955# Elsewhere, gcc is preferred to cc.
18956
18957if test "x$CC" != x; then
18958  COMPILER_CHECK_LIST="$CC"
18959elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18960  COMPILER_CHECK_LIST="cl"
18961elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
18962  COMPILER_CHECK_LIST="cc gcc"
18963else
18964  COMPILER_CHECK_LIST="gcc cc"
18965fi
18966
18967
18968  COMPILER_NAME=C
18969
18970  CC=
18971  # If TOOLS_DIR is set, check for all compiler names in there first
18972  # before checking the rest of the PATH.
18973  if test -n "$TOOLS_DIR"; then
18974    PATH_save="$PATH"
18975    PATH="$TOOLS_DIR"
18976    for ac_prog in $COMPILER_CHECK_LIST
18977do
18978  # Extract the first word of "$ac_prog", so it can be a program name with args.
18979set dummy $ac_prog; ac_word=$2
18980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18981$as_echo_n "checking for $ac_word... " >&6; }
18982if test "${ac_cv_path_TOOLS_DIR_CC+set}" = set; then :
18983  $as_echo_n "(cached) " >&6
18984else
18985  case $TOOLS_DIR_CC in
18986  [\\/]* | ?:[\\/]*)
18987  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
18988  ;;
18989  *)
18990  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18991for as_dir in $PATH
18992do
18993  IFS=$as_save_IFS
18994  test -z "$as_dir" && as_dir=.
18995    for ac_exec_ext in '' $ac_executable_extensions; do
18996  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
18997    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
18998    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18999    break 2
19000  fi
19001done
19002  done
19003IFS=$as_save_IFS
19004
19005  ;;
19006esac
19007fi
19008TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
19009if test -n "$TOOLS_DIR_CC"; then
19010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
19011$as_echo "$TOOLS_DIR_CC" >&6; }
19012else
19013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19014$as_echo "no" >&6; }
19015fi
19016
19017
19018  test -n "$TOOLS_DIR_CC" && break
19019done
19020
19021    CC=$TOOLS_DIR_CC
19022    PATH="$PATH_save"
19023  fi
19024
19025  # AC_PATH_PROGS can't be run multiple times with the same variable,
19026  # so create a new name for this run.
19027  if test "x$CC" = x; then
19028    for ac_prog in $COMPILER_CHECK_LIST
19029do
19030  # Extract the first word of "$ac_prog", so it can be a program name with args.
19031set dummy $ac_prog; ac_word=$2
19032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19033$as_echo_n "checking for $ac_word... " >&6; }
19034if test "${ac_cv_path_POTENTIAL_CC+set}" = set; then :
19035  $as_echo_n "(cached) " >&6
19036else
19037  case $POTENTIAL_CC in
19038  [\\/]* | ?:[\\/]*)
19039  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
19040  ;;
19041  *)
19042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19043for as_dir in $PATH
19044do
19045  IFS=$as_save_IFS
19046  test -z "$as_dir" && as_dir=.
19047    for ac_exec_ext in '' $ac_executable_extensions; do
19048  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19049    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
19050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19051    break 2
19052  fi
19053done
19054  done
19055IFS=$as_save_IFS
19056
19057  ;;
19058esac
19059fi
19060POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
19061if test -n "$POTENTIAL_CC"; then
19062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
19063$as_echo "$POTENTIAL_CC" >&6; }
19064else
19065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19066$as_echo "no" >&6; }
19067fi
19068
19069
19070  test -n "$POTENTIAL_CC" && break
19071done
19072
19073    CC=$POTENTIAL_CC
19074  fi
19075
19076  if test "x$CC" = x; then
19077
19078    # Print a helpful message on how to acquire the necessary build dependency.
19079    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
19080    MISSING_DEPENDENCY=devkit
19081    PKGHANDLER_COMMAND=
19082
19083    case $PKGHANDLER in
19084	apt-get)
19085                apt_help     $MISSING_DEPENDENCY ;;
19086    yum)
19087                yum_help     $MISSING_DEPENDENCY ;;
19088	port)
19089                port_help    $MISSING_DEPENDENCY ;;
19090	pkgutil)
19091                pkgutil_help $MISSING_DEPENDENCY ;;
19092	pkgadd)
19093                pkgadd_help  $MISSING_DEPENDENCY ;;
19094    * )
19095      break ;;
19096    esac
19097
19098    if test "x$PKGHANDLER_COMMAND" != x; then
19099        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
19100    fi
19101
19102      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
19103  fi
19104
19105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19106
19107  # First separate the path from the arguments. This will split at the first
19108  # space.
19109  complete="$CC"
19110  path="${complete%% *}"
19111  tmp="$complete EOL"
19112  arguments="${tmp#* }"
19113
19114  # Input might be given as Windows format, start by converting to
19115  # unix format.
19116  new_path=`$CYGPATH -u "$path"`
19117
19118  # Now try to locate executable using which
19119  new_path=`$WHICH "$new_path" 2> /dev/null`
19120  # bat and cmd files are not always considered executable in cygwin causing which
19121  # to not find them
19122  if test "x$new_path" = x \
19123           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19124           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19125    new_path=`$CYGPATH -u "$path"`
19126  fi
19127  if test "x$new_path" = x; then
19128    # Oops. Which didn't find the executable.
19129    # The splitting of arguments from the executable at a space might have been incorrect,
19130    # since paths with space are more likely in Windows. Give it another try with the whole
19131    # argument.
19132    path="$complete"
19133    arguments="EOL"
19134    new_path=`$CYGPATH -u "$path"`
19135    new_path=`$WHICH "$new_path" 2> /dev/null`
19136    # bat and cmd files are not always considered executable in cygwin causing which
19137    # to not find them
19138    if test "x$new_path" = x \
19139             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19140             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19141      new_path=`$CYGPATH -u "$path"`
19142    fi
19143    if test "x$new_path" = x; then
19144      # It's still not found. Now this is an unrecoverable error.
19145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19146$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19147      has_space=`$ECHO "$complete" | $GREP " "`
19148      if test "x$has_space" != x; then
19149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19151      fi
19152      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19153    fi
19154  fi
19155
19156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19159  # "foo.exe" is OK but "foo" is an error.
19160  #
19161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19162  # It is also a way to make sure we got the proper file name for the real test later on.
19163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19164  if test "x$test_shortpath" = x; then
19165    # Short path failed, file does not exist as specified.
19166    # Try adding .exe or .cmd
19167    if test -f "${new_path}.exe"; then
19168       input_to_shortpath="${new_path}.exe"
19169    elif test -f "${new_path}.cmd"; then
19170       input_to_shortpath="${new_path}.cmd"
19171    else
19172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
19173$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
19174      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19175$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19176      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19177    fi
19178  else
19179    input_to_shortpath="$new_path"
19180  fi
19181
19182  # Call helper function which possibly converts this using DOS-style short mode.
19183  # If so, the updated path is stored in $new_path.
19184  new_path="$input_to_shortpath"
19185
19186  input_path="$input_to_shortpath"
19187  # Check if we need to convert this using DOS-style short mode. If the path
19188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19189  # take no chances and rewrite it.
19190  # Note: m4 eats our [], so we need to use [ and ] instead.
19191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19192  if test "x$has_forbidden_chars" != x; then
19193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19197      # Going to short mode and back again did indeed matter. Since short mode is
19198      # case insensitive, let's make it lowercase to improve readability.
19199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19200      # Now convert it back to Unix-stile (cygpath)
19201      input_path=`$CYGPATH -u "$shortmode_path"`
19202      new_path="$input_path"
19203    fi
19204  fi
19205
19206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19207  if test "x$test_cygdrive_prefix" = x; then
19208    # As a simple fix, exclude /usr/bin since it's not a real path.
19209    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19211      # a path prefixed by /cygdrive for fixpath to work.
19212      new_path="$CYGWIN_ROOT_PATH$input_path"
19213    fi
19214  fi
19215
19216  # remove trailing .exe if any
19217  new_path="${new_path/%.exe/}"
19218
19219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19220
19221  # First separate the path from the arguments. This will split at the first
19222  # space.
19223  complete="$CC"
19224  path="${complete%% *}"
19225  tmp="$complete EOL"
19226  arguments="${tmp#* }"
19227
19228  # Input might be given as Windows format, start by converting to
19229  # unix format.
19230  new_path="$path"
19231
19232  windows_path="$new_path"
19233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19234    unix_path=`$CYGPATH -u "$windows_path"`
19235    new_path="$unix_path"
19236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19238    new_path="$unix_path"
19239  fi
19240
19241
19242  # Now try to locate executable using which
19243  new_path=`$WHICH "$new_path" 2> /dev/null`
19244
19245  if test "x$new_path" = x; then
19246    # Oops. Which didn't find the executable.
19247    # The splitting of arguments from the executable at a space might have been incorrect,
19248    # since paths with space are more likely in Windows. Give it another try with the whole
19249    # argument.
19250    path="$complete"
19251    arguments="EOL"
19252    new_path="$path"
19253
19254  windows_path="$new_path"
19255  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19256    unix_path=`$CYGPATH -u "$windows_path"`
19257    new_path="$unix_path"
19258  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19259    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19260    new_path="$unix_path"
19261  fi
19262
19263
19264    new_path=`$WHICH "$new_path" 2> /dev/null`
19265
19266    if test "x$new_path" = x; then
19267      # It's still not found. Now this is an unrecoverable error.
19268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19269$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19270      has_space=`$ECHO "$complete" | $GREP " "`
19271      if test "x$has_space" != x; then
19272        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19273$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19274      fi
19275      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19276    fi
19277  fi
19278
19279  # Now new_path has a complete unix path to the binary
19280  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19281    # Keep paths in /bin as-is, but remove trailing .exe if any
19282    new_path="${new_path/%.exe/}"
19283    # Do not save /bin paths to all_fixpath_prefixes!
19284  else
19285    # Not in mixed or Windows style, start by that.
19286    new_path=`cmd //c echo $new_path`
19287
19288  input_path="$new_path"
19289  # Check if we need to convert this using DOS-style short mode. If the path
19290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19291  # take no chances and rewrite it.
19292  # Note: m4 eats our [], so we need to use [ and ] instead.
19293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19294  if test "x$has_forbidden_chars" != x; then
19295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19297  fi
19298
19299    # Output is in $new_path
19300
19301  windows_path="$new_path"
19302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19303    unix_path=`$CYGPATH -u "$windows_path"`
19304    new_path="$unix_path"
19305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19307    new_path="$unix_path"
19308  fi
19309
19310    # remove trailing .exe if any
19311    new_path="${new_path/%.exe/}"
19312
19313    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19314    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19315  fi
19316
19317  else
19318    # We're on a posix platform. Hooray! :)
19319    # First separate the path from the arguments. This will split at the first
19320    # space.
19321    complete="$CC"
19322    path="${complete%% *}"
19323    tmp="$complete EOL"
19324    arguments="${tmp#* }"
19325
19326    # Cannot rely on the command "which" here since it doesn't always work.
19327    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19328    if test -z "$is_absolute_path"; then
19329      # Path to executable is not absolute. Find it.
19330      IFS_save="$IFS"
19331      IFS=:
19332      for p in $PATH; do
19333        if test -f "$p/$path" && test -x "$p/$path"; then
19334          new_path="$p/$path"
19335          break
19336        fi
19337      done
19338      IFS="$IFS_save"
19339    else
19340      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CC (as $path) failed, using $path directly." >&5
19341$as_echo "$as_me: Resolving CC (as $path) failed, using $path directly." >&6;}
19342      new_path="$path"
19343    fi
19344
19345    if test "x$new_path" = x; then
19346        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
19347$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
19348        has_space=`$ECHO "$complete" | $GREP " "`
19349        if test "x$has_space" != x; then
19350          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19351$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19352        fi
19353        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
19354      fi
19355  fi
19356
19357      # Now join together the path and the arguments once again
19358      if test "x$arguments" != xEOL; then
19359        new_complete="$new_path ${arguments% *}"
19360      else
19361        new_complete="$new_path"
19362      fi
19363
19364  if test "x$complete" != "x$new_complete"; then
19365      CC="$new_complete"
19366      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
19367$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
19368    fi
19369
19370  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
19371$as_echo_n "checking resolved symbolic links for CC... " >&6; }
19372  TEST_COMPILER="$CC"
19373
19374    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19375        # Follow a chain of symbolic links. Use readlink
19376        # where it exists, else fall back to horribly
19377        # complicated shell code.
19378        if test "x$READLINK_TESTED" != yes; then
19379            # On MacOSX there is a readlink tool with a different
19380            # purpose than the GNU readlink tool. Check the found readlink.
19381            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19382            if test "x$ISGNU" = x; then
19383                 # A readlink that we do not know how to use.
19384                 # Are there other non-GNU readlinks out there?
19385                 READLINK_TESTED=yes
19386                 READLINK=
19387            fi
19388        fi
19389
19390        if test "x$READLINK" != x; then
19391            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
19392        else
19393            # Save the current directory for restoring afterwards
19394            STARTDIR=$PWD
19395            COUNTER=0
19396            sym_link_dir=`$DIRNAME $TEST_COMPILER`
19397            sym_link_file=`$BASENAME $TEST_COMPILER`
19398            # Use the system pwd and not the shell builtin to resolve directory symlinks
19399            cd $sym_link_dir
19400            cd `$THEPWDCMD`
19401            sym_link_dir=`$THEPWDCMD`
19402            # Resolve file symlinks
19403            while test $COUNTER -lt 20; do
19404                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19405                if test "x$ISLINK" == x; then
19406                    # This is not a symbolic link! We are done!
19407                    break
19408                fi
19409                # Again resolve directory symlinks since the target of the just found
19410                # link could be in a different directory
19411                cd `$DIRNAME $ISLINK`
19412                sym_link_dir=`$THEPWDCMD`
19413                sym_link_file=`$BASENAME $ISLINK`
19414                let COUNTER=COUNTER+1
19415            done
19416            cd $STARTDIR
19417            TEST_COMPILER=$sym_link_dir/$sym_link_file
19418        fi
19419    fi
19420
19421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
19422$as_echo "$TEST_COMPILER" >&6; }
19423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
19424$as_echo_n "checking if CC is disguised ccache... " >&6; }
19425
19426  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
19427  if test "x$COMPILER_BASENAME" = "xccache"; then
19428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
19429$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
19430    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
19431    # We want to control ccache invocation ourselves, so ignore this cc and try
19432    # searching again.
19433
19434    # Remove the path to the fake ccache cc from the PATH
19435    RETRY_COMPILER_SAVED_PATH="$PATH"
19436    COMPILER_DIRNAME=`$DIRNAME $CC`
19437    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
19438
19439    # Try again looking for our compiler
19440    if test -n "$ac_tool_prefix"; then
19441  for ac_prog in $COMPILER_CHECK_LIST
19442  do
19443    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19444set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19446$as_echo_n "checking for $ac_word... " >&6; }
19447if test "${ac_cv_prog_PROPER_COMPILER_CC+set}" = set; then :
19448  $as_echo_n "(cached) " >&6
19449else
19450  if test -n "$PROPER_COMPILER_CC"; then
19451  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
19452else
19453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19454for as_dir in $PATH
19455do
19456  IFS=$as_save_IFS
19457  test -z "$as_dir" && as_dir=.
19458    for ac_exec_ext in '' $ac_executable_extensions; do
19459  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19460    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
19461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19462    break 2
19463  fi
19464done
19465  done
19466IFS=$as_save_IFS
19467
19468fi
19469fi
19470PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
19471if test -n "$PROPER_COMPILER_CC"; then
19472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19473$as_echo "$PROPER_COMPILER_CC" >&6; }
19474else
19475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19476$as_echo "no" >&6; }
19477fi
19478
19479
19480    test -n "$PROPER_COMPILER_CC" && break
19481  done
19482fi
19483if test -z "$PROPER_COMPILER_CC"; then
19484  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
19485  for ac_prog in $COMPILER_CHECK_LIST
19486do
19487  # Extract the first word of "$ac_prog", so it can be a program name with args.
19488set dummy $ac_prog; ac_word=$2
19489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19490$as_echo_n "checking for $ac_word... " >&6; }
19491if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+set}" = set; then :
19492  $as_echo_n "(cached) " >&6
19493else
19494  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19495  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
19496else
19497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19498for as_dir in $PATH
19499do
19500  IFS=$as_save_IFS
19501  test -z "$as_dir" && as_dir=.
19502    for ac_exec_ext in '' $ac_executable_extensions; do
19503  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19504    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
19505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19506    break 2
19507  fi
19508done
19509  done
19510IFS=$as_save_IFS
19511
19512fi
19513fi
19514ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
19515if test -n "$ac_ct_PROPER_COMPILER_CC"; then
19516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
19517$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
19518else
19519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19520$as_echo "no" >&6; }
19521fi
19522
19523
19524  test -n "$ac_ct_PROPER_COMPILER_CC" && break
19525done
19526
19527  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
19528    PROPER_COMPILER_CC=""
19529  else
19530    case $cross_compiling:$ac_tool_warned in
19531yes:)
19532{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19533$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19534ac_tool_warned=yes ;;
19535esac
19536    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
19537  fi
19538fi
19539
19540
19541  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19542
19543  # First separate the path from the arguments. This will split at the first
19544  # space.
19545  complete="$PROPER_COMPILER_CC"
19546  path="${complete%% *}"
19547  tmp="$complete EOL"
19548  arguments="${tmp#* }"
19549
19550  # Input might be given as Windows format, start by converting to
19551  # unix format.
19552  new_path=`$CYGPATH -u "$path"`
19553
19554  # Now try to locate executable using which
19555  new_path=`$WHICH "$new_path" 2> /dev/null`
19556  # bat and cmd files are not always considered executable in cygwin causing which
19557  # to not find them
19558  if test "x$new_path" = x \
19559           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19560           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19561    new_path=`$CYGPATH -u "$path"`
19562  fi
19563  if test "x$new_path" = x; then
19564    # Oops. Which didn't find the executable.
19565    # The splitting of arguments from the executable at a space might have been incorrect,
19566    # since paths with space are more likely in Windows. Give it another try with the whole
19567    # argument.
19568    path="$complete"
19569    arguments="EOL"
19570    new_path=`$CYGPATH -u "$path"`
19571    new_path=`$WHICH "$new_path" 2> /dev/null`
19572    # bat and cmd files are not always considered executable in cygwin causing which
19573    # to not find them
19574    if test "x$new_path" = x \
19575             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19576             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19577      new_path=`$CYGPATH -u "$path"`
19578    fi
19579    if test "x$new_path" = x; then
19580      # It's still not found. Now this is an unrecoverable error.
19581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19582$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19583      has_space=`$ECHO "$complete" | $GREP " "`
19584      if test "x$has_space" != x; then
19585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19587      fi
19588      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19589    fi
19590  fi
19591
19592  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19593  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19594  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19595  # "foo.exe" is OK but "foo" is an error.
19596  #
19597  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19598  # It is also a way to make sure we got the proper file name for the real test later on.
19599  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19600  if test "x$test_shortpath" = x; then
19601    # Short path failed, file does not exist as specified.
19602    # Try adding .exe or .cmd
19603    if test -f "${new_path}.exe"; then
19604       input_to_shortpath="${new_path}.exe"
19605    elif test -f "${new_path}.cmd"; then
19606       input_to_shortpath="${new_path}.cmd"
19607    else
19608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
19609$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
19610      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19611$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19612      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19613    fi
19614  else
19615    input_to_shortpath="$new_path"
19616  fi
19617
19618  # Call helper function which possibly converts this using DOS-style short mode.
19619  # If so, the updated path is stored in $new_path.
19620  new_path="$input_to_shortpath"
19621
19622  input_path="$input_to_shortpath"
19623  # Check if we need to convert this using DOS-style short mode. If the path
19624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19625  # take no chances and rewrite it.
19626  # Note: m4 eats our [], so we need to use [ and ] instead.
19627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19628  if test "x$has_forbidden_chars" != x; then
19629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19633      # Going to short mode and back again did indeed matter. Since short mode is
19634      # case insensitive, let's make it lowercase to improve readability.
19635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19636      # Now convert it back to Unix-stile (cygpath)
19637      input_path=`$CYGPATH -u "$shortmode_path"`
19638      new_path="$input_path"
19639    fi
19640  fi
19641
19642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19643  if test "x$test_cygdrive_prefix" = x; then
19644    # As a simple fix, exclude /usr/bin since it's not a real path.
19645    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19647      # a path prefixed by /cygdrive for fixpath to work.
19648      new_path="$CYGWIN_ROOT_PATH$input_path"
19649    fi
19650  fi
19651
19652  # remove trailing .exe if any
19653  new_path="${new_path/%.exe/}"
19654
19655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19656
19657  # First separate the path from the arguments. This will split at the first
19658  # space.
19659  complete="$PROPER_COMPILER_CC"
19660  path="${complete%% *}"
19661  tmp="$complete EOL"
19662  arguments="${tmp#* }"
19663
19664  # Input might be given as Windows format, start by converting to
19665  # unix format.
19666  new_path="$path"
19667
19668  windows_path="$new_path"
19669  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19670    unix_path=`$CYGPATH -u "$windows_path"`
19671    new_path="$unix_path"
19672  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19673    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19674    new_path="$unix_path"
19675  fi
19676
19677
19678  # Now try to locate executable using which
19679  new_path=`$WHICH "$new_path" 2> /dev/null`
19680
19681  if test "x$new_path" = x; then
19682    # Oops. Which didn't find the executable.
19683    # The splitting of arguments from the executable at a space might have been incorrect,
19684    # since paths with space are more likely in Windows. Give it another try with the whole
19685    # argument.
19686    path="$complete"
19687    arguments="EOL"
19688    new_path="$path"
19689
19690  windows_path="$new_path"
19691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19692    unix_path=`$CYGPATH -u "$windows_path"`
19693    new_path="$unix_path"
19694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19696    new_path="$unix_path"
19697  fi
19698
19699
19700    new_path=`$WHICH "$new_path" 2> /dev/null`
19701
19702    if test "x$new_path" = x; then
19703      # It's still not found. Now this is an unrecoverable error.
19704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19705$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19706      has_space=`$ECHO "$complete" | $GREP " "`
19707      if test "x$has_space" != x; then
19708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19710      fi
19711      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19712    fi
19713  fi
19714
19715  # Now new_path has a complete unix path to the binary
19716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19717    # Keep paths in /bin as-is, but remove trailing .exe if any
19718    new_path="${new_path/%.exe/}"
19719    # Do not save /bin paths to all_fixpath_prefixes!
19720  else
19721    # Not in mixed or Windows style, start by that.
19722    new_path=`cmd //c echo $new_path`
19723
19724  input_path="$new_path"
19725  # Check if we need to convert this using DOS-style short mode. If the path
19726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19727  # take no chances and rewrite it.
19728  # Note: m4 eats our [], so we need to use [ and ] instead.
19729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19730  if test "x$has_forbidden_chars" != x; then
19731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19733  fi
19734
19735    # Output is in $new_path
19736
19737  windows_path="$new_path"
19738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19739    unix_path=`$CYGPATH -u "$windows_path"`
19740    new_path="$unix_path"
19741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19743    new_path="$unix_path"
19744  fi
19745
19746    # remove trailing .exe if any
19747    new_path="${new_path/%.exe/}"
19748
19749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19751  fi
19752
19753  else
19754    # We're on a posix platform. Hooray! :)
19755    # First separate the path from the arguments. This will split at the first
19756    # space.
19757    complete="$PROPER_COMPILER_CC"
19758    path="${complete%% *}"
19759    tmp="$complete EOL"
19760    arguments="${tmp#* }"
19761
19762    # Cannot rely on the command "which" here since it doesn't always work.
19763    is_absolute_path=`$ECHO "$path" | $GREP ^/`
19764    if test -z "$is_absolute_path"; then
19765      # Path to executable is not absolute. Find it.
19766      IFS_save="$IFS"
19767      IFS=:
19768      for p in $PATH; do
19769        if test -f "$p/$path" && test -x "$p/$path"; then
19770          new_path="$p/$path"
19771          break
19772        fi
19773      done
19774      IFS="$IFS_save"
19775    else
19776      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&5
19777$as_echo "$as_me: Resolving PROPER_COMPILER_CC (as $path) failed, using $path directly." >&6;}
19778      new_path="$path"
19779    fi
19780
19781    if test "x$new_path" = x; then
19782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
19783$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
19784        has_space=`$ECHO "$complete" | $GREP " "`
19785        if test "x$has_space" != x; then
19786          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19788        fi
19789        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
19790      fi
19791  fi
19792
19793      # Now join together the path and the arguments once again
19794      if test "x$arguments" != xEOL; then
19795        new_complete="$new_path ${arguments% *}"
19796      else
19797        new_complete="$new_path"
19798      fi
19799
19800  if test "x$complete" != "x$new_complete"; then
19801      PROPER_COMPILER_CC="$new_complete"
19802      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
19803$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
19804    fi
19805
19806    PATH="$RETRY_COMPILER_SAVED_PATH"
19807
19808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
19809$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
19810
19811    if test "x$OPENJDK_BUILD_OS" != xwindows; then
19812        # Follow a chain of symbolic links. Use readlink
19813        # where it exists, else fall back to horribly
19814        # complicated shell code.
19815        if test "x$READLINK_TESTED" != yes; then
19816            # On MacOSX there is a readlink tool with a different
19817            # purpose than the GNU readlink tool. Check the found readlink.
19818            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
19819            if test "x$ISGNU" = x; then
19820                 # A readlink that we do not know how to use.
19821                 # Are there other non-GNU readlinks out there?
19822                 READLINK_TESTED=yes
19823                 READLINK=
19824            fi
19825        fi
19826
19827        if test "x$READLINK" != x; then
19828            PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
19829        else
19830            # Save the current directory for restoring afterwards
19831            STARTDIR=$PWD
19832            COUNTER=0
19833            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
19834            sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
19835            # Use the system pwd and not the shell builtin to resolve directory symlinks
19836            cd $sym_link_dir
19837            cd `$THEPWDCMD`
19838            sym_link_dir=`$THEPWDCMD`
19839            # Resolve file symlinks
19840            while test $COUNTER -lt 20; do
19841                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
19842                if test "x$ISLINK" == x; then
19843                    # This is not a symbolic link! We are done!
19844                    break
19845                fi
19846                # Again resolve directory symlinks since the target of the just found
19847                # link could be in a different directory
19848                cd `$DIRNAME $ISLINK`
19849                sym_link_dir=`$THEPWDCMD`
19850                sym_link_file=`$BASENAME $ISLINK`
19851                let COUNTER=COUNTER+1
19852            done
19853            cd $STARTDIR
19854            PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
19855        fi
19856    fi
19857
19858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
19859$as_echo "$PROPER_COMPILER_CC" >&6; }
19860    CC="$PROPER_COMPILER_CC"
19861  else
19862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
19863$as_echo "no, keeping CC" >&6; }
19864    CC="$TEST_COMPILER"
19865  fi
19866
19867  COMPILER=$CC
19868  COMPILER_NAME=$COMPILER_NAME
19869
19870  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
19871    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
19872    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
19873    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
19874    if test $? -ne 0; then
19875      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19876
19877      { $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
19878$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
19879      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
19880$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
19881      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19882    else
19883      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
19884      COMPILER_VENDOR="Sun Studio"
19885    fi
19886  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
19887    # First line typically looks something like:
19888    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
19889    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
19890    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
19891    COMPILER_VENDOR="Microsoft CL.EXE"
19892    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
19893    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
19894      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
19895        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
19896      fi
19897    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
19898      if test "x$COMPILER_CPU_TEST" != "xx64"; then
19899        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
19900      fi
19901    fi
19902  else
19903    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
19904    # Check that this is likely to be GCC.
19905    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
19906    if test $? -ne 0; then
19907      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
19908$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
19909      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
19910$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
19911      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
19912    fi
19913
19914    # First line typically looks something like:
19915    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
19916    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
19917    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
19918  fi
19919  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
19920  CC_VERSION="$COMPILER_VERSION"
19921  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
19922  CC_VENDOR="$COMPILER_VENDOR"
19923
19924  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
19925$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
19926
19927
19928# Now that we have resolved CC ourself, let autoconf have its go at it
19929ac_ext=c
19930ac_cpp='$CPP $CPPFLAGS'
19931ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19932ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19933ac_compiler_gnu=$ac_cv_c_compiler_gnu
19934if test -n "$ac_tool_prefix"; then
19935  for ac_prog in $CC
19936  do
19937    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
19938set dummy $ac_tool_prefix$ac_prog; ac_word=$2
19939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19940$as_echo_n "checking for $ac_word... " >&6; }
19941if test "${ac_cv_prog_CC+set}" = set; then :
19942  $as_echo_n "(cached) " >&6
19943else
19944  if test -n "$CC"; then
19945  ac_cv_prog_CC="$CC" # Let the user override the test.
19946else
19947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19948for as_dir in $PATH
19949do
19950  IFS=$as_save_IFS
19951  test -z "$as_dir" && as_dir=.
19952    for ac_exec_ext in '' $ac_executable_extensions; do
19953  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19954    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
19955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19956    break 2
19957  fi
19958done
19959  done
19960IFS=$as_save_IFS
19961
19962fi
19963fi
19964CC=$ac_cv_prog_CC
19965if test -n "$CC"; then
19966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
19967$as_echo "$CC" >&6; }
19968else
19969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19970$as_echo "no" >&6; }
19971fi
19972
19973
19974    test -n "$CC" && break
19975  done
19976fi
19977if test -z "$CC"; then
19978  ac_ct_CC=$CC
19979  for ac_prog in $CC
19980do
19981  # Extract the first word of "$ac_prog", so it can be a program name with args.
19982set dummy $ac_prog; ac_word=$2
19983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19984$as_echo_n "checking for $ac_word... " >&6; }
19985if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
19986  $as_echo_n "(cached) " >&6
19987else
19988  if test -n "$ac_ct_CC"; then
19989  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
19990else
19991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19992for as_dir in $PATH
19993do
19994  IFS=$as_save_IFS
19995  test -z "$as_dir" && as_dir=.
19996    for ac_exec_ext in '' $ac_executable_extensions; do
19997  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19998    ac_cv_prog_ac_ct_CC="$ac_prog"
19999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20000    break 2
20001  fi
20002done
20003  done
20004IFS=$as_save_IFS
20005
20006fi
20007fi
20008ac_ct_CC=$ac_cv_prog_ac_ct_CC
20009if test -n "$ac_ct_CC"; then
20010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
20011$as_echo "$ac_ct_CC" >&6; }
20012else
20013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20014$as_echo "no" >&6; }
20015fi
20016
20017
20018  test -n "$ac_ct_CC" && break
20019done
20020
20021  if test "x$ac_ct_CC" = x; then
20022    CC=""
20023  else
20024    case $cross_compiling:$ac_tool_warned in
20025yes:)
20026{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20027$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20028ac_tool_warned=yes ;;
20029esac
20030    CC=$ac_ct_CC
20031  fi
20032fi
20033
20034
20035test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20037as_fn_error $? "no acceptable C compiler found in \$PATH
20038See \`config.log' for more details" "$LINENO" 5; }
20039
20040# Provide some information about the compiler.
20041$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
20042set X $ac_compile
20043ac_compiler=$2
20044for ac_option in --version -v -V -qversion; do
20045  { { ac_try="$ac_compiler $ac_option >&5"
20046case "(($ac_try" in
20047  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20048  *) ac_try_echo=$ac_try;;
20049esac
20050eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20051$as_echo "$ac_try_echo"; } >&5
20052  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
20053  ac_status=$?
20054  if test -s conftest.err; then
20055    sed '10a\
20056... rest of stderr output deleted ...
20057         10q' conftest.err >conftest.er1
20058    cat conftest.er1 >&5
20059  fi
20060  rm -f conftest.er1 conftest.err
20061  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20062  test $ac_status = 0; }
20063done
20064
20065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20066/* end confdefs.h.  */
20067
20068int
20069main ()
20070{
20071
20072  ;
20073  return 0;
20074}
20075_ACEOF
20076ac_clean_files_save=$ac_clean_files
20077ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
20078# Try to create an executable without -o first, disregard a.out.
20079# It will help us diagnose broken compilers, and finding out an intuition
20080# of exeext.
20081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
20082$as_echo_n "checking whether the C compiler works... " >&6; }
20083ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
20084
20085# The possible output files:
20086ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
20087
20088ac_rmfiles=
20089for ac_file in $ac_files
20090do
20091  case $ac_file in
20092    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20093    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
20094  esac
20095done
20096rm -f $ac_rmfiles
20097
20098if { { ac_try="$ac_link_default"
20099case "(($ac_try" in
20100  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20101  *) ac_try_echo=$ac_try;;
20102esac
20103eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20104$as_echo "$ac_try_echo"; } >&5
20105  (eval "$ac_link_default") 2>&5
20106  ac_status=$?
20107  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20108  test $ac_status = 0; }; then :
20109  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
20110# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
20111# in a Makefile.  We should not override ac_cv_exeext if it was cached,
20112# so that the user can short-circuit this test for compilers unknown to
20113# Autoconf.
20114for ac_file in $ac_files ''
20115do
20116  test -f "$ac_file" || continue
20117  case $ac_file in
20118    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
20119	;;
20120    [ab].out )
20121	# We found the default executable, but exeext='' is most
20122	# certainly right.
20123	break;;
20124    *.* )
20125	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
20126	then :; else
20127	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20128	fi
20129	# We set ac_cv_exeext here because the later test for it is not
20130	# safe: cross compilers may not add the suffix if given an `-o'
20131	# argument, so we may need to know it at that point already.
20132	# Even if this section looks crufty: it has the advantage of
20133	# actually working.
20134	break;;
20135    * )
20136	break;;
20137  esac
20138done
20139test "$ac_cv_exeext" = no && ac_cv_exeext=
20140
20141else
20142  ac_file=''
20143fi
20144if test -z "$ac_file"; then :
20145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20146$as_echo "no" >&6; }
20147$as_echo "$as_me: failed program was:" >&5
20148sed 's/^/| /' conftest.$ac_ext >&5
20149
20150{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20152as_fn_error 77 "C compiler cannot create executables
20153See \`config.log' for more details" "$LINENO" 5; }
20154else
20155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20156$as_echo "yes" >&6; }
20157fi
20158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
20159$as_echo_n "checking for C compiler default output file name... " >&6; }
20160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
20161$as_echo "$ac_file" >&6; }
20162ac_exeext=$ac_cv_exeext
20163
20164rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
20165ac_clean_files=$ac_clean_files_save
20166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
20167$as_echo_n "checking for suffix of executables... " >&6; }
20168if { { ac_try="$ac_link"
20169case "(($ac_try" in
20170  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20171  *) ac_try_echo=$ac_try;;
20172esac
20173eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20174$as_echo "$ac_try_echo"; } >&5
20175  (eval "$ac_link") 2>&5
20176  ac_status=$?
20177  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20178  test $ac_status = 0; }; then :
20179  # If both `conftest.exe' and `conftest' are `present' (well, observable)
20180# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
20181# work properly (i.e., refer to `conftest.exe'), while it won't with
20182# `rm'.
20183for ac_file in conftest.exe conftest conftest.*; do
20184  test -f "$ac_file" || continue
20185  case $ac_file in
20186    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
20187    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
20188	  break;;
20189    * ) break;;
20190  esac
20191done
20192else
20193  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20194$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20195as_fn_error $? "cannot compute suffix of executables: cannot compile and link
20196See \`config.log' for more details" "$LINENO" 5; }
20197fi
20198rm -f conftest conftest$ac_cv_exeext
20199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
20200$as_echo "$ac_cv_exeext" >&6; }
20201
20202rm -f conftest.$ac_ext
20203EXEEXT=$ac_cv_exeext
20204ac_exeext=$EXEEXT
20205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20206/* end confdefs.h.  */
20207#include <stdio.h>
20208int
20209main ()
20210{
20211FILE *f = fopen ("conftest.out", "w");
20212 return ferror (f) || fclose (f) != 0;
20213
20214  ;
20215  return 0;
20216}
20217_ACEOF
20218ac_clean_files="$ac_clean_files conftest.out"
20219# Check that the compiler produces executables we can run.  If not, either
20220# the compiler is broken, or we cross compile.
20221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
20222$as_echo_n "checking whether we are cross compiling... " >&6; }
20223if test "$cross_compiling" != yes; then
20224  { { ac_try="$ac_link"
20225case "(($ac_try" in
20226  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20227  *) ac_try_echo=$ac_try;;
20228esac
20229eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20230$as_echo "$ac_try_echo"; } >&5
20231  (eval "$ac_link") 2>&5
20232  ac_status=$?
20233  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20234  test $ac_status = 0; }
20235  if { ac_try='./conftest$ac_cv_exeext'
20236  { { case "(($ac_try" in
20237  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20238  *) ac_try_echo=$ac_try;;
20239esac
20240eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20241$as_echo "$ac_try_echo"; } >&5
20242  (eval "$ac_try") 2>&5
20243  ac_status=$?
20244  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20245  test $ac_status = 0; }; }; then
20246    cross_compiling=no
20247  else
20248    if test "$cross_compiling" = maybe; then
20249	cross_compiling=yes
20250    else
20251	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20252$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20253as_fn_error $? "cannot run C compiled programs.
20254If you meant to cross compile, use \`--host'.
20255See \`config.log' for more details" "$LINENO" 5; }
20256    fi
20257  fi
20258fi
20259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
20260$as_echo "$cross_compiling" >&6; }
20261
20262rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
20263ac_clean_files=$ac_clean_files_save
20264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
20265$as_echo_n "checking for suffix of object files... " >&6; }
20266if test "${ac_cv_objext+set}" = set; then :
20267  $as_echo_n "(cached) " >&6
20268else
20269  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20270/* end confdefs.h.  */
20271
20272int
20273main ()
20274{
20275
20276  ;
20277  return 0;
20278}
20279_ACEOF
20280rm -f conftest.o conftest.obj
20281if { { ac_try="$ac_compile"
20282case "(($ac_try" in
20283  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20284  *) ac_try_echo=$ac_try;;
20285esac
20286eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
20287$as_echo "$ac_try_echo"; } >&5
20288  (eval "$ac_compile") 2>&5
20289  ac_status=$?
20290  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20291  test $ac_status = 0; }; then :
20292  for ac_file in conftest.o conftest.obj conftest.*; do
20293  test -f "$ac_file" || continue;
20294  case $ac_file in
20295    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
20296    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
20297       break;;
20298  esac
20299done
20300else
20301  $as_echo "$as_me: failed program was:" >&5
20302sed 's/^/| /' conftest.$ac_ext >&5
20303
20304{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20306as_fn_error $? "cannot compute suffix of object files: cannot compile
20307See \`config.log' for more details" "$LINENO" 5; }
20308fi
20309rm -f conftest.$ac_cv_objext conftest.$ac_ext
20310fi
20311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
20312$as_echo "$ac_cv_objext" >&6; }
20313OBJEXT=$ac_cv_objext
20314ac_objext=$OBJEXT
20315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
20316$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
20317if test "${ac_cv_c_compiler_gnu+set}" = set; then :
20318  $as_echo_n "(cached) " >&6
20319else
20320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20321/* end confdefs.h.  */
20322
20323int
20324main ()
20325{
20326#ifndef __GNUC__
20327       choke me
20328#endif
20329
20330  ;
20331  return 0;
20332}
20333_ACEOF
20334if ac_fn_c_try_compile "$LINENO"; then :
20335  ac_compiler_gnu=yes
20336else
20337  ac_compiler_gnu=no
20338fi
20339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20340ac_cv_c_compiler_gnu=$ac_compiler_gnu
20341
20342fi
20343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
20344$as_echo "$ac_cv_c_compiler_gnu" >&6; }
20345if test $ac_compiler_gnu = yes; then
20346  GCC=yes
20347else
20348  GCC=
20349fi
20350ac_test_CFLAGS=${CFLAGS+set}
20351ac_save_CFLAGS=$CFLAGS
20352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
20353$as_echo_n "checking whether $CC accepts -g... " >&6; }
20354if test "${ac_cv_prog_cc_g+set}" = set; then :
20355  $as_echo_n "(cached) " >&6
20356else
20357  ac_save_c_werror_flag=$ac_c_werror_flag
20358   ac_c_werror_flag=yes
20359   ac_cv_prog_cc_g=no
20360   CFLAGS="-g"
20361   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20362/* end confdefs.h.  */
20363
20364int
20365main ()
20366{
20367
20368  ;
20369  return 0;
20370}
20371_ACEOF
20372if ac_fn_c_try_compile "$LINENO"; then :
20373  ac_cv_prog_cc_g=yes
20374else
20375  CFLAGS=""
20376      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20377/* end confdefs.h.  */
20378
20379int
20380main ()
20381{
20382
20383  ;
20384  return 0;
20385}
20386_ACEOF
20387if ac_fn_c_try_compile "$LINENO"; then :
20388
20389else
20390  ac_c_werror_flag=$ac_save_c_werror_flag
20391	 CFLAGS="-g"
20392	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20393/* end confdefs.h.  */
20394
20395int
20396main ()
20397{
20398
20399  ;
20400  return 0;
20401}
20402_ACEOF
20403if ac_fn_c_try_compile "$LINENO"; then :
20404  ac_cv_prog_cc_g=yes
20405fi
20406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20407fi
20408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20409fi
20410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20411   ac_c_werror_flag=$ac_save_c_werror_flag
20412fi
20413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
20414$as_echo "$ac_cv_prog_cc_g" >&6; }
20415if test "$ac_test_CFLAGS" = set; then
20416  CFLAGS=$ac_save_CFLAGS
20417elif test $ac_cv_prog_cc_g = yes; then
20418  if test "$GCC" = yes; then
20419    CFLAGS="-g -O2"
20420  else
20421    CFLAGS="-g"
20422  fi
20423else
20424  if test "$GCC" = yes; then
20425    CFLAGS="-O2"
20426  else
20427    CFLAGS=
20428  fi
20429fi
20430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
20431$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
20432if test "${ac_cv_prog_cc_c89+set}" = set; then :
20433  $as_echo_n "(cached) " >&6
20434else
20435  ac_cv_prog_cc_c89=no
20436ac_save_CC=$CC
20437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20438/* end confdefs.h.  */
20439#include <stdarg.h>
20440#include <stdio.h>
20441#include <sys/types.h>
20442#include <sys/stat.h>
20443/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
20444struct buf { int x; };
20445FILE * (*rcsopen) (struct buf *, struct stat *, int);
20446static char *e (p, i)
20447     char **p;
20448     int i;
20449{
20450  return p[i];
20451}
20452static char *f (char * (*g) (char **, int), char **p, ...)
20453{
20454  char *s;
20455  va_list v;
20456  va_start (v,p);
20457  s = g (p, va_arg (v,int));
20458  va_end (v);
20459  return s;
20460}
20461
20462/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
20463   function prototypes and stuff, but not '\xHH' hex character constants.
20464   These don't provoke an error unfortunately, instead are silently treated
20465   as 'x'.  The following induces an error, until -std is added to get
20466   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
20467   array size at least.  It's necessary to write '\x00'==0 to get something
20468   that's true only with -std.  */
20469int osf4_cc_array ['\x00' == 0 ? 1 : -1];
20470
20471/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
20472   inside strings and character constants.  */
20473#define FOO(x) 'x'
20474int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
20475
20476int test (int i, double x);
20477struct s1 {int (*f) (int a);};
20478struct s2 {int (*f) (double a);};
20479int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
20480int argc;
20481char **argv;
20482int
20483main ()
20484{
20485return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
20486  ;
20487  return 0;
20488}
20489_ACEOF
20490for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
20491	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
20492do
20493  CC="$ac_save_CC $ac_arg"
20494  if ac_fn_c_try_compile "$LINENO"; then :
20495  ac_cv_prog_cc_c89=$ac_arg
20496fi
20497rm -f core conftest.err conftest.$ac_objext
20498  test "x$ac_cv_prog_cc_c89" != "xno" && break
20499done
20500rm -f conftest.$ac_ext
20501CC=$ac_save_CC
20502
20503fi
20504# AC_CACHE_VAL
20505case "x$ac_cv_prog_cc_c89" in
20506  x)
20507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
20508$as_echo "none needed" >&6; } ;;
20509  xno)
20510    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
20511$as_echo "unsupported" >&6; } ;;
20512  *)
20513    CC="$CC $ac_cv_prog_cc_c89"
20514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
20515$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
20516esac
20517if test "x$ac_cv_prog_cc_c89" != xno; then :
20518
20519fi
20520
20521ac_ext=cpp
20522ac_cpp='$CXXCPP $CPPFLAGS'
20523ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20524ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20525ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
20526
20527
20528### Locate C++ compiler (CXX)
20529
20530if test "x$CXX" != x; then
20531  COMPILER_CHECK_LIST="$CXX"
20532elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
20533  COMPILER_CHECK_LIST="cl"
20534elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
20535  COMPILER_CHECK_LIST="CC g++"
20536else
20537  COMPILER_CHECK_LIST="g++ CC"
20538fi
20539
20540
20541  COMPILER_NAME=C++
20542
20543  CXX=
20544  # If TOOLS_DIR is set, check for all compiler names in there first
20545  # before checking the rest of the PATH.
20546  if test -n "$TOOLS_DIR"; then
20547    PATH_save="$PATH"
20548    PATH="$TOOLS_DIR"
20549    for ac_prog in $COMPILER_CHECK_LIST
20550do
20551  # Extract the first word of "$ac_prog", so it can be a program name with args.
20552set dummy $ac_prog; ac_word=$2
20553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20554$as_echo_n "checking for $ac_word... " >&6; }
20555if test "${ac_cv_path_TOOLS_DIR_CXX+set}" = set; then :
20556  $as_echo_n "(cached) " >&6
20557else
20558  case $TOOLS_DIR_CXX in
20559  [\\/]* | ?:[\\/]*)
20560  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
20561  ;;
20562  *)
20563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20564for as_dir in $PATH
20565do
20566  IFS=$as_save_IFS
20567  test -z "$as_dir" && as_dir=.
20568    for ac_exec_ext in '' $ac_executable_extensions; do
20569  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20570    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
20571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20572    break 2
20573  fi
20574done
20575  done
20576IFS=$as_save_IFS
20577
20578  ;;
20579esac
20580fi
20581TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
20582if test -n "$TOOLS_DIR_CXX"; then
20583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
20584$as_echo "$TOOLS_DIR_CXX" >&6; }
20585else
20586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20587$as_echo "no" >&6; }
20588fi
20589
20590
20591  test -n "$TOOLS_DIR_CXX" && break
20592done
20593
20594    CXX=$TOOLS_DIR_CXX
20595    PATH="$PATH_save"
20596  fi
20597
20598  # AC_PATH_PROGS can't be run multiple times with the same variable,
20599  # so create a new name for this run.
20600  if test "x$CXX" = x; then
20601    for ac_prog in $COMPILER_CHECK_LIST
20602do
20603  # Extract the first word of "$ac_prog", so it can be a program name with args.
20604set dummy $ac_prog; ac_word=$2
20605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20606$as_echo_n "checking for $ac_word... " >&6; }
20607if test "${ac_cv_path_POTENTIAL_CXX+set}" = set; then :
20608  $as_echo_n "(cached) " >&6
20609else
20610  case $POTENTIAL_CXX in
20611  [\\/]* | ?:[\\/]*)
20612  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
20613  ;;
20614  *)
20615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20616for as_dir in $PATH
20617do
20618  IFS=$as_save_IFS
20619  test -z "$as_dir" && as_dir=.
20620    for ac_exec_ext in '' $ac_executable_extensions; do
20621  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20622    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
20623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20624    break 2
20625  fi
20626done
20627  done
20628IFS=$as_save_IFS
20629
20630  ;;
20631esac
20632fi
20633POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
20634if test -n "$POTENTIAL_CXX"; then
20635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
20636$as_echo "$POTENTIAL_CXX" >&6; }
20637else
20638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20639$as_echo "no" >&6; }
20640fi
20641
20642
20643  test -n "$POTENTIAL_CXX" && break
20644done
20645
20646    CXX=$POTENTIAL_CXX
20647  fi
20648
20649  if test "x$CXX" = x; then
20650
20651    # Print a helpful message on how to acquire the necessary build dependency.
20652    # devkit is the help tag: freetyp2, cups, pulse, alsa etc
20653    MISSING_DEPENDENCY=devkit
20654    PKGHANDLER_COMMAND=
20655
20656    case $PKGHANDLER in
20657	apt-get)
20658                apt_help     $MISSING_DEPENDENCY ;;
20659    yum)
20660                yum_help     $MISSING_DEPENDENCY ;;
20661	port)
20662                port_help    $MISSING_DEPENDENCY ;;
20663	pkgutil)
20664                pkgutil_help $MISSING_DEPENDENCY ;;
20665	pkgadd)
20666                pkgadd_help  $MISSING_DEPENDENCY ;;
20667    * )
20668      break ;;
20669    esac
20670
20671    if test "x$PKGHANDLER_COMMAND" != x; then
20672        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
20673    fi
20674
20675      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
20676  fi
20677
20678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20679
20680  # First separate the path from the arguments. This will split at the first
20681  # space.
20682  complete="$CXX"
20683  path="${complete%% *}"
20684  tmp="$complete EOL"
20685  arguments="${tmp#* }"
20686
20687  # Input might be given as Windows format, start by converting to
20688  # unix format.
20689  new_path=`$CYGPATH -u "$path"`
20690
20691  # Now try to locate executable using which
20692  new_path=`$WHICH "$new_path" 2> /dev/null`
20693  # bat and cmd files are not always considered executable in cygwin causing which
20694  # to not find them
20695  if test "x$new_path" = x \
20696           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20697           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20698    new_path=`$CYGPATH -u "$path"`
20699  fi
20700  if test "x$new_path" = x; then
20701    # Oops. Which didn't find the executable.
20702    # The splitting of arguments from the executable at a space might have been incorrect,
20703    # since paths with space are more likely in Windows. Give it another try with the whole
20704    # argument.
20705    path="$complete"
20706    arguments="EOL"
20707    new_path=`$CYGPATH -u "$path"`
20708    new_path=`$WHICH "$new_path" 2> /dev/null`
20709    # bat and cmd files are not always considered executable in cygwin causing which
20710    # to not find them
20711    if test "x$new_path" = x \
20712             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20713             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20714      new_path=`$CYGPATH -u "$path"`
20715    fi
20716    if test "x$new_path" = x; then
20717      # It's still not found. Now this is an unrecoverable error.
20718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20719$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20720      has_space=`$ECHO "$complete" | $GREP " "`
20721      if test "x$has_space" != x; then
20722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20724      fi
20725      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20726    fi
20727  fi
20728
20729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20732  # "foo.exe" is OK but "foo" is an error.
20733  #
20734  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20735  # It is also a way to make sure we got the proper file name for the real test later on.
20736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20737  if test "x$test_shortpath" = x; then
20738    # Short path failed, file does not exist as specified.
20739    # Try adding .exe or .cmd
20740    if test -f "${new_path}.exe"; then
20741       input_to_shortpath="${new_path}.exe"
20742    elif test -f "${new_path}.cmd"; then
20743       input_to_shortpath="${new_path}.cmd"
20744    else
20745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
20746$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
20747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20749      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20750    fi
20751  else
20752    input_to_shortpath="$new_path"
20753  fi
20754
20755  # Call helper function which possibly converts this using DOS-style short mode.
20756  # If so, the updated path is stored in $new_path.
20757  new_path="$input_to_shortpath"
20758
20759  input_path="$input_to_shortpath"
20760  # Check if we need to convert this using DOS-style short mode. If the path
20761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20762  # take no chances and rewrite it.
20763  # Note: m4 eats our [], so we need to use [ and ] instead.
20764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20765  if test "x$has_forbidden_chars" != x; then
20766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20770      # Going to short mode and back again did indeed matter. Since short mode is
20771      # case insensitive, let's make it lowercase to improve readability.
20772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20773      # Now convert it back to Unix-stile (cygpath)
20774      input_path=`$CYGPATH -u "$shortmode_path"`
20775      new_path="$input_path"
20776    fi
20777  fi
20778
20779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20780  if test "x$test_cygdrive_prefix" = x; then
20781    # As a simple fix, exclude /usr/bin since it's not a real path.
20782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20784      # a path prefixed by /cygdrive for fixpath to work.
20785      new_path="$CYGWIN_ROOT_PATH$input_path"
20786    fi
20787  fi
20788
20789  # remove trailing .exe if any
20790  new_path="${new_path/%.exe/}"
20791
20792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20793
20794  # First separate the path from the arguments. This will split at the first
20795  # space.
20796  complete="$CXX"
20797  path="${complete%% *}"
20798  tmp="$complete EOL"
20799  arguments="${tmp#* }"
20800
20801  # Input might be given as Windows format, start by converting to
20802  # unix format.
20803  new_path="$path"
20804
20805  windows_path="$new_path"
20806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20807    unix_path=`$CYGPATH -u "$windows_path"`
20808    new_path="$unix_path"
20809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20811    new_path="$unix_path"
20812  fi
20813
20814
20815  # Now try to locate executable using which
20816  new_path=`$WHICH "$new_path" 2> /dev/null`
20817
20818  if test "x$new_path" = x; then
20819    # Oops. Which didn't find the executable.
20820    # The splitting of arguments from the executable at a space might have been incorrect,
20821    # since paths with space are more likely in Windows. Give it another try with the whole
20822    # argument.
20823    path="$complete"
20824    arguments="EOL"
20825    new_path="$path"
20826
20827  windows_path="$new_path"
20828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20829    unix_path=`$CYGPATH -u "$windows_path"`
20830    new_path="$unix_path"
20831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20833    new_path="$unix_path"
20834  fi
20835
20836
20837    new_path=`$WHICH "$new_path" 2> /dev/null`
20838
20839    if test "x$new_path" = x; then
20840      # It's still not found. Now this is an unrecoverable error.
20841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20842$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20843      has_space=`$ECHO "$complete" | $GREP " "`
20844      if test "x$has_space" != x; then
20845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20847      fi
20848      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20849    fi
20850  fi
20851
20852  # Now new_path has a complete unix path to the binary
20853  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20854    # Keep paths in /bin as-is, but remove trailing .exe if any
20855    new_path="${new_path/%.exe/}"
20856    # Do not save /bin paths to all_fixpath_prefixes!
20857  else
20858    # Not in mixed or Windows style, start by that.
20859    new_path=`cmd //c echo $new_path`
20860
20861  input_path="$new_path"
20862  # Check if we need to convert this using DOS-style short mode. If the path
20863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20864  # take no chances and rewrite it.
20865  # Note: m4 eats our [], so we need to use [ and ] instead.
20866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20867  if test "x$has_forbidden_chars" != x; then
20868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20869    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20870  fi
20871
20872    # Output is in $new_path
20873
20874  windows_path="$new_path"
20875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20876    unix_path=`$CYGPATH -u "$windows_path"`
20877    new_path="$unix_path"
20878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20880    new_path="$unix_path"
20881  fi
20882
20883    # remove trailing .exe if any
20884    new_path="${new_path/%.exe/}"
20885
20886    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20887    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20888  fi
20889
20890  else
20891    # We're on a posix platform. Hooray! :)
20892    # First separate the path from the arguments. This will split at the first
20893    # space.
20894    complete="$CXX"
20895    path="${complete%% *}"
20896    tmp="$complete EOL"
20897    arguments="${tmp#* }"
20898
20899    # Cannot rely on the command "which" here since it doesn't always work.
20900    is_absolute_path=`$ECHO "$path" | $GREP ^/`
20901    if test -z "$is_absolute_path"; then
20902      # Path to executable is not absolute. Find it.
20903      IFS_save="$IFS"
20904      IFS=:
20905      for p in $PATH; do
20906        if test -f "$p/$path" && test -x "$p/$path"; then
20907          new_path="$p/$path"
20908          break
20909        fi
20910      done
20911      IFS="$IFS_save"
20912    else
20913      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXX (as $path) failed, using $path directly." >&5
20914$as_echo "$as_me: Resolving CXX (as $path) failed, using $path directly." >&6;}
20915      new_path="$path"
20916    fi
20917
20918    if test "x$new_path" = x; then
20919        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
20920$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
20921        has_space=`$ECHO "$complete" | $GREP " "`
20922        if test "x$has_space" != x; then
20923          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20924$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20925        fi
20926        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
20927      fi
20928  fi
20929
20930      # Now join together the path and the arguments once again
20931      if test "x$arguments" != xEOL; then
20932        new_complete="$new_path ${arguments% *}"
20933      else
20934        new_complete="$new_path"
20935      fi
20936
20937  if test "x$complete" != "x$new_complete"; then
20938      CXX="$new_complete"
20939      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
20940$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
20941    fi
20942
20943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
20944$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
20945  TEST_COMPILER="$CXX"
20946
20947    if test "x$OPENJDK_BUILD_OS" != xwindows; then
20948        # Follow a chain of symbolic links. Use readlink
20949        # where it exists, else fall back to horribly
20950        # complicated shell code.
20951        if test "x$READLINK_TESTED" != yes; then
20952            # On MacOSX there is a readlink tool with a different
20953            # purpose than the GNU readlink tool. Check the found readlink.
20954            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
20955            if test "x$ISGNU" = x; then
20956                 # A readlink that we do not know how to use.
20957                 # Are there other non-GNU readlinks out there?
20958                 READLINK_TESTED=yes
20959                 READLINK=
20960            fi
20961        fi
20962
20963        if test "x$READLINK" != x; then
20964            TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
20965        else
20966            # Save the current directory for restoring afterwards
20967            STARTDIR=$PWD
20968            COUNTER=0
20969            sym_link_dir=`$DIRNAME $TEST_COMPILER`
20970            sym_link_file=`$BASENAME $TEST_COMPILER`
20971            # Use the system pwd and not the shell builtin to resolve directory symlinks
20972            cd $sym_link_dir
20973            cd `$THEPWDCMD`
20974            sym_link_dir=`$THEPWDCMD`
20975            # Resolve file symlinks
20976            while test $COUNTER -lt 20; do
20977                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
20978                if test "x$ISLINK" == x; then
20979                    # This is not a symbolic link! We are done!
20980                    break
20981                fi
20982                # Again resolve directory symlinks since the target of the just found
20983                # link could be in a different directory
20984                cd `$DIRNAME $ISLINK`
20985                sym_link_dir=`$THEPWDCMD`
20986                sym_link_file=`$BASENAME $ISLINK`
20987                let COUNTER=COUNTER+1
20988            done
20989            cd $STARTDIR
20990            TEST_COMPILER=$sym_link_dir/$sym_link_file
20991        fi
20992    fi
20993
20994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
20995$as_echo "$TEST_COMPILER" >&6; }
20996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
20997$as_echo_n "checking if CXX is disguised ccache... " >&6; }
20998
20999  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
21000  if test "x$COMPILER_BASENAME" = "xccache"; then
21001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
21002$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
21003    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
21004    # We want to control ccache invocation ourselves, so ignore this cc and try
21005    # searching again.
21006
21007    # Remove the path to the fake ccache cc from the PATH
21008    RETRY_COMPILER_SAVED_PATH="$PATH"
21009    COMPILER_DIRNAME=`$DIRNAME $CXX`
21010    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
21011
21012    # Try again looking for our compiler
21013    if test -n "$ac_tool_prefix"; then
21014  for ac_prog in $COMPILER_CHECK_LIST
21015  do
21016    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21017set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21019$as_echo_n "checking for $ac_word... " >&6; }
21020if test "${ac_cv_prog_PROPER_COMPILER_CXX+set}" = set; then :
21021  $as_echo_n "(cached) " >&6
21022else
21023  if test -n "$PROPER_COMPILER_CXX"; then
21024  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
21025else
21026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21027for as_dir in $PATH
21028do
21029  IFS=$as_save_IFS
21030  test -z "$as_dir" && as_dir=.
21031    for ac_exec_ext in '' $ac_executable_extensions; do
21032  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21033    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
21034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21035    break 2
21036  fi
21037done
21038  done
21039IFS=$as_save_IFS
21040
21041fi
21042fi
21043PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
21044if test -n "$PROPER_COMPILER_CXX"; then
21045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21046$as_echo "$PROPER_COMPILER_CXX" >&6; }
21047else
21048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21049$as_echo "no" >&6; }
21050fi
21051
21052
21053    test -n "$PROPER_COMPILER_CXX" && break
21054  done
21055fi
21056if test -z "$PROPER_COMPILER_CXX"; then
21057  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
21058  for ac_prog in $COMPILER_CHECK_LIST
21059do
21060  # Extract the first word of "$ac_prog", so it can be a program name with args.
21061set dummy $ac_prog; ac_word=$2
21062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21063$as_echo_n "checking for $ac_word... " >&6; }
21064if test "${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+set}" = set; then :
21065  $as_echo_n "(cached) " >&6
21066else
21067  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21068  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
21069else
21070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21071for as_dir in $PATH
21072do
21073  IFS=$as_save_IFS
21074  test -z "$as_dir" && as_dir=.
21075    for ac_exec_ext in '' $ac_executable_extensions; do
21076  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21077    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
21078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21079    break 2
21080  fi
21081done
21082  done
21083IFS=$as_save_IFS
21084
21085fi
21086fi
21087ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
21088if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
21089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
21090$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
21091else
21092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21093$as_echo "no" >&6; }
21094fi
21095
21096
21097  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
21098done
21099
21100  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
21101    PROPER_COMPILER_CXX=""
21102  else
21103    case $cross_compiling:$ac_tool_warned in
21104yes:)
21105{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21106$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21107ac_tool_warned=yes ;;
21108esac
21109    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
21110  fi
21111fi
21112
21113
21114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21115
21116  # First separate the path from the arguments. This will split at the first
21117  # space.
21118  complete="$PROPER_COMPILER_CXX"
21119  path="${complete%% *}"
21120  tmp="$complete EOL"
21121  arguments="${tmp#* }"
21122
21123  # Input might be given as Windows format, start by converting to
21124  # unix format.
21125  new_path=`$CYGPATH -u "$path"`
21126
21127  # Now try to locate executable using which
21128  new_path=`$WHICH "$new_path" 2> /dev/null`
21129  # bat and cmd files are not always considered executable in cygwin causing which
21130  # to not find them
21131  if test "x$new_path" = x \
21132           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21133           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21134    new_path=`$CYGPATH -u "$path"`
21135  fi
21136  if test "x$new_path" = x; then
21137    # Oops. Which didn't find the executable.
21138    # The splitting of arguments from the executable at a space might have been incorrect,
21139    # since paths with space are more likely in Windows. Give it another try with the whole
21140    # argument.
21141    path="$complete"
21142    arguments="EOL"
21143    new_path=`$CYGPATH -u "$path"`
21144    new_path=`$WHICH "$new_path" 2> /dev/null`
21145    # bat and cmd files are not always considered executable in cygwin causing which
21146    # to not find them
21147    if test "x$new_path" = x \
21148             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21149             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21150      new_path=`$CYGPATH -u "$path"`
21151    fi
21152    if test "x$new_path" = x; then
21153      # It's still not found. Now this is an unrecoverable error.
21154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21155$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21156      has_space=`$ECHO "$complete" | $GREP " "`
21157      if test "x$has_space" != x; then
21158        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21159$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21160      fi
21161      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21162    fi
21163  fi
21164
21165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21168  # "foo.exe" is OK but "foo" is an error.
21169  #
21170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21171  # It is also a way to make sure we got the proper file name for the real test later on.
21172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21173  if test "x$test_shortpath" = x; then
21174    # Short path failed, file does not exist as specified.
21175    # Try adding .exe or .cmd
21176    if test -f "${new_path}.exe"; then
21177       input_to_shortpath="${new_path}.exe"
21178    elif test -f "${new_path}.cmd"; then
21179       input_to_shortpath="${new_path}.cmd"
21180    else
21181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
21182$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
21183      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21184$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21185      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21186    fi
21187  else
21188    input_to_shortpath="$new_path"
21189  fi
21190
21191  # Call helper function which possibly converts this using DOS-style short mode.
21192  # If so, the updated path is stored in $new_path.
21193  new_path="$input_to_shortpath"
21194
21195  input_path="$input_to_shortpath"
21196  # Check if we need to convert this using DOS-style short mode. If the path
21197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21198  # take no chances and rewrite it.
21199  # Note: m4 eats our [], so we need to use [ and ] instead.
21200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21201  if test "x$has_forbidden_chars" != x; then
21202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21203    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21204    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21205    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21206      # Going to short mode and back again did indeed matter. Since short mode is
21207      # case insensitive, let's make it lowercase to improve readability.
21208      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21209      # Now convert it back to Unix-stile (cygpath)
21210      input_path=`$CYGPATH -u "$shortmode_path"`
21211      new_path="$input_path"
21212    fi
21213  fi
21214
21215  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21216  if test "x$test_cygdrive_prefix" = x; then
21217    # As a simple fix, exclude /usr/bin since it's not a real path.
21218    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21219      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21220      # a path prefixed by /cygdrive for fixpath to work.
21221      new_path="$CYGWIN_ROOT_PATH$input_path"
21222    fi
21223  fi
21224
21225  # remove trailing .exe if any
21226  new_path="${new_path/%.exe/}"
21227
21228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21229
21230  # First separate the path from the arguments. This will split at the first
21231  # space.
21232  complete="$PROPER_COMPILER_CXX"
21233  path="${complete%% *}"
21234  tmp="$complete EOL"
21235  arguments="${tmp#* }"
21236
21237  # Input might be given as Windows format, start by converting to
21238  # unix format.
21239  new_path="$path"
21240
21241  windows_path="$new_path"
21242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21243    unix_path=`$CYGPATH -u "$windows_path"`
21244    new_path="$unix_path"
21245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21247    new_path="$unix_path"
21248  fi
21249
21250
21251  # Now try to locate executable using which
21252  new_path=`$WHICH "$new_path" 2> /dev/null`
21253
21254  if test "x$new_path" = x; then
21255    # Oops. Which didn't find the executable.
21256    # The splitting of arguments from the executable at a space might have been incorrect,
21257    # since paths with space are more likely in Windows. Give it another try with the whole
21258    # argument.
21259    path="$complete"
21260    arguments="EOL"
21261    new_path="$path"
21262
21263  windows_path="$new_path"
21264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21265    unix_path=`$CYGPATH -u "$windows_path"`
21266    new_path="$unix_path"
21267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21269    new_path="$unix_path"
21270  fi
21271
21272
21273    new_path=`$WHICH "$new_path" 2> /dev/null`
21274
21275    if test "x$new_path" = x; then
21276      # It's still not found. Now this is an unrecoverable error.
21277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21278$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21279      has_space=`$ECHO "$complete" | $GREP " "`
21280      if test "x$has_space" != x; then
21281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21283      fi
21284      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21285    fi
21286  fi
21287
21288  # Now new_path has a complete unix path to the binary
21289  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21290    # Keep paths in /bin as-is, but remove trailing .exe if any
21291    new_path="${new_path/%.exe/}"
21292    # Do not save /bin paths to all_fixpath_prefixes!
21293  else
21294    # Not in mixed or Windows style, start by that.
21295    new_path=`cmd //c echo $new_path`
21296
21297  input_path="$new_path"
21298  # Check if we need to convert this using DOS-style short mode. If the path
21299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21300  # take no chances and rewrite it.
21301  # Note: m4 eats our [], so we need to use [ and ] instead.
21302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21303  if test "x$has_forbidden_chars" != x; then
21304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21306  fi
21307
21308    # Output is in $new_path
21309
21310  windows_path="$new_path"
21311  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21312    unix_path=`$CYGPATH -u "$windows_path"`
21313    new_path="$unix_path"
21314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21315    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21316    new_path="$unix_path"
21317  fi
21318
21319    # remove trailing .exe if any
21320    new_path="${new_path/%.exe/}"
21321
21322    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21323    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21324  fi
21325
21326  else
21327    # We're on a posix platform. Hooray! :)
21328    # First separate the path from the arguments. This will split at the first
21329    # space.
21330    complete="$PROPER_COMPILER_CXX"
21331    path="${complete%% *}"
21332    tmp="$complete EOL"
21333    arguments="${tmp#* }"
21334
21335    # Cannot rely on the command "which" here since it doesn't always work.
21336    is_absolute_path=`$ECHO "$path" | $GREP ^/`
21337    if test -z "$is_absolute_path"; then
21338      # Path to executable is not absolute. Find it.
21339      IFS_save="$IFS"
21340      IFS=:
21341      for p in $PATH; do
21342        if test -f "$p/$path" && test -x "$p/$path"; then
21343          new_path="$p/$path"
21344          break
21345        fi
21346      done
21347      IFS="$IFS_save"
21348    else
21349      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&5
21350$as_echo "$as_me: Resolving PROPER_COMPILER_CXX (as $path) failed, using $path directly." >&6;}
21351      new_path="$path"
21352    fi
21353
21354    if test "x$new_path" = x; then
21355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
21356$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
21357        has_space=`$ECHO "$complete" | $GREP " "`
21358        if test "x$has_space" != x; then
21359          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21360$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21361        fi
21362        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
21363      fi
21364  fi
21365
21366      # Now join together the path and the arguments once again
21367      if test "x$arguments" != xEOL; then
21368        new_complete="$new_path ${arguments% *}"
21369      else
21370        new_complete="$new_path"
21371      fi
21372
21373  if test "x$complete" != "x$new_complete"; then
21374      PROPER_COMPILER_CXX="$new_complete"
21375      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
21376$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
21377    fi
21378
21379    PATH="$RETRY_COMPILER_SAVED_PATH"
21380
21381    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
21382$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
21383
21384    if test "x$OPENJDK_BUILD_OS" != xwindows; then
21385        # Follow a chain of symbolic links. Use readlink
21386        # where it exists, else fall back to horribly
21387        # complicated shell code.
21388        if test "x$READLINK_TESTED" != yes; then
21389            # On MacOSX there is a readlink tool with a different
21390            # purpose than the GNU readlink tool. Check the found readlink.
21391            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21392            if test "x$ISGNU" = x; then
21393                 # A readlink that we do not know how to use.
21394                 # Are there other non-GNU readlinks out there?
21395                 READLINK_TESTED=yes
21396                 READLINK=
21397            fi
21398        fi
21399
21400        if test "x$READLINK" != x; then
21401            PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
21402        else
21403            # Save the current directory for restoring afterwards
21404            STARTDIR=$PWD
21405            COUNTER=0
21406            sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
21407            sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
21408            # Use the system pwd and not the shell builtin to resolve directory symlinks
21409            cd $sym_link_dir
21410            cd `$THEPWDCMD`
21411            sym_link_dir=`$THEPWDCMD`
21412            # Resolve file symlinks
21413            while test $COUNTER -lt 20; do
21414                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21415                if test "x$ISLINK" == x; then
21416                    # This is not a symbolic link! We are done!
21417                    break
21418                fi
21419                # Again resolve directory symlinks since the target of the just found
21420                # link could be in a different directory
21421                cd `$DIRNAME $ISLINK`
21422                sym_link_dir=`$THEPWDCMD`
21423                sym_link_file=`$BASENAME $ISLINK`
21424                let COUNTER=COUNTER+1
21425            done
21426            cd $STARTDIR
21427            PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
21428        fi
21429    fi
21430
21431    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
21432$as_echo "$PROPER_COMPILER_CXX" >&6; }
21433    CXX="$PROPER_COMPILER_CXX"
21434  else
21435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
21436$as_echo "no, keeping CXX" >&6; }
21437    CXX="$TEST_COMPILER"
21438  fi
21439
21440  COMPILER=$CXX
21441  COMPILER_NAME=$COMPILER_NAME
21442
21443  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
21444    # Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work
21445    COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1`
21446    $ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
21447    if test $? -ne 0; then
21448      GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21449
21450      { $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
21451$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler." >&6;}
21452      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&5
21453$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_TEST\" and with --version: \"$GCC_VERSION_TEST\"" >&6;}
21454      as_fn_error $? "Sun Studio compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21455    else
21456      COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p"`
21457      COMPILER_VENDOR="Sun Studio"
21458    fi
21459  elif test  "x$OPENJDK_TARGET_OS" = xwindows; then
21460    # First line typically looks something like:
21461    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
21462    COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1`
21463    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \([1-9][0-9.]*\) .*/\1/p"`
21464    COMPILER_VENDOR="Microsoft CL.EXE"
21465    COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"`
21466    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
21467      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
21468        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
21469      fi
21470    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
21471      if test "x$COMPILER_CPU_TEST" != "xx64"; then
21472        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
21473      fi
21474    fi
21475  else
21476    COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1`
21477    # Check that this is likely to be GCC.
21478    $COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null
21479    if test $? -ne 0; then
21480      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&5
21481$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler." >&6;}
21482      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&5
21483$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_TEST\"" >&6;}
21484      as_fn_error $? "GCC compiler is required. Try setting --with-tools-dir." "$LINENO" 5
21485    fi
21486
21487    # First line typically looks something like:
21488    # gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
21489    COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \([1-9][0-9.]*\)/\1/p"`
21490    COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) [1-9][0-9.]*/\1/p"`
21491  fi
21492  # This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker)
21493  CXX_VERSION="$COMPILER_VERSION"
21494  # This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker)
21495  CXX_VENDOR="$COMPILER_VENDOR"
21496
21497  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&5
21498$as_echo "$as_me: Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)" >&6;}
21499
21500
21501# Now that we have resolved CXX ourself, let autoconf have its go at it
21502ac_ext=cpp
21503ac_cpp='$CXXCPP $CPPFLAGS'
21504ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21505ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21506ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21507if test -z "$CXX"; then
21508  if test -n "$CCC"; then
21509    CXX=$CCC
21510  else
21511    if test -n "$ac_tool_prefix"; then
21512  for ac_prog in $CXX
21513  do
21514    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21515set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21517$as_echo_n "checking for $ac_word... " >&6; }
21518if test "${ac_cv_prog_CXX+set}" = set; then :
21519  $as_echo_n "(cached) " >&6
21520else
21521  if test -n "$CXX"; then
21522  ac_cv_prog_CXX="$CXX" # Let the user override the test.
21523else
21524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21525for as_dir in $PATH
21526do
21527  IFS=$as_save_IFS
21528  test -z "$as_dir" && as_dir=.
21529    for ac_exec_ext in '' $ac_executable_extensions; do
21530  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21531    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
21532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21533    break 2
21534  fi
21535done
21536  done
21537IFS=$as_save_IFS
21538
21539fi
21540fi
21541CXX=$ac_cv_prog_CXX
21542if test -n "$CXX"; then
21543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
21544$as_echo "$CXX" >&6; }
21545else
21546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21547$as_echo "no" >&6; }
21548fi
21549
21550
21551    test -n "$CXX" && break
21552  done
21553fi
21554if test -z "$CXX"; then
21555  ac_ct_CXX=$CXX
21556  for ac_prog in $CXX
21557do
21558  # Extract the first word of "$ac_prog", so it can be a program name with args.
21559set dummy $ac_prog; ac_word=$2
21560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21561$as_echo_n "checking for $ac_word... " >&6; }
21562if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
21563  $as_echo_n "(cached) " >&6
21564else
21565  if test -n "$ac_ct_CXX"; then
21566  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
21567else
21568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21569for as_dir in $PATH
21570do
21571  IFS=$as_save_IFS
21572  test -z "$as_dir" && as_dir=.
21573    for ac_exec_ext in '' $ac_executable_extensions; do
21574  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21575    ac_cv_prog_ac_ct_CXX="$ac_prog"
21576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21577    break 2
21578  fi
21579done
21580  done
21581IFS=$as_save_IFS
21582
21583fi
21584fi
21585ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
21586if test -n "$ac_ct_CXX"; then
21587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
21588$as_echo "$ac_ct_CXX" >&6; }
21589else
21590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21591$as_echo "no" >&6; }
21592fi
21593
21594
21595  test -n "$ac_ct_CXX" && break
21596done
21597
21598  if test "x$ac_ct_CXX" = x; then
21599    CXX="g++"
21600  else
21601    case $cross_compiling:$ac_tool_warned in
21602yes:)
21603{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21604$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21605ac_tool_warned=yes ;;
21606esac
21607    CXX=$ac_ct_CXX
21608  fi
21609fi
21610
21611  fi
21612fi
21613# Provide some information about the compiler.
21614$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
21615set X $ac_compile
21616ac_compiler=$2
21617for ac_option in --version -v -V -qversion; do
21618  { { ac_try="$ac_compiler $ac_option >&5"
21619case "(($ac_try" in
21620  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21621  *) ac_try_echo=$ac_try;;
21622esac
21623eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21624$as_echo "$ac_try_echo"; } >&5
21625  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21626  ac_status=$?
21627  if test -s conftest.err; then
21628    sed '10a\
21629... rest of stderr output deleted ...
21630         10q' conftest.err >conftest.er1
21631    cat conftest.er1 >&5
21632  fi
21633  rm -f conftest.er1 conftest.err
21634  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21635  test $ac_status = 0; }
21636done
21637
21638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
21639$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
21640if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
21641  $as_echo_n "(cached) " >&6
21642else
21643  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21644/* end confdefs.h.  */
21645
21646int
21647main ()
21648{
21649#ifndef __GNUC__
21650       choke me
21651#endif
21652
21653  ;
21654  return 0;
21655}
21656_ACEOF
21657if ac_fn_cxx_try_compile "$LINENO"; then :
21658  ac_compiler_gnu=yes
21659else
21660  ac_compiler_gnu=no
21661fi
21662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21663ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
21664
21665fi
21666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
21667$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
21668if test $ac_compiler_gnu = yes; then
21669  GXX=yes
21670else
21671  GXX=
21672fi
21673ac_test_CXXFLAGS=${CXXFLAGS+set}
21674ac_save_CXXFLAGS=$CXXFLAGS
21675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
21676$as_echo_n "checking whether $CXX accepts -g... " >&6; }
21677if test "${ac_cv_prog_cxx_g+set}" = set; then :
21678  $as_echo_n "(cached) " >&6
21679else
21680  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
21681   ac_cxx_werror_flag=yes
21682   ac_cv_prog_cxx_g=no
21683   CXXFLAGS="-g"
21684   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21685/* end confdefs.h.  */
21686
21687int
21688main ()
21689{
21690
21691  ;
21692  return 0;
21693}
21694_ACEOF
21695if ac_fn_cxx_try_compile "$LINENO"; then :
21696  ac_cv_prog_cxx_g=yes
21697else
21698  CXXFLAGS=""
21699      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21700/* end confdefs.h.  */
21701
21702int
21703main ()
21704{
21705
21706  ;
21707  return 0;
21708}
21709_ACEOF
21710if ac_fn_cxx_try_compile "$LINENO"; then :
21711
21712else
21713  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21714	 CXXFLAGS="-g"
21715	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21716/* end confdefs.h.  */
21717
21718int
21719main ()
21720{
21721
21722  ;
21723  return 0;
21724}
21725_ACEOF
21726if ac_fn_cxx_try_compile "$LINENO"; then :
21727  ac_cv_prog_cxx_g=yes
21728fi
21729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21730fi
21731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21732fi
21733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21734   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
21735fi
21736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
21737$as_echo "$ac_cv_prog_cxx_g" >&6; }
21738if test "$ac_test_CXXFLAGS" = set; then
21739  CXXFLAGS=$ac_save_CXXFLAGS
21740elif test $ac_cv_prog_cxx_g = yes; then
21741  if test "$GXX" = yes; then
21742    CXXFLAGS="-g -O2"
21743  else
21744    CXXFLAGS="-g"
21745  fi
21746else
21747  if test "$GXX" = yes; then
21748    CXXFLAGS="-O2"
21749  else
21750    CXXFLAGS=
21751  fi
21752fi
21753ac_ext=cpp
21754ac_cpp='$CXXCPP $CPPFLAGS'
21755ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21756ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21757ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21758
21759
21760### Locate other tools
21761
21762if test "x$OPENJDK_TARGET_OS" = xmacosx; then
21763    ac_ext=m
21764ac_cpp='$OBJCPP $CPPFLAGS'
21765ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21766ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21767ac_compiler_gnu=$ac_cv_objc_compiler_gnu
21768if test -n "$ac_tool_prefix"; then
21769  for ac_prog in gcc objcc objc cc CC
21770  do
21771    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
21772set dummy $ac_tool_prefix$ac_prog; ac_word=$2
21773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21774$as_echo_n "checking for $ac_word... " >&6; }
21775if test "${ac_cv_prog_OBJC+set}" = set; then :
21776  $as_echo_n "(cached) " >&6
21777else
21778  if test -n "$OBJC"; then
21779  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
21780else
21781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21782for as_dir in $PATH
21783do
21784  IFS=$as_save_IFS
21785  test -z "$as_dir" && as_dir=.
21786    for ac_exec_ext in '' $ac_executable_extensions; do
21787  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21788    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
21789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21790    break 2
21791  fi
21792done
21793  done
21794IFS=$as_save_IFS
21795
21796fi
21797fi
21798OBJC=$ac_cv_prog_OBJC
21799if test -n "$OBJC"; then
21800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
21801$as_echo "$OBJC" >&6; }
21802else
21803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21804$as_echo "no" >&6; }
21805fi
21806
21807
21808    test -n "$OBJC" && break
21809  done
21810fi
21811if test -z "$OBJC"; then
21812  ac_ct_OBJC=$OBJC
21813  for ac_prog in gcc objcc objc cc CC
21814do
21815  # Extract the first word of "$ac_prog", so it can be a program name with args.
21816set dummy $ac_prog; ac_word=$2
21817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21818$as_echo_n "checking for $ac_word... " >&6; }
21819if test "${ac_cv_prog_ac_ct_OBJC+set}" = set; then :
21820  $as_echo_n "(cached) " >&6
21821else
21822  if test -n "$ac_ct_OBJC"; then
21823  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
21824else
21825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21826for as_dir in $PATH
21827do
21828  IFS=$as_save_IFS
21829  test -z "$as_dir" && as_dir=.
21830    for ac_exec_ext in '' $ac_executable_extensions; do
21831  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21832    ac_cv_prog_ac_ct_OBJC="$ac_prog"
21833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21834    break 2
21835  fi
21836done
21837  done
21838IFS=$as_save_IFS
21839
21840fi
21841fi
21842ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
21843if test -n "$ac_ct_OBJC"; then
21844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
21845$as_echo "$ac_ct_OBJC" >&6; }
21846else
21847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21848$as_echo "no" >&6; }
21849fi
21850
21851
21852  test -n "$ac_ct_OBJC" && break
21853done
21854
21855  if test "x$ac_ct_OBJC" = x; then
21856    OBJC="gcc"
21857  else
21858    case $cross_compiling:$ac_tool_warned in
21859yes:)
21860{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21861$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21862ac_tool_warned=yes ;;
21863esac
21864    OBJC=$ac_ct_OBJC
21865  fi
21866fi
21867
21868# Provide some information about the compiler.
21869$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
21870set X $ac_compile
21871ac_compiler=$2
21872for ac_option in --version -v -V -qversion; do
21873  { { ac_try="$ac_compiler $ac_option >&5"
21874case "(($ac_try" in
21875  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21876  *) ac_try_echo=$ac_try;;
21877esac
21878eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
21879$as_echo "$ac_try_echo"; } >&5
21880  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
21881  ac_status=$?
21882  if test -s conftest.err; then
21883    sed '10a\
21884... rest of stderr output deleted ...
21885         10q' conftest.err >conftest.er1
21886    cat conftest.er1 >&5
21887  fi
21888  rm -f conftest.er1 conftest.err
21889  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
21890  test $ac_status = 0; }
21891done
21892
21893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
21894$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
21895if test "${ac_cv_objc_compiler_gnu+set}" = set; then :
21896  $as_echo_n "(cached) " >&6
21897else
21898  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21899/* end confdefs.h.  */
21900
21901int
21902main ()
21903{
21904#ifndef __GNUC__
21905       choke me
21906#endif
21907
21908  ;
21909  return 0;
21910}
21911_ACEOF
21912if ac_fn_objc_try_compile "$LINENO"; then :
21913  ac_compiler_gnu=yes
21914else
21915  ac_compiler_gnu=no
21916fi
21917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21918ac_cv_objc_compiler_gnu=$ac_compiler_gnu
21919
21920fi
21921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
21922$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
21923if test $ac_compiler_gnu = yes; then
21924  GOBJC=yes
21925else
21926  GOBJC=
21927fi
21928ac_test_OBJCFLAGS=${OBJCFLAGS+set}
21929ac_save_OBJCFLAGS=$OBJCFLAGS
21930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
21931$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
21932if test "${ac_cv_prog_objc_g+set}" = set; then :
21933  $as_echo_n "(cached) " >&6
21934else
21935  ac_save_objc_werror_flag=$ac_objc_werror_flag
21936   ac_objc_werror_flag=yes
21937   ac_cv_prog_objc_g=no
21938   OBJCFLAGS="-g"
21939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21940/* end confdefs.h.  */
21941
21942int
21943main ()
21944{
21945
21946  ;
21947  return 0;
21948}
21949_ACEOF
21950if ac_fn_objc_try_compile "$LINENO"; then :
21951  ac_cv_prog_objc_g=yes
21952else
21953  OBJCFLAGS=""
21954      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21955/* end confdefs.h.  */
21956
21957int
21958main ()
21959{
21960
21961  ;
21962  return 0;
21963}
21964_ACEOF
21965if ac_fn_objc_try_compile "$LINENO"; then :
21966
21967else
21968  ac_objc_werror_flag=$ac_save_objc_werror_flag
21969	 OBJCFLAGS="-g"
21970	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21971/* end confdefs.h.  */
21972
21973int
21974main ()
21975{
21976
21977  ;
21978  return 0;
21979}
21980_ACEOF
21981if ac_fn_objc_try_compile "$LINENO"; then :
21982  ac_cv_prog_objc_g=yes
21983fi
21984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21985fi
21986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21987fi
21988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21989   ac_objc_werror_flag=$ac_save_objc_werror_flag
21990fi
21991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
21992$as_echo "$ac_cv_prog_objc_g" >&6; }
21993if test "$ac_test_OBJCFLAGS" = set; then
21994  OBJCFLAGS=$ac_save_OBJCFLAGS
21995elif test $ac_cv_prog_objc_g = yes; then
21996  if test "$GOBJC" = yes; then
21997    OBJCFLAGS="-g -O2"
21998  else
21999    OBJCFLAGS="-g"
22000  fi
22001else
22002  if test "$GOBJC" = yes; then
22003    OBJCFLAGS="-O2"
22004  else
22005    OBJCFLAGS=
22006  fi
22007fi
22008ac_ext=cpp
22009ac_cpp='$CXXCPP $CPPFLAGS'
22010ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22011ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22012ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22013
22014
22015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22016
22017  # First separate the path from the arguments. This will split at the first
22018  # space.
22019  complete="$OBJC"
22020  path="${complete%% *}"
22021  tmp="$complete EOL"
22022  arguments="${tmp#* }"
22023
22024  # Input might be given as Windows format, start by converting to
22025  # unix format.
22026  new_path=`$CYGPATH -u "$path"`
22027
22028  # Now try to locate executable using which
22029  new_path=`$WHICH "$new_path" 2> /dev/null`
22030  # bat and cmd files are not always considered executable in cygwin causing which
22031  # to not find them
22032  if test "x$new_path" = x \
22033           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22034           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22035    new_path=`$CYGPATH -u "$path"`
22036  fi
22037  if test "x$new_path" = x; then
22038    # Oops. Which didn't find the executable.
22039    # The splitting of arguments from the executable at a space might have been incorrect,
22040    # since paths with space are more likely in Windows. Give it another try with the whole
22041    # argument.
22042    path="$complete"
22043    arguments="EOL"
22044    new_path=`$CYGPATH -u "$path"`
22045    new_path=`$WHICH "$new_path" 2> /dev/null`
22046    # bat and cmd files are not always considered executable in cygwin causing which
22047    # to not find them
22048    if test "x$new_path" = x \
22049             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22050             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22051      new_path=`$CYGPATH -u "$path"`
22052    fi
22053    if test "x$new_path" = x; then
22054      # It's still not found. Now this is an unrecoverable error.
22055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22056$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22057      has_space=`$ECHO "$complete" | $GREP " "`
22058      if test "x$has_space" != x; then
22059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22061      fi
22062      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22063    fi
22064  fi
22065
22066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22069  # "foo.exe" is OK but "foo" is an error.
22070  #
22071  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22072  # It is also a way to make sure we got the proper file name for the real test later on.
22073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22074  if test "x$test_shortpath" = x; then
22075    # Short path failed, file does not exist as specified.
22076    # Try adding .exe or .cmd
22077    if test -f "${new_path}.exe"; then
22078       input_to_shortpath="${new_path}.exe"
22079    elif test -f "${new_path}.cmd"; then
22080       input_to_shortpath="${new_path}.cmd"
22081    else
22082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
22083$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
22084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22086      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22087    fi
22088  else
22089    input_to_shortpath="$new_path"
22090  fi
22091
22092  # Call helper function which possibly converts this using DOS-style short mode.
22093  # If so, the updated path is stored in $new_path.
22094  new_path="$input_to_shortpath"
22095
22096  input_path="$input_to_shortpath"
22097  # Check if we need to convert this using DOS-style short mode. If the path
22098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22099  # take no chances and rewrite it.
22100  # Note: m4 eats our [], so we need to use [ and ] instead.
22101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22102  if test "x$has_forbidden_chars" != x; then
22103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22107      # Going to short mode and back again did indeed matter. Since short mode is
22108      # case insensitive, let's make it lowercase to improve readability.
22109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22110      # Now convert it back to Unix-stile (cygpath)
22111      input_path=`$CYGPATH -u "$shortmode_path"`
22112      new_path="$input_path"
22113    fi
22114  fi
22115
22116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22117  if test "x$test_cygdrive_prefix" = x; then
22118    # As a simple fix, exclude /usr/bin since it's not a real path.
22119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22121      # a path prefixed by /cygdrive for fixpath to work.
22122      new_path="$CYGWIN_ROOT_PATH$input_path"
22123    fi
22124  fi
22125
22126  # remove trailing .exe if any
22127  new_path="${new_path/%.exe/}"
22128
22129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22130
22131  # First separate the path from the arguments. This will split at the first
22132  # space.
22133  complete="$OBJC"
22134  path="${complete%% *}"
22135  tmp="$complete EOL"
22136  arguments="${tmp#* }"
22137
22138  # Input might be given as Windows format, start by converting to
22139  # unix format.
22140  new_path="$path"
22141
22142  windows_path="$new_path"
22143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22144    unix_path=`$CYGPATH -u "$windows_path"`
22145    new_path="$unix_path"
22146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22148    new_path="$unix_path"
22149  fi
22150
22151
22152  # Now try to locate executable using which
22153  new_path=`$WHICH "$new_path" 2> /dev/null`
22154
22155  if test "x$new_path" = x; then
22156    # Oops. Which didn't find the executable.
22157    # The splitting of arguments from the executable at a space might have been incorrect,
22158    # since paths with space are more likely in Windows. Give it another try with the whole
22159    # argument.
22160    path="$complete"
22161    arguments="EOL"
22162    new_path="$path"
22163
22164  windows_path="$new_path"
22165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22166    unix_path=`$CYGPATH -u "$windows_path"`
22167    new_path="$unix_path"
22168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22170    new_path="$unix_path"
22171  fi
22172
22173
22174    new_path=`$WHICH "$new_path" 2> /dev/null`
22175
22176    if test "x$new_path" = x; then
22177      # It's still not found. Now this is an unrecoverable error.
22178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22179$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22180      has_space=`$ECHO "$complete" | $GREP " "`
22181      if test "x$has_space" != x; then
22182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22184      fi
22185      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22186    fi
22187  fi
22188
22189  # Now new_path has a complete unix path to the binary
22190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22191    # Keep paths in /bin as-is, but remove trailing .exe if any
22192    new_path="${new_path/%.exe/}"
22193    # Do not save /bin paths to all_fixpath_prefixes!
22194  else
22195    # Not in mixed or Windows style, start by that.
22196    new_path=`cmd //c echo $new_path`
22197
22198  input_path="$new_path"
22199  # Check if we need to convert this using DOS-style short mode. If the path
22200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22201  # take no chances and rewrite it.
22202  # Note: m4 eats our [], so we need to use [ and ] instead.
22203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22204  if test "x$has_forbidden_chars" != x; then
22205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22207  fi
22208
22209    # Output is in $new_path
22210
22211  windows_path="$new_path"
22212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22213    unix_path=`$CYGPATH -u "$windows_path"`
22214    new_path="$unix_path"
22215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22217    new_path="$unix_path"
22218  fi
22219
22220    # remove trailing .exe if any
22221    new_path="${new_path/%.exe/}"
22222
22223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22225  fi
22226
22227  else
22228    # We're on a posix platform. Hooray! :)
22229    # First separate the path from the arguments. This will split at the first
22230    # space.
22231    complete="$OBJC"
22232    path="${complete%% *}"
22233    tmp="$complete EOL"
22234    arguments="${tmp#* }"
22235
22236    # Cannot rely on the command "which" here since it doesn't always work.
22237    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22238    if test -z "$is_absolute_path"; then
22239      # Path to executable is not absolute. Find it.
22240      IFS_save="$IFS"
22241      IFS=:
22242      for p in $PATH; do
22243        if test -f "$p/$path" && test -x "$p/$path"; then
22244          new_path="$p/$path"
22245          break
22246        fi
22247      done
22248      IFS="$IFS_save"
22249    else
22250      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJC (as $path) failed, using $path directly." >&5
22251$as_echo "$as_me: Resolving OBJC (as $path) failed, using $path directly." >&6;}
22252      new_path="$path"
22253    fi
22254
22255    if test "x$new_path" = x; then
22256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
22257$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
22258        has_space=`$ECHO "$complete" | $GREP " "`
22259        if test "x$has_space" != x; then
22260          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22261$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22262        fi
22263        as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
22264      fi
22265  fi
22266
22267      # Now join together the path and the arguments once again
22268      if test "x$arguments" != xEOL; then
22269        new_complete="$new_path ${arguments% *}"
22270      else
22271        new_complete="$new_path"
22272      fi
22273
22274  if test "x$complete" != "x$new_complete"; then
22275      OBJC="$new_complete"
22276      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
22277$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
22278    fi
22279
22280else
22281    OBJC=
22282fi
22283
22284# Restore the flags to the user specified values.
22285# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
22286CFLAGS="$ORG_CFLAGS"
22287CXXFLAGS="$ORG_CXXFLAGS"
22288OBJCFLAGS="$ORG_OBJCFLAGS"
22289
22290LD="$CC"
22291LDEXE="$CC"
22292LDCXX="$CXX"
22293LDEXECXX="$CXX"
22294
22295# LDEXE is the linker to use, when creating executables.
22296
22297# Linking C++ libraries.
22298
22299# Linking C++ executables.
22300
22301
22302if test "x$OPENJDK_TARGET_OS" != xwindows; then
22303    if test -n "$ac_tool_prefix"; then
22304  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
22305set dummy ${ac_tool_prefix}ar; ac_word=$2
22306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22307$as_echo_n "checking for $ac_word... " >&6; }
22308if test "${ac_cv_prog_AR+set}" = set; then :
22309  $as_echo_n "(cached) " >&6
22310else
22311  if test -n "$AR"; then
22312  ac_cv_prog_AR="$AR" # Let the user override the test.
22313else
22314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22315for as_dir in $PATH
22316do
22317  IFS=$as_save_IFS
22318  test -z "$as_dir" && as_dir=.
22319    for ac_exec_ext in '' $ac_executable_extensions; do
22320  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22321    ac_cv_prog_AR="${ac_tool_prefix}ar"
22322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22323    break 2
22324  fi
22325done
22326  done
22327IFS=$as_save_IFS
22328
22329fi
22330fi
22331AR=$ac_cv_prog_AR
22332if test -n "$AR"; then
22333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
22334$as_echo "$AR" >&6; }
22335else
22336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22337$as_echo "no" >&6; }
22338fi
22339
22340
22341fi
22342if test -z "$ac_cv_prog_AR"; then
22343  ac_ct_AR=$AR
22344  # Extract the first word of "ar", so it can be a program name with args.
22345set dummy ar; ac_word=$2
22346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22347$as_echo_n "checking for $ac_word... " >&6; }
22348if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
22349  $as_echo_n "(cached) " >&6
22350else
22351  if test -n "$ac_ct_AR"; then
22352  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
22353else
22354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22355for as_dir in $PATH
22356do
22357  IFS=$as_save_IFS
22358  test -z "$as_dir" && as_dir=.
22359    for ac_exec_ext in '' $ac_executable_extensions; do
22360  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22361    ac_cv_prog_ac_ct_AR="ar"
22362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22363    break 2
22364  fi
22365done
22366  done
22367IFS=$as_save_IFS
22368
22369fi
22370fi
22371ac_ct_AR=$ac_cv_prog_ac_ct_AR
22372if test -n "$ac_ct_AR"; then
22373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
22374$as_echo "$ac_ct_AR" >&6; }
22375else
22376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22377$as_echo "no" >&6; }
22378fi
22379
22380  if test "x$ac_ct_AR" = x; then
22381    AR=""
22382  else
22383    case $cross_compiling:$ac_tool_warned in
22384yes:)
22385{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
22386$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
22387ac_tool_warned=yes ;;
22388esac
22389    AR=$ac_ct_AR
22390  fi
22391else
22392  AR="$ac_cv_prog_AR"
22393fi
22394
22395
22396  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22397
22398  # First separate the path from the arguments. This will split at the first
22399  # space.
22400  complete="$AR"
22401  path="${complete%% *}"
22402  tmp="$complete EOL"
22403  arguments="${tmp#* }"
22404
22405  # Input might be given as Windows format, start by converting to
22406  # unix format.
22407  new_path=`$CYGPATH -u "$path"`
22408
22409  # Now try to locate executable using which
22410  new_path=`$WHICH "$new_path" 2> /dev/null`
22411  # bat and cmd files are not always considered executable in cygwin causing which
22412  # to not find them
22413  if test "x$new_path" = x \
22414           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22415           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22416    new_path=`$CYGPATH -u "$path"`
22417  fi
22418  if test "x$new_path" = x; then
22419    # Oops. Which didn't find the executable.
22420    # The splitting of arguments from the executable at a space might have been incorrect,
22421    # since paths with space are more likely in Windows. Give it another try with the whole
22422    # argument.
22423    path="$complete"
22424    arguments="EOL"
22425    new_path=`$CYGPATH -u "$path"`
22426    new_path=`$WHICH "$new_path" 2> /dev/null`
22427    # bat and cmd files are not always considered executable in cygwin causing which
22428    # to not find them
22429    if test "x$new_path" = x \
22430             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22431             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22432      new_path=`$CYGPATH -u "$path"`
22433    fi
22434    if test "x$new_path" = x; then
22435      # It's still not found. Now this is an unrecoverable error.
22436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22437$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22438      has_space=`$ECHO "$complete" | $GREP " "`
22439      if test "x$has_space" != x; then
22440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22442      fi
22443      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22444    fi
22445  fi
22446
22447  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22448  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22449  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22450  # "foo.exe" is OK but "foo" is an error.
22451  #
22452  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22453  # It is also a way to make sure we got the proper file name for the real test later on.
22454  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22455  if test "x$test_shortpath" = x; then
22456    # Short path failed, file does not exist as specified.
22457    # Try adding .exe or .cmd
22458    if test -f "${new_path}.exe"; then
22459       input_to_shortpath="${new_path}.exe"
22460    elif test -f "${new_path}.cmd"; then
22461       input_to_shortpath="${new_path}.cmd"
22462    else
22463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
22464$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
22465      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22466$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22467      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22468    fi
22469  else
22470    input_to_shortpath="$new_path"
22471  fi
22472
22473  # Call helper function which possibly converts this using DOS-style short mode.
22474  # If so, the updated path is stored in $new_path.
22475  new_path="$input_to_shortpath"
22476
22477  input_path="$input_to_shortpath"
22478  # Check if we need to convert this using DOS-style short mode. If the path
22479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22480  # take no chances and rewrite it.
22481  # Note: m4 eats our [], so we need to use [ and ] instead.
22482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22483  if test "x$has_forbidden_chars" != x; then
22484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22488      # Going to short mode and back again did indeed matter. Since short mode is
22489      # case insensitive, let's make it lowercase to improve readability.
22490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22491      # Now convert it back to Unix-stile (cygpath)
22492      input_path=`$CYGPATH -u "$shortmode_path"`
22493      new_path="$input_path"
22494    fi
22495  fi
22496
22497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22498  if test "x$test_cygdrive_prefix" = x; then
22499    # As a simple fix, exclude /usr/bin since it's not a real path.
22500    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22502      # a path prefixed by /cygdrive for fixpath to work.
22503      new_path="$CYGWIN_ROOT_PATH$input_path"
22504    fi
22505  fi
22506
22507  # remove trailing .exe if any
22508  new_path="${new_path/%.exe/}"
22509
22510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22511
22512  # First separate the path from the arguments. This will split at the first
22513  # space.
22514  complete="$AR"
22515  path="${complete%% *}"
22516  tmp="$complete EOL"
22517  arguments="${tmp#* }"
22518
22519  # Input might be given as Windows format, start by converting to
22520  # unix format.
22521  new_path="$path"
22522
22523  windows_path="$new_path"
22524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22525    unix_path=`$CYGPATH -u "$windows_path"`
22526    new_path="$unix_path"
22527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22529    new_path="$unix_path"
22530  fi
22531
22532
22533  # Now try to locate executable using which
22534  new_path=`$WHICH "$new_path" 2> /dev/null`
22535
22536  if test "x$new_path" = x; then
22537    # Oops. Which didn't find the executable.
22538    # The splitting of arguments from the executable at a space might have been incorrect,
22539    # since paths with space are more likely in Windows. Give it another try with the whole
22540    # argument.
22541    path="$complete"
22542    arguments="EOL"
22543    new_path="$path"
22544
22545  windows_path="$new_path"
22546  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22547    unix_path=`$CYGPATH -u "$windows_path"`
22548    new_path="$unix_path"
22549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22550    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22551    new_path="$unix_path"
22552  fi
22553
22554
22555    new_path=`$WHICH "$new_path" 2> /dev/null`
22556
22557    if test "x$new_path" = x; then
22558      # It's still not found. Now this is an unrecoverable error.
22559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22560$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22561      has_space=`$ECHO "$complete" | $GREP " "`
22562      if test "x$has_space" != x; then
22563        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22564$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22565      fi
22566      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22567    fi
22568  fi
22569
22570  # Now new_path has a complete unix path to the binary
22571  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22572    # Keep paths in /bin as-is, but remove trailing .exe if any
22573    new_path="${new_path/%.exe/}"
22574    # Do not save /bin paths to all_fixpath_prefixes!
22575  else
22576    # Not in mixed or Windows style, start by that.
22577    new_path=`cmd //c echo $new_path`
22578
22579  input_path="$new_path"
22580  # Check if we need to convert this using DOS-style short mode. If the path
22581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22582  # take no chances and rewrite it.
22583  # Note: m4 eats our [], so we need to use [ and ] instead.
22584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22585  if test "x$has_forbidden_chars" != x; then
22586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22588  fi
22589
22590    # Output is in $new_path
22591
22592  windows_path="$new_path"
22593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22594    unix_path=`$CYGPATH -u "$windows_path"`
22595    new_path="$unix_path"
22596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22598    new_path="$unix_path"
22599  fi
22600
22601    # remove trailing .exe if any
22602    new_path="${new_path/%.exe/}"
22603
22604    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22605    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22606  fi
22607
22608  else
22609    # We're on a posix platform. Hooray! :)
22610    # First separate the path from the arguments. This will split at the first
22611    # space.
22612    complete="$AR"
22613    path="${complete%% *}"
22614    tmp="$complete EOL"
22615    arguments="${tmp#* }"
22616
22617    # Cannot rely on the command "which" here since it doesn't always work.
22618    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22619    if test -z "$is_absolute_path"; then
22620      # Path to executable is not absolute. Find it.
22621      IFS_save="$IFS"
22622      IFS=:
22623      for p in $PATH; do
22624        if test -f "$p/$path" && test -x "$p/$path"; then
22625          new_path="$p/$path"
22626          break
22627        fi
22628      done
22629      IFS="$IFS_save"
22630    else
22631      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AR (as $path) failed, using $path directly." >&5
22632$as_echo "$as_me: Resolving AR (as $path) failed, using $path directly." >&6;}
22633      new_path="$path"
22634    fi
22635
22636    if test "x$new_path" = x; then
22637        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
22638$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
22639        has_space=`$ECHO "$complete" | $GREP " "`
22640        if test "x$has_space" != x; then
22641          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22642$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22643        fi
22644        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
22645      fi
22646  fi
22647
22648      # Now join together the path and the arguments once again
22649      if test "x$arguments" != xEOL; then
22650        new_complete="$new_path ${arguments% *}"
22651      else
22652        new_complete="$new_path"
22653      fi
22654
22655  if test "x$complete" != "x$new_complete"; then
22656      AR="$new_complete"
22657      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
22658$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
22659    fi
22660
22661fi
22662if test "x$OPENJDK_TARGET_OS" = xmacosx; then
22663    ARFLAGS="-r"
22664else
22665    ARFLAGS=""
22666fi
22667
22668
22669# For hotspot, we need these in Windows mixed path; other platforms keep them the same
22670HOTSPOT_CXX="$CXX"
22671HOTSPOT_LD="$LD"
22672
22673
22674
22675COMPILER_NAME=gcc
22676COMPILER_TYPE=CC
22677if test "x$OPENJDK_TARGET_OS" = xwindows; then :
22678
22679    # For now, assume that we are always compiling using cl.exe.
22680    CC_OUT_OPTION=-Fo
22681    EXE_OUT_OPTION=-out:
22682    LD_OUT_OPTION=-out:
22683    AR_OUT_OPTION=-out:
22684    # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin
22685    # program for something completely different.
22686    # Extract the first word of "link", so it can be a program name with args.
22687set dummy link; ac_word=$2
22688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22689$as_echo_n "checking for $ac_word... " >&6; }
22690if test "${ac_cv_prog_WINLD+set}" = set; then :
22691  $as_echo_n "(cached) " >&6
22692else
22693  if test -n "$WINLD"; then
22694  ac_cv_prog_WINLD="$WINLD" # Let the user override the test.
22695else
22696  ac_prog_rejected=no
22697as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22698for as_dir in $PATH
22699do
22700  IFS=$as_save_IFS
22701  test -z "$as_dir" && as_dir=.
22702    for ac_exec_ext in '' $ac_executable_extensions; do
22703  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
22704    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
22705       ac_prog_rejected=yes
22706       continue
22707     fi
22708    ac_cv_prog_WINLD="link"
22709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22710    break 2
22711  fi
22712done
22713  done
22714IFS=$as_save_IFS
22715
22716if test $ac_prog_rejected = yes; then
22717  # We found a bogon in the path, so make sure we never use it.
22718  set dummy $ac_cv_prog_WINLD
22719  shift
22720  if test $# != 0; then
22721    # We chose a different compiler from the bogus one.
22722    # However, it has the same basename, so the bogon will be chosen
22723    # first if we set WINLD to just the basename; use the full file name.
22724    shift
22725    ac_cv_prog_WINLD="$as_dir/$ac_word${1+' '}$@"
22726  fi
22727fi
22728fi
22729fi
22730WINLD=$ac_cv_prog_WINLD
22731if test -n "$WINLD"; then
22732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINLD" >&5
22733$as_echo "$WINLD" >&6; }
22734else
22735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22736$as_echo "no" >&6; }
22737fi
22738
22739
22740    # Since we must ignore the first found link, WINLD will contain
22741    # the full path to the link.exe program.
22742
22743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22744
22745  # First separate the path from the arguments. This will split at the first
22746  # space.
22747  complete="$WINLD"
22748  path="${complete%% *}"
22749  tmp="$complete EOL"
22750  arguments="${tmp#* }"
22751
22752  # Input might be given as Windows format, start by converting to
22753  # unix format.
22754  new_path=`$CYGPATH -u "$path"`
22755
22756  # Now try to locate executable using which
22757  new_path=`$WHICH "$new_path" 2> /dev/null`
22758  # bat and cmd files are not always considered executable in cygwin causing which
22759  # to not find them
22760  if test "x$new_path" = x \
22761           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22762           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22763    new_path=`$CYGPATH -u "$path"`
22764  fi
22765  if test "x$new_path" = x; then
22766    # Oops. Which didn't find the executable.
22767    # The splitting of arguments from the executable at a space might have been incorrect,
22768    # since paths with space are more likely in Windows. Give it another try with the whole
22769    # argument.
22770    path="$complete"
22771    arguments="EOL"
22772    new_path=`$CYGPATH -u "$path"`
22773    new_path=`$WHICH "$new_path" 2> /dev/null`
22774    # bat and cmd files are not always considered executable in cygwin causing which
22775    # to not find them
22776    if test "x$new_path" = x \
22777             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
22778             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
22779      new_path=`$CYGPATH -u "$path"`
22780    fi
22781    if test "x$new_path" = x; then
22782      # It's still not found. Now this is an unrecoverable error.
22783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22784$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22785      has_space=`$ECHO "$complete" | $GREP " "`
22786      if test "x$has_space" != x; then
22787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22789      fi
22790      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22791    fi
22792  fi
22793
22794  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22795  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22796  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22797  # "foo.exe" is OK but "foo" is an error.
22798  #
22799  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22800  # It is also a way to make sure we got the proper file name for the real test later on.
22801  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22802  if test "x$test_shortpath" = x; then
22803    # Short path failed, file does not exist as specified.
22804    # Try adding .exe or .cmd
22805    if test -f "${new_path}.exe"; then
22806       input_to_shortpath="${new_path}.exe"
22807    elif test -f "${new_path}.cmd"; then
22808       input_to_shortpath="${new_path}.cmd"
22809    else
22810      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$new_path\", is invalid." >&5
22811$as_echo "$as_me: The path of WINLD, which resolves as \"$new_path\", is invalid." >&6;}
22812      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
22813$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
22814      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22815    fi
22816  else
22817    input_to_shortpath="$new_path"
22818  fi
22819
22820  # Call helper function which possibly converts this using DOS-style short mode.
22821  # If so, the updated path is stored in $new_path.
22822  new_path="$input_to_shortpath"
22823
22824  input_path="$input_to_shortpath"
22825  # Check if we need to convert this using DOS-style short mode. If the path
22826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22827  # take no chances and rewrite it.
22828  # Note: m4 eats our [], so we need to use [ and ] instead.
22829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22830  if test "x$has_forbidden_chars" != x; then
22831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22835      # Going to short mode and back again did indeed matter. Since short mode is
22836      # case insensitive, let's make it lowercase to improve readability.
22837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22838      # Now convert it back to Unix-stile (cygpath)
22839      input_path=`$CYGPATH -u "$shortmode_path"`
22840      new_path="$input_path"
22841    fi
22842  fi
22843
22844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22845  if test "x$test_cygdrive_prefix" = x; then
22846    # As a simple fix, exclude /usr/bin since it's not a real path.
22847    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
22848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22849      # a path prefixed by /cygdrive for fixpath to work.
22850      new_path="$CYGWIN_ROOT_PATH$input_path"
22851    fi
22852  fi
22853
22854  # remove trailing .exe if any
22855  new_path="${new_path/%.exe/}"
22856
22857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22858
22859  # First separate the path from the arguments. This will split at the first
22860  # space.
22861  complete="$WINLD"
22862  path="${complete%% *}"
22863  tmp="$complete EOL"
22864  arguments="${tmp#* }"
22865
22866  # Input might be given as Windows format, start by converting to
22867  # unix format.
22868  new_path="$path"
22869
22870  windows_path="$new_path"
22871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22872    unix_path=`$CYGPATH -u "$windows_path"`
22873    new_path="$unix_path"
22874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22876    new_path="$unix_path"
22877  fi
22878
22879
22880  # Now try to locate executable using which
22881  new_path=`$WHICH "$new_path" 2> /dev/null`
22882
22883  if test "x$new_path" = x; then
22884    # Oops. Which didn't find the executable.
22885    # The splitting of arguments from the executable at a space might have been incorrect,
22886    # since paths with space are more likely in Windows. Give it another try with the whole
22887    # argument.
22888    path="$complete"
22889    arguments="EOL"
22890    new_path="$path"
22891
22892  windows_path="$new_path"
22893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22894    unix_path=`$CYGPATH -u "$windows_path"`
22895    new_path="$unix_path"
22896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22898    new_path="$unix_path"
22899  fi
22900
22901
22902    new_path=`$WHICH "$new_path" 2> /dev/null`
22903
22904    if test "x$new_path" = x; then
22905      # It's still not found. Now this is an unrecoverable error.
22906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22907$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22908      has_space=`$ECHO "$complete" | $GREP " "`
22909      if test "x$has_space" != x; then
22910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
22911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
22912      fi
22913      as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22914    fi
22915  fi
22916
22917  # Now new_path has a complete unix path to the binary
22918  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
22919    # Keep paths in /bin as-is, but remove trailing .exe if any
22920    new_path="${new_path/%.exe/}"
22921    # Do not save /bin paths to all_fixpath_prefixes!
22922  else
22923    # Not in mixed or Windows style, start by that.
22924    new_path=`cmd //c echo $new_path`
22925
22926  input_path="$new_path"
22927  # Check if we need to convert this using DOS-style short mode. If the path
22928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22929  # take no chances and rewrite it.
22930  # Note: m4 eats our [], so we need to use [ and ] instead.
22931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22932  if test "x$has_forbidden_chars" != x; then
22933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22935  fi
22936
22937    # Output is in $new_path
22938
22939  windows_path="$new_path"
22940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22941    unix_path=`$CYGPATH -u "$windows_path"`
22942    new_path="$unix_path"
22943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22945    new_path="$unix_path"
22946  fi
22947
22948    # remove trailing .exe if any
22949    new_path="${new_path/%.exe/}"
22950
22951    # Save the first 10 bytes of this path to the storage, so fixpath can work.
22952    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22953  fi
22954
22955  else
22956    # We're on a posix platform. Hooray! :)
22957    # First separate the path from the arguments. This will split at the first
22958    # space.
22959    complete="$WINLD"
22960    path="${complete%% *}"
22961    tmp="$complete EOL"
22962    arguments="${tmp#* }"
22963
22964    # Cannot rely on the command "which" here since it doesn't always work.
22965    is_absolute_path=`$ECHO "$path" | $GREP ^/`
22966    if test -z "$is_absolute_path"; then
22967      # Path to executable is not absolute. Find it.
22968      IFS_save="$IFS"
22969      IFS=:
22970      for p in $PATH; do
22971        if test -f "$p/$path" && test -x "$p/$path"; then
22972          new_path="$p/$path"
22973          break
22974        fi
22975      done
22976      IFS="$IFS_save"
22977    else
22978      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINLD (as $path) failed, using $path directly." >&5
22979$as_echo "$as_me: Resolving WINLD (as $path) failed, using $path directly." >&6;}
22980      new_path="$path"
22981    fi
22982
22983    if test "x$new_path" = x; then
22984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINLD, which resolves as \"$complete\", is not found." >&5
22985$as_echo "$as_me: The path of WINLD, which resolves as \"$complete\", is not found." >&6;}
22986        has_space=`$ECHO "$complete" | $GREP " "`
22987        if test "x$has_space" != x; then
22988          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
22989$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
22990        fi
22991        as_fn_error $? "Cannot locate the the path of WINLD" "$LINENO" 5
22992      fi
22993  fi
22994
22995      # Now join together the path and the arguments once again
22996      if test "x$arguments" != xEOL; then
22997        new_complete="$new_path ${arguments% *}"
22998      else
22999        new_complete="$new_path"
23000      fi
23001
23002  if test "x$complete" != "x$new_complete"; then
23003      WINLD="$new_complete"
23004      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINLD to \"$new_complete\"" >&5
23005$as_echo "$as_me: Rewriting WINLD to \"$new_complete\"" >&6;}
23006    fi
23007
23008    printf "Windows linker was found at $WINLD\n"
23009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
23010$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
23011    "$WINLD" --version > /dev/null
23012    if test $? -eq 0 ; then
23013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23014$as_echo "no" >&6; }
23015      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
23016    else
23017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23018$as_echo "yes" >&6; }
23019    fi
23020    LD="$WINLD"
23021    LDEXE="$WINLD"
23022    LDCXX="$WINLD"
23023    LDEXECXX="$WINLD"
23024
23025    # Extract the first word of "mt", so it can be a program name with args.
23026set dummy mt; ac_word=$2
23027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23028$as_echo_n "checking for $ac_word... " >&6; }
23029if test "${ac_cv_prog_MT+set}" = set; then :
23030  $as_echo_n "(cached) " >&6
23031else
23032  if test -n "$MT"; then
23033  ac_cv_prog_MT="$MT" # Let the user override the test.
23034else
23035  ac_prog_rejected=no
23036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23037for as_dir in $PATH
23038do
23039  IFS=$as_save_IFS
23040  test -z "$as_dir" && as_dir=.
23041    for ac_exec_ext in '' $ac_executable_extensions; do
23042  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23043    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
23044       ac_prog_rejected=yes
23045       continue
23046     fi
23047    ac_cv_prog_MT="mt"
23048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23049    break 2
23050  fi
23051done
23052  done
23053IFS=$as_save_IFS
23054
23055if test $ac_prog_rejected = yes; then
23056  # We found a bogon in the path, so make sure we never use it.
23057  set dummy $ac_cv_prog_MT
23058  shift
23059  if test $# != 0; then
23060    # We chose a different compiler from the bogus one.
23061    # However, it has the same basename, so the bogon will be chosen
23062    # first if we set MT to just the basename; use the full file name.
23063    shift
23064    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
23065  fi
23066fi
23067fi
23068fi
23069MT=$ac_cv_prog_MT
23070if test -n "$MT"; then
23071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
23072$as_echo "$MT" >&6; }
23073else
23074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23075$as_echo "no" >&6; }
23076fi
23077
23078
23079
23080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23081
23082  # First separate the path from the arguments. This will split at the first
23083  # space.
23084  complete="$MT"
23085  path="${complete%% *}"
23086  tmp="$complete EOL"
23087  arguments="${tmp#* }"
23088
23089  # Input might be given as Windows format, start by converting to
23090  # unix format.
23091  new_path=`$CYGPATH -u "$path"`
23092
23093  # Now try to locate executable using which
23094  new_path=`$WHICH "$new_path" 2> /dev/null`
23095  # bat and cmd files are not always considered executable in cygwin causing which
23096  # to not find them
23097  if test "x$new_path" = x \
23098           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23099           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23100    new_path=`$CYGPATH -u "$path"`
23101  fi
23102  if test "x$new_path" = x; then
23103    # Oops. Which didn't find the executable.
23104    # The splitting of arguments from the executable at a space might have been incorrect,
23105    # since paths with space are more likely in Windows. Give it another try with the whole
23106    # argument.
23107    path="$complete"
23108    arguments="EOL"
23109    new_path=`$CYGPATH -u "$path"`
23110    new_path=`$WHICH "$new_path" 2> /dev/null`
23111    # bat and cmd files are not always considered executable in cygwin causing which
23112    # to not find them
23113    if test "x$new_path" = x \
23114             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23115             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23116      new_path=`$CYGPATH -u "$path"`
23117    fi
23118    if test "x$new_path" = x; then
23119      # It's still not found. Now this is an unrecoverable error.
23120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23121$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23122      has_space=`$ECHO "$complete" | $GREP " "`
23123      if test "x$has_space" != x; then
23124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23126      fi
23127      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23128    fi
23129  fi
23130
23131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23134  # "foo.exe" is OK but "foo" is an error.
23135  #
23136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23137  # It is also a way to make sure we got the proper file name for the real test later on.
23138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23139  if test "x$test_shortpath" = x; then
23140    # Short path failed, file does not exist as specified.
23141    # Try adding .exe or .cmd
23142    if test -f "${new_path}.exe"; then
23143       input_to_shortpath="${new_path}.exe"
23144    elif test -f "${new_path}.cmd"; then
23145       input_to_shortpath="${new_path}.cmd"
23146    else
23147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
23148$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
23149      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23150$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23151      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23152    fi
23153  else
23154    input_to_shortpath="$new_path"
23155  fi
23156
23157  # Call helper function which possibly converts this using DOS-style short mode.
23158  # If so, the updated path is stored in $new_path.
23159  new_path="$input_to_shortpath"
23160
23161  input_path="$input_to_shortpath"
23162  # Check if we need to convert this using DOS-style short mode. If the path
23163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23164  # take no chances and rewrite it.
23165  # Note: m4 eats our [], so we need to use [ and ] instead.
23166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23167  if test "x$has_forbidden_chars" != x; then
23168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23172      # Going to short mode and back again did indeed matter. Since short mode is
23173      # case insensitive, let's make it lowercase to improve readability.
23174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23175      # Now convert it back to Unix-stile (cygpath)
23176      input_path=`$CYGPATH -u "$shortmode_path"`
23177      new_path="$input_path"
23178    fi
23179  fi
23180
23181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23182  if test "x$test_cygdrive_prefix" = x; then
23183    # As a simple fix, exclude /usr/bin since it's not a real path.
23184    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23186      # a path prefixed by /cygdrive for fixpath to work.
23187      new_path="$CYGWIN_ROOT_PATH$input_path"
23188    fi
23189  fi
23190
23191  # remove trailing .exe if any
23192  new_path="${new_path/%.exe/}"
23193
23194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23195
23196  # First separate the path from the arguments. This will split at the first
23197  # space.
23198  complete="$MT"
23199  path="${complete%% *}"
23200  tmp="$complete EOL"
23201  arguments="${tmp#* }"
23202
23203  # Input might be given as Windows format, start by converting to
23204  # unix format.
23205  new_path="$path"
23206
23207  windows_path="$new_path"
23208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23209    unix_path=`$CYGPATH -u "$windows_path"`
23210    new_path="$unix_path"
23211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23213    new_path="$unix_path"
23214  fi
23215
23216
23217  # Now try to locate executable using which
23218  new_path=`$WHICH "$new_path" 2> /dev/null`
23219
23220  if test "x$new_path" = x; then
23221    # Oops. Which didn't find the executable.
23222    # The splitting of arguments from the executable at a space might have been incorrect,
23223    # since paths with space are more likely in Windows. Give it another try with the whole
23224    # argument.
23225    path="$complete"
23226    arguments="EOL"
23227    new_path="$path"
23228
23229  windows_path="$new_path"
23230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23231    unix_path=`$CYGPATH -u "$windows_path"`
23232    new_path="$unix_path"
23233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23235    new_path="$unix_path"
23236  fi
23237
23238
23239    new_path=`$WHICH "$new_path" 2> /dev/null`
23240
23241    if test "x$new_path" = x; then
23242      # It's still not found. Now this is an unrecoverable error.
23243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23244$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23245      has_space=`$ECHO "$complete" | $GREP " "`
23246      if test "x$has_space" != x; then
23247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23249      fi
23250      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23251    fi
23252  fi
23253
23254  # Now new_path has a complete unix path to the binary
23255  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23256    # Keep paths in /bin as-is, but remove trailing .exe if any
23257    new_path="${new_path/%.exe/}"
23258    # Do not save /bin paths to all_fixpath_prefixes!
23259  else
23260    # Not in mixed or Windows style, start by that.
23261    new_path=`cmd //c echo $new_path`
23262
23263  input_path="$new_path"
23264  # Check if we need to convert this using DOS-style short mode. If the path
23265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23266  # take no chances and rewrite it.
23267  # Note: m4 eats our [], so we need to use [ and ] instead.
23268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23269  if test "x$has_forbidden_chars" != x; then
23270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23272  fi
23273
23274    # Output is in $new_path
23275
23276  windows_path="$new_path"
23277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23278    unix_path=`$CYGPATH -u "$windows_path"`
23279    new_path="$unix_path"
23280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23282    new_path="$unix_path"
23283  fi
23284
23285    # remove trailing .exe if any
23286    new_path="${new_path/%.exe/}"
23287
23288    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23289    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23290  fi
23291
23292  else
23293    # We're on a posix platform. Hooray! :)
23294    # First separate the path from the arguments. This will split at the first
23295    # space.
23296    complete="$MT"
23297    path="${complete%% *}"
23298    tmp="$complete EOL"
23299    arguments="${tmp#* }"
23300
23301    # Cannot rely on the command "which" here since it doesn't always work.
23302    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23303    if test -z "$is_absolute_path"; then
23304      # Path to executable is not absolute. Find it.
23305      IFS_save="$IFS"
23306      IFS=:
23307      for p in $PATH; do
23308        if test -f "$p/$path" && test -x "$p/$path"; then
23309          new_path="$p/$path"
23310          break
23311        fi
23312      done
23313      IFS="$IFS_save"
23314    else
23315      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MT (as $path) failed, using $path directly." >&5
23316$as_echo "$as_me: Resolving MT (as $path) failed, using $path directly." >&6;}
23317      new_path="$path"
23318    fi
23319
23320    if test "x$new_path" = x; then
23321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
23322$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
23323        has_space=`$ECHO "$complete" | $GREP " "`
23324        if test "x$has_space" != x; then
23325          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23326$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23327        fi
23328        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
23329      fi
23330  fi
23331
23332      # Now join together the path and the arguments once again
23333      if test "x$arguments" != xEOL; then
23334        new_complete="$new_path ${arguments% *}"
23335      else
23336        new_complete="$new_path"
23337      fi
23338
23339  if test "x$complete" != "x$new_complete"; then
23340      MT="$new_complete"
23341      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
23342$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
23343    fi
23344
23345    # The resource compiler
23346    # Extract the first word of "rc", so it can be a program name with args.
23347set dummy rc; ac_word=$2
23348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23349$as_echo_n "checking for $ac_word... " >&6; }
23350if test "${ac_cv_prog_RC+set}" = set; then :
23351  $as_echo_n "(cached) " >&6
23352else
23353  if test -n "$RC"; then
23354  ac_cv_prog_RC="$RC" # Let the user override the test.
23355else
23356  ac_prog_rejected=no
23357as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23358for as_dir in $PATH
23359do
23360  IFS=$as_save_IFS
23361  test -z "$as_dir" && as_dir=.
23362    for ac_exec_ext in '' $ac_executable_extensions; do
23363  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23364    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
23365       ac_prog_rejected=yes
23366       continue
23367     fi
23368    ac_cv_prog_RC="rc"
23369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23370    break 2
23371  fi
23372done
23373  done
23374IFS=$as_save_IFS
23375
23376if test $ac_prog_rejected = yes; then
23377  # We found a bogon in the path, so make sure we never use it.
23378  set dummy $ac_cv_prog_RC
23379  shift
23380  if test $# != 0; then
23381    # We chose a different compiler from the bogus one.
23382    # However, it has the same basename, so the bogon will be chosen
23383    # first if we set RC to just the basename; use the full file name.
23384    shift
23385    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
23386  fi
23387fi
23388fi
23389fi
23390RC=$ac_cv_prog_RC
23391if test -n "$RC"; then
23392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
23393$as_echo "$RC" >&6; }
23394else
23395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23396$as_echo "no" >&6; }
23397fi
23398
23399
23400
23401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23402
23403  # First separate the path from the arguments. This will split at the first
23404  # space.
23405  complete="$RC"
23406  path="${complete%% *}"
23407  tmp="$complete EOL"
23408  arguments="${tmp#* }"
23409
23410  # Input might be given as Windows format, start by converting to
23411  # unix format.
23412  new_path=`$CYGPATH -u "$path"`
23413
23414  # Now try to locate executable using which
23415  new_path=`$WHICH "$new_path" 2> /dev/null`
23416  # bat and cmd files are not always considered executable in cygwin causing which
23417  # to not find them
23418  if test "x$new_path" = x \
23419           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23420           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23421    new_path=`$CYGPATH -u "$path"`
23422  fi
23423  if test "x$new_path" = x; then
23424    # Oops. Which didn't find the executable.
23425    # The splitting of arguments from the executable at a space might have been incorrect,
23426    # since paths with space are more likely in Windows. Give it another try with the whole
23427    # argument.
23428    path="$complete"
23429    arguments="EOL"
23430    new_path=`$CYGPATH -u "$path"`
23431    new_path=`$WHICH "$new_path" 2> /dev/null`
23432    # bat and cmd files are not always considered executable in cygwin causing which
23433    # to not find them
23434    if test "x$new_path" = x \
23435             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23436             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23437      new_path=`$CYGPATH -u "$path"`
23438    fi
23439    if test "x$new_path" = x; then
23440      # It's still not found. Now this is an unrecoverable error.
23441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23442$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23443      has_space=`$ECHO "$complete" | $GREP " "`
23444      if test "x$has_space" != x; then
23445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23447      fi
23448      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23449    fi
23450  fi
23451
23452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23455  # "foo.exe" is OK but "foo" is an error.
23456  #
23457  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23458  # It is also a way to make sure we got the proper file name for the real test later on.
23459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23460  if test "x$test_shortpath" = x; then
23461    # Short path failed, file does not exist as specified.
23462    # Try adding .exe or .cmd
23463    if test -f "${new_path}.exe"; then
23464       input_to_shortpath="${new_path}.exe"
23465    elif test -f "${new_path}.cmd"; then
23466       input_to_shortpath="${new_path}.cmd"
23467    else
23468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
23469$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
23470      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23471$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23472      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23473    fi
23474  else
23475    input_to_shortpath="$new_path"
23476  fi
23477
23478  # Call helper function which possibly converts this using DOS-style short mode.
23479  # If so, the updated path is stored in $new_path.
23480  new_path="$input_to_shortpath"
23481
23482  input_path="$input_to_shortpath"
23483  # Check if we need to convert this using DOS-style short mode. If the path
23484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23485  # take no chances and rewrite it.
23486  # Note: m4 eats our [], so we need to use [ and ] instead.
23487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23488  if test "x$has_forbidden_chars" != x; then
23489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23493      # Going to short mode and back again did indeed matter. Since short mode is
23494      # case insensitive, let's make it lowercase to improve readability.
23495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23496      # Now convert it back to Unix-stile (cygpath)
23497      input_path=`$CYGPATH -u "$shortmode_path"`
23498      new_path="$input_path"
23499    fi
23500  fi
23501
23502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23503  if test "x$test_cygdrive_prefix" = x; then
23504    # As a simple fix, exclude /usr/bin since it's not a real path.
23505    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23507      # a path prefixed by /cygdrive for fixpath to work.
23508      new_path="$CYGWIN_ROOT_PATH$input_path"
23509    fi
23510  fi
23511
23512  # remove trailing .exe if any
23513  new_path="${new_path/%.exe/}"
23514
23515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23516
23517  # First separate the path from the arguments. This will split at the first
23518  # space.
23519  complete="$RC"
23520  path="${complete%% *}"
23521  tmp="$complete EOL"
23522  arguments="${tmp#* }"
23523
23524  # Input might be given as Windows format, start by converting to
23525  # unix format.
23526  new_path="$path"
23527
23528  windows_path="$new_path"
23529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23530    unix_path=`$CYGPATH -u "$windows_path"`
23531    new_path="$unix_path"
23532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23534    new_path="$unix_path"
23535  fi
23536
23537
23538  # Now try to locate executable using which
23539  new_path=`$WHICH "$new_path" 2> /dev/null`
23540
23541  if test "x$new_path" = x; then
23542    # Oops. Which didn't find the executable.
23543    # The splitting of arguments from the executable at a space might have been incorrect,
23544    # since paths with space are more likely in Windows. Give it another try with the whole
23545    # argument.
23546    path="$complete"
23547    arguments="EOL"
23548    new_path="$path"
23549
23550  windows_path="$new_path"
23551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23552    unix_path=`$CYGPATH -u "$windows_path"`
23553    new_path="$unix_path"
23554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23556    new_path="$unix_path"
23557  fi
23558
23559
23560    new_path=`$WHICH "$new_path" 2> /dev/null`
23561
23562    if test "x$new_path" = x; then
23563      # It's still not found. Now this is an unrecoverable error.
23564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23565$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23566      has_space=`$ECHO "$complete" | $GREP " "`
23567      if test "x$has_space" != x; then
23568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23570      fi
23571      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23572    fi
23573  fi
23574
23575  # Now new_path has a complete unix path to the binary
23576  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23577    # Keep paths in /bin as-is, but remove trailing .exe if any
23578    new_path="${new_path/%.exe/}"
23579    # Do not save /bin paths to all_fixpath_prefixes!
23580  else
23581    # Not in mixed or Windows style, start by that.
23582    new_path=`cmd //c echo $new_path`
23583
23584  input_path="$new_path"
23585  # Check if we need to convert this using DOS-style short mode. If the path
23586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23587  # take no chances and rewrite it.
23588  # Note: m4 eats our [], so we need to use [ and ] instead.
23589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23590  if test "x$has_forbidden_chars" != x; then
23591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23592    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23593  fi
23594
23595    # Output is in $new_path
23596
23597  windows_path="$new_path"
23598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23599    unix_path=`$CYGPATH -u "$windows_path"`
23600    new_path="$unix_path"
23601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23603    new_path="$unix_path"
23604  fi
23605
23606    # remove trailing .exe if any
23607    new_path="${new_path/%.exe/}"
23608
23609    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23610    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23611  fi
23612
23613  else
23614    # We're on a posix platform. Hooray! :)
23615    # First separate the path from the arguments. This will split at the first
23616    # space.
23617    complete="$RC"
23618    path="${complete%% *}"
23619    tmp="$complete EOL"
23620    arguments="${tmp#* }"
23621
23622    # Cannot rely on the command "which" here since it doesn't always work.
23623    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23624    if test -z "$is_absolute_path"; then
23625      # Path to executable is not absolute. Find it.
23626      IFS_save="$IFS"
23627      IFS=:
23628      for p in $PATH; do
23629        if test -f "$p/$path" && test -x "$p/$path"; then
23630          new_path="$p/$path"
23631          break
23632        fi
23633      done
23634      IFS="$IFS_save"
23635    else
23636      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving RC (as $path) failed, using $path directly." >&5
23637$as_echo "$as_me: Resolving RC (as $path) failed, using $path directly." >&6;}
23638      new_path="$path"
23639    fi
23640
23641    if test "x$new_path" = x; then
23642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
23643$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
23644        has_space=`$ECHO "$complete" | $GREP " "`
23645        if test "x$has_space" != x; then
23646          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
23647$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
23648        fi
23649        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
23650      fi
23651  fi
23652
23653      # Now join together the path and the arguments once again
23654      if test "x$arguments" != xEOL; then
23655        new_complete="$new_path ${arguments% *}"
23656      else
23657        new_complete="$new_path"
23658      fi
23659
23660  if test "x$complete" != "x$new_complete"; then
23661      RC="$new_complete"
23662      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
23663$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
23664    fi
23665
23666
23667    # For hotspot, we need these in Windows mixed path,
23668    # so rewrite them all. Need added .exe suffix.
23669    HOTSPOT_CXX="$CXX.exe"
23670    HOTSPOT_LD="$LD.exe"
23671    HOTSPOT_MT="$MT.exe"
23672    HOTSPOT_RC="$RC.exe"
23673
23674  unix_path="$HOTSPOT_CXX"
23675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23676    windows_path=`$CYGPATH -m "$unix_path"`
23677    HOTSPOT_CXX="$windows_path"
23678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23679    windows_path=`cmd //c echo $unix_path`
23680    HOTSPOT_CXX="$windows_path"
23681  fi
23682
23683
23684  unix_path="$HOTSPOT_LD"
23685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23686    windows_path=`$CYGPATH -m "$unix_path"`
23687    HOTSPOT_LD="$windows_path"
23688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23689    windows_path=`cmd //c echo $unix_path`
23690    HOTSPOT_LD="$windows_path"
23691  fi
23692
23693
23694  unix_path="$HOTSPOT_MT"
23695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23696    windows_path=`$CYGPATH -m "$unix_path"`
23697    HOTSPOT_MT="$windows_path"
23698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23699    windows_path=`cmd //c echo $unix_path`
23700    HOTSPOT_MT="$windows_path"
23701  fi
23702
23703
23704  unix_path="$HOTSPOT_RC"
23705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23706    windows_path=`$CYGPATH -m "$unix_path"`
23707    HOTSPOT_RC="$windows_path"
23708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23709    windows_path=`cmd //c echo $unix_path`
23710    HOTSPOT_RC="$windows_path"
23711  fi
23712
23713
23714
23715
23716    RC_FLAGS="-nologo -l 0x409 -r"
23717    if test "x$VARIANT" = xOPT; then :
23718
23719        RC_FLAGS="$RC_FLAGS -d NDEBUG"
23720
23721fi
23722    JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION
23723    if test "x$JDK_UPDATE_VERSION" = x; then :
23724
23725        JDK_UPDATE_VERSION_NOTNULL=0
23726
23727fi
23728    RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\""
23729    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\""
23730    RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\""
23731    RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\""
23732    RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\""
23733    RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\""
23734    RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\""
23735
23736    # lib.exe is used to create static libraries.
23737    # Extract the first word of "lib", so it can be a program name with args.
23738set dummy lib; ac_word=$2
23739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23740$as_echo_n "checking for $ac_word... " >&6; }
23741if test "${ac_cv_prog_WINAR+set}" = set; then :
23742  $as_echo_n "(cached) " >&6
23743else
23744  if test -n "$WINAR"; then
23745  ac_cv_prog_WINAR="$WINAR" # Let the user override the test.
23746else
23747as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23748for as_dir in $PATH
23749do
23750  IFS=$as_save_IFS
23751  test -z "$as_dir" && as_dir=.
23752    for ac_exec_ext in '' $ac_executable_extensions; do
23753  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
23754    ac_cv_prog_WINAR="lib"
23755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23756    break 2
23757  fi
23758done
23759  done
23760IFS=$as_save_IFS
23761
23762fi
23763fi
23764WINAR=$ac_cv_prog_WINAR
23765if test -n "$WINAR"; then
23766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINAR" >&5
23767$as_echo "$WINAR" >&6; }
23768else
23769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23770$as_echo "no" >&6; }
23771fi
23772
23773
23774
23775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23776
23777  # First separate the path from the arguments. This will split at the first
23778  # space.
23779  complete="$WINAR"
23780  path="${complete%% *}"
23781  tmp="$complete EOL"
23782  arguments="${tmp#* }"
23783
23784  # Input might be given as Windows format, start by converting to
23785  # unix format.
23786  new_path=`$CYGPATH -u "$path"`
23787
23788  # Now try to locate executable using which
23789  new_path=`$WHICH "$new_path" 2> /dev/null`
23790  # bat and cmd files are not always considered executable in cygwin causing which
23791  # to not find them
23792  if test "x$new_path" = x \
23793           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23794           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23795    new_path=`$CYGPATH -u "$path"`
23796  fi
23797  if test "x$new_path" = x; then
23798    # Oops. Which didn't find the executable.
23799    # The splitting of arguments from the executable at a space might have been incorrect,
23800    # since paths with space are more likely in Windows. Give it another try with the whole
23801    # argument.
23802    path="$complete"
23803    arguments="EOL"
23804    new_path=`$CYGPATH -u "$path"`
23805    new_path=`$WHICH "$new_path" 2> /dev/null`
23806    # bat and cmd files are not always considered executable in cygwin causing which
23807    # to not find them
23808    if test "x$new_path" = x \
23809             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
23810             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
23811      new_path=`$CYGPATH -u "$path"`
23812    fi
23813    if test "x$new_path" = x; then
23814      # It's still not found. Now this is an unrecoverable error.
23815      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23816$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23817      has_space=`$ECHO "$complete" | $GREP " "`
23818      if test "x$has_space" != x; then
23819        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23820$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23821      fi
23822      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23823    fi
23824  fi
23825
23826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23829  # "foo.exe" is OK but "foo" is an error.
23830  #
23831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23832  # It is also a way to make sure we got the proper file name for the real test later on.
23833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23834  if test "x$test_shortpath" = x; then
23835    # Short path failed, file does not exist as specified.
23836    # Try adding .exe or .cmd
23837    if test -f "${new_path}.exe"; then
23838       input_to_shortpath="${new_path}.exe"
23839    elif test -f "${new_path}.cmd"; then
23840       input_to_shortpath="${new_path}.cmd"
23841    else
23842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$new_path\", is invalid." >&5
23843$as_echo "$as_me: The path of WINAR, which resolves as \"$new_path\", is invalid." >&6;}
23844      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
23845$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
23846      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23847    fi
23848  else
23849    input_to_shortpath="$new_path"
23850  fi
23851
23852  # Call helper function which possibly converts this using DOS-style short mode.
23853  # If so, the updated path is stored in $new_path.
23854  new_path="$input_to_shortpath"
23855
23856  input_path="$input_to_shortpath"
23857  # Check if we need to convert this using DOS-style short mode. If the path
23858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23859  # take no chances and rewrite it.
23860  # Note: m4 eats our [], so we need to use [ and ] instead.
23861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23862  if test "x$has_forbidden_chars" != x; then
23863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23864    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23865    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23866    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23867      # Going to short mode and back again did indeed matter. Since short mode is
23868      # case insensitive, let's make it lowercase to improve readability.
23869      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23870      # Now convert it back to Unix-stile (cygpath)
23871      input_path=`$CYGPATH -u "$shortmode_path"`
23872      new_path="$input_path"
23873    fi
23874  fi
23875
23876  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23877  if test "x$test_cygdrive_prefix" = x; then
23878    # As a simple fix, exclude /usr/bin since it's not a real path.
23879    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
23880      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23881      # a path prefixed by /cygdrive for fixpath to work.
23882      new_path="$CYGWIN_ROOT_PATH$input_path"
23883    fi
23884  fi
23885
23886  # remove trailing .exe if any
23887  new_path="${new_path/%.exe/}"
23888
23889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23890
23891  # First separate the path from the arguments. This will split at the first
23892  # space.
23893  complete="$WINAR"
23894  path="${complete%% *}"
23895  tmp="$complete EOL"
23896  arguments="${tmp#* }"
23897
23898  # Input might be given as Windows format, start by converting to
23899  # unix format.
23900  new_path="$path"
23901
23902  windows_path="$new_path"
23903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23904    unix_path=`$CYGPATH -u "$windows_path"`
23905    new_path="$unix_path"
23906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23908    new_path="$unix_path"
23909  fi
23910
23911
23912  # Now try to locate executable using which
23913  new_path=`$WHICH "$new_path" 2> /dev/null`
23914
23915  if test "x$new_path" = x; then
23916    # Oops. Which didn't find the executable.
23917    # The splitting of arguments from the executable at a space might have been incorrect,
23918    # since paths with space are more likely in Windows. Give it another try with the whole
23919    # argument.
23920    path="$complete"
23921    arguments="EOL"
23922    new_path="$path"
23923
23924  windows_path="$new_path"
23925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23926    unix_path=`$CYGPATH -u "$windows_path"`
23927    new_path="$unix_path"
23928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23930    new_path="$unix_path"
23931  fi
23932
23933
23934    new_path=`$WHICH "$new_path" 2> /dev/null`
23935
23936    if test "x$new_path" = x; then
23937      # It's still not found. Now this is an unrecoverable error.
23938      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
23939$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
23940      has_space=`$ECHO "$complete" | $GREP " "`
23941      if test "x$has_space" != x; then
23942        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
23943$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
23944      fi
23945      as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
23946    fi
23947  fi
23948
23949  # Now new_path has a complete unix path to the binary
23950  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
23951    # Keep paths in /bin as-is, but remove trailing .exe if any
23952    new_path="${new_path/%.exe/}"
23953    # Do not save /bin paths to all_fixpath_prefixes!
23954  else
23955    # Not in mixed or Windows style, start by that.
23956    new_path=`cmd //c echo $new_path`
23957
23958  input_path="$new_path"
23959  # Check if we need to convert this using DOS-style short mode. If the path
23960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23961  # take no chances and rewrite it.
23962  # Note: m4 eats our [], so we need to use [ and ] instead.
23963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23964  if test "x$has_forbidden_chars" != x; then
23965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23967  fi
23968
23969    # Output is in $new_path
23970
23971  windows_path="$new_path"
23972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23973    unix_path=`$CYGPATH -u "$windows_path"`
23974    new_path="$unix_path"
23975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23977    new_path="$unix_path"
23978  fi
23979
23980    # remove trailing .exe if any
23981    new_path="${new_path/%.exe/}"
23982
23983    # Save the first 10 bytes of this path to the storage, so fixpath can work.
23984    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23985  fi
23986
23987  else
23988    # We're on a posix platform. Hooray! :)
23989    # First separate the path from the arguments. This will split at the first
23990    # space.
23991    complete="$WINAR"
23992    path="${complete%% *}"
23993    tmp="$complete EOL"
23994    arguments="${tmp#* }"
23995
23996    # Cannot rely on the command "which" here since it doesn't always work.
23997    is_absolute_path=`$ECHO "$path" | $GREP ^/`
23998    if test -z "$is_absolute_path"; then
23999      # Path to executable is not absolute. Find it.
24000      IFS_save="$IFS"
24001      IFS=:
24002      for p in $PATH; do
24003        if test -f "$p/$path" && test -x "$p/$path"; then
24004          new_path="$p/$path"
24005          break
24006        fi
24007      done
24008      IFS="$IFS_save"
24009    else
24010      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving WINAR (as $path) failed, using $path directly." >&5
24011$as_echo "$as_me: Resolving WINAR (as $path) failed, using $path directly." >&6;}
24012      new_path="$path"
24013    fi
24014
24015    if test "x$new_path" = x; then
24016        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of WINAR, which resolves as \"$complete\", is not found." >&5
24017$as_echo "$as_me: The path of WINAR, which resolves as \"$complete\", is not found." >&6;}
24018        has_space=`$ECHO "$complete" | $GREP " "`
24019        if test "x$has_space" != x; then
24020          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24021$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24022        fi
24023        as_fn_error $? "Cannot locate the the path of WINAR" "$LINENO" 5
24024      fi
24025  fi
24026
24027      # Now join together the path and the arguments once again
24028      if test "x$arguments" != xEOL; then
24029        new_complete="$new_path ${arguments% *}"
24030      else
24031        new_complete="$new_path"
24032      fi
24033
24034  if test "x$complete" != "x$new_complete"; then
24035      WINAR="$new_complete"
24036      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting WINAR to \"$new_complete\"" >&5
24037$as_echo "$as_me: Rewriting WINAR to \"$new_complete\"" >&6;}
24038    fi
24039
24040    AR="$WINAR"
24041    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
24042
24043    # Extract the first word of "dumpbin", so it can be a program name with args.
24044set dummy dumpbin; ac_word=$2
24045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24046$as_echo_n "checking for $ac_word... " >&6; }
24047if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
24048  $as_echo_n "(cached) " >&6
24049else
24050  if test -n "$DUMPBIN"; then
24051  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
24052else
24053as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24054for as_dir in $PATH
24055do
24056  IFS=$as_save_IFS
24057  test -z "$as_dir" && as_dir=.
24058    for ac_exec_ext in '' $ac_executable_extensions; do
24059  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
24060    ac_cv_prog_DUMPBIN="dumpbin"
24061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24062    break 2
24063  fi
24064done
24065  done
24066IFS=$as_save_IFS
24067
24068fi
24069fi
24070DUMPBIN=$ac_cv_prog_DUMPBIN
24071if test -n "$DUMPBIN"; then
24072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
24073$as_echo "$DUMPBIN" >&6; }
24074else
24075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24076$as_echo "no" >&6; }
24077fi
24078
24079
24080
24081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24082
24083  # First separate the path from the arguments. This will split at the first
24084  # space.
24085  complete="$DUMPBIN"
24086  path="${complete%% *}"
24087  tmp="$complete EOL"
24088  arguments="${tmp#* }"
24089
24090  # Input might be given as Windows format, start by converting to
24091  # unix format.
24092  new_path=`$CYGPATH -u "$path"`
24093
24094  # Now try to locate executable using which
24095  new_path=`$WHICH "$new_path" 2> /dev/null`
24096  # bat and cmd files are not always considered executable in cygwin causing which
24097  # to not find them
24098  if test "x$new_path" = x \
24099           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24100           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24101    new_path=`$CYGPATH -u "$path"`
24102  fi
24103  if test "x$new_path" = x; then
24104    # Oops. Which didn't find the executable.
24105    # The splitting of arguments from the executable at a space might have been incorrect,
24106    # since paths with space are more likely in Windows. Give it another try with the whole
24107    # argument.
24108    path="$complete"
24109    arguments="EOL"
24110    new_path=`$CYGPATH -u "$path"`
24111    new_path=`$WHICH "$new_path" 2> /dev/null`
24112    # bat and cmd files are not always considered executable in cygwin causing which
24113    # to not find them
24114    if test "x$new_path" = x \
24115             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24116             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24117      new_path=`$CYGPATH -u "$path"`
24118    fi
24119    if test "x$new_path" = x; then
24120      # It's still not found. Now this is an unrecoverable error.
24121      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24122$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24123      has_space=`$ECHO "$complete" | $GREP " "`
24124      if test "x$has_space" != x; then
24125        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24126$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24127      fi
24128      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24129    fi
24130  fi
24131
24132  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24133  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24134  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24135  # "foo.exe" is OK but "foo" is an error.
24136  #
24137  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24138  # It is also a way to make sure we got the proper file name for the real test later on.
24139  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24140  if test "x$test_shortpath" = x; then
24141    # Short path failed, file does not exist as specified.
24142    # Try adding .exe or .cmd
24143    if test -f "${new_path}.exe"; then
24144       input_to_shortpath="${new_path}.exe"
24145    elif test -f "${new_path}.cmd"; then
24146       input_to_shortpath="${new_path}.cmd"
24147    else
24148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
24149$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
24150      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24151$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24152      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24153    fi
24154  else
24155    input_to_shortpath="$new_path"
24156  fi
24157
24158  # Call helper function which possibly converts this using DOS-style short mode.
24159  # If so, the updated path is stored in $new_path.
24160  new_path="$input_to_shortpath"
24161
24162  input_path="$input_to_shortpath"
24163  # Check if we need to convert this using DOS-style short mode. If the path
24164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24165  # take no chances and rewrite it.
24166  # Note: m4 eats our [], so we need to use [ and ] instead.
24167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24168  if test "x$has_forbidden_chars" != x; then
24169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24170    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24171    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24172    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24173      # Going to short mode and back again did indeed matter. Since short mode is
24174      # case insensitive, let's make it lowercase to improve readability.
24175      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24176      # Now convert it back to Unix-stile (cygpath)
24177      input_path=`$CYGPATH -u "$shortmode_path"`
24178      new_path="$input_path"
24179    fi
24180  fi
24181
24182  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24183  if test "x$test_cygdrive_prefix" = x; then
24184    # As a simple fix, exclude /usr/bin since it's not a real path.
24185    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24186      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24187      # a path prefixed by /cygdrive for fixpath to work.
24188      new_path="$CYGWIN_ROOT_PATH$input_path"
24189    fi
24190  fi
24191
24192  # remove trailing .exe if any
24193  new_path="${new_path/%.exe/}"
24194
24195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24196
24197  # First separate the path from the arguments. This will split at the first
24198  # space.
24199  complete="$DUMPBIN"
24200  path="${complete%% *}"
24201  tmp="$complete EOL"
24202  arguments="${tmp#* }"
24203
24204  # Input might be given as Windows format, start by converting to
24205  # unix format.
24206  new_path="$path"
24207
24208  windows_path="$new_path"
24209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24210    unix_path=`$CYGPATH -u "$windows_path"`
24211    new_path="$unix_path"
24212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24214    new_path="$unix_path"
24215  fi
24216
24217
24218  # Now try to locate executable using which
24219  new_path=`$WHICH "$new_path" 2> /dev/null`
24220
24221  if test "x$new_path" = x; then
24222    # Oops. Which didn't find the executable.
24223    # The splitting of arguments from the executable at a space might have been incorrect,
24224    # since paths with space are more likely in Windows. Give it another try with the whole
24225    # argument.
24226    path="$complete"
24227    arguments="EOL"
24228    new_path="$path"
24229
24230  windows_path="$new_path"
24231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24232    unix_path=`$CYGPATH -u "$windows_path"`
24233    new_path="$unix_path"
24234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24236    new_path="$unix_path"
24237  fi
24238
24239
24240    new_path=`$WHICH "$new_path" 2> /dev/null`
24241
24242    if test "x$new_path" = x; then
24243      # It's still not found. Now this is an unrecoverable error.
24244      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24245$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24246      has_space=`$ECHO "$complete" | $GREP " "`
24247      if test "x$has_space" != x; then
24248        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24249$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24250      fi
24251      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24252    fi
24253  fi
24254
24255  # Now new_path has a complete unix path to the binary
24256  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24257    # Keep paths in /bin as-is, but remove trailing .exe if any
24258    new_path="${new_path/%.exe/}"
24259    # Do not save /bin paths to all_fixpath_prefixes!
24260  else
24261    # Not in mixed or Windows style, start by that.
24262    new_path=`cmd //c echo $new_path`
24263
24264  input_path="$new_path"
24265  # Check if we need to convert this using DOS-style short mode. If the path
24266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24267  # take no chances and rewrite it.
24268  # Note: m4 eats our [], so we need to use [ and ] instead.
24269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24270  if test "x$has_forbidden_chars" != x; then
24271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24273  fi
24274
24275    # Output is in $new_path
24276
24277  windows_path="$new_path"
24278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24279    unix_path=`$CYGPATH -u "$windows_path"`
24280    new_path="$unix_path"
24281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24283    new_path="$unix_path"
24284  fi
24285
24286    # remove trailing .exe if any
24287    new_path="${new_path/%.exe/}"
24288
24289    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24290    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24291  fi
24292
24293  else
24294    # We're on a posix platform. Hooray! :)
24295    # First separate the path from the arguments. This will split at the first
24296    # space.
24297    complete="$DUMPBIN"
24298    path="${complete%% *}"
24299    tmp="$complete EOL"
24300    arguments="${tmp#* }"
24301
24302    # Cannot rely on the command "which" here since it doesn't always work.
24303    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24304    if test -z "$is_absolute_path"; then
24305      # Path to executable is not absolute. Find it.
24306      IFS_save="$IFS"
24307      IFS=:
24308      for p in $PATH; do
24309        if test -f "$p/$path" && test -x "$p/$path"; then
24310          new_path="$p/$path"
24311          break
24312        fi
24313      done
24314      IFS="$IFS_save"
24315    else
24316      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving DUMPBIN (as $path) failed, using $path directly." >&5
24317$as_echo "$as_me: Resolving DUMPBIN (as $path) failed, using $path directly." >&6;}
24318      new_path="$path"
24319    fi
24320
24321    if test "x$new_path" = x; then
24322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
24323$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
24324        has_space=`$ECHO "$complete" | $GREP " "`
24325        if test "x$has_space" != x; then
24326          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24327$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24328        fi
24329        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
24330      fi
24331  fi
24332
24333      # Now join together the path and the arguments once again
24334      if test "x$arguments" != xEOL; then
24335        new_complete="$new_path ${arguments% *}"
24336      else
24337        new_complete="$new_path"
24338      fi
24339
24340  if test "x$complete" != "x$new_complete"; then
24341      DUMPBIN="$new_complete"
24342      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
24343$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
24344    fi
24345
24346
24347    COMPILER_TYPE=CL
24348    CCXXFLAGS="$CCXXFLAGS -nologo"
24349
24350fi
24351
24352
24353
24354ac_ext=c
24355ac_cpp='$CPP $CPPFLAGS'
24356ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24357ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24358ac_compiler_gnu=$ac_cv_c_compiler_gnu
24359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
24360$as_echo_n "checking how to run the C preprocessor... " >&6; }
24361# On Suns, sometimes $CPP names a directory.
24362if test -n "$CPP" && test -d "$CPP"; then
24363  CPP=
24364fi
24365if test -z "$CPP"; then
24366  if test "${ac_cv_prog_CPP+set}" = set; then :
24367  $as_echo_n "(cached) " >&6
24368else
24369      # Double quotes because CPP needs to be expanded
24370    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
24371    do
24372      ac_preproc_ok=false
24373for ac_c_preproc_warn_flag in '' yes
24374do
24375  # Use a header file that comes with gcc, so configuring glibc
24376  # with a fresh cross-compiler works.
24377  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24378  # <limits.h> exists even on freestanding compilers.
24379  # On the NeXT, cc -E runs the code through the compiler's parser,
24380  # not just through cpp. "Syntax error" is here to catch this case.
24381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24382/* end confdefs.h.  */
24383#ifdef __STDC__
24384# include <limits.h>
24385#else
24386# include <assert.h>
24387#endif
24388		     Syntax error
24389_ACEOF
24390if ac_fn_c_try_cpp "$LINENO"; then :
24391
24392else
24393  # Broken: fails on valid input.
24394continue
24395fi
24396rm -f conftest.err conftest.i conftest.$ac_ext
24397
24398  # OK, works on sane cases.  Now check whether nonexistent headers
24399  # can be detected and how.
24400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24401/* end confdefs.h.  */
24402#include <ac_nonexistent.h>
24403_ACEOF
24404if ac_fn_c_try_cpp "$LINENO"; then :
24405  # Broken: success on invalid input.
24406continue
24407else
24408  # Passes both tests.
24409ac_preproc_ok=:
24410break
24411fi
24412rm -f conftest.err conftest.i conftest.$ac_ext
24413
24414done
24415# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24416rm -f conftest.i conftest.err conftest.$ac_ext
24417if $ac_preproc_ok; then :
24418  break
24419fi
24420
24421    done
24422    ac_cv_prog_CPP=$CPP
24423
24424fi
24425  CPP=$ac_cv_prog_CPP
24426else
24427  ac_cv_prog_CPP=$CPP
24428fi
24429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
24430$as_echo "$CPP" >&6; }
24431ac_preproc_ok=false
24432for ac_c_preproc_warn_flag in '' yes
24433do
24434  # Use a header file that comes with gcc, so configuring glibc
24435  # with a fresh cross-compiler works.
24436  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24437  # <limits.h> exists even on freestanding compilers.
24438  # On the NeXT, cc -E runs the code through the compiler's parser,
24439  # not just through cpp. "Syntax error" is here to catch this case.
24440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24441/* end confdefs.h.  */
24442#ifdef __STDC__
24443# include <limits.h>
24444#else
24445# include <assert.h>
24446#endif
24447		     Syntax error
24448_ACEOF
24449if ac_fn_c_try_cpp "$LINENO"; then :
24450
24451else
24452  # Broken: fails on valid input.
24453continue
24454fi
24455rm -f conftest.err conftest.i conftest.$ac_ext
24456
24457  # OK, works on sane cases.  Now check whether nonexistent headers
24458  # can be detected and how.
24459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24460/* end confdefs.h.  */
24461#include <ac_nonexistent.h>
24462_ACEOF
24463if ac_fn_c_try_cpp "$LINENO"; then :
24464  # Broken: success on invalid input.
24465continue
24466else
24467  # Passes both tests.
24468ac_preproc_ok=:
24469break
24470fi
24471rm -f conftest.err conftest.i conftest.$ac_ext
24472
24473done
24474# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24475rm -f conftest.i conftest.err conftest.$ac_ext
24476if $ac_preproc_ok; then :
24477
24478else
24479  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24480$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24481as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
24482See \`config.log' for more details" "$LINENO" 5; }
24483fi
24484
24485ac_ext=cpp
24486ac_cpp='$CXXCPP $CPPFLAGS'
24487ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24488ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24489ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24490
24491
24492  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24493
24494  # First separate the path from the arguments. This will split at the first
24495  # space.
24496  complete="$CPP"
24497  path="${complete%% *}"
24498  tmp="$complete EOL"
24499  arguments="${tmp#* }"
24500
24501  # Input might be given as Windows format, start by converting to
24502  # unix format.
24503  new_path=`$CYGPATH -u "$path"`
24504
24505  # Now try to locate executable using which
24506  new_path=`$WHICH "$new_path" 2> /dev/null`
24507  # bat and cmd files are not always considered executable in cygwin causing which
24508  # to not find them
24509  if test "x$new_path" = x \
24510           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24511           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24512    new_path=`$CYGPATH -u "$path"`
24513  fi
24514  if test "x$new_path" = x; then
24515    # Oops. Which didn't find the executable.
24516    # The splitting of arguments from the executable at a space might have been incorrect,
24517    # since paths with space are more likely in Windows. Give it another try with the whole
24518    # argument.
24519    path="$complete"
24520    arguments="EOL"
24521    new_path=`$CYGPATH -u "$path"`
24522    new_path=`$WHICH "$new_path" 2> /dev/null`
24523    # bat and cmd files are not always considered executable in cygwin causing which
24524    # to not find them
24525    if test "x$new_path" = x \
24526             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24527             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24528      new_path=`$CYGPATH -u "$path"`
24529    fi
24530    if test "x$new_path" = x; then
24531      # It's still not found. Now this is an unrecoverable error.
24532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24533$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24534      has_space=`$ECHO "$complete" | $GREP " "`
24535      if test "x$has_space" != x; then
24536        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24537$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24538      fi
24539      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24540    fi
24541  fi
24542
24543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24546  # "foo.exe" is OK but "foo" is an error.
24547  #
24548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24549  # It is also a way to make sure we got the proper file name for the real test later on.
24550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24551  if test "x$test_shortpath" = x; then
24552    # Short path failed, file does not exist as specified.
24553    # Try adding .exe or .cmd
24554    if test -f "${new_path}.exe"; then
24555       input_to_shortpath="${new_path}.exe"
24556    elif test -f "${new_path}.cmd"; then
24557       input_to_shortpath="${new_path}.cmd"
24558    else
24559      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
24560$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
24561      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24562$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24563      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24564    fi
24565  else
24566    input_to_shortpath="$new_path"
24567  fi
24568
24569  # Call helper function which possibly converts this using DOS-style short mode.
24570  # If so, the updated path is stored in $new_path.
24571  new_path="$input_to_shortpath"
24572
24573  input_path="$input_to_shortpath"
24574  # Check if we need to convert this using DOS-style short mode. If the path
24575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24576  # take no chances and rewrite it.
24577  # Note: m4 eats our [], so we need to use [ and ] instead.
24578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24579  if test "x$has_forbidden_chars" != x; then
24580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24584      # Going to short mode and back again did indeed matter. Since short mode is
24585      # case insensitive, let's make it lowercase to improve readability.
24586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24587      # Now convert it back to Unix-stile (cygpath)
24588      input_path=`$CYGPATH -u "$shortmode_path"`
24589      new_path="$input_path"
24590    fi
24591  fi
24592
24593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24594  if test "x$test_cygdrive_prefix" = x; then
24595    # As a simple fix, exclude /usr/bin since it's not a real path.
24596    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24598      # a path prefixed by /cygdrive for fixpath to work.
24599      new_path="$CYGWIN_ROOT_PATH$input_path"
24600    fi
24601  fi
24602
24603  # remove trailing .exe if any
24604  new_path="${new_path/%.exe/}"
24605
24606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24607
24608  # First separate the path from the arguments. This will split at the first
24609  # space.
24610  complete="$CPP"
24611  path="${complete%% *}"
24612  tmp="$complete EOL"
24613  arguments="${tmp#* }"
24614
24615  # Input might be given as Windows format, start by converting to
24616  # unix format.
24617  new_path="$path"
24618
24619  windows_path="$new_path"
24620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24621    unix_path=`$CYGPATH -u "$windows_path"`
24622    new_path="$unix_path"
24623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24625    new_path="$unix_path"
24626  fi
24627
24628
24629  # Now try to locate executable using which
24630  new_path=`$WHICH "$new_path" 2> /dev/null`
24631
24632  if test "x$new_path" = x; then
24633    # Oops. Which didn't find the executable.
24634    # The splitting of arguments from the executable at a space might have been incorrect,
24635    # since paths with space are more likely in Windows. Give it another try with the whole
24636    # argument.
24637    path="$complete"
24638    arguments="EOL"
24639    new_path="$path"
24640
24641  windows_path="$new_path"
24642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24643    unix_path=`$CYGPATH -u "$windows_path"`
24644    new_path="$unix_path"
24645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24647    new_path="$unix_path"
24648  fi
24649
24650
24651    new_path=`$WHICH "$new_path" 2> /dev/null`
24652
24653    if test "x$new_path" = x; then
24654      # It's still not found. Now this is an unrecoverable error.
24655      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24656$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24657      has_space=`$ECHO "$complete" | $GREP " "`
24658      if test "x$has_space" != x; then
24659        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24660$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24661      fi
24662      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24663    fi
24664  fi
24665
24666  # Now new_path has a complete unix path to the binary
24667  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
24668    # Keep paths in /bin as-is, but remove trailing .exe if any
24669    new_path="${new_path/%.exe/}"
24670    # Do not save /bin paths to all_fixpath_prefixes!
24671  else
24672    # Not in mixed or Windows style, start by that.
24673    new_path=`cmd //c echo $new_path`
24674
24675  input_path="$new_path"
24676  # Check if we need to convert this using DOS-style short mode. If the path
24677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24678  # take no chances and rewrite it.
24679  # Note: m4 eats our [], so we need to use [ and ] instead.
24680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24681  if test "x$has_forbidden_chars" != x; then
24682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24683    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24684  fi
24685
24686    # Output is in $new_path
24687
24688  windows_path="$new_path"
24689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24690    unix_path=`$CYGPATH -u "$windows_path"`
24691    new_path="$unix_path"
24692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24694    new_path="$unix_path"
24695  fi
24696
24697    # remove trailing .exe if any
24698    new_path="${new_path/%.exe/}"
24699
24700    # Save the first 10 bytes of this path to the storage, so fixpath can work.
24701    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24702  fi
24703
24704  else
24705    # We're on a posix platform. Hooray! :)
24706    # First separate the path from the arguments. This will split at the first
24707    # space.
24708    complete="$CPP"
24709    path="${complete%% *}"
24710    tmp="$complete EOL"
24711    arguments="${tmp#* }"
24712
24713    # Cannot rely on the command "which" here since it doesn't always work.
24714    is_absolute_path=`$ECHO "$path" | $GREP ^/`
24715    if test -z "$is_absolute_path"; then
24716      # Path to executable is not absolute. Find it.
24717      IFS_save="$IFS"
24718      IFS=:
24719      for p in $PATH; do
24720        if test -f "$p/$path" && test -x "$p/$path"; then
24721          new_path="$p/$path"
24722          break
24723        fi
24724      done
24725      IFS="$IFS_save"
24726    else
24727      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CPP (as $path) failed, using $path directly." >&5
24728$as_echo "$as_me: Resolving CPP (as $path) failed, using $path directly." >&6;}
24729      new_path="$path"
24730    fi
24731
24732    if test "x$new_path" = x; then
24733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
24734$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
24735        has_space=`$ECHO "$complete" | $GREP " "`
24736        if test "x$has_space" != x; then
24737          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
24738$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
24739        fi
24740        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
24741      fi
24742  fi
24743
24744      # Now join together the path and the arguments once again
24745      if test "x$arguments" != xEOL; then
24746        new_complete="$new_path ${arguments% *}"
24747      else
24748        new_complete="$new_path"
24749      fi
24750
24751  if test "x$complete" != "x$new_complete"; then
24752      CPP="$new_complete"
24753      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
24754$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
24755    fi
24756
24757
24758ac_ext=cpp
24759ac_cpp='$CXXCPP $CPPFLAGS'
24760ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24761ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24762ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
24764$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
24765if test -z "$CXXCPP"; then
24766  if test "${ac_cv_prog_CXXCPP+set}" = set; then :
24767  $as_echo_n "(cached) " >&6
24768else
24769      # Double quotes because CXXCPP needs to be expanded
24770    for CXXCPP in "$CXX -E" "/lib/cpp"
24771    do
24772      ac_preproc_ok=false
24773for ac_cxx_preproc_warn_flag in '' yes
24774do
24775  # Use a header file that comes with gcc, so configuring glibc
24776  # with a fresh cross-compiler works.
24777  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24778  # <limits.h> exists even on freestanding compilers.
24779  # On the NeXT, cc -E runs the code through the compiler's parser,
24780  # not just through cpp. "Syntax error" is here to catch this case.
24781  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24782/* end confdefs.h.  */
24783#ifdef __STDC__
24784# include <limits.h>
24785#else
24786# include <assert.h>
24787#endif
24788		     Syntax error
24789_ACEOF
24790if ac_fn_cxx_try_cpp "$LINENO"; then :
24791
24792else
24793  # Broken: fails on valid input.
24794continue
24795fi
24796rm -f conftest.err conftest.i conftest.$ac_ext
24797
24798  # OK, works on sane cases.  Now check whether nonexistent headers
24799  # can be detected and how.
24800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24801/* end confdefs.h.  */
24802#include <ac_nonexistent.h>
24803_ACEOF
24804if ac_fn_cxx_try_cpp "$LINENO"; then :
24805  # Broken: success on invalid input.
24806continue
24807else
24808  # Passes both tests.
24809ac_preproc_ok=:
24810break
24811fi
24812rm -f conftest.err conftest.i conftest.$ac_ext
24813
24814done
24815# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24816rm -f conftest.i conftest.err conftest.$ac_ext
24817if $ac_preproc_ok; then :
24818  break
24819fi
24820
24821    done
24822    ac_cv_prog_CXXCPP=$CXXCPP
24823
24824fi
24825  CXXCPP=$ac_cv_prog_CXXCPP
24826else
24827  ac_cv_prog_CXXCPP=$CXXCPP
24828fi
24829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
24830$as_echo "$CXXCPP" >&6; }
24831ac_preproc_ok=false
24832for ac_cxx_preproc_warn_flag in '' yes
24833do
24834  # Use a header file that comes with gcc, so configuring glibc
24835  # with a fresh cross-compiler works.
24836  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24837  # <limits.h> exists even on freestanding compilers.
24838  # On the NeXT, cc -E runs the code through the compiler's parser,
24839  # not just through cpp. "Syntax error" is here to catch this case.
24840  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24841/* end confdefs.h.  */
24842#ifdef __STDC__
24843# include <limits.h>
24844#else
24845# include <assert.h>
24846#endif
24847		     Syntax error
24848_ACEOF
24849if ac_fn_cxx_try_cpp "$LINENO"; then :
24850
24851else
24852  # Broken: fails on valid input.
24853continue
24854fi
24855rm -f conftest.err conftest.i conftest.$ac_ext
24856
24857  # OK, works on sane cases.  Now check whether nonexistent headers
24858  # can be detected and how.
24859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24860/* end confdefs.h.  */
24861#include <ac_nonexistent.h>
24862_ACEOF
24863if ac_fn_cxx_try_cpp "$LINENO"; then :
24864  # Broken: success on invalid input.
24865continue
24866else
24867  # Passes both tests.
24868ac_preproc_ok=:
24869break
24870fi
24871rm -f conftest.err conftest.i conftest.$ac_ext
24872
24873done
24874# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24875rm -f conftest.i conftest.err conftest.$ac_ext
24876if $ac_preproc_ok; then :
24877
24878else
24879  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24880$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24881as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
24882See \`config.log' for more details" "$LINENO" 5; }
24883fi
24884
24885ac_ext=cpp
24886ac_cpp='$CXXCPP $CPPFLAGS'
24887ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24888ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24889ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24890
24891
24892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24893
24894  # First separate the path from the arguments. This will split at the first
24895  # space.
24896  complete="$CXXCPP"
24897  path="${complete%% *}"
24898  tmp="$complete EOL"
24899  arguments="${tmp#* }"
24900
24901  # Input might be given as Windows format, start by converting to
24902  # unix format.
24903  new_path=`$CYGPATH -u "$path"`
24904
24905  # Now try to locate executable using which
24906  new_path=`$WHICH "$new_path" 2> /dev/null`
24907  # bat and cmd files are not always considered executable in cygwin causing which
24908  # to not find them
24909  if test "x$new_path" = x \
24910           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24911           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24912    new_path=`$CYGPATH -u "$path"`
24913  fi
24914  if test "x$new_path" = x; then
24915    # Oops. Which didn't find the executable.
24916    # The splitting of arguments from the executable at a space might have been incorrect,
24917    # since paths with space are more likely in Windows. Give it another try with the whole
24918    # argument.
24919    path="$complete"
24920    arguments="EOL"
24921    new_path=`$CYGPATH -u "$path"`
24922    new_path=`$WHICH "$new_path" 2> /dev/null`
24923    # bat and cmd files are not always considered executable in cygwin causing which
24924    # to not find them
24925    if test "x$new_path" = x \
24926             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
24927             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
24928      new_path=`$CYGPATH -u "$path"`
24929    fi
24930    if test "x$new_path" = x; then
24931      # It's still not found. Now this is an unrecoverable error.
24932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
24933$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
24934      has_space=`$ECHO "$complete" | $GREP " "`
24935      if test "x$has_space" != x; then
24936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
24937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
24938      fi
24939      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24940    fi
24941  fi
24942
24943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24946  # "foo.exe" is OK but "foo" is an error.
24947  #
24948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24949  # It is also a way to make sure we got the proper file name for the real test later on.
24950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24951  if test "x$test_shortpath" = x; then
24952    # Short path failed, file does not exist as specified.
24953    # Try adding .exe or .cmd
24954    if test -f "${new_path}.exe"; then
24955       input_to_shortpath="${new_path}.exe"
24956    elif test -f "${new_path}.cmd"; then
24957       input_to_shortpath="${new_path}.cmd"
24958    else
24959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
24960$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
24961      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
24962$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
24963      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
24964    fi
24965  else
24966    input_to_shortpath="$new_path"
24967  fi
24968
24969  # Call helper function which possibly converts this using DOS-style short mode.
24970  # If so, the updated path is stored in $new_path.
24971  new_path="$input_to_shortpath"
24972
24973  input_path="$input_to_shortpath"
24974  # Check if we need to convert this using DOS-style short mode. If the path
24975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24976  # take no chances and rewrite it.
24977  # Note: m4 eats our [], so we need to use [ and ] instead.
24978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24979  if test "x$has_forbidden_chars" != x; then
24980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24984      # Going to short mode and back again did indeed matter. Since short mode is
24985      # case insensitive, let's make it lowercase to improve readability.
24986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24987      # Now convert it back to Unix-stile (cygpath)
24988      input_path=`$CYGPATH -u "$shortmode_path"`
24989      new_path="$input_path"
24990    fi
24991  fi
24992
24993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24994  if test "x$test_cygdrive_prefix" = x; then
24995    # As a simple fix, exclude /usr/bin since it's not a real path.
24996    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
24997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24998      # a path prefixed by /cygdrive for fixpath to work.
24999      new_path="$CYGWIN_ROOT_PATH$input_path"
25000    fi
25001  fi
25002
25003  # remove trailing .exe if any
25004  new_path="${new_path/%.exe/}"
25005
25006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25007
25008  # First separate the path from the arguments. This will split at the first
25009  # space.
25010  complete="$CXXCPP"
25011  path="${complete%% *}"
25012  tmp="$complete EOL"
25013  arguments="${tmp#* }"
25014
25015  # Input might be given as Windows format, start by converting to
25016  # unix format.
25017  new_path="$path"
25018
25019  windows_path="$new_path"
25020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25021    unix_path=`$CYGPATH -u "$windows_path"`
25022    new_path="$unix_path"
25023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25025    new_path="$unix_path"
25026  fi
25027
25028
25029  # Now try to locate executable using which
25030  new_path=`$WHICH "$new_path" 2> /dev/null`
25031
25032  if test "x$new_path" = x; then
25033    # Oops. Which didn't find the executable.
25034    # The splitting of arguments from the executable at a space might have been incorrect,
25035    # since paths with space are more likely in Windows. Give it another try with the whole
25036    # argument.
25037    path="$complete"
25038    arguments="EOL"
25039    new_path="$path"
25040
25041  windows_path="$new_path"
25042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25043    unix_path=`$CYGPATH -u "$windows_path"`
25044    new_path="$unix_path"
25045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25047    new_path="$unix_path"
25048  fi
25049
25050
25051    new_path=`$WHICH "$new_path" 2> /dev/null`
25052
25053    if test "x$new_path" = x; then
25054      # It's still not found. Now this is an unrecoverable error.
25055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25056$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25057      has_space=`$ECHO "$complete" | $GREP " "`
25058      if test "x$has_space" != x; then
25059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25061      fi
25062      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25063    fi
25064  fi
25065
25066  # Now new_path has a complete unix path to the binary
25067  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25068    # Keep paths in /bin as-is, but remove trailing .exe if any
25069    new_path="${new_path/%.exe/}"
25070    # Do not save /bin paths to all_fixpath_prefixes!
25071  else
25072    # Not in mixed or Windows style, start by that.
25073    new_path=`cmd //c echo $new_path`
25074
25075  input_path="$new_path"
25076  # Check if we need to convert this using DOS-style short mode. If the path
25077  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25078  # take no chances and rewrite it.
25079  # Note: m4 eats our [], so we need to use [ and ] instead.
25080  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25081  if test "x$has_forbidden_chars" != x; then
25082    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25083    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25084  fi
25085
25086    # Output is in $new_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    # remove trailing .exe if any
25098    new_path="${new_path/%.exe/}"
25099
25100    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25101    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25102  fi
25103
25104  else
25105    # We're on a posix platform. Hooray! :)
25106    # First separate the path from the arguments. This will split at the first
25107    # space.
25108    complete="$CXXCPP"
25109    path="${complete%% *}"
25110    tmp="$complete EOL"
25111    arguments="${tmp#* }"
25112
25113    # Cannot rely on the command "which" here since it doesn't always work.
25114    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25115    if test -z "$is_absolute_path"; then
25116      # Path to executable is not absolute. Find it.
25117      IFS_save="$IFS"
25118      IFS=:
25119      for p in $PATH; do
25120        if test -f "$p/$path" && test -x "$p/$path"; then
25121          new_path="$p/$path"
25122          break
25123        fi
25124      done
25125      IFS="$IFS_save"
25126    else
25127      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving CXXCPP (as $path) failed, using $path directly." >&5
25128$as_echo "$as_me: Resolving CXXCPP (as $path) failed, using $path directly." >&6;}
25129      new_path="$path"
25130    fi
25131
25132    if test "x$new_path" = x; then
25133        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
25134$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
25135        has_space=`$ECHO "$complete" | $GREP " "`
25136        if test "x$has_space" != x; then
25137          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25138$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25139        fi
25140        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
25141      fi
25142  fi
25143
25144      # Now join together the path and the arguments once again
25145      if test "x$arguments" != xEOL; then
25146        new_complete="$new_path ${arguments% *}"
25147      else
25148        new_complete="$new_path"
25149      fi
25150
25151  if test "x$complete" != "x$new_complete"; then
25152      CXXCPP="$new_complete"
25153      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
25154$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
25155    fi
25156
25157
25158if test "x$COMPILE_TYPE" != "xcross"; then
25159    # If we are not cross compiling, use the same compilers for
25160    # building the build platform executables. The cross-compilation
25161    # case needed to be done earlier, but this can only be done after
25162    # the native tools have been localized.
25163    BUILD_CC="$CC"
25164    BUILD_CXX="$CXX"
25165    BUILD_LD="$LD"
25166fi
25167
25168# for solaris we really need solaris tools, and not gnu equivalent
25169#   these seems to normally reside in /usr/ccs/bin so add that to path before
25170#   starting to probe
25171#
25172#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
25173#         so that it can be overriden --with-tools-dir
25174if test "x$OPENJDK_BUILD_OS" = xsolaris; then
25175    PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
25176fi
25177
25178# Find the right assembler.
25179if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25180    # Extract the first word of "as", so it can be a program name with args.
25181set dummy as; ac_word=$2
25182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25183$as_echo_n "checking for $ac_word... " >&6; }
25184if test "${ac_cv_path_AS+set}" = set; then :
25185  $as_echo_n "(cached) " >&6
25186else
25187  case $AS in
25188  [\\/]* | ?:[\\/]*)
25189  ac_cv_path_AS="$AS" # Let the user override the test with a path.
25190  ;;
25191  *)
25192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25193for as_dir in $PATH
25194do
25195  IFS=$as_save_IFS
25196  test -z "$as_dir" && as_dir=.
25197    for ac_exec_ext in '' $ac_executable_extensions; do
25198  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25199    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
25200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25201    break 2
25202  fi
25203done
25204  done
25205IFS=$as_save_IFS
25206
25207  ;;
25208esac
25209fi
25210AS=$ac_cv_path_AS
25211if test -n "$AS"; then
25212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
25213$as_echo "$AS" >&6; }
25214else
25215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25216$as_echo "no" >&6; }
25217fi
25218
25219
25220
25221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25222
25223  # First separate the path from the arguments. This will split at the first
25224  # space.
25225  complete="$AS"
25226  path="${complete%% *}"
25227  tmp="$complete EOL"
25228  arguments="${tmp#* }"
25229
25230  # Input might be given as Windows format, start by converting to
25231  # unix format.
25232  new_path=`$CYGPATH -u "$path"`
25233
25234  # Now try to locate executable using which
25235  new_path=`$WHICH "$new_path" 2> /dev/null`
25236  # bat and cmd files are not always considered executable in cygwin causing which
25237  # to not find them
25238  if test "x$new_path" = x \
25239           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25240           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25241    new_path=`$CYGPATH -u "$path"`
25242  fi
25243  if test "x$new_path" = x; then
25244    # Oops. Which didn't find the executable.
25245    # The splitting of arguments from the executable at a space might have been incorrect,
25246    # since paths with space are more likely in Windows. Give it another try with the whole
25247    # argument.
25248    path="$complete"
25249    arguments="EOL"
25250    new_path=`$CYGPATH -u "$path"`
25251    new_path=`$WHICH "$new_path" 2> /dev/null`
25252    # bat and cmd files are not always considered executable in cygwin causing which
25253    # to not find them
25254    if test "x$new_path" = x \
25255             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25256             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25257      new_path=`$CYGPATH -u "$path"`
25258    fi
25259    if test "x$new_path" = x; then
25260      # It's still not found. Now this is an unrecoverable error.
25261      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25262$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25263      has_space=`$ECHO "$complete" | $GREP " "`
25264      if test "x$has_space" != x; then
25265        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25266$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25267      fi
25268      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25269    fi
25270  fi
25271
25272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25275  # "foo.exe" is OK but "foo" is an error.
25276  #
25277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25278  # It is also a way to make sure we got the proper file name for the real test later on.
25279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25280  if test "x$test_shortpath" = x; then
25281    # Short path failed, file does not exist as specified.
25282    # Try adding .exe or .cmd
25283    if test -f "${new_path}.exe"; then
25284       input_to_shortpath="${new_path}.exe"
25285    elif test -f "${new_path}.cmd"; then
25286       input_to_shortpath="${new_path}.cmd"
25287    else
25288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
25289$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
25290      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25291$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25292      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25293    fi
25294  else
25295    input_to_shortpath="$new_path"
25296  fi
25297
25298  # Call helper function which possibly converts this using DOS-style short mode.
25299  # If so, the updated path is stored in $new_path.
25300  new_path="$input_to_shortpath"
25301
25302  input_path="$input_to_shortpath"
25303  # Check if we need to convert this using DOS-style short mode. If the path
25304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25305  # take no chances and rewrite it.
25306  # Note: m4 eats our [], so we need to use [ and ] instead.
25307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25308  if test "x$has_forbidden_chars" != x; then
25309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25313      # Going to short mode and back again did indeed matter. Since short mode is
25314      # case insensitive, let's make it lowercase to improve readability.
25315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25316      # Now convert it back to Unix-stile (cygpath)
25317      input_path=`$CYGPATH -u "$shortmode_path"`
25318      new_path="$input_path"
25319    fi
25320  fi
25321
25322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25323  if test "x$test_cygdrive_prefix" = x; then
25324    # As a simple fix, exclude /usr/bin since it's not a real path.
25325    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25327      # a path prefixed by /cygdrive for fixpath to work.
25328      new_path="$CYGWIN_ROOT_PATH$input_path"
25329    fi
25330  fi
25331
25332  # remove trailing .exe if any
25333  new_path="${new_path/%.exe/}"
25334
25335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25336
25337  # First separate the path from the arguments. This will split at the first
25338  # space.
25339  complete="$AS"
25340  path="${complete%% *}"
25341  tmp="$complete EOL"
25342  arguments="${tmp#* }"
25343
25344  # Input might be given as Windows format, start by converting to
25345  # unix format.
25346  new_path="$path"
25347
25348  windows_path="$new_path"
25349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25350    unix_path=`$CYGPATH -u "$windows_path"`
25351    new_path="$unix_path"
25352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25354    new_path="$unix_path"
25355  fi
25356
25357
25358  # Now try to locate executable using which
25359  new_path=`$WHICH "$new_path" 2> /dev/null`
25360
25361  if test "x$new_path" = x; then
25362    # Oops. Which didn't find the executable.
25363    # The splitting of arguments from the executable at a space might have been incorrect,
25364    # since paths with space are more likely in Windows. Give it another try with the whole
25365    # argument.
25366    path="$complete"
25367    arguments="EOL"
25368    new_path="$path"
25369
25370  windows_path="$new_path"
25371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25372    unix_path=`$CYGPATH -u "$windows_path"`
25373    new_path="$unix_path"
25374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25376    new_path="$unix_path"
25377  fi
25378
25379
25380    new_path=`$WHICH "$new_path" 2> /dev/null`
25381
25382    if test "x$new_path" = x; then
25383      # It's still not found. Now this is an unrecoverable error.
25384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25385$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25386      has_space=`$ECHO "$complete" | $GREP " "`
25387      if test "x$has_space" != x; then
25388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25390      fi
25391      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25392    fi
25393  fi
25394
25395  # Now new_path has a complete unix path to the binary
25396  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25397    # Keep paths in /bin as-is, but remove trailing .exe if any
25398    new_path="${new_path/%.exe/}"
25399    # Do not save /bin paths to all_fixpath_prefixes!
25400  else
25401    # Not in mixed or Windows style, start by that.
25402    new_path=`cmd //c echo $new_path`
25403
25404  input_path="$new_path"
25405  # Check if we need to convert this using DOS-style short mode. If the path
25406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25407  # take no chances and rewrite it.
25408  # Note: m4 eats our [], so we need to use [ and ] instead.
25409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25410  if test "x$has_forbidden_chars" != x; then
25411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25412    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25413  fi
25414
25415    # Output is in $new_path
25416
25417  windows_path="$new_path"
25418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25419    unix_path=`$CYGPATH -u "$windows_path"`
25420    new_path="$unix_path"
25421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25422    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25423    new_path="$unix_path"
25424  fi
25425
25426    # remove trailing .exe if any
25427    new_path="${new_path/%.exe/}"
25428
25429    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25430    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25431  fi
25432
25433  else
25434    # We're on a posix platform. Hooray! :)
25435    # First separate the path from the arguments. This will split at the first
25436    # space.
25437    complete="$AS"
25438    path="${complete%% *}"
25439    tmp="$complete EOL"
25440    arguments="${tmp#* }"
25441
25442    # Cannot rely on the command "which" here since it doesn't always work.
25443    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25444    if test -z "$is_absolute_path"; then
25445      # Path to executable is not absolute. Find it.
25446      IFS_save="$IFS"
25447      IFS=:
25448      for p in $PATH; do
25449        if test -f "$p/$path" && test -x "$p/$path"; then
25450          new_path="$p/$path"
25451          break
25452        fi
25453      done
25454      IFS="$IFS_save"
25455    else
25456      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving AS (as $path) failed, using $path directly." >&5
25457$as_echo "$as_me: Resolving AS (as $path) failed, using $path directly." >&6;}
25458      new_path="$path"
25459    fi
25460
25461    if test "x$new_path" = x; then
25462        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
25463$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
25464        has_space=`$ECHO "$complete" | $GREP " "`
25465        if test "x$has_space" != x; then
25466          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25467$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25468        fi
25469        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
25470      fi
25471  fi
25472
25473      # Now join together the path and the arguments once again
25474      if test "x$arguments" != xEOL; then
25475        new_complete="$new_path ${arguments% *}"
25476      else
25477        new_complete="$new_path"
25478      fi
25479
25480  if test "x$complete" != "x$new_complete"; then
25481      AS="$new_complete"
25482      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
25483$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
25484    fi
25485
25486else
25487    AS="$CC -c"
25488fi
25489
25490
25491if test "x$OPENJDK_TARGET_OS" = xsolaris; then
25492    # Extract the first word of "nm", so it can be a program name with args.
25493set dummy nm; ac_word=$2
25494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25495$as_echo_n "checking for $ac_word... " >&6; }
25496if test "${ac_cv_path_NM+set}" = set; then :
25497  $as_echo_n "(cached) " >&6
25498else
25499  case $NM in
25500  [\\/]* | ?:[\\/]*)
25501  ac_cv_path_NM="$NM" # Let the user override the test with a path.
25502  ;;
25503  *)
25504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25505for as_dir in $PATH
25506do
25507  IFS=$as_save_IFS
25508  test -z "$as_dir" && as_dir=.
25509    for ac_exec_ext in '' $ac_executable_extensions; do
25510  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25511    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
25512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25513    break 2
25514  fi
25515done
25516  done
25517IFS=$as_save_IFS
25518
25519  ;;
25520esac
25521fi
25522NM=$ac_cv_path_NM
25523if test -n "$NM"; then
25524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
25525$as_echo "$NM" >&6; }
25526else
25527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25528$as_echo "no" >&6; }
25529fi
25530
25531
25532
25533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25534
25535  # First separate the path from the arguments. This will split at the first
25536  # space.
25537  complete="$NM"
25538  path="${complete%% *}"
25539  tmp="$complete EOL"
25540  arguments="${tmp#* }"
25541
25542  # Input might be given as Windows format, start by converting to
25543  # unix format.
25544  new_path=`$CYGPATH -u "$path"`
25545
25546  # Now try to locate executable using which
25547  new_path=`$WHICH "$new_path" 2> /dev/null`
25548  # bat and cmd files are not always considered executable in cygwin causing which
25549  # to not find them
25550  if test "x$new_path" = x \
25551           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25552           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25553    new_path=`$CYGPATH -u "$path"`
25554  fi
25555  if test "x$new_path" = x; then
25556    # Oops. Which didn't find the executable.
25557    # The splitting of arguments from the executable at a space might have been incorrect,
25558    # since paths with space are more likely in Windows. Give it another try with the whole
25559    # argument.
25560    path="$complete"
25561    arguments="EOL"
25562    new_path=`$CYGPATH -u "$path"`
25563    new_path=`$WHICH "$new_path" 2> /dev/null`
25564    # bat and cmd files are not always considered executable in cygwin causing which
25565    # to not find them
25566    if test "x$new_path" = x \
25567             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25568             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25569      new_path=`$CYGPATH -u "$path"`
25570    fi
25571    if test "x$new_path" = x; then
25572      # It's still not found. Now this is an unrecoverable error.
25573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25574$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25575      has_space=`$ECHO "$complete" | $GREP " "`
25576      if test "x$has_space" != x; then
25577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25579      fi
25580      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25581    fi
25582  fi
25583
25584  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25585  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25586  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25587  # "foo.exe" is OK but "foo" is an error.
25588  #
25589  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25590  # It is also a way to make sure we got the proper file name for the real test later on.
25591  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25592  if test "x$test_shortpath" = x; then
25593    # Short path failed, file does not exist as specified.
25594    # Try adding .exe or .cmd
25595    if test -f "${new_path}.exe"; then
25596       input_to_shortpath="${new_path}.exe"
25597    elif test -f "${new_path}.cmd"; then
25598       input_to_shortpath="${new_path}.cmd"
25599    else
25600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
25601$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
25602      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25603$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25604      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25605    fi
25606  else
25607    input_to_shortpath="$new_path"
25608  fi
25609
25610  # Call helper function which possibly converts this using DOS-style short mode.
25611  # If so, the updated path is stored in $new_path.
25612  new_path="$input_to_shortpath"
25613
25614  input_path="$input_to_shortpath"
25615  # Check if we need to convert this using DOS-style short mode. If the path
25616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25617  # take no chances and rewrite it.
25618  # Note: m4 eats our [], so we need to use [ and ] instead.
25619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25620  if test "x$has_forbidden_chars" != x; then
25621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25625      # Going to short mode and back again did indeed matter. Since short mode is
25626      # case insensitive, let's make it lowercase to improve readability.
25627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25628      # Now convert it back to Unix-stile (cygpath)
25629      input_path=`$CYGPATH -u "$shortmode_path"`
25630      new_path="$input_path"
25631    fi
25632  fi
25633
25634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25635  if test "x$test_cygdrive_prefix" = x; then
25636    # As a simple fix, exclude /usr/bin since it's not a real path.
25637    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25639      # a path prefixed by /cygdrive for fixpath to work.
25640      new_path="$CYGWIN_ROOT_PATH$input_path"
25641    fi
25642  fi
25643
25644  # remove trailing .exe if any
25645  new_path="${new_path/%.exe/}"
25646
25647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25648
25649  # First separate the path from the arguments. This will split at the first
25650  # space.
25651  complete="$NM"
25652  path="${complete%% *}"
25653  tmp="$complete EOL"
25654  arguments="${tmp#* }"
25655
25656  # Input might be given as Windows format, start by converting to
25657  # unix format.
25658  new_path="$path"
25659
25660  windows_path="$new_path"
25661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25662    unix_path=`$CYGPATH -u "$windows_path"`
25663    new_path="$unix_path"
25664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25666    new_path="$unix_path"
25667  fi
25668
25669
25670  # Now try to locate executable using which
25671  new_path=`$WHICH "$new_path" 2> /dev/null`
25672
25673  if test "x$new_path" = x; then
25674    # Oops. Which didn't find the executable.
25675    # The splitting of arguments from the executable at a space might have been incorrect,
25676    # since paths with space are more likely in Windows. Give it another try with the whole
25677    # argument.
25678    path="$complete"
25679    arguments="EOL"
25680    new_path="$path"
25681
25682  windows_path="$new_path"
25683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25684    unix_path=`$CYGPATH -u "$windows_path"`
25685    new_path="$unix_path"
25686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25688    new_path="$unix_path"
25689  fi
25690
25691
25692    new_path=`$WHICH "$new_path" 2> /dev/null`
25693
25694    if test "x$new_path" = x; then
25695      # It's still not found. Now this is an unrecoverable error.
25696      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25697$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25698      has_space=`$ECHO "$complete" | $GREP " "`
25699      if test "x$has_space" != x; then
25700        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25701$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25702      fi
25703      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25704    fi
25705  fi
25706
25707  # Now new_path has a complete unix path to the binary
25708  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
25709    # Keep paths in /bin as-is, but remove trailing .exe if any
25710    new_path="${new_path/%.exe/}"
25711    # Do not save /bin paths to all_fixpath_prefixes!
25712  else
25713    # Not in mixed or Windows style, start by that.
25714    new_path=`cmd //c echo $new_path`
25715
25716  input_path="$new_path"
25717  # Check if we need to convert this using DOS-style short mode. If the path
25718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25719  # take no chances and rewrite it.
25720  # Note: m4 eats our [], so we need to use [ and ] instead.
25721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25722  if test "x$has_forbidden_chars" != x; then
25723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25725  fi
25726
25727    # Output is in $new_path
25728
25729  windows_path="$new_path"
25730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25731    unix_path=`$CYGPATH -u "$windows_path"`
25732    new_path="$unix_path"
25733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25735    new_path="$unix_path"
25736  fi
25737
25738    # remove trailing .exe if any
25739    new_path="${new_path/%.exe/}"
25740
25741    # Save the first 10 bytes of this path to the storage, so fixpath can work.
25742    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25743  fi
25744
25745  else
25746    # We're on a posix platform. Hooray! :)
25747    # First separate the path from the arguments. This will split at the first
25748    # space.
25749    complete="$NM"
25750    path="${complete%% *}"
25751    tmp="$complete EOL"
25752    arguments="${tmp#* }"
25753
25754    # Cannot rely on the command "which" here since it doesn't always work.
25755    is_absolute_path=`$ECHO "$path" | $GREP ^/`
25756    if test -z "$is_absolute_path"; then
25757      # Path to executable is not absolute. Find it.
25758      IFS_save="$IFS"
25759      IFS=:
25760      for p in $PATH; do
25761        if test -f "$p/$path" && test -x "$p/$path"; then
25762          new_path="$p/$path"
25763          break
25764        fi
25765      done
25766      IFS="$IFS_save"
25767    else
25768      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
25769$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
25770      new_path="$path"
25771    fi
25772
25773    if test "x$new_path" = x; then
25774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
25775$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
25776        has_space=`$ECHO "$complete" | $GREP " "`
25777        if test "x$has_space" != x; then
25778          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
25779$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
25780        fi
25781        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
25782      fi
25783  fi
25784
25785      # Now join together the path and the arguments once again
25786      if test "x$arguments" != xEOL; then
25787        new_complete="$new_path ${arguments% *}"
25788      else
25789        new_complete="$new_path"
25790      fi
25791
25792  if test "x$complete" != "x$new_complete"; then
25793      NM="$new_complete"
25794      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
25795$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
25796    fi
25797
25798    # Extract the first word of "gnm", so it can be a program name with args.
25799set dummy gnm; ac_word=$2
25800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25801$as_echo_n "checking for $ac_word... " >&6; }
25802if test "${ac_cv_path_GNM+set}" = set; then :
25803  $as_echo_n "(cached) " >&6
25804else
25805  case $GNM in
25806  [\\/]* | ?:[\\/]*)
25807  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
25808  ;;
25809  *)
25810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25811for as_dir in $PATH
25812do
25813  IFS=$as_save_IFS
25814  test -z "$as_dir" && as_dir=.
25815    for ac_exec_ext in '' $ac_executable_extensions; do
25816  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
25817    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
25818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25819    break 2
25820  fi
25821done
25822  done
25823IFS=$as_save_IFS
25824
25825  ;;
25826esac
25827fi
25828GNM=$ac_cv_path_GNM
25829if test -n "$GNM"; then
25830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
25831$as_echo "$GNM" >&6; }
25832else
25833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25834$as_echo "no" >&6; }
25835fi
25836
25837
25838
25839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25840
25841  # First separate the path from the arguments. This will split at the first
25842  # space.
25843  complete="$GNM"
25844  path="${complete%% *}"
25845  tmp="$complete EOL"
25846  arguments="${tmp#* }"
25847
25848  # Input might be given as Windows format, start by converting to
25849  # unix format.
25850  new_path=`$CYGPATH -u "$path"`
25851
25852  # Now try to locate executable using which
25853  new_path=`$WHICH "$new_path" 2> /dev/null`
25854  # bat and cmd files are not always considered executable in cygwin causing which
25855  # to not find them
25856  if test "x$new_path" = x \
25857           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25858           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25859    new_path=`$CYGPATH -u "$path"`
25860  fi
25861  if test "x$new_path" = x; then
25862    # Oops. Which didn't find the executable.
25863    # The splitting of arguments from the executable at a space might have been incorrect,
25864    # since paths with space are more likely in Windows. Give it another try with the whole
25865    # argument.
25866    path="$complete"
25867    arguments="EOL"
25868    new_path=`$CYGPATH -u "$path"`
25869    new_path=`$WHICH "$new_path" 2> /dev/null`
25870    # bat and cmd files are not always considered executable in cygwin causing which
25871    # to not find them
25872    if test "x$new_path" = x \
25873             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
25874             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
25875      new_path=`$CYGPATH -u "$path"`
25876    fi
25877    if test "x$new_path" = x; then
25878      # It's still not found. Now this is an unrecoverable error.
25879      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
25880$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
25881      has_space=`$ECHO "$complete" | $GREP " "`
25882      if test "x$has_space" != x; then
25883        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
25884$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
25885      fi
25886      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25887    fi
25888  fi
25889
25890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25893  # "foo.exe" is OK but "foo" is an error.
25894  #
25895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25896  # It is also a way to make sure we got the proper file name for the real test later on.
25897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25898  if test "x$test_shortpath" = x; then
25899    # Short path failed, file does not exist as specified.
25900    # Try adding .exe or .cmd
25901    if test -f "${new_path}.exe"; then
25902       input_to_shortpath="${new_path}.exe"
25903    elif test -f "${new_path}.cmd"; then
25904       input_to_shortpath="${new_path}.cmd"
25905    else
25906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
25907$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
25908      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
25909$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
25910      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
25911    fi
25912  else
25913    input_to_shortpath="$new_path"
25914  fi
25915
25916  # Call helper function which possibly converts this using DOS-style short mode.
25917  # If so, the updated path is stored in $new_path.
25918  new_path="$input_to_shortpath"
25919
25920  input_path="$input_to_shortpath"
25921  # Check if we need to convert this using DOS-style short mode. If the path
25922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25923  # take no chances and rewrite it.
25924  # Note: m4 eats our [], so we need to use [ and ] instead.
25925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25926  if test "x$has_forbidden_chars" != x; then
25927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25931      # Going to short mode and back again did indeed matter. Since short mode is
25932      # case insensitive, let's make it lowercase to improve readability.
25933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25934      # Now convert it back to Unix-stile (cygpath)
25935      input_path=`$CYGPATH -u "$shortmode_path"`
25936      new_path="$input_path"
25937    fi
25938  fi
25939
25940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25941  if test "x$test_cygdrive_prefix" = x; then
25942    # As a simple fix, exclude /usr/bin since it's not a real path.
25943    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
25944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25945      # a path prefixed by /cygdrive for fixpath to work.
25946      new_path="$CYGWIN_ROOT_PATH$input_path"
25947    fi
25948  fi
25949
25950  # remove trailing .exe if any
25951  new_path="${new_path/%.exe/}"
25952
25953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25954
25955  # First separate the path from the arguments. This will split at the first
25956  # space.
25957  complete="$GNM"
25958  path="${complete%% *}"
25959  tmp="$complete EOL"
25960  arguments="${tmp#* }"
25961
25962  # Input might be given as Windows format, start by converting to
25963  # unix format.
25964  new_path="$path"
25965
25966  windows_path="$new_path"
25967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25968    unix_path=`$CYGPATH -u "$windows_path"`
25969    new_path="$unix_path"
25970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25972    new_path="$unix_path"
25973  fi
25974
25975
25976  # Now try to locate executable using which
25977  new_path=`$WHICH "$new_path" 2> /dev/null`
25978
25979  if test "x$new_path" = x; then
25980    # Oops. Which didn't find the executable.
25981    # The splitting of arguments from the executable at a space might have been incorrect,
25982    # since paths with space are more likely in Windows. Give it another try with the whole
25983    # argument.
25984    path="$complete"
25985    arguments="EOL"
25986    new_path="$path"
25987
25988  windows_path="$new_path"
25989  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25990    unix_path=`$CYGPATH -u "$windows_path"`
25991    new_path="$unix_path"
25992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25993    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25994    new_path="$unix_path"
25995  fi
25996
25997
25998    new_path=`$WHICH "$new_path" 2> /dev/null`
25999
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 GNM, which resolves as \"$complete\", is not found." >&5
26003$as_echo "$as_me: The path of GNM, 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 GNM" "$LINENO" 5
26010    fi
26011  fi
26012
26013  # Now new_path has a complete unix path to the binary
26014  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26015    # Keep paths in /bin as-is, but remove trailing .exe if any
26016    new_path="${new_path/%.exe/}"
26017    # Do not save /bin paths to all_fixpath_prefixes!
26018  else
26019    # Not in mixed or Windows style, start by that.
26020    new_path=`cmd //c echo $new_path`
26021
26022  input_path="$new_path"
26023  # Check if we need to convert this using DOS-style short mode. If the path
26024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26025  # take no chances and rewrite it.
26026  # Note: m4 eats our [], so we need to use [ and ] instead.
26027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26028  if test "x$has_forbidden_chars" != x; then
26029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26031  fi
26032
26033    # Output is in $new_path
26034
26035  windows_path="$new_path"
26036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26037    unix_path=`$CYGPATH -u "$windows_path"`
26038    new_path="$unix_path"
26039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26041    new_path="$unix_path"
26042  fi
26043
26044    # remove trailing .exe if any
26045    new_path="${new_path/%.exe/}"
26046
26047    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26048    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26049  fi
26050
26051  else
26052    # We're on a posix platform. Hooray! :)
26053    # First separate the path from the arguments. This will split at the first
26054    # space.
26055    complete="$GNM"
26056    path="${complete%% *}"
26057    tmp="$complete EOL"
26058    arguments="${tmp#* }"
26059
26060    # Cannot rely on the command "which" here since it doesn't always work.
26061    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26062    if test -z "$is_absolute_path"; then
26063      # Path to executable is not absolute. Find it.
26064      IFS_save="$IFS"
26065      IFS=:
26066      for p in $PATH; do
26067        if test -f "$p/$path" && test -x "$p/$path"; then
26068          new_path="$p/$path"
26069          break
26070        fi
26071      done
26072      IFS="$IFS_save"
26073    else
26074      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving GNM (as $path) failed, using $path directly." >&5
26075$as_echo "$as_me: Resolving GNM (as $path) failed, using $path directly." >&6;}
26076      new_path="$path"
26077    fi
26078
26079    if test "x$new_path" = x; then
26080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
26081$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
26082        has_space=`$ECHO "$complete" | $GREP " "`
26083        if test "x$has_space" != x; then
26084          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26085$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26086        fi
26087        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
26088      fi
26089  fi
26090
26091      # Now join together the path and the arguments once again
26092      if test "x$arguments" != xEOL; then
26093        new_complete="$new_path ${arguments% *}"
26094      else
26095        new_complete="$new_path"
26096      fi
26097
26098  if test "x$complete" != "x$new_complete"; then
26099      GNM="$new_complete"
26100      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
26101$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
26102    fi
26103
26104    # Extract the first word of "strip", so it can be a program name with args.
26105set dummy strip; ac_word=$2
26106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26107$as_echo_n "checking for $ac_word... " >&6; }
26108if test "${ac_cv_path_STRIP+set}" = set; then :
26109  $as_echo_n "(cached) " >&6
26110else
26111  case $STRIP in
26112  [\\/]* | ?:[\\/]*)
26113  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
26114  ;;
26115  *)
26116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26117for as_dir in $PATH
26118do
26119  IFS=$as_save_IFS
26120  test -z "$as_dir" && as_dir=.
26121    for ac_exec_ext in '' $ac_executable_extensions; do
26122  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26123    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
26124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26125    break 2
26126  fi
26127done
26128  done
26129IFS=$as_save_IFS
26130
26131  ;;
26132esac
26133fi
26134STRIP=$ac_cv_path_STRIP
26135if test -n "$STRIP"; then
26136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
26137$as_echo "$STRIP" >&6; }
26138else
26139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26140$as_echo "no" >&6; }
26141fi
26142
26143
26144
26145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26146
26147  # First separate the path from the arguments. This will split at the first
26148  # space.
26149  complete="$STRIP"
26150  path="${complete%% *}"
26151  tmp="$complete EOL"
26152  arguments="${tmp#* }"
26153
26154  # Input might be given as Windows format, start by converting to
26155  # unix format.
26156  new_path=`$CYGPATH -u "$path"`
26157
26158  # Now try to locate executable using which
26159  new_path=`$WHICH "$new_path" 2> /dev/null`
26160  # bat and cmd files are not always considered executable in cygwin causing which
26161  # to not find them
26162  if test "x$new_path" = x \
26163           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26164           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26165    new_path=`$CYGPATH -u "$path"`
26166  fi
26167  if test "x$new_path" = x; then
26168    # Oops. Which didn't find the executable.
26169    # The splitting of arguments from the executable at a space might have been incorrect,
26170    # since paths with space are more likely in Windows. Give it another try with the whole
26171    # argument.
26172    path="$complete"
26173    arguments="EOL"
26174    new_path=`$CYGPATH -u "$path"`
26175    new_path=`$WHICH "$new_path" 2> /dev/null`
26176    # bat and cmd files are not always considered executable in cygwin causing which
26177    # to not find them
26178    if test "x$new_path" = x \
26179             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26180             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26181      new_path=`$CYGPATH -u "$path"`
26182    fi
26183    if test "x$new_path" = x; then
26184      # It's still not found. Now this is an unrecoverable error.
26185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26186$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26187      has_space=`$ECHO "$complete" | $GREP " "`
26188      if test "x$has_space" != x; then
26189        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26190$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26191      fi
26192      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26193    fi
26194  fi
26195
26196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26199  # "foo.exe" is OK but "foo" is an error.
26200  #
26201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26202  # It is also a way to make sure we got the proper file name for the real test later on.
26203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26204  if test "x$test_shortpath" = x; then
26205    # Short path failed, file does not exist as specified.
26206    # Try adding .exe or .cmd
26207    if test -f "${new_path}.exe"; then
26208       input_to_shortpath="${new_path}.exe"
26209    elif test -f "${new_path}.cmd"; then
26210       input_to_shortpath="${new_path}.cmd"
26211    else
26212      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
26213$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
26214      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26215$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26216      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26217    fi
26218  else
26219    input_to_shortpath="$new_path"
26220  fi
26221
26222  # Call helper function which possibly converts this using DOS-style short mode.
26223  # If so, the updated path is stored in $new_path.
26224  new_path="$input_to_shortpath"
26225
26226  input_path="$input_to_shortpath"
26227  # Check if we need to convert this using DOS-style short mode. If the path
26228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26229  # take no chances and rewrite it.
26230  # Note: m4 eats our [], so we need to use [ and ] instead.
26231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26232  if test "x$has_forbidden_chars" != x; then
26233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26234    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26235    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26236    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26237      # Going to short mode and back again did indeed matter. Since short mode is
26238      # case insensitive, let's make it lowercase to improve readability.
26239      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26240      # Now convert it back to Unix-stile (cygpath)
26241      input_path=`$CYGPATH -u "$shortmode_path"`
26242      new_path="$input_path"
26243    fi
26244  fi
26245
26246  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26247  if test "x$test_cygdrive_prefix" = x; then
26248    # As a simple fix, exclude /usr/bin since it's not a real path.
26249    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26250      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26251      # a path prefixed by /cygdrive for fixpath to work.
26252      new_path="$CYGWIN_ROOT_PATH$input_path"
26253    fi
26254  fi
26255
26256  # remove trailing .exe if any
26257  new_path="${new_path/%.exe/}"
26258
26259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26260
26261  # First separate the path from the arguments. This will split at the first
26262  # space.
26263  complete="$STRIP"
26264  path="${complete%% *}"
26265  tmp="$complete EOL"
26266  arguments="${tmp#* }"
26267
26268  # Input might be given as Windows format, start by converting to
26269  # unix format.
26270  new_path="$path"
26271
26272  windows_path="$new_path"
26273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26274    unix_path=`$CYGPATH -u "$windows_path"`
26275    new_path="$unix_path"
26276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26278    new_path="$unix_path"
26279  fi
26280
26281
26282  # Now try to locate executable using which
26283  new_path=`$WHICH "$new_path" 2> /dev/null`
26284
26285  if test "x$new_path" = x; then
26286    # Oops. Which didn't find the executable.
26287    # The splitting of arguments from the executable at a space might have been incorrect,
26288    # since paths with space are more likely in Windows. Give it another try with the whole
26289    # argument.
26290    path="$complete"
26291    arguments="EOL"
26292    new_path="$path"
26293
26294  windows_path="$new_path"
26295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26296    unix_path=`$CYGPATH -u "$windows_path"`
26297    new_path="$unix_path"
26298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26300    new_path="$unix_path"
26301  fi
26302
26303
26304    new_path=`$WHICH "$new_path" 2> /dev/null`
26305
26306    if test "x$new_path" = x; then
26307      # It's still not found. Now this is an unrecoverable error.
26308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26309$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26310      has_space=`$ECHO "$complete" | $GREP " "`
26311      if test "x$has_space" != x; then
26312        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26313$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26314      fi
26315      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26316    fi
26317  fi
26318
26319  # Now new_path has a complete unix path to the binary
26320  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26321    # Keep paths in /bin as-is, but remove trailing .exe if any
26322    new_path="${new_path/%.exe/}"
26323    # Do not save /bin paths to all_fixpath_prefixes!
26324  else
26325    # Not in mixed or Windows style, start by that.
26326    new_path=`cmd //c echo $new_path`
26327
26328  input_path="$new_path"
26329  # Check if we need to convert this using DOS-style short mode. If the path
26330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26331  # take no chances and rewrite it.
26332  # Note: m4 eats our [], so we need to use [ and ] instead.
26333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26334  if test "x$has_forbidden_chars" != x; then
26335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26336    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26337  fi
26338
26339    # Output is in $new_path
26340
26341  windows_path="$new_path"
26342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26343    unix_path=`$CYGPATH -u "$windows_path"`
26344    new_path="$unix_path"
26345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26347    new_path="$unix_path"
26348  fi
26349
26350    # remove trailing .exe if any
26351    new_path="${new_path/%.exe/}"
26352
26353    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26354    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26355  fi
26356
26357  else
26358    # We're on a posix platform. Hooray! :)
26359    # First separate the path from the arguments. This will split at the first
26360    # space.
26361    complete="$STRIP"
26362    path="${complete%% *}"
26363    tmp="$complete EOL"
26364    arguments="${tmp#* }"
26365
26366    # Cannot rely on the command "which" here since it doesn't always work.
26367    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26368    if test -z "$is_absolute_path"; then
26369      # Path to executable is not absolute. Find it.
26370      IFS_save="$IFS"
26371      IFS=:
26372      for p in $PATH; do
26373        if test -f "$p/$path" && test -x "$p/$path"; then
26374          new_path="$p/$path"
26375          break
26376        fi
26377      done
26378      IFS="$IFS_save"
26379    else
26380      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
26381$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
26382      new_path="$path"
26383    fi
26384
26385    if test "x$new_path" = x; then
26386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
26387$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
26388        has_space=`$ECHO "$complete" | $GREP " "`
26389        if test "x$has_space" != x; then
26390          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26391$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26392        fi
26393        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
26394      fi
26395  fi
26396
26397      # Now join together the path and the arguments once again
26398      if test "x$arguments" != xEOL; then
26399        new_complete="$new_path ${arguments% *}"
26400      else
26401        new_complete="$new_path"
26402      fi
26403
26404  if test "x$complete" != "x$new_complete"; then
26405      STRIP="$new_complete"
26406      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
26407$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
26408    fi
26409
26410    # Extract the first word of "mcs", so it can be a program name with args.
26411set dummy mcs; ac_word=$2
26412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26413$as_echo_n "checking for $ac_word... " >&6; }
26414if test "${ac_cv_path_MCS+set}" = set; then :
26415  $as_echo_n "(cached) " >&6
26416else
26417  case $MCS in
26418  [\\/]* | ?:[\\/]*)
26419  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
26420  ;;
26421  *)
26422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26423for as_dir in $PATH
26424do
26425  IFS=$as_save_IFS
26426  test -z "$as_dir" && as_dir=.
26427    for ac_exec_ext in '' $ac_executable_extensions; do
26428  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26429    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
26430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26431    break 2
26432  fi
26433done
26434  done
26435IFS=$as_save_IFS
26436
26437  ;;
26438esac
26439fi
26440MCS=$ac_cv_path_MCS
26441if test -n "$MCS"; then
26442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
26443$as_echo "$MCS" >&6; }
26444else
26445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26446$as_echo "no" >&6; }
26447fi
26448
26449
26450
26451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26452
26453  # First separate the path from the arguments. This will split at the first
26454  # space.
26455  complete="$MCS"
26456  path="${complete%% *}"
26457  tmp="$complete EOL"
26458  arguments="${tmp#* }"
26459
26460  # Input might be given as Windows format, start by converting to
26461  # unix format.
26462  new_path=`$CYGPATH -u "$path"`
26463
26464  # Now try to locate executable using which
26465  new_path=`$WHICH "$new_path" 2> /dev/null`
26466  # bat and cmd files are not always considered executable in cygwin causing which
26467  # to not find them
26468  if test "x$new_path" = x \
26469           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26470           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26471    new_path=`$CYGPATH -u "$path"`
26472  fi
26473  if test "x$new_path" = x; then
26474    # Oops. Which didn't find the executable.
26475    # The splitting of arguments from the executable at a space might have been incorrect,
26476    # since paths with space are more likely in Windows. Give it another try with the whole
26477    # argument.
26478    path="$complete"
26479    arguments="EOL"
26480    new_path=`$CYGPATH -u "$path"`
26481    new_path=`$WHICH "$new_path" 2> /dev/null`
26482    # bat and cmd files are not always considered executable in cygwin causing which
26483    # to not find them
26484    if test "x$new_path" = x \
26485             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26486             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26487      new_path=`$CYGPATH -u "$path"`
26488    fi
26489    if test "x$new_path" = x; then
26490      # It's still not found. Now this is an unrecoverable error.
26491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26492$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26493      has_space=`$ECHO "$complete" | $GREP " "`
26494      if test "x$has_space" != x; then
26495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26497      fi
26498      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26499    fi
26500  fi
26501
26502  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26503  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26504  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26505  # "foo.exe" is OK but "foo" is an error.
26506  #
26507  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26508  # It is also a way to make sure we got the proper file name for the real test later on.
26509  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26510  if test "x$test_shortpath" = x; then
26511    # Short path failed, file does not exist as specified.
26512    # Try adding .exe or .cmd
26513    if test -f "${new_path}.exe"; then
26514       input_to_shortpath="${new_path}.exe"
26515    elif test -f "${new_path}.cmd"; then
26516       input_to_shortpath="${new_path}.cmd"
26517    else
26518      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
26519$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
26520      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26521$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26522      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26523    fi
26524  else
26525    input_to_shortpath="$new_path"
26526  fi
26527
26528  # Call helper function which possibly converts this using DOS-style short mode.
26529  # If so, the updated path is stored in $new_path.
26530  new_path="$input_to_shortpath"
26531
26532  input_path="$input_to_shortpath"
26533  # Check if we need to convert this using DOS-style short mode. If the path
26534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26535  # take no chances and rewrite it.
26536  # Note: m4 eats our [], so we need to use [ and ] instead.
26537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26538  if test "x$has_forbidden_chars" != x; then
26539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26540    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26541    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26542    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26543      # Going to short mode and back again did indeed matter. Since short mode is
26544      # case insensitive, let's make it lowercase to improve readability.
26545      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26546      # Now convert it back to Unix-stile (cygpath)
26547      input_path=`$CYGPATH -u "$shortmode_path"`
26548      new_path="$input_path"
26549    fi
26550  fi
26551
26552  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26553  if test "x$test_cygdrive_prefix" = x; then
26554    # As a simple fix, exclude /usr/bin since it's not a real path.
26555    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26556      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26557      # a path prefixed by /cygdrive for fixpath to work.
26558      new_path="$CYGWIN_ROOT_PATH$input_path"
26559    fi
26560  fi
26561
26562  # remove trailing .exe if any
26563  new_path="${new_path/%.exe/}"
26564
26565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26566
26567  # First separate the path from the arguments. This will split at the first
26568  # space.
26569  complete="$MCS"
26570  path="${complete%% *}"
26571  tmp="$complete EOL"
26572  arguments="${tmp#* }"
26573
26574  # Input might be given as Windows format, start by converting to
26575  # unix format.
26576  new_path="$path"
26577
26578  windows_path="$new_path"
26579  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26580    unix_path=`$CYGPATH -u "$windows_path"`
26581    new_path="$unix_path"
26582  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26583    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26584    new_path="$unix_path"
26585  fi
26586
26587
26588  # Now try to locate executable using which
26589  new_path=`$WHICH "$new_path" 2> /dev/null`
26590
26591  if test "x$new_path" = x; then
26592    # Oops. Which didn't find the executable.
26593    # The splitting of arguments from the executable at a space might have been incorrect,
26594    # since paths with space are more likely in Windows. Give it another try with the whole
26595    # argument.
26596    path="$complete"
26597    arguments="EOL"
26598    new_path="$path"
26599
26600  windows_path="$new_path"
26601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26602    unix_path=`$CYGPATH -u "$windows_path"`
26603    new_path="$unix_path"
26604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26605    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26606    new_path="$unix_path"
26607  fi
26608
26609
26610    new_path=`$WHICH "$new_path" 2> /dev/null`
26611
26612    if test "x$new_path" = x; then
26613      # It's still not found. Now this is an unrecoverable error.
26614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26615$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26616      has_space=`$ECHO "$complete" | $GREP " "`
26617      if test "x$has_space" != x; then
26618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26620      fi
26621      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26622    fi
26623  fi
26624
26625  # Now new_path has a complete unix path to the binary
26626  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26627    # Keep paths in /bin as-is, but remove trailing .exe if any
26628    new_path="${new_path/%.exe/}"
26629    # Do not save /bin paths to all_fixpath_prefixes!
26630  else
26631    # Not in mixed or Windows style, start by that.
26632    new_path=`cmd //c echo $new_path`
26633
26634  input_path="$new_path"
26635  # Check if we need to convert this using DOS-style short mode. If the path
26636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26637  # take no chances and rewrite it.
26638  # Note: m4 eats our [], so we need to use [ and ] instead.
26639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26640  if test "x$has_forbidden_chars" != x; then
26641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26643  fi
26644
26645    # Output is in $new_path
26646
26647  windows_path="$new_path"
26648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26649    unix_path=`$CYGPATH -u "$windows_path"`
26650    new_path="$unix_path"
26651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26653    new_path="$unix_path"
26654  fi
26655
26656    # remove trailing .exe if any
26657    new_path="${new_path/%.exe/}"
26658
26659    # Save the first 10 bytes of this path to the storage, so fixpath can work.
26660    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26661  fi
26662
26663  else
26664    # We're on a posix platform. Hooray! :)
26665    # First separate the path from the arguments. This will split at the first
26666    # space.
26667    complete="$MCS"
26668    path="${complete%% *}"
26669    tmp="$complete EOL"
26670    arguments="${tmp#* }"
26671
26672    # Cannot rely on the command "which" here since it doesn't always work.
26673    is_absolute_path=`$ECHO "$path" | $GREP ^/`
26674    if test -z "$is_absolute_path"; then
26675      # Path to executable is not absolute. Find it.
26676      IFS_save="$IFS"
26677      IFS=:
26678      for p in $PATH; do
26679        if test -f "$p/$path" && test -x "$p/$path"; then
26680          new_path="$p/$path"
26681          break
26682        fi
26683      done
26684      IFS="$IFS_save"
26685    else
26686      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving MCS (as $path) failed, using $path directly." >&5
26687$as_echo "$as_me: Resolving MCS (as $path) failed, using $path directly." >&6;}
26688      new_path="$path"
26689    fi
26690
26691    if test "x$new_path" = x; then
26692        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
26693$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
26694        has_space=`$ECHO "$complete" | $GREP " "`
26695        if test "x$has_space" != x; then
26696          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
26697$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
26698        fi
26699        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
26700      fi
26701  fi
26702
26703      # Now join together the path and the arguments once again
26704      if test "x$arguments" != xEOL; then
26705        new_complete="$new_path ${arguments% *}"
26706      else
26707        new_complete="$new_path"
26708      fi
26709
26710  if test "x$complete" != "x$new_complete"; then
26711      MCS="$new_complete"
26712      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
26713$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
26714    fi
26715
26716elif test "x$OPENJDK_TARGET_OS" != xwindows; then
26717    if test -n "$ac_tool_prefix"; then
26718  # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
26719set dummy ${ac_tool_prefix}nm; ac_word=$2
26720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26721$as_echo_n "checking for $ac_word... " >&6; }
26722if test "${ac_cv_prog_NM+set}" = set; then :
26723  $as_echo_n "(cached) " >&6
26724else
26725  if test -n "$NM"; then
26726  ac_cv_prog_NM="$NM" # Let the user override the test.
26727else
26728as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26729for as_dir in $PATH
26730do
26731  IFS=$as_save_IFS
26732  test -z "$as_dir" && as_dir=.
26733    for ac_exec_ext in '' $ac_executable_extensions; do
26734  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26735    ac_cv_prog_NM="${ac_tool_prefix}nm"
26736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26737    break 2
26738  fi
26739done
26740  done
26741IFS=$as_save_IFS
26742
26743fi
26744fi
26745NM=$ac_cv_prog_NM
26746if test -n "$NM"; then
26747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
26748$as_echo "$NM" >&6; }
26749else
26750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26751$as_echo "no" >&6; }
26752fi
26753
26754
26755fi
26756if test -z "$ac_cv_prog_NM"; then
26757  ac_ct_NM=$NM
26758  # Extract the first word of "nm", so it can be a program name with args.
26759set dummy nm; ac_word=$2
26760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26761$as_echo_n "checking for $ac_word... " >&6; }
26762if test "${ac_cv_prog_ac_ct_NM+set}" = set; then :
26763  $as_echo_n "(cached) " >&6
26764else
26765  if test -n "$ac_ct_NM"; then
26766  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
26767else
26768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26769for as_dir in $PATH
26770do
26771  IFS=$as_save_IFS
26772  test -z "$as_dir" && as_dir=.
26773    for ac_exec_ext in '' $ac_executable_extensions; do
26774  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
26775    ac_cv_prog_ac_ct_NM="nm"
26776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26777    break 2
26778  fi
26779done
26780  done
26781IFS=$as_save_IFS
26782
26783fi
26784fi
26785ac_ct_NM=$ac_cv_prog_ac_ct_NM
26786if test -n "$ac_ct_NM"; then
26787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
26788$as_echo "$ac_ct_NM" >&6; }
26789else
26790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26791$as_echo "no" >&6; }
26792fi
26793
26794  if test "x$ac_ct_NM" = x; then
26795    NM=""
26796  else
26797    case $cross_compiling:$ac_tool_warned in
26798yes:)
26799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
26800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
26801ac_tool_warned=yes ;;
26802esac
26803    NM=$ac_ct_NM
26804  fi
26805else
26806  NM="$ac_cv_prog_NM"
26807fi
26808
26809
26810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26811
26812  # First separate the path from the arguments. This will split at the first
26813  # space.
26814  complete="$NM"
26815  path="${complete%% *}"
26816  tmp="$complete EOL"
26817  arguments="${tmp#* }"
26818
26819  # Input might be given as Windows format, start by converting to
26820  # unix format.
26821  new_path=`$CYGPATH -u "$path"`
26822
26823  # Now try to locate executable using which
26824  new_path=`$WHICH "$new_path" 2> /dev/null`
26825  # bat and cmd files are not always considered executable in cygwin causing which
26826  # to not find them
26827  if test "x$new_path" = x \
26828           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26829           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26830    new_path=`$CYGPATH -u "$path"`
26831  fi
26832  if test "x$new_path" = x; then
26833    # Oops. Which didn't find the executable.
26834    # The splitting of arguments from the executable at a space might have been incorrect,
26835    # since paths with space are more likely in Windows. Give it another try with the whole
26836    # argument.
26837    path="$complete"
26838    arguments="EOL"
26839    new_path=`$CYGPATH -u "$path"`
26840    new_path=`$WHICH "$new_path" 2> /dev/null`
26841    # bat and cmd files are not always considered executable in cygwin causing which
26842    # to not find them
26843    if test "x$new_path" = x \
26844             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26845             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26846      new_path=`$CYGPATH -u "$path"`
26847    fi
26848    if test "x$new_path" = x; then
26849      # It's still not found. Now this is an unrecoverable error.
26850      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26851$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26852      has_space=`$ECHO "$complete" | $GREP " "`
26853      if test "x$has_space" != x; then
26854        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26855$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26856      fi
26857      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26858    fi
26859  fi
26860
26861  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26862  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26863  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26864  # "foo.exe" is OK but "foo" is an error.
26865  #
26866  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26867  # It is also a way to make sure we got the proper file name for the real test later on.
26868  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26869  if test "x$test_shortpath" = x; then
26870    # Short path failed, file does not exist as specified.
26871    # Try adding .exe or .cmd
26872    if test -f "${new_path}.exe"; then
26873       input_to_shortpath="${new_path}.exe"
26874    elif test -f "${new_path}.cmd"; then
26875       input_to_shortpath="${new_path}.cmd"
26876    else
26877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
26878$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
26879      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26880$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26881      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26882    fi
26883  else
26884    input_to_shortpath="$new_path"
26885  fi
26886
26887  # Call helper function which possibly converts this using DOS-style short mode.
26888  # If so, the updated path is stored in $new_path.
26889  new_path="$input_to_shortpath"
26890
26891  input_path="$input_to_shortpath"
26892  # Check if we need to convert this using DOS-style short mode. If the path
26893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26894  # take no chances and rewrite it.
26895  # Note: m4 eats our [], so we need to use [ and ] instead.
26896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26897  if test "x$has_forbidden_chars" != x; then
26898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26902      # Going to short mode and back again did indeed matter. Since short mode is
26903      # case insensitive, let's make it lowercase to improve readability.
26904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26905      # Now convert it back to Unix-stile (cygpath)
26906      input_path=`$CYGPATH -u "$shortmode_path"`
26907      new_path="$input_path"
26908    fi
26909  fi
26910
26911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26912  if test "x$test_cygdrive_prefix" = x; then
26913    # As a simple fix, exclude /usr/bin since it's not a real path.
26914    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26916      # a path prefixed by /cygdrive for fixpath to work.
26917      new_path="$CYGWIN_ROOT_PATH$input_path"
26918    fi
26919  fi
26920
26921  # remove trailing .exe if any
26922  new_path="${new_path/%.exe/}"
26923
26924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26925
26926  # First separate the path from the arguments. This will split at the first
26927  # space.
26928  complete="$NM"
26929  path="${complete%% *}"
26930  tmp="$complete EOL"
26931  arguments="${tmp#* }"
26932
26933  # Input might be given as Windows format, start by converting to
26934  # unix format.
26935  new_path="$path"
26936
26937  windows_path="$new_path"
26938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26939    unix_path=`$CYGPATH -u "$windows_path"`
26940    new_path="$unix_path"
26941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26943    new_path="$unix_path"
26944  fi
26945
26946
26947  # Now try to locate executable using which
26948  new_path=`$WHICH "$new_path" 2> /dev/null`
26949
26950  if test "x$new_path" = x; then
26951    # Oops. Which didn't find the executable.
26952    # The splitting of arguments from the executable at a space might have been incorrect,
26953    # since paths with space are more likely in Windows. Give it another try with the whole
26954    # argument.
26955    path="$complete"
26956    arguments="EOL"
26957    new_path="$path"
26958
26959  windows_path="$new_path"
26960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26961    unix_path=`$CYGPATH -u "$windows_path"`
26962    new_path="$unix_path"
26963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26965    new_path="$unix_path"
26966  fi
26967
26968
26969    new_path=`$WHICH "$new_path" 2> /dev/null`
26970
26971    if test "x$new_path" = x; then
26972      # It's still not found. Now this is an unrecoverable error.
26973      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
26974$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
26975      has_space=`$ECHO "$complete" | $GREP " "`
26976      if test "x$has_space" != x; then
26977        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26978$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26979      fi
26980      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
26981    fi
26982  fi
26983
26984  # Now new_path has a complete unix path to the binary
26985  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
26986    # Keep paths in /bin as-is, but remove trailing .exe if any
26987    new_path="${new_path/%.exe/}"
26988    # Do not save /bin paths to all_fixpath_prefixes!
26989  else
26990    # Not in mixed or Windows style, start by that.
26991    new_path=`cmd //c echo $new_path`
26992
26993  input_path="$new_path"
26994  # Check if we need to convert this using DOS-style short mode. If the path
26995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26996  # take no chances and rewrite it.
26997  # Note: m4 eats our [], so we need to use [ and ] instead.
26998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26999  if test "x$has_forbidden_chars" != x; then
27000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27002  fi
27003
27004    # Output is in $new_path
27005
27006  windows_path="$new_path"
27007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27008    unix_path=`$CYGPATH -u "$windows_path"`
27009    new_path="$unix_path"
27010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27012    new_path="$unix_path"
27013  fi
27014
27015    # remove trailing .exe if any
27016    new_path="${new_path/%.exe/}"
27017
27018    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27019    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27020  fi
27021
27022  else
27023    # We're on a posix platform. Hooray! :)
27024    # First separate the path from the arguments. This will split at the first
27025    # space.
27026    complete="$NM"
27027    path="${complete%% *}"
27028    tmp="$complete EOL"
27029    arguments="${tmp#* }"
27030
27031    # Cannot rely on the command "which" here since it doesn't always work.
27032    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27033    if test -z "$is_absolute_path"; then
27034      # Path to executable is not absolute. Find it.
27035      IFS_save="$IFS"
27036      IFS=:
27037      for p in $PATH; do
27038        if test -f "$p/$path" && test -x "$p/$path"; then
27039          new_path="$p/$path"
27040          break
27041        fi
27042      done
27043      IFS="$IFS_save"
27044    else
27045      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving NM (as $path) failed, using $path directly." >&5
27046$as_echo "$as_me: Resolving NM (as $path) failed, using $path directly." >&6;}
27047      new_path="$path"
27048    fi
27049
27050    if test "x$new_path" = x; then
27051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
27052$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
27053        has_space=`$ECHO "$complete" | $GREP " "`
27054        if test "x$has_space" != x; then
27055          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27057        fi
27058        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
27059      fi
27060  fi
27061
27062      # Now join together the path and the arguments once again
27063      if test "x$arguments" != xEOL; then
27064        new_complete="$new_path ${arguments% *}"
27065      else
27066        new_complete="$new_path"
27067      fi
27068
27069  if test "x$complete" != "x$new_complete"; then
27070      NM="$new_complete"
27071      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
27072$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
27073    fi
27074
27075    GNM="$NM"
27076
27077    if test -n "$ac_tool_prefix"; then
27078  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
27079set dummy ${ac_tool_prefix}strip; ac_word=$2
27080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27081$as_echo_n "checking for $ac_word... " >&6; }
27082if test "${ac_cv_prog_STRIP+set}" = set; then :
27083  $as_echo_n "(cached) " >&6
27084else
27085  if test -n "$STRIP"; then
27086  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
27087else
27088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27089for as_dir in $PATH
27090do
27091  IFS=$as_save_IFS
27092  test -z "$as_dir" && as_dir=.
27093    for ac_exec_ext in '' $ac_executable_extensions; do
27094  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27095    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
27096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27097    break 2
27098  fi
27099done
27100  done
27101IFS=$as_save_IFS
27102
27103fi
27104fi
27105STRIP=$ac_cv_prog_STRIP
27106if test -n "$STRIP"; then
27107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
27108$as_echo "$STRIP" >&6; }
27109else
27110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27111$as_echo "no" >&6; }
27112fi
27113
27114
27115fi
27116if test -z "$ac_cv_prog_STRIP"; then
27117  ac_ct_STRIP=$STRIP
27118  # Extract the first word of "strip", so it can be a program name with args.
27119set dummy strip; ac_word=$2
27120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27121$as_echo_n "checking for $ac_word... " >&6; }
27122if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
27123  $as_echo_n "(cached) " >&6
27124else
27125  if test -n "$ac_ct_STRIP"; then
27126  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
27127else
27128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27129for as_dir in $PATH
27130do
27131  IFS=$as_save_IFS
27132  test -z "$as_dir" && as_dir=.
27133    for ac_exec_ext in '' $ac_executable_extensions; do
27134  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27135    ac_cv_prog_ac_ct_STRIP="strip"
27136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27137    break 2
27138  fi
27139done
27140  done
27141IFS=$as_save_IFS
27142
27143fi
27144fi
27145ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
27146if test -n "$ac_ct_STRIP"; then
27147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
27148$as_echo "$ac_ct_STRIP" >&6; }
27149else
27150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27151$as_echo "no" >&6; }
27152fi
27153
27154  if test "x$ac_ct_STRIP" = x; then
27155    STRIP=""
27156  else
27157    case $cross_compiling:$ac_tool_warned in
27158yes:)
27159{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27160$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27161ac_tool_warned=yes ;;
27162esac
27163    STRIP=$ac_ct_STRIP
27164  fi
27165else
27166  STRIP="$ac_cv_prog_STRIP"
27167fi
27168
27169
27170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27171
27172  # First separate the path from the arguments. This will split at the first
27173  # space.
27174  complete="$STRIP"
27175  path="${complete%% *}"
27176  tmp="$complete EOL"
27177  arguments="${tmp#* }"
27178
27179  # Input might be given as Windows format, start by converting to
27180  # unix format.
27181  new_path=`$CYGPATH -u "$path"`
27182
27183  # Now try to locate executable using which
27184  new_path=`$WHICH "$new_path" 2> /dev/null`
27185  # bat and cmd files are not always considered executable in cygwin causing which
27186  # to not find them
27187  if test "x$new_path" = x \
27188           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27189           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27190    new_path=`$CYGPATH -u "$path"`
27191  fi
27192  if test "x$new_path" = x; then
27193    # Oops. Which didn't find the executable.
27194    # The splitting of arguments from the executable at a space might have been incorrect,
27195    # since paths with space are more likely in Windows. Give it another try with the whole
27196    # argument.
27197    path="$complete"
27198    arguments="EOL"
27199    new_path=`$CYGPATH -u "$path"`
27200    new_path=`$WHICH "$new_path" 2> /dev/null`
27201    # bat and cmd files are not always considered executable in cygwin causing which
27202    # to not find them
27203    if test "x$new_path" = x \
27204             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27205             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27206      new_path=`$CYGPATH -u "$path"`
27207    fi
27208    if test "x$new_path" = x; then
27209      # It's still not found. Now this is an unrecoverable error.
27210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27211$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27212      has_space=`$ECHO "$complete" | $GREP " "`
27213      if test "x$has_space" != x; then
27214        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27215$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27216      fi
27217      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27218    fi
27219  fi
27220
27221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27224  # "foo.exe" is OK but "foo" is an error.
27225  #
27226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27227  # It is also a way to make sure we got the proper file name for the real test later on.
27228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27229  if test "x$test_shortpath" = x; then
27230    # Short path failed, file does not exist as specified.
27231    # Try adding .exe or .cmd
27232    if test -f "${new_path}.exe"; then
27233       input_to_shortpath="${new_path}.exe"
27234    elif test -f "${new_path}.cmd"; then
27235       input_to_shortpath="${new_path}.cmd"
27236    else
27237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
27238$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
27239      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27240$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27241      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27242    fi
27243  else
27244    input_to_shortpath="$new_path"
27245  fi
27246
27247  # Call helper function which possibly converts this using DOS-style short mode.
27248  # If so, the updated path is stored in $new_path.
27249  new_path="$input_to_shortpath"
27250
27251  input_path="$input_to_shortpath"
27252  # Check if we need to convert this using DOS-style short mode. If the path
27253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27254  # take no chances and rewrite it.
27255  # Note: m4 eats our [], so we need to use [ and ] instead.
27256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27257  if test "x$has_forbidden_chars" != x; then
27258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27262      # Going to short mode and back again did indeed matter. Since short mode is
27263      # case insensitive, let's make it lowercase to improve readability.
27264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27265      # Now convert it back to Unix-stile (cygpath)
27266      input_path=`$CYGPATH -u "$shortmode_path"`
27267      new_path="$input_path"
27268    fi
27269  fi
27270
27271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27272  if test "x$test_cygdrive_prefix" = x; then
27273    # As a simple fix, exclude /usr/bin since it's not a real path.
27274    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27276      # a path prefixed by /cygdrive for fixpath to work.
27277      new_path="$CYGWIN_ROOT_PATH$input_path"
27278    fi
27279  fi
27280
27281  # remove trailing .exe if any
27282  new_path="${new_path/%.exe/}"
27283
27284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27285
27286  # First separate the path from the arguments. This will split at the first
27287  # space.
27288  complete="$STRIP"
27289  path="${complete%% *}"
27290  tmp="$complete EOL"
27291  arguments="${tmp#* }"
27292
27293  # Input might be given as Windows format, start by converting to
27294  # unix format.
27295  new_path="$path"
27296
27297  windows_path="$new_path"
27298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27299    unix_path=`$CYGPATH -u "$windows_path"`
27300    new_path="$unix_path"
27301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27303    new_path="$unix_path"
27304  fi
27305
27306
27307  # Now try to locate executable using which
27308  new_path=`$WHICH "$new_path" 2> /dev/null`
27309
27310  if test "x$new_path" = x; then
27311    # Oops. Which didn't find the executable.
27312    # The splitting of arguments from the executable at a space might have been incorrect,
27313    # since paths with space are more likely in Windows. Give it another try with the whole
27314    # argument.
27315    path="$complete"
27316    arguments="EOL"
27317    new_path="$path"
27318
27319  windows_path="$new_path"
27320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27321    unix_path=`$CYGPATH -u "$windows_path"`
27322    new_path="$unix_path"
27323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27324    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27325    new_path="$unix_path"
27326  fi
27327
27328
27329    new_path=`$WHICH "$new_path" 2> /dev/null`
27330
27331    if test "x$new_path" = x; then
27332      # It's still not found. Now this is an unrecoverable error.
27333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27334$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27335      has_space=`$ECHO "$complete" | $GREP " "`
27336      if test "x$has_space" != x; then
27337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27339      fi
27340      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27341    fi
27342  fi
27343
27344  # Now new_path has a complete unix path to the binary
27345  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27346    # Keep paths in /bin as-is, but remove trailing .exe if any
27347    new_path="${new_path/%.exe/}"
27348    # Do not save /bin paths to all_fixpath_prefixes!
27349  else
27350    # Not in mixed or Windows style, start by that.
27351    new_path=`cmd //c echo $new_path`
27352
27353  input_path="$new_path"
27354  # Check if we need to convert this using DOS-style short mode. If the path
27355  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27356  # take no chances and rewrite it.
27357  # Note: m4 eats our [], so we need to use [ and ] instead.
27358  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27359  if test "x$has_forbidden_chars" != x; then
27360    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27361    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27362  fi
27363
27364    # Output is in $new_path
27365
27366  windows_path="$new_path"
27367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27368    unix_path=`$CYGPATH -u "$windows_path"`
27369    new_path="$unix_path"
27370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27372    new_path="$unix_path"
27373  fi
27374
27375    # remove trailing .exe if any
27376    new_path="${new_path/%.exe/}"
27377
27378    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27379    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27380  fi
27381
27382  else
27383    # We're on a posix platform. Hooray! :)
27384    # First separate the path from the arguments. This will split at the first
27385    # space.
27386    complete="$STRIP"
27387    path="${complete%% *}"
27388    tmp="$complete EOL"
27389    arguments="${tmp#* }"
27390
27391    # Cannot rely on the command "which" here since it doesn't always work.
27392    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27393    if test -z "$is_absolute_path"; then
27394      # Path to executable is not absolute. Find it.
27395      IFS_save="$IFS"
27396      IFS=:
27397      for p in $PATH; do
27398        if test -f "$p/$path" && test -x "$p/$path"; then
27399          new_path="$p/$path"
27400          break
27401        fi
27402      done
27403      IFS="$IFS_save"
27404    else
27405      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving STRIP (as $path) failed, using $path directly." >&5
27406$as_echo "$as_me: Resolving STRIP (as $path) failed, using $path directly." >&6;}
27407      new_path="$path"
27408    fi
27409
27410    if test "x$new_path" = x; then
27411        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
27412$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
27413        has_space=`$ECHO "$complete" | $GREP " "`
27414        if test "x$has_space" != x; then
27415          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27416$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27417        fi
27418        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
27419      fi
27420  fi
27421
27422      # Now join together the path and the arguments once again
27423      if test "x$arguments" != xEOL; then
27424        new_complete="$new_path ${arguments% *}"
27425      else
27426        new_complete="$new_path"
27427      fi
27428
27429  if test "x$complete" != "x$new_complete"; then
27430      STRIP="$new_complete"
27431      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
27432$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
27433    fi
27434
27435fi
27436
27437# objcopy is used for moving debug symbols to separate files when
27438# full debug symbols are enabled.
27439if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
27440    if test -n "$ac_tool_prefix"; then
27441  for ac_prog in gobjcopy objcopy
27442  do
27443    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27444set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27446$as_echo_n "checking for $ac_word... " >&6; }
27447if test "${ac_cv_prog_OBJCOPY+set}" = set; then :
27448  $as_echo_n "(cached) " >&6
27449else
27450  if test -n "$OBJCOPY"; then
27451  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
27452else
27453as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27454for as_dir in $PATH
27455do
27456  IFS=$as_save_IFS
27457  test -z "$as_dir" && as_dir=.
27458    for ac_exec_ext in '' $ac_executable_extensions; do
27459  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27460    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
27461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27462    break 2
27463  fi
27464done
27465  done
27466IFS=$as_save_IFS
27467
27468fi
27469fi
27470OBJCOPY=$ac_cv_prog_OBJCOPY
27471if test -n "$OBJCOPY"; then
27472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
27473$as_echo "$OBJCOPY" >&6; }
27474else
27475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27476$as_echo "no" >&6; }
27477fi
27478
27479
27480    test -n "$OBJCOPY" && break
27481  done
27482fi
27483if test -z "$OBJCOPY"; then
27484  ac_ct_OBJCOPY=$OBJCOPY
27485  for ac_prog in gobjcopy objcopy
27486do
27487  # Extract the first word of "$ac_prog", so it can be a program name with args.
27488set dummy $ac_prog; ac_word=$2
27489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27490$as_echo_n "checking for $ac_word... " >&6; }
27491if test "${ac_cv_prog_ac_ct_OBJCOPY+set}" = set; then :
27492  $as_echo_n "(cached) " >&6
27493else
27494  if test -n "$ac_ct_OBJCOPY"; then
27495  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
27496else
27497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27498for as_dir in $PATH
27499do
27500  IFS=$as_save_IFS
27501  test -z "$as_dir" && as_dir=.
27502    for ac_exec_ext in '' $ac_executable_extensions; do
27503  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27504    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
27505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27506    break 2
27507  fi
27508done
27509  done
27510IFS=$as_save_IFS
27511
27512fi
27513fi
27514ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
27515if test -n "$ac_ct_OBJCOPY"; then
27516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
27517$as_echo "$ac_ct_OBJCOPY" >&6; }
27518else
27519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27520$as_echo "no" >&6; }
27521fi
27522
27523
27524  test -n "$ac_ct_OBJCOPY" && break
27525done
27526
27527  if test "x$ac_ct_OBJCOPY" = x; then
27528    OBJCOPY=""
27529  else
27530    case $cross_compiling:$ac_tool_warned in
27531yes:)
27532{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27533$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27534ac_tool_warned=yes ;;
27535esac
27536    OBJCOPY=$ac_ct_OBJCOPY
27537  fi
27538fi
27539
27540    # Only call fixup if objcopy was found.
27541    if test -n "$OBJCOPY"; then
27542
27543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27544
27545  # First separate the path from the arguments. This will split at the first
27546  # space.
27547  complete="$OBJCOPY"
27548  path="${complete%% *}"
27549  tmp="$complete EOL"
27550  arguments="${tmp#* }"
27551
27552  # Input might be given as Windows format, start by converting to
27553  # unix format.
27554  new_path=`$CYGPATH -u "$path"`
27555
27556  # Now try to locate executable using which
27557  new_path=`$WHICH "$new_path" 2> /dev/null`
27558  # bat and cmd files are not always considered executable in cygwin causing which
27559  # to not find them
27560  if test "x$new_path" = x \
27561           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27562           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27563    new_path=`$CYGPATH -u "$path"`
27564  fi
27565  if test "x$new_path" = x; then
27566    # Oops. Which didn't find the executable.
27567    # The splitting of arguments from the executable at a space might have been incorrect,
27568    # since paths with space are more likely in Windows. Give it another try with the whole
27569    # argument.
27570    path="$complete"
27571    arguments="EOL"
27572    new_path=`$CYGPATH -u "$path"`
27573    new_path=`$WHICH "$new_path" 2> /dev/null`
27574    # bat and cmd files are not always considered executable in cygwin causing which
27575    # to not find them
27576    if test "x$new_path" = x \
27577             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27578             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27579      new_path=`$CYGPATH -u "$path"`
27580    fi
27581    if test "x$new_path" = x; then
27582      # It's still not found. Now this is an unrecoverable error.
27583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27584$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27585      has_space=`$ECHO "$complete" | $GREP " "`
27586      if test "x$has_space" != x; then
27587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27589      fi
27590      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27591    fi
27592  fi
27593
27594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27597  # "foo.exe" is OK but "foo" is an error.
27598  #
27599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27600  # It is also a way to make sure we got the proper file name for the real test later on.
27601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27602  if test "x$test_shortpath" = x; then
27603    # Short path failed, file does not exist as specified.
27604    # Try adding .exe or .cmd
27605    if test -f "${new_path}.exe"; then
27606       input_to_shortpath="${new_path}.exe"
27607    elif test -f "${new_path}.cmd"; then
27608       input_to_shortpath="${new_path}.cmd"
27609    else
27610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
27611$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
27612      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27613$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27614      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27615    fi
27616  else
27617    input_to_shortpath="$new_path"
27618  fi
27619
27620  # Call helper function which possibly converts this using DOS-style short mode.
27621  # If so, the updated path is stored in $new_path.
27622  new_path="$input_to_shortpath"
27623
27624  input_path="$input_to_shortpath"
27625  # Check if we need to convert this using DOS-style short mode. If the path
27626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27627  # take no chances and rewrite it.
27628  # Note: m4 eats our [], so we need to use [ and ] instead.
27629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27630  if test "x$has_forbidden_chars" != x; then
27631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27635      # Going to short mode and back again did indeed matter. Since short mode is
27636      # case insensitive, let's make it lowercase to improve readability.
27637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27638      # Now convert it back to Unix-stile (cygpath)
27639      input_path=`$CYGPATH -u "$shortmode_path"`
27640      new_path="$input_path"
27641    fi
27642  fi
27643
27644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27645  if test "x$test_cygdrive_prefix" = x; then
27646    # As a simple fix, exclude /usr/bin since it's not a real path.
27647    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27649      # a path prefixed by /cygdrive for fixpath to work.
27650      new_path="$CYGWIN_ROOT_PATH$input_path"
27651    fi
27652  fi
27653
27654  # remove trailing .exe if any
27655  new_path="${new_path/%.exe/}"
27656
27657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27658
27659  # First separate the path from the arguments. This will split at the first
27660  # space.
27661  complete="$OBJCOPY"
27662  path="${complete%% *}"
27663  tmp="$complete EOL"
27664  arguments="${tmp#* }"
27665
27666  # Input might be given as Windows format, start by converting to
27667  # unix format.
27668  new_path="$path"
27669
27670  windows_path="$new_path"
27671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27672    unix_path=`$CYGPATH -u "$windows_path"`
27673    new_path="$unix_path"
27674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27676    new_path="$unix_path"
27677  fi
27678
27679
27680  # Now try to locate executable using which
27681  new_path=`$WHICH "$new_path" 2> /dev/null`
27682
27683  if test "x$new_path" = x; then
27684    # Oops. Which didn't find the executable.
27685    # The splitting of arguments from the executable at a space might have been incorrect,
27686    # since paths with space are more likely in Windows. Give it another try with the whole
27687    # argument.
27688    path="$complete"
27689    arguments="EOL"
27690    new_path="$path"
27691
27692  windows_path="$new_path"
27693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27694    unix_path=`$CYGPATH -u "$windows_path"`
27695    new_path="$unix_path"
27696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27698    new_path="$unix_path"
27699  fi
27700
27701
27702    new_path=`$WHICH "$new_path" 2> /dev/null`
27703
27704    if test "x$new_path" = x; then
27705      # It's still not found. Now this is an unrecoverable error.
27706      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27707$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27708      has_space=`$ECHO "$complete" | $GREP " "`
27709      if test "x$has_space" != x; then
27710        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27711$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27712      fi
27713      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27714    fi
27715  fi
27716
27717  # Now new_path has a complete unix path to the binary
27718  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27719    # Keep paths in /bin as-is, but remove trailing .exe if any
27720    new_path="${new_path/%.exe/}"
27721    # Do not save /bin paths to all_fixpath_prefixes!
27722  else
27723    # Not in mixed or Windows style, start by that.
27724    new_path=`cmd //c echo $new_path`
27725
27726  input_path="$new_path"
27727  # Check if we need to convert this using DOS-style short mode. If the path
27728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27729  # take no chances and rewrite it.
27730  # Note: m4 eats our [], so we need to use [ and ] instead.
27731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27732  if test "x$has_forbidden_chars" != x; then
27733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27735  fi
27736
27737    # Output is in $new_path
27738
27739  windows_path="$new_path"
27740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27741    unix_path=`$CYGPATH -u "$windows_path"`
27742    new_path="$unix_path"
27743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27745    new_path="$unix_path"
27746  fi
27747
27748    # remove trailing .exe if any
27749    new_path="${new_path/%.exe/}"
27750
27751    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27752    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27753  fi
27754
27755  else
27756    # We're on a posix platform. Hooray! :)
27757    # First separate the path from the arguments. This will split at the first
27758    # space.
27759    complete="$OBJCOPY"
27760    path="${complete%% *}"
27761    tmp="$complete EOL"
27762    arguments="${tmp#* }"
27763
27764    # Cannot rely on the command "which" here since it doesn't always work.
27765    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27766    if test -z "$is_absolute_path"; then
27767      # Path to executable is not absolute. Find it.
27768      IFS_save="$IFS"
27769      IFS=:
27770      for p in $PATH; do
27771        if test -f "$p/$path" && test -x "$p/$path"; then
27772          new_path="$p/$path"
27773          break
27774        fi
27775      done
27776      IFS="$IFS_save"
27777    else
27778      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJCOPY (as $path) failed, using $path directly." >&5
27779$as_echo "$as_me: Resolving OBJCOPY (as $path) failed, using $path directly." >&6;}
27780      new_path="$path"
27781    fi
27782
27783    if test "x$new_path" = x; then
27784        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
27785$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
27786        has_space=`$ECHO "$complete" | $GREP " "`
27787        if test "x$has_space" != x; then
27788          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27789$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27790        fi
27791        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
27792      fi
27793  fi
27794
27795      # Now join together the path and the arguments once again
27796      if test "x$arguments" != xEOL; then
27797        new_complete="$new_path ${arguments% *}"
27798      else
27799        new_complete="$new_path"
27800      fi
27801
27802  if test "x$complete" != "x$new_complete"; then
27803      OBJCOPY="$new_complete"
27804      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
27805$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
27806    fi
27807
27808    fi
27809fi
27810
27811if test -n "$ac_tool_prefix"; then
27812  for ac_prog in gobjdump objdump
27813  do
27814    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27815set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27817$as_echo_n "checking for $ac_word... " >&6; }
27818if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
27819  $as_echo_n "(cached) " >&6
27820else
27821  if test -n "$OBJDUMP"; then
27822  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
27823else
27824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27825for as_dir in $PATH
27826do
27827  IFS=$as_save_IFS
27828  test -z "$as_dir" && as_dir=.
27829    for ac_exec_ext in '' $ac_executable_extensions; do
27830  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27831    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
27832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27833    break 2
27834  fi
27835done
27836  done
27837IFS=$as_save_IFS
27838
27839fi
27840fi
27841OBJDUMP=$ac_cv_prog_OBJDUMP
27842if test -n "$OBJDUMP"; then
27843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
27844$as_echo "$OBJDUMP" >&6; }
27845else
27846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27847$as_echo "no" >&6; }
27848fi
27849
27850
27851    test -n "$OBJDUMP" && break
27852  done
27853fi
27854if test -z "$OBJDUMP"; then
27855  ac_ct_OBJDUMP=$OBJDUMP
27856  for ac_prog in gobjdump objdump
27857do
27858  # Extract the first word of "$ac_prog", so it can be a program name with args.
27859set dummy $ac_prog; ac_word=$2
27860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27861$as_echo_n "checking for $ac_word... " >&6; }
27862if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
27863  $as_echo_n "(cached) " >&6
27864else
27865  if test -n "$ac_ct_OBJDUMP"; then
27866  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
27867else
27868as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27869for as_dir in $PATH
27870do
27871  IFS=$as_save_IFS
27872  test -z "$as_dir" && as_dir=.
27873    for ac_exec_ext in '' $ac_executable_extensions; do
27874  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27875    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
27876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27877    break 2
27878  fi
27879done
27880  done
27881IFS=$as_save_IFS
27882
27883fi
27884fi
27885ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
27886if test -n "$ac_ct_OBJDUMP"; then
27887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
27888$as_echo "$ac_ct_OBJDUMP" >&6; }
27889else
27890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27891$as_echo "no" >&6; }
27892fi
27893
27894
27895  test -n "$ac_ct_OBJDUMP" && break
27896done
27897
27898  if test "x$ac_ct_OBJDUMP" = x; then
27899    OBJDUMP=""
27900  else
27901    case $cross_compiling:$ac_tool_warned in
27902yes:)
27903{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
27904$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
27905ac_tool_warned=yes ;;
27906esac
27907    OBJDUMP=$ac_ct_OBJDUMP
27908  fi
27909fi
27910
27911if test "x$OBJDUMP" != x; then
27912  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
27913
27914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27915
27916  # First separate the path from the arguments. This will split at the first
27917  # space.
27918  complete="$OBJDUMP"
27919  path="${complete%% *}"
27920  tmp="$complete EOL"
27921  arguments="${tmp#* }"
27922
27923  # Input might be given as Windows format, start by converting to
27924  # unix format.
27925  new_path=`$CYGPATH -u "$path"`
27926
27927  # Now try to locate executable using which
27928  new_path=`$WHICH "$new_path" 2> /dev/null`
27929  # bat and cmd files are not always considered executable in cygwin causing which
27930  # to not find them
27931  if test "x$new_path" = x \
27932           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27933           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27934    new_path=`$CYGPATH -u "$path"`
27935  fi
27936  if test "x$new_path" = x; then
27937    # Oops. Which didn't find the executable.
27938    # The splitting of arguments from the executable at a space might have been incorrect,
27939    # since paths with space are more likely in Windows. Give it another try with the whole
27940    # argument.
27941    path="$complete"
27942    arguments="EOL"
27943    new_path=`$CYGPATH -u "$path"`
27944    new_path=`$WHICH "$new_path" 2> /dev/null`
27945    # bat and cmd files are not always considered executable in cygwin causing which
27946    # to not find them
27947    if test "x$new_path" = x \
27948             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27949             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27950      new_path=`$CYGPATH -u "$path"`
27951    fi
27952    if test "x$new_path" = x; then
27953      # It's still not found. Now this is an unrecoverable error.
27954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
27955$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
27956      has_space=`$ECHO "$complete" | $GREP " "`
27957      if test "x$has_space" != x; then
27958        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27959$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27960      fi
27961      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27962    fi
27963  fi
27964
27965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27968  # "foo.exe" is OK but "foo" is an error.
27969  #
27970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27971  # It is also a way to make sure we got the proper file name for the real test later on.
27972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27973  if test "x$test_shortpath" = x; then
27974    # Short path failed, file does not exist as specified.
27975    # Try adding .exe or .cmd
27976    if test -f "${new_path}.exe"; then
27977       input_to_shortpath="${new_path}.exe"
27978    elif test -f "${new_path}.cmd"; then
27979       input_to_shortpath="${new_path}.cmd"
27980    else
27981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
27982$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
27983      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27984$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27985      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
27986    fi
27987  else
27988    input_to_shortpath="$new_path"
27989  fi
27990
27991  # Call helper function which possibly converts this using DOS-style short mode.
27992  # If so, the updated path is stored in $new_path.
27993  new_path="$input_to_shortpath"
27994
27995  input_path="$input_to_shortpath"
27996  # Check if we need to convert this using DOS-style short mode. If the path
27997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27998  # take no chances and rewrite it.
27999  # Note: m4 eats our [], so we need to use [ and ] instead.
28000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28001  if test "x$has_forbidden_chars" != x; then
28002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28006      # Going to short mode and back again did indeed matter. Since short mode is
28007      # case insensitive, let's make it lowercase to improve readability.
28008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28009      # Now convert it back to Unix-stile (cygpath)
28010      input_path=`$CYGPATH -u "$shortmode_path"`
28011      new_path="$input_path"
28012    fi
28013  fi
28014
28015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28016  if test "x$test_cygdrive_prefix" = x; then
28017    # As a simple fix, exclude /usr/bin since it's not a real path.
28018    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28020      # a path prefixed by /cygdrive for fixpath to work.
28021      new_path="$CYGWIN_ROOT_PATH$input_path"
28022    fi
28023  fi
28024
28025  # remove trailing .exe if any
28026  new_path="${new_path/%.exe/}"
28027
28028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28029
28030  # First separate the path from the arguments. This will split at the first
28031  # space.
28032  complete="$OBJDUMP"
28033  path="${complete%% *}"
28034  tmp="$complete EOL"
28035  arguments="${tmp#* }"
28036
28037  # Input might be given as Windows format, start by converting to
28038  # unix format.
28039  new_path="$path"
28040
28041  windows_path="$new_path"
28042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28043    unix_path=`$CYGPATH -u "$windows_path"`
28044    new_path="$unix_path"
28045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28047    new_path="$unix_path"
28048  fi
28049
28050
28051  # Now try to locate executable using which
28052  new_path=`$WHICH "$new_path" 2> /dev/null`
28053
28054  if test "x$new_path" = x; then
28055    # Oops. Which didn't find the executable.
28056    # The splitting of arguments from the executable at a space might have been incorrect,
28057    # since paths with space are more likely in Windows. Give it another try with the whole
28058    # argument.
28059    path="$complete"
28060    arguments="EOL"
28061    new_path="$path"
28062
28063  windows_path="$new_path"
28064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28065    unix_path=`$CYGPATH -u "$windows_path"`
28066    new_path="$unix_path"
28067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28069    new_path="$unix_path"
28070  fi
28071
28072
28073    new_path=`$WHICH "$new_path" 2> /dev/null`
28074
28075    if test "x$new_path" = x; then
28076      # It's still not found. Now this is an unrecoverable error.
28077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28078$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28079      has_space=`$ECHO "$complete" | $GREP " "`
28080      if test "x$has_space" != x; then
28081        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28082$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28083      fi
28084      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28085    fi
28086  fi
28087
28088  # Now new_path has a complete unix path to the binary
28089  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28090    # Keep paths in /bin as-is, but remove trailing .exe if any
28091    new_path="${new_path/%.exe/}"
28092    # Do not save /bin paths to all_fixpath_prefixes!
28093  else
28094    # Not in mixed or Windows style, start by that.
28095    new_path=`cmd //c echo $new_path`
28096
28097  input_path="$new_path"
28098  # Check if we need to convert this using DOS-style short mode. If the path
28099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28100  # take no chances and rewrite it.
28101  # Note: m4 eats our [], so we need to use [ and ] instead.
28102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28103  if test "x$has_forbidden_chars" != x; then
28104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28105    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28106  fi
28107
28108    # Output is in $new_path
28109
28110  windows_path="$new_path"
28111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28112    unix_path=`$CYGPATH -u "$windows_path"`
28113    new_path="$unix_path"
28114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28116    new_path="$unix_path"
28117  fi
28118
28119    # remove trailing .exe if any
28120    new_path="${new_path/%.exe/}"
28121
28122    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28123    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28124  fi
28125
28126  else
28127    # We're on a posix platform. Hooray! :)
28128    # First separate the path from the arguments. This will split at the first
28129    # space.
28130    complete="$OBJDUMP"
28131    path="${complete%% *}"
28132    tmp="$complete EOL"
28133    arguments="${tmp#* }"
28134
28135    # Cannot rely on the command "which" here since it doesn't always work.
28136    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28137    if test -z "$is_absolute_path"; then
28138      # Path to executable is not absolute. Find it.
28139      IFS_save="$IFS"
28140      IFS=:
28141      for p in $PATH; do
28142        if test -f "$p/$path" && test -x "$p/$path"; then
28143          new_path="$p/$path"
28144          break
28145        fi
28146      done
28147      IFS="$IFS_save"
28148    else
28149      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving OBJDUMP (as $path) failed, using $path directly." >&5
28150$as_echo "$as_me: Resolving OBJDUMP (as $path) failed, using $path directly." >&6;}
28151      new_path="$path"
28152    fi
28153
28154    if test "x$new_path" = x; then
28155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
28156$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
28157        has_space=`$ECHO "$complete" | $GREP " "`
28158        if test "x$has_space" != x; then
28159          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28160$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28161        fi
28162        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
28163      fi
28164  fi
28165
28166      # Now join together the path and the arguments once again
28167      if test "x$arguments" != xEOL; then
28168        new_complete="$new_path ${arguments% *}"
28169      else
28170        new_complete="$new_path"
28171      fi
28172
28173  if test "x$complete" != "x$new_complete"; then
28174      OBJDUMP="$new_complete"
28175      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
28176$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
28177    fi
28178
28179fi
28180
28181if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
28182   # Extract the first word of "lipo", so it can be a program name with args.
28183set dummy lipo; ac_word=$2
28184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28185$as_echo_n "checking for $ac_word... " >&6; }
28186if test "${ac_cv_path_LIPO+set}" = set; then :
28187  $as_echo_n "(cached) " >&6
28188else
28189  case $LIPO in
28190  [\\/]* | ?:[\\/]*)
28191  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
28192  ;;
28193  *)
28194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28195for as_dir in $PATH
28196do
28197  IFS=$as_save_IFS
28198  test -z "$as_dir" && as_dir=.
28199    for ac_exec_ext in '' $ac_executable_extensions; do
28200  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
28201    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
28202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28203    break 2
28204  fi
28205done
28206  done
28207IFS=$as_save_IFS
28208
28209  ;;
28210esac
28211fi
28212LIPO=$ac_cv_path_LIPO
28213if test -n "$LIPO"; then
28214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
28215$as_echo "$LIPO" >&6; }
28216else
28217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28218$as_echo "no" >&6; }
28219fi
28220
28221
28222
28223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28224
28225  # First separate the path from the arguments. This will split at the first
28226  # space.
28227  complete="$LIPO"
28228  path="${complete%% *}"
28229  tmp="$complete EOL"
28230  arguments="${tmp#* }"
28231
28232  # Input might be given as Windows format, start by converting to
28233  # unix format.
28234  new_path=`$CYGPATH -u "$path"`
28235
28236  # Now try to locate executable using which
28237  new_path=`$WHICH "$new_path" 2> /dev/null`
28238  # bat and cmd files are not always considered executable in cygwin causing which
28239  # to not find them
28240  if test "x$new_path" = x \
28241           && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28242           && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28243    new_path=`$CYGPATH -u "$path"`
28244  fi
28245  if test "x$new_path" = x; then
28246    # Oops. Which didn't find the executable.
28247    # The splitting of arguments from the executable at a space might have been incorrect,
28248    # since paths with space are more likely in Windows. Give it another try with the whole
28249    # argument.
28250    path="$complete"
28251    arguments="EOL"
28252    new_path=`$CYGPATH -u "$path"`
28253    new_path=`$WHICH "$new_path" 2> /dev/null`
28254    # bat and cmd files are not always considered executable in cygwin causing which
28255    # to not find them
28256    if test "x$new_path" = x \
28257             && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28258             && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28259      new_path=`$CYGPATH -u "$path"`
28260    fi
28261    if test "x$new_path" = x; then
28262      # It's still not found. Now this is an unrecoverable error.
28263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28264$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28265      has_space=`$ECHO "$complete" | $GREP " "`
28266      if test "x$has_space" != x; then
28267        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28268$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28269      fi
28270      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28271    fi
28272  fi
28273
28274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28277  # "foo.exe" is OK but "foo" is an error.
28278  #
28279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28280  # It is also a way to make sure we got the proper file name for the real test later on.
28281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28282  if test "x$test_shortpath" = x; then
28283    # Short path failed, file does not exist as specified.
28284    # Try adding .exe or .cmd
28285    if test -f "${new_path}.exe"; then
28286       input_to_shortpath="${new_path}.exe"
28287    elif test -f "${new_path}.cmd"; then
28288       input_to_shortpath="${new_path}.cmd"
28289    else
28290      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
28291$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
28292      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28293$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28294      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28295    fi
28296  else
28297    input_to_shortpath="$new_path"
28298  fi
28299
28300  # Call helper function which possibly converts this using DOS-style short mode.
28301  # If so, the updated path is stored in $new_path.
28302  new_path="$input_to_shortpath"
28303
28304  input_path="$input_to_shortpath"
28305  # Check if we need to convert this using DOS-style short mode. If the path
28306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28307  # take no chances and rewrite it.
28308  # Note: m4 eats our [], so we need to use [ and ] instead.
28309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28310  if test "x$has_forbidden_chars" != x; then
28311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28315      # Going to short mode and back again did indeed matter. Since short mode is
28316      # case insensitive, let's make it lowercase to improve readability.
28317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28318      # Now convert it back to Unix-stile (cygpath)
28319      input_path=`$CYGPATH -u "$shortmode_path"`
28320      new_path="$input_path"
28321    fi
28322  fi
28323
28324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28325  if test "x$test_cygdrive_prefix" = x; then
28326    # As a simple fix, exclude /usr/bin since it's not a real path.
28327    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28329      # a path prefixed by /cygdrive for fixpath to work.
28330      new_path="$CYGWIN_ROOT_PATH$input_path"
28331    fi
28332  fi
28333
28334  # remove trailing .exe if any
28335  new_path="${new_path/%.exe/}"
28336
28337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28338
28339  # First separate the path from the arguments. This will split at the first
28340  # space.
28341  complete="$LIPO"
28342  path="${complete%% *}"
28343  tmp="$complete EOL"
28344  arguments="${tmp#* }"
28345
28346  # Input might be given as Windows format, start by converting to
28347  # unix format.
28348  new_path="$path"
28349
28350  windows_path="$new_path"
28351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28352    unix_path=`$CYGPATH -u "$windows_path"`
28353    new_path="$unix_path"
28354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28356    new_path="$unix_path"
28357  fi
28358
28359
28360  # Now try to locate executable using which
28361  new_path=`$WHICH "$new_path" 2> /dev/null`
28362
28363  if test "x$new_path" = x; then
28364    # Oops. Which didn't find the executable.
28365    # The splitting of arguments from the executable at a space might have been incorrect,
28366    # since paths with space are more likely in Windows. Give it another try with the whole
28367    # argument.
28368    path="$complete"
28369    arguments="EOL"
28370    new_path="$path"
28371
28372  windows_path="$new_path"
28373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28374    unix_path=`$CYGPATH -u "$windows_path"`
28375    new_path="$unix_path"
28376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28378    new_path="$unix_path"
28379  fi
28380
28381
28382    new_path=`$WHICH "$new_path" 2> /dev/null`
28383
28384    if test "x$new_path" = x; then
28385      # It's still not found. Now this is an unrecoverable error.
28386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28387$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28388      has_space=`$ECHO "$complete" | $GREP " "`
28389      if test "x$has_space" != x; then
28390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28392      fi
28393      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28394    fi
28395  fi
28396
28397  # Now new_path has a complete unix path to the binary
28398  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28399    # Keep paths in /bin as-is, but remove trailing .exe if any
28400    new_path="${new_path/%.exe/}"
28401    # Do not save /bin paths to all_fixpath_prefixes!
28402  else
28403    # Not in mixed or Windows style, start by that.
28404    new_path=`cmd //c echo $new_path`
28405
28406  input_path="$new_path"
28407  # Check if we need to convert this using DOS-style short mode. If the path
28408  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28409  # take no chances and rewrite it.
28410  # Note: m4 eats our [], so we need to use [ and ] instead.
28411  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28412  if test "x$has_forbidden_chars" != x; then
28413    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28414    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28415  fi
28416
28417    # Output is in $new_path
28418
28419  windows_path="$new_path"
28420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28421    unix_path=`$CYGPATH -u "$windows_path"`
28422    new_path="$unix_path"
28423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28425    new_path="$unix_path"
28426  fi
28427
28428    # remove trailing .exe if any
28429    new_path="${new_path/%.exe/}"
28430
28431    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28432    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28433  fi
28434
28435  else
28436    # We're on a posix platform. Hooray! :)
28437    # First separate the path from the arguments. This will split at the first
28438    # space.
28439    complete="$LIPO"
28440    path="${complete%% *}"
28441    tmp="$complete EOL"
28442    arguments="${tmp#* }"
28443
28444    # Cannot rely on the command "which" here since it doesn't always work.
28445    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28446    if test -z "$is_absolute_path"; then
28447      # Path to executable is not absolute. Find it.
28448      IFS_save="$IFS"
28449      IFS=:
28450      for p in $PATH; do
28451        if test -f "$p/$path" && test -x "$p/$path"; then
28452          new_path="$p/$path"
28453          break
28454        fi
28455      done
28456      IFS="$IFS_save"
28457    else
28458      { $as_echo "$as_me:${as_lineno-$LINENO}: Resolving LIPO (as $path) failed, using $path directly." >&5
28459$as_echo "$as_me: Resolving LIPO (as $path) failed, using $path directly." >&6;}
28460      new_path="$path"
28461    fi
28462
28463    if test "x$new_path" = x; then
28464        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
28465$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
28466        has_space=`$ECHO "$complete" | $GREP " "`
28467        if test "x$has_space" != x; then
28468          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28469$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28470        fi
28471        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
28472      fi
28473  fi
28474
28475      # Now join together the path and the arguments once again
28476      if test "x$arguments" != xEOL; then
28477        new_complete="$new_path ${arguments% *}"
28478      else
28479        new_complete="$new_path"
28480      fi
28481
28482  if test "x$complete" != "x$new_complete"; then
28483      LIPO="$new_complete"
28484      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
28485$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
28486    fi
28487
28488fi
28489
28490
28491
28492# Restore old path without tools dir
28493PATH="$OLD_PATH"
28494
28495
28496# FIXME: Currently we must test this after paths but before flags. Fix!
28497
28498# And we can test some aspects on the target using configure macros.
28499
28500
28501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
28502$as_echo_n "checking for ANSI C header files... " >&6; }
28503if test "${ac_cv_header_stdc+set}" = set; then :
28504  $as_echo_n "(cached) " >&6
28505else
28506  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28507/* end confdefs.h.  */
28508#include <stdlib.h>
28509#include <stdarg.h>
28510#include <string.h>
28511#include <float.h>
28512
28513int
28514main ()
28515{
28516
28517  ;
28518  return 0;
28519}
28520_ACEOF
28521if ac_fn_cxx_try_compile "$LINENO"; then :
28522  ac_cv_header_stdc=yes
28523else
28524  ac_cv_header_stdc=no
28525fi
28526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28527
28528if test $ac_cv_header_stdc = yes; then
28529  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
28530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28531/* end confdefs.h.  */
28532#include <string.h>
28533
28534_ACEOF
28535if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28536  $EGREP "memchr" >/dev/null 2>&1; then :
28537
28538else
28539  ac_cv_header_stdc=no
28540fi
28541rm -f conftest*
28542
28543fi
28544
28545if test $ac_cv_header_stdc = yes; then
28546  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
28547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28548/* end confdefs.h.  */
28549#include <stdlib.h>
28550
28551_ACEOF
28552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28553  $EGREP "free" >/dev/null 2>&1; then :
28554
28555else
28556  ac_cv_header_stdc=no
28557fi
28558rm -f conftest*
28559
28560fi
28561
28562if test $ac_cv_header_stdc = yes; then
28563  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
28564  if test "$cross_compiling" = yes; then :
28565  :
28566else
28567  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28568/* end confdefs.h.  */
28569#include <ctype.h>
28570#include <stdlib.h>
28571#if ((' ' & 0x0FF) == 0x020)
28572# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
28573# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
28574#else
28575# define ISLOWER(c) \
28576		   (('a' <= (c) && (c) <= 'i') \
28577		     || ('j' <= (c) && (c) <= 'r') \
28578		     || ('s' <= (c) && (c) <= 'z'))
28579# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
28580#endif
28581
28582#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
28583int
28584main ()
28585{
28586  int i;
28587  for (i = 0; i < 256; i++)
28588    if (XOR (islower (i), ISLOWER (i))
28589	|| toupper (i) != TOUPPER (i))
28590      return 2;
28591  return 0;
28592}
28593_ACEOF
28594if ac_fn_cxx_try_run "$LINENO"; then :
28595
28596else
28597  ac_cv_header_stdc=no
28598fi
28599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28600  conftest.$ac_objext conftest.beam conftest.$ac_ext
28601fi
28602
28603fi
28604fi
28605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
28606$as_echo "$ac_cv_header_stdc" >&6; }
28607if test $ac_cv_header_stdc = yes; then
28608
28609$as_echo "#define STDC_HEADERS 1" >>confdefs.h
28610
28611fi
28612
28613# On IRIX 5.3, sys/types and inttypes.h are conflicting.
28614for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
28615		  inttypes.h stdint.h unistd.h
28616do :
28617  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28618ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
28619"
28620if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28621  cat >>confdefs.h <<_ACEOF
28622#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
28623_ACEOF
28624
28625fi
28626
28627done
28628
28629
28630
28631###############################################################################
28632#
28633# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
28634# (The JVM can use 32 or 64 bit Java pointers but that decision
28635# is made at runtime.)
28636#
28637
28638if test "x$OPENJDK_TARGET_OS" = xsolaris; then
28639  # Always specify -m flags on Solaris
28640
28641  # keep track of c/cxx flags that we added outselves...
28642  #   to prevent emitting warning...
28643  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28644  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28645  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28646
28647  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28648  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28649  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28650
28651  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28652  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28653  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28654
28655elif test "x$COMPILE_TYPE" = xreduced; then
28656  if test "x$OPENJDK_TARGET_OS" != xwindows; then
28657    # Specify -m if running reduced on other Posix platforms
28658
28659  # keep track of c/cxx flags that we added outselves...
28660  #   to prevent emitting warning...
28661  ADDED_CFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28662  ADDED_CXXFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28663  ADDED_LDFLAGS=" -m${OPENJDK_TARGET_CPU_BITS}"
28664
28665  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
28666  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
28667  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
28668
28669  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
28670  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
28671  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
28672
28673  fi
28674fi
28675
28676# Make compilation sanity check
28677for ac_header in stdio.h
28678do :
28679  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
28680if test "x$ac_cv_header_stdio_h" = x""yes; then :
28681  cat >>confdefs.h <<_ACEOF
28682#define HAVE_STDIO_H 1
28683_ACEOF
28684
28685else
28686
28687  { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
28688$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
28689  if test "x$COMPILE_TYPE" = xreduced; then
28690    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
28691$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
28692  elif test "x$COMPILE_TYPE" = xcross; then
28693    { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
28694$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
28695  fi
28696  as_fn_error $? "Cannot continue." "$LINENO" 5
28697
28698fi
28699
28700done
28701
28702
28703# The cast to long int works around a bug in the HP C Compiler
28704# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
28705# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
28706# This bug is HP SR number 8606223364.
28707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
28708$as_echo_n "checking size of int *... " >&6; }
28709if test "${ac_cv_sizeof_int_p+set}" = set; then :
28710  $as_echo_n "(cached) " >&6
28711else
28712  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
28713
28714else
28715  if test "$ac_cv_type_int_p" = yes; then
28716     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28718as_fn_error 77 "cannot compute sizeof (int *)
28719See \`config.log' for more details" "$LINENO" 5; }
28720   else
28721     ac_cv_sizeof_int_p=0
28722   fi
28723fi
28724
28725fi
28726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
28727$as_echo "$ac_cv_sizeof_int_p" >&6; }
28728
28729
28730
28731cat >>confdefs.h <<_ACEOF
28732#define SIZEOF_INT_P $ac_cv_sizeof_int_p
28733_ACEOF
28734
28735
28736
28737if test "x$SIZEOF_INT_P" != "x$ac_cv_sizeof_int_p"; then
28738  # Workaround autoconf bug, see http://lists.gnu.org/archive/html/autoconf/2010-07/msg00004.html
28739  SIZEOF_INT_P="$ac_cv_sizeof_int_p"
28740fi
28741
28742if test "x$SIZEOF_INT_P" = x; then
28743    # The test failed, lets stick to the assumed value.
28744    { $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
28745$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
28746else
28747    TESTED_TARGET_CPU_BITS=`expr 8 \* $SIZEOF_INT_P`
28748
28749    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
28750        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
28751    fi
28752fi
28753
28754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
28755$as_echo_n "checking for target address size... " >&6; }
28756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
28757$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
28758
28759
28760###############################################################################
28761#
28762# Is the target little of big endian?
28763#
28764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
28765$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
28766if test "${ac_cv_c_bigendian+set}" = set; then :
28767  $as_echo_n "(cached) " >&6
28768else
28769  ac_cv_c_bigendian=unknown
28770    # See if we're dealing with a universal compiler.
28771    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28772/* end confdefs.h.  */
28773#ifndef __APPLE_CC__
28774	       not a universal capable compiler
28775	     #endif
28776	     typedef int dummy;
28777
28778_ACEOF
28779if ac_fn_cxx_try_compile "$LINENO"; then :
28780
28781	# Check for potential -arch flags.  It is not universal unless
28782	# there are at least two -arch flags with different values.
28783	ac_arch=
28784	ac_prev=
28785	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
28786	 if test -n "$ac_prev"; then
28787	   case $ac_word in
28788	     i?86 | x86_64 | ppc | ppc64)
28789	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
28790		 ac_arch=$ac_word
28791	       else
28792		 ac_cv_c_bigendian=universal
28793		 break
28794	       fi
28795	       ;;
28796	   esac
28797	   ac_prev=
28798	 elif test "x$ac_word" = "x-arch"; then
28799	   ac_prev=arch
28800	 fi
28801       done
28802fi
28803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28804    if test $ac_cv_c_bigendian = unknown; then
28805      # See if sys/param.h defines the BYTE_ORDER macro.
28806      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28807/* end confdefs.h.  */
28808#include <sys/types.h>
28809	     #include <sys/param.h>
28810
28811int
28812main ()
28813{
28814#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
28815		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
28816		     && LITTLE_ENDIAN)
28817	      bogus endian macros
28818	     #endif
28819
28820  ;
28821  return 0;
28822}
28823_ACEOF
28824if ac_fn_cxx_try_compile "$LINENO"; then :
28825  # It does; now see whether it defined to BIG_ENDIAN or not.
28826	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28827/* end confdefs.h.  */
28828#include <sys/types.h>
28829		#include <sys/param.h>
28830
28831int
28832main ()
28833{
28834#if BYTE_ORDER != BIG_ENDIAN
28835		 not big endian
28836		#endif
28837
28838  ;
28839  return 0;
28840}
28841_ACEOF
28842if ac_fn_cxx_try_compile "$LINENO"; then :
28843  ac_cv_c_bigendian=yes
28844else
28845  ac_cv_c_bigendian=no
28846fi
28847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28848fi
28849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28850    fi
28851    if test $ac_cv_c_bigendian = unknown; then
28852      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
28853      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28854/* end confdefs.h.  */
28855#include <limits.h>
28856
28857int
28858main ()
28859{
28860#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
28861	      bogus endian macros
28862	     #endif
28863
28864  ;
28865  return 0;
28866}
28867_ACEOF
28868if ac_fn_cxx_try_compile "$LINENO"; then :
28869  # It does; now see whether it defined to _BIG_ENDIAN or not.
28870	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28871/* end confdefs.h.  */
28872#include <limits.h>
28873
28874int
28875main ()
28876{
28877#ifndef _BIG_ENDIAN
28878		 not big endian
28879		#endif
28880
28881  ;
28882  return 0;
28883}
28884_ACEOF
28885if ac_fn_cxx_try_compile "$LINENO"; then :
28886  ac_cv_c_bigendian=yes
28887else
28888  ac_cv_c_bigendian=no
28889fi
28890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28891fi
28892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28893    fi
28894    if test $ac_cv_c_bigendian = unknown; then
28895      # Compile a test program.
28896      if test "$cross_compiling" = yes; then :
28897  # Try to guess by grepping values from an object file.
28898	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28899/* end confdefs.h.  */
28900short int ascii_mm[] =
28901		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
28902		short int ascii_ii[] =
28903		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
28904		int use_ascii (int i) {
28905		  return ascii_mm[i] + ascii_ii[i];
28906		}
28907		short int ebcdic_ii[] =
28908		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
28909		short int ebcdic_mm[] =
28910		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
28911		int use_ebcdic (int i) {
28912		  return ebcdic_mm[i] + ebcdic_ii[i];
28913		}
28914		extern int foo;
28915
28916int
28917main ()
28918{
28919return use_ascii (foo) == use_ebcdic (foo);
28920  ;
28921  return 0;
28922}
28923_ACEOF
28924if ac_fn_cxx_try_compile "$LINENO"; then :
28925  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
28926	      ac_cv_c_bigendian=yes
28927	    fi
28928	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
28929	      if test "$ac_cv_c_bigendian" = unknown; then
28930		ac_cv_c_bigendian=no
28931	      else
28932		# finding both strings is unlikely to happen, but who knows?
28933		ac_cv_c_bigendian=unknown
28934	      fi
28935	    fi
28936fi
28937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28938else
28939  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28940/* end confdefs.h.  */
28941$ac_includes_default
28942int
28943main ()
28944{
28945
28946	     /* Are we little or big endian?  From Harbison&Steele.  */
28947	     union
28948	     {
28949	       long int l;
28950	       char c[sizeof (long int)];
28951	     } u;
28952	     u.l = 1;
28953	     return u.c[sizeof (long int) - 1] == 1;
28954
28955  ;
28956  return 0;
28957}
28958_ACEOF
28959if ac_fn_cxx_try_run "$LINENO"; then :
28960  ac_cv_c_bigendian=no
28961else
28962  ac_cv_c_bigendian=yes
28963fi
28964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28965  conftest.$ac_objext conftest.beam conftest.$ac_ext
28966fi
28967
28968    fi
28969fi
28970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
28971$as_echo "$ac_cv_c_bigendian" >&6; }
28972 case $ac_cv_c_bigendian in #(
28973   yes)
28974     ENDIAN="big";; #(
28975   no)
28976     ENDIAN="little" ;; #(
28977   universal)
28978     ENDIAN="universal_endianness"
28979     ;; #(
28980   *)
28981     ENDIAN="unknown" ;;
28982 esac
28983
28984
28985if test "x$ENDIAN" = xuniversal_endianness; then
28986    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
28987fi
28988if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
28989    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
28990fi
28991
28992
28993# Configure flags for the tools
28994
28995
28996###############################################################################
28997#
28998# How to compile shared libraries.
28999#
29000
29001if test "x$GCC" = xyes; then
29002    COMPILER_NAME=gcc
29003    PICFLAG="-fPIC"
29004    LIBRARY_PREFIX=lib
29005    SHARED_LIBRARY='lib$1.so'
29006    STATIC_LIBRARY='lib$1.a'
29007    SHARED_LIBRARY_FLAGS="-shared"
29008    SHARED_LIBRARY_SUFFIX='.so'
29009    STATIC_LIBRARY_SUFFIX='.a'
29010    OBJ_SUFFIX='.o'
29011    EXE_SUFFIX=''
29012    SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
29013    SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
29014    C_FLAG_REORDER=''
29015    CXX_FLAG_REORDER=''
29016    SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29017    SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
29018    LD="$CC"
29019    LDEXE="$CC"
29020    LDCXX="$CXX"
29021    LDEXECXX="$CXX"
29022    POST_STRIP_CMD="$STRIP -g"
29023
29024    # Linking is different on MacOSX
29025    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29026        # Might change in the future to clang.
29027        COMPILER_NAME=gcc
29028        SHARED_LIBRARY='lib$1.dylib'
29029        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
29030        SHARED_LIBRARY_SUFFIX='.dylib'
29031        EXE_SUFFIX=''
29032        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
29033        SET_SHARED_LIBRARY_MAPFILE=''
29034        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
29035        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29036        POST_STRIP_CMD="$STRIP -S"
29037    fi
29038else
29039    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29040        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
29041        COMPILER_NAME=ossc
29042        PICFLAG="-KPIC"
29043        LIBRARY_PREFIX=lib
29044        SHARED_LIBRARY='lib$1.so'
29045        STATIC_LIBRARY='lib$1.a'
29046        SHARED_LIBRARY_FLAGS="-G"
29047        SHARED_LIBRARY_SUFFIX='.so'
29048        STATIC_LIBRARY_SUFFIX='.a'
29049        OBJ_SUFFIX='.o'
29050        EXE_SUFFIX=''
29051        SET_SHARED_LIBRARY_NAME=''
29052        SET_SHARED_LIBRARY_MAPFILE='-M$1'
29053	C_FLAG_REORDER='-xF'
29054	CXX_FLAG_REORDER='-xF'
29055        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN$1'
29056        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
29057        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
29058        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
29059        CFLAGS_JDKLIB_EXTRA='-xstrconst'
29060        POST_STRIP_CMD="$STRIP -x"
29061        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
29062    fi
29063    if test "x$OPENJDK_TARGET_OS" = xwindows; then
29064        # If it is not gcc, then assume it is the MS Visual Studio compiler
29065        COMPILER_NAME=cl
29066        PICFLAG=""
29067        LIBRARY_PREFIX=
29068        SHARED_LIBRARY='$1.dll'
29069        STATIC_LIBRARY='$1.lib'
29070        SHARED_LIBRARY_FLAGS="-LD"
29071        SHARED_LIBRARY_SUFFIX='.dll'
29072        STATIC_LIBRARY_SUFFIX='.lib'
29073        OBJ_SUFFIX='.obj'
29074        EXE_SUFFIX='.exe'
29075        SET_SHARED_LIBRARY_NAME=''
29076        SET_SHARED_LIBRARY_MAPFILE=''
29077        SET_SHARED_LIBRARY_ORIGIN=''
29078        SET_EXECUTABLE_ORIGIN=''
29079    fi
29080fi
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100# The (cross) compiler is now configured, we can now test capabilities
29101# of the target platform.
29102
29103
29104
29105###############################################################################
29106#
29107# Setup the opt flags for different compilers
29108# and different operating systems.
29109#
29110
29111#
29112# NOTE: check for -mstackrealign needs to be below potential addition of -m32
29113#
29114if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
29115    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
29116    # While waiting for a better solution, the current workaround is to use -mstackrealign.
29117    CFLAGS="$CFLAGS -mstackrealign"
29118    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if 32-bit compiler supports -mstackrealign" >&5
29119$as_echo_n "checking if 32-bit compiler supports -mstackrealign... " >&6; }
29120    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29121/* end confdefs.h.  */
29122int main() { return 0; }
29123_ACEOF
29124if ac_fn_cxx_try_link "$LINENO"; then :
29125
29126		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29127$as_echo "yes" >&6; }
29128
29129else
29130
29131		        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29132$as_echo "no" >&6; }
29133	                as_fn_error $? "The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path." "$LINENO" 5
29134
29135fi
29136rm -f core conftest.err conftest.$ac_objext \
29137    conftest$ac_exeext conftest.$ac_ext
29138fi
29139
29140C_FLAG_DEPS="-MMD -MF"
29141CXX_FLAG_DEPS="-MMD -MF"
29142
29143case $COMPILER_TYPE in
29144  CC )
29145    D_FLAG="-g"
29146    case $COMPILER_NAME in
29147      gcc )
29148      	case $OPENJDK_TARGET_OS in
29149	  macosx )
29150	    # On MacOSX we optimize for size, something
29151	    # we should do for all platforms?
29152	    C_O_FLAG_HI="-Os"
29153	    C_O_FLAG_NORM="-Os"
29154	    C_O_FLAG_NONE=""
29155	    ;;
29156	  *)
29157	    C_O_FLAG_HI="-O3"
29158	    C_O_FLAG_NORM="-O2"
29159	    C_O_FLAG_NONE="-O0"
29160	    CFLAGS_DEBUG_SYMBOLS="-g"
29161	    CXXFLAGS_DEBUG_SYMBOLS="-g"
29162	    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
29163	       CFLAGS_DEBUG_SYMBOLS="-g1"
29164	       CXXFLAGS_DEBUG_SYMBOLS="-g1"
29165	    fi
29166	    ;;
29167	esac
29168        CXX_O_FLAG_HI="$C_O_FLAG_HI"
29169        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29170        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29171        ;;
29172      ossc )
29173        #
29174        # Forte has different names for this with their C++ compiler...
29175        #
29176        C_FLAG_DEPS="-xMMD -xMF"
29177        CXX_FLAG_DEPS="-xMMD -xMF"
29178
29179        # Extra options used with HIGHEST
29180        #
29181        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
29182        #          done with care, there are some assumptions below that need to
29183        #          be understood about the use of pointers, and IEEE behavior.
29184        #
29185        # Use non-standard floating point mode (not IEEE 754)
29186        CC_HIGHEST="$CC_HIGHEST -fns"
29187        # Do some simplification of floating point arithmetic (not IEEE 754)
29188        CC_HIGHEST="$CC_HIGHEST -fsimple"
29189        # Use single precision floating point with 'float'
29190        CC_HIGHEST="$CC_HIGHEST -fsingle"
29191        # Assume memory references via basic pointer types do not alias
29192        #   (Source with excessing pointer casting and data access with mixed
29193        #    pointer types are not recommended)
29194        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
29195        # Use intrinsic or inline versions for math/std functions
29196        #   (If you expect perfect errno behavior, do not use this)
29197        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
29198        # Loop data dependency optimizations (need -xO3 or higher)
29199        CC_HIGHEST="$CC_HIGHEST -xdepend"
29200        # Pointer parameters to functions do not overlap
29201        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
29202        #    If you pass in multiple pointers to the same data, do not use this)
29203        CC_HIGHEST="$CC_HIGHEST -xrestrict"
29204        # Inline some library routines
29205        #   (If you expect perfect errno behavior, do not use this)
29206        CC_HIGHEST="$CC_HIGHEST -xlibmil"
29207        # Use optimized math routines
29208        #   (If you expect perfect errno behavior, do not use this)
29209        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
29210        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
29211
29212        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
29213          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
29214          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
29215        fi
29216
29217        case $OPENJDK_TARGET_CPU_ARCH in
29218          x86)
29219            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
29220            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
29221            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
29222            C_O_FLAG_NONE="-xregs=no%frameptr"
29223            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
29224            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
29225            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
29226            CXX_O_FLAG_NONE="-xregs=no%frameptr"
29227            if test "x$OPENJDK_TARGET_CPU" = xx86; then
29228               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
29229               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
29230            fi
29231            ;;
29232          sparc)
29233            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29234            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
29235            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29236            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29237            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
29238            C_O_FLAG_NONE=""
29239            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
29240            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29241            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
29242            CXX_O_FLAG_NONE=""
29243            ;;
29244        esac
29245
29246    CFLAGS_DEBUG_SYMBOLS="-g -xs"
29247    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
29248    esac
29249    ;;
29250  CL )
29251    D_FLAG=
29252    C_O_FLAG_HIGHEST="-O2"
29253    C_O_FLAG_HI="-O1"
29254    C_O_FLAG_NORM="-O1"
29255    C_O_FLAG_NONE="-Od"
29256    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
29257    CXX_O_FLAG_HI="$C_O_FLAG_HI"
29258    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
29259    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
29260    ;;
29261esac
29262
29263if test -z "$C_O_FLAG_HIGHEST"; then
29264   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
29265fi
29266
29267if test -z "$CXX_O_FLAG_HIGHEST"; then
29268   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
29269fi
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
29285   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
29286$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
29287fi
29288
29289if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
29290   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
29291$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
29292fi
29293
29294if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
29295   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
29296$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
29297fi
29298
29299
29300# Check whether --with-extra-cflags was given.
29301if test "${with_extra_cflags+set}" = set; then :
29302  withval=$with_extra_cflags;
29303fi
29304
29305
29306
29307# Check whether --with-extra-cxxflags was given.
29308if test "${with_extra_cxxflags+set}" = set; then :
29309  withval=$with_extra_cxxflags;
29310fi
29311
29312
29313
29314# Check whether --with-extra-ldflags was given.
29315if test "${with_extra_ldflags+set}" = set; then :
29316  withval=$with_extra_ldflags;
29317fi
29318
29319
29320CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
29321CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
29322LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
29323
29324# Hotspot needs these set in their legacy form
29325LEGACY_EXTRA_CFLAGS=$with_extra_cflags
29326LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
29327LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
29328
29329
29330
29331
29332
29333###############################################################################
29334#
29335# Now setup the CFLAGS and LDFLAGS for the JDK build.
29336# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
29337#
29338case $COMPILER_NAME in
29339      gcc )
29340      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
29341                          -pipe \
29342                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
29343	  case $OPENJDK_TARGET_CPU_ARCH in
29344	  arm )
29345            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
29346	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29347	  ;;
29348	  ppc )
29349            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
29350	  ;;
29351	  * )
29352	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
29353	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
29354          ;;
29355	  esac
29356          ;;
29357      ossc )
29358          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
29359          case $OPENJDK_TARGET_CPU_ARCH in
29360          x86 )
29361            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
29362       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
29363          ;;
29364          esac
29365
29366      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
29367      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
29368
29369          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
29370          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
29371          ;;
29372      cl )
29373          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
29374               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
29375	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
29376	       -DWIN32 -DIAL"
29377          case $OPENJDK_TARGET_CPU in
29378              x86 )
29379                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
29380                  ;;
29381              x86_64 )
29382                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
29383                  ;;
29384          esac
29385          ;;
29386esac
29387
29388###############################################################################
29389
29390CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
29391
29392# The package path is used only on macosx?
29393PACKAGE_PATH=/opt/local
29394
29395
29396if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
29397    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
29398    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
29399    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
29400    #   Note: -Dmacro         is the same as    #define macro 1
29401    #         -Dmacro=	    is the same as    #define macro
29402    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29403        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
29404    else
29405        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
29406    fi
29407else
29408    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
29409fi
29410if test "x$OPENJDK_TARGET_OS" = xlinux; then
29411    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
29412fi
29413if test "x$OPENJDK_TARGET_OS" = xwindows; then
29414    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
29415fi
29416if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29417    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
29418fi
29419if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29420    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
29421    # Setting these parameters makes it an error to link to macosx APIs that are
29422    # newer than the given OS version and makes the linked binaries compatible even
29423    # if built on a newer version of the OS.
29424    # The expected format is X.Y.Z
29425    MACOSX_VERSION_MIN=10.7.0
29426
29427    # The macro takes the version with no dots, ex: 1070
29428    # Let the flags variables get resolved in make for easier override on make
29429    # command line.
29430    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29431    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
29432fi
29433if test "x$OPENJDK_TARGET_OS" = xbsd; then
29434    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
29435fi
29436if test "x$DEBUG_LEVEL" = xrelease; then
29437    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
29438    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29439        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
29440    fi
29441else
29442    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
29443fi
29444
29445CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
29446CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
29447
29448CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
29449        -I${JDK_OUTPUTDIR}/include \
29450        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
29451        -I${JDK_TOPDIR}/src/share/javavm/export \
29452        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
29453        -I${JDK_TOPDIR}/src/share/native/common \
29454        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
29455
29456# The shared libraries are compiled using the picflag.
29457CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
29458CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
29459
29460# Executable flags
29461CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
29462CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
29463
29464# Now this is odd. The JDK native libraries have to link against libjvm.so
29465# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
29466# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
29467# is identical for client and server? Yes. Which is picked at runtime (client or server)?
29468# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
29469# libraries will link to whatever is in memory. Yuck.
29470#
29471# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
29472if test "x$COMPILER_NAME" = xcl; then
29473    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
29474    if test "x$OPENJDK_TARGET_CPU" = xx86; then
29475        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
29476    fi
29477    # TODO: make -debug optional "--disable-full-debug-symbols"
29478    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
29479    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
29480    LDFLAGS_JDKLIB_SUFFIX=""
29481    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
29482        LDFLAGS_STACK_SIZE=1048576
29483    else
29484        LDFLAGS_STACK_SIZE=327680
29485    fi
29486    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
29487else
29488    if test "x$COMPILER_NAME" = xgcc; then
29489        # If this is a --hash-style=gnu system, use --hash-style=both, why?
29490        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
29491        if test -n "$HAS_GNU_HASH"; then
29492            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
29493        fi
29494        if test "x$OPENJDK_TARGET_OS" = xlinux; then
29495          # And since we now know that the linker is gnu, then add -z defs, to forbid
29496          # undefined symbols in object files.
29497          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
29498          if test "x$DEBUG_LEVEL" = "xrelease"; then
29499              # When building release libraries, tell the linker optimize them.
29500              # Should this be supplied to the OSS linker as well?
29501              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
29502          fi
29503        fi
29504    fi
29505    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
29506                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
29507
29508    # On some platforms (mac) the linker warns about non existing -L dirs.
29509    # Add server first if available. Linking aginst client does not always produce the same results.
29510    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
29511    # Default to server for other variants.
29512    if test "x$JVM_VARIANT_SERVER" = xtrue; then
29513        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29514    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
29515        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
29516    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
29517        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
29518    else
29519        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
29520    fi
29521
29522    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
29523    if test "x$COMPILER_NAME" = xossc; then
29524        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
29525    fi
29526
29527    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
29528    if test "x$OPENJDK_TARGET_OS" = xlinux; then
29529        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
29530    fi
29531fi
29532
29533# Adjust flags according to debug level.
29534case $DEBUG_LEVEL in
29535      fastdebug )
29536              CFLAGS="$CFLAGS $D_FLAG"
29537              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29538              ;;
29539      slowdebug )
29540              CFLAGS="$CFLAGS $D_FLAG"
29541	      C_O_FLAG_HI="$C_O_FLAG_NONE"
29542	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
29543	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
29544	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
29545              JAVAC_FLAGS="$JAVAC_FLAGS -g"
29546              ;;
29547esac
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564  # Some Zero and Shark settings.
29565  # ZERO_ARCHFLAG tells the compiler which mode to build for
29566  case "${OPENJDK_TARGET_CPU}" in
29567    s390)
29568      ZERO_ARCHFLAG="-m31"
29569      ;;
29570    *)
29571      ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
29572  esac
29573
29574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
29575$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
29576  supports=yes
29577
29578  saved_cflags="$CFLAGS"
29579  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
29580  ac_ext=c
29581ac_cpp='$CPP $CPPFLAGS'
29582ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29583ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29584ac_compiler_gnu=$ac_cv_c_compiler_gnu
29585
29586  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29587/* end confdefs.h.  */
29588
29589    int i;
29590
29591_ACEOF
29592if ac_fn_c_try_compile "$LINENO"; then :
29593
29594else
29595  supports=no
29596fi
29597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29598  ac_ext=cpp
29599ac_cpp='$CXXCPP $CPPFLAGS'
29600ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29601ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29602ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29603
29604  CFLAGS="$saved_cflags"
29605
29606  saved_cxxflags="$CXXFLAGS"
29607  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
29608  ac_ext=cpp
29609ac_cpp='$CXXCPP $CPPFLAGS'
29610ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29611ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29612ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29613
29614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29615/* end confdefs.h.  */
29616
29617    int i;
29618
29619_ACEOF
29620if ac_fn_cxx_try_compile "$LINENO"; then :
29621
29622else
29623  supports=no
29624fi
29625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29626  ac_ext=cpp
29627ac_cpp='$CXXCPP $CPPFLAGS'
29628ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29629ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29630ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29631
29632  CXXFLAGS="$saved_cxxflags"
29633
29634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29635$as_echo "$supports" >&6; }
29636  if test "x$supports" = "xyes" ; then
29637    :
29638  else
29639    ZERO_ARCHFLAG=""
29640  fi
29641
29642
29643
29644  # Check that the compiler supports -mX flags
29645  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
29646
29647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"" >&5
29648$as_echo_n "checking if compiler supports \"-m${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
29649  supports=yes
29650
29651  saved_cflags="$CFLAGS"
29652  CFLAGS="$CFLAGS -m${OPENJDK_TARGET_CPU_BITS}"
29653  ac_ext=c
29654ac_cpp='$CPP $CPPFLAGS'
29655ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29656ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29657ac_compiler_gnu=$ac_cv_c_compiler_gnu
29658
29659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29660/* end confdefs.h.  */
29661
29662    int i;
29663
29664_ACEOF
29665if ac_fn_c_try_compile "$LINENO"; then :
29666
29667else
29668  supports=no
29669fi
29670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29671  ac_ext=cpp
29672ac_cpp='$CXXCPP $CPPFLAGS'
29673ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29674ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29675ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29676
29677  CFLAGS="$saved_cflags"
29678
29679  saved_cxxflags="$CXXFLAGS"
29680  CXXFLAGS="$CXXFLAG -m${OPENJDK_TARGET_CPU_BITS}"
29681  ac_ext=cpp
29682ac_cpp='$CXXCPP $CPPFLAGS'
29683ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29684ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29685ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29686
29687  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29688/* end confdefs.h.  */
29689
29690    int i;
29691
29692_ACEOF
29693if ac_fn_cxx_try_compile "$LINENO"; then :
29694
29695else
29696  supports=no
29697fi
29698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29699  ac_ext=cpp
29700ac_cpp='$CXXCPP $CPPFLAGS'
29701ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29702ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29703ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29704
29705  CXXFLAGS="$saved_cxxflags"
29706
29707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
29708$as_echo "$supports" >&6; }
29709  if test "x$supports" = "xyes" ; then
29710    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
29711  else
29712    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
29713  fi
29714
29715
29716
29717
29718# Setup debug symbols (need objcopy from the toolchain for that)
29719
29720#
29721# ENABLE_DEBUG_SYMBOLS
29722# This must be done after the toolchain is setup, since we're looking at objcopy.
29723#
29724# Check whether --enable-debug-symbols was given.
29725if test "${enable_debug_symbols+set}" = set; then :
29726  enableval=$enable_debug_symbols;
29727fi
29728
29729
29730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
29731$as_echo_n "checking if we should generate debug symbols... " >&6; }
29732
29733if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
29734   # explicit enabling of enable-debug-symbols and can't find objcopy
29735   #   this is an error
29736   as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
29737fi
29738
29739if test "x$enable_debug_symbols" = "xyes"; then
29740  ENABLE_DEBUG_SYMBOLS=true
29741elif test "x$enable_debug_symbols" = "xno"; then
29742  ENABLE_DEBUG_SYMBOLS=false
29743else
29744  # default on macosx is false
29745  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29746    ENABLE_DEBUG_SYMBOLS=false
29747  # Default is on if objcopy is found, otherwise off
29748  elif test "x$OBJCOPY" != x || test "x$OPENJDK_TARGET_OS" = xwindows; then
29749    ENABLE_DEBUG_SYMBOLS=true
29750  else
29751    ENABLE_DEBUG_SYMBOLS=false
29752  fi
29753fi
29754
29755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
29756$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
29757
29758#
29759# ZIP_DEBUGINFO_FILES
29760#
29761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
29762$as_echo_n "checking if we should zip debug-info files... " >&6; }
29763# Check whether --enable-zip-debug-info was given.
29764if test "${enable_zip_debug_info+set}" = set; then :
29765  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
29766else
29767  enable_zip_debug_info="yes"
29768fi
29769
29770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
29771$as_echo "${enable_zip_debug_info}" >&6; }
29772
29773if test "x${enable_zip_debug_info}" = "xno"; then
29774   ZIP_DEBUGINFO_FILES=false
29775else
29776   ZIP_DEBUGINFO_FILES=true
29777fi
29778
29779
29780
29781
29782
29783
29784
29785###############################################################################
29786#
29787# Check dependencies for external and internal libraries.
29788#
29789###############################################################################
29790
29791
29792
29793###############################################################################
29794#
29795# OS specific settings that we never will need to probe.
29796#
29797if test "x$OPENJDK_TARGET_OS" = xlinux; then
29798    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
29799$as_echo_n "checking what is not needed on Linux?... " >&6; }
29800    PULSE_NOT_NEEDED=yes
29801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
29802$as_echo "pulse" >&6; }
29803fi
29804
29805if test "x$OPENJDK_TARGET_OS" = xsolaris; then
29806    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
29807$as_echo_n "checking what is not needed on Solaris?... " >&6; }
29808    ALSA_NOT_NEEDED=yes
29809    PULSE_NOT_NEEDED=yes
29810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29811$as_echo "alsa pulse" >&6; }
29812fi
29813
29814if test "x$OPENJDK_TARGET_OS" = xwindows; then
29815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
29816$as_echo_n "checking what is not needed on Windows?... " >&6; }
29817    CUPS_NOT_NEEDED=yes
29818    ALSA_NOT_NEEDED=yes
29819    PULSE_NOT_NEEDED=yes
29820    X11_NOT_NEEDED=yes
29821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
29822$as_echo "alsa cups pulse x11" >&6; }
29823fi
29824
29825if test "x$OPENJDK_TARGET_OS" = xmacosx; then
29826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
29827$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
29828    ALSA_NOT_NEEDED=yes
29829    PULSE_NOT_NEEDED=yes
29830    X11_NOT_NEEDED=yes
29831    FREETYPE2_NOT_NEEDED=yes
29832    # If the java runtime framework is disabled, then we need X11.
29833    # This will be adjusted below.
29834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
29835$as_echo "alsa pulse x11" >&6; }
29836fi
29837
29838if test "x$OPENJDK_TARGET_OS" = xbsd; then
29839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
29840$as_echo_n "checking what is not needed on bsd?... " >&6; }
29841    ALSA_NOT_NEEDED=yes
29842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
29843$as_echo "alsa" >&6; }
29844fi
29845
29846if test "x$OPENJDK" = "xfalse"; then
29847    FREETYPE2_NOT_NEEDED=yes
29848fi
29849
29850if test "x$SUPPORT_HEADFUL" = xno; then
29851    X11_NOT_NEEDED=yes
29852fi
29853
29854###############################################################################
29855#
29856# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM
29857# that uses this API.
29858#
29859# Check whether --enable-macosx-runtime-support was given.
29860if test "${enable_macosx_runtime_support+set}" = set; then :
29861  enableval=$enable_macosx_runtime_support; MACOSX_RUNTIME_SUPPORT="${enableval}"
29862else
29863  MACOSX_RUNTIME_SUPPORT="no"
29864fi
29865
29866
29867USE_MACOSX_RUNTIME_SUPPORT=no
29868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for explicit Java runtime support in the OS" >&5
29869$as_echo_n "checking for explicit Java runtime support in the OS... " >&6; }
29870if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
29871    if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then
29872        MACOSX_RUNTIME_SUPPORT=yes
29873        USE_MACOSX_RUNTIME_SUPPORT=yes
29874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, does not need alsa freetype2 pulse and X11" >&5
29875$as_echo "yes, does not need alsa freetype2 pulse and X11" >&6; }
29876    else
29877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, but explicitly disabled." >&5
29878$as_echo "yes, but explicitly disabled." >&6; }
29879    fi
29880else
29881    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29882$as_echo "no" >&6; }
29883fi
29884
29885if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then
29886    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on an X11 build on MacOSX?" >&5
29887$as_echo_n "checking what is not needed on an X11 build on MacOSX?... " >&6; }
29888    X11_NOT_NEEDED=
29889    FREETYPE2_NOT_NEEDED=
29890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
29891$as_echo "alsa pulse" >&6; }
29892fi
29893
29894
29895
29896###############################################################################
29897#
29898# Check for X Windows
29899#
29900
29901# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
29902# Make a simple check for the libraries at the sysroot, and setup --x-includes and
29903# --x-libraries for the sysroot, if that seems to be correct.
29904if test "x$SYS_ROOT" != "x/"; then
29905  if test "x$x_includes" = xNONE; then
29906    if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
29907      x_includes="$SYS_ROOT/usr/X11R6/include"
29908    fi
29909  fi
29910  if test "x$x_libraries" = xNONE; then
29911    if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
29912      x_libraries="$SYS_ROOT/usr/X11R6/lib"
29913    fi
29914  fi
29915fi
29916
29917# Now let autoconf do it's magic
29918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
29919$as_echo_n "checking for X... " >&6; }
29920
29921
29922# Check whether --with-x was given.
29923if test "${with_x+set}" = set; then :
29924  withval=$with_x;
29925fi
29926
29927# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
29928if test "x$with_x" = xno; then
29929  # The user explicitly disabled X.
29930  have_x=disabled
29931else
29932  case $x_includes,$x_libraries in #(
29933    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
29934    *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
29935  $as_echo_n "(cached) " >&6
29936else
29937  # One or both of the vars are not set, and there is no cached value.
29938ac_x_includes=no ac_x_libraries=no
29939rm -f -r conftest.dir
29940if mkdir conftest.dir; then
29941  cd conftest.dir
29942  cat >Imakefile <<'_ACEOF'
29943incroot:
29944	@echo incroot='${INCROOT}'
29945usrlibdir:
29946	@echo usrlibdir='${USRLIBDIR}'
29947libdir:
29948	@echo libdir='${LIBDIR}'
29949_ACEOF
29950  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
29951    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
29952    for ac_var in incroot usrlibdir libdir; do
29953      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
29954    done
29955    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
29956    for ac_extension in a so sl dylib la dll; do
29957      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
29958	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
29959	ac_im_usrlibdir=$ac_im_libdir; break
29960      fi
29961    done
29962    # Screen out bogus values from the imake configuration.  They are
29963    # bogus both because they are the default anyway, and because
29964    # using them would break gcc on systems where it needs fixed includes.
29965    case $ac_im_incroot in
29966	/usr/include) ac_x_includes= ;;
29967	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
29968    esac
29969    case $ac_im_usrlibdir in
29970	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
29971	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
29972    esac
29973  fi
29974  cd ..
29975  rm -f -r conftest.dir
29976fi
29977
29978# Standard set of common directories for X headers.
29979# Check X11 before X11Rn because it is often a symlink to the current release.
29980ac_x_header_dirs='
29981/usr/X11/include
29982/usr/X11R7/include
29983/usr/X11R6/include
29984/usr/X11R5/include
29985/usr/X11R4/include
29986
29987/usr/include/X11
29988/usr/include/X11R7
29989/usr/include/X11R6
29990/usr/include/X11R5
29991/usr/include/X11R4
29992
29993/usr/local/X11/include
29994/usr/local/X11R7/include
29995/usr/local/X11R6/include
29996/usr/local/X11R5/include
29997/usr/local/X11R4/include
29998
29999/usr/local/include/X11
30000/usr/local/include/X11R7
30001/usr/local/include/X11R6
30002/usr/local/include/X11R5
30003/usr/local/include/X11R4
30004
30005/usr/X386/include
30006/usr/x386/include
30007/usr/XFree86/include/X11
30008
30009/usr/include
30010/usr/local/include
30011/usr/unsupported/include
30012/usr/athena/include
30013/usr/local/x11r5/include
30014/usr/lpp/Xamples/include
30015
30016/usr/openwin/include
30017/usr/openwin/share/include'
30018
30019if test "$ac_x_includes" = no; then
30020  # Guess where to find include files, by looking for Xlib.h.
30021  # First, try using that file with no special directory specified.
30022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30023/* end confdefs.h.  */
30024#include <X11/Xlib.h>
30025_ACEOF
30026if ac_fn_cxx_try_cpp "$LINENO"; then :
30027  # We can compile using X headers with no special include directory.
30028ac_x_includes=
30029else
30030  for ac_dir in $ac_x_header_dirs; do
30031  if test -r "$ac_dir/X11/Xlib.h"; then
30032    ac_x_includes=$ac_dir
30033    break
30034  fi
30035done
30036fi
30037rm -f conftest.err conftest.i conftest.$ac_ext
30038fi # $ac_x_includes = no
30039
30040if test "$ac_x_libraries" = no; then
30041  # Check for the libraries.
30042  # See if we find them without any special options.
30043  # Don't add to $LIBS permanently.
30044  ac_save_LIBS=$LIBS
30045  LIBS="-lX11 $LIBS"
30046  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30047/* end confdefs.h.  */
30048#include <X11/Xlib.h>
30049int
30050main ()
30051{
30052XrmInitialize ()
30053  ;
30054  return 0;
30055}
30056_ACEOF
30057if ac_fn_cxx_try_link "$LINENO"; then :
30058  LIBS=$ac_save_LIBS
30059# We can link X programs with no special library path.
30060ac_x_libraries=
30061else
30062  LIBS=$ac_save_LIBS
30063for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
30064do
30065  # Don't even attempt the hair of trying to link an X program!
30066  for ac_extension in a so sl dylib la dll; do
30067    if test -r "$ac_dir/libX11.$ac_extension"; then
30068      ac_x_libraries=$ac_dir
30069      break 2
30070    fi
30071  done
30072done
30073fi
30074rm -f core conftest.err conftest.$ac_objext \
30075    conftest$ac_exeext conftest.$ac_ext
30076fi # $ac_x_libraries = no
30077
30078case $ac_x_includes,$ac_x_libraries in #(
30079  no,* | *,no | *\'*)
30080    # Didn't find X, or a directory has "'" in its name.
30081    ac_cv_have_x="have_x=no";; #(
30082  *)
30083    # Record where we found X for the cache.
30084    ac_cv_have_x="have_x=yes\
30085	ac_x_includes='$ac_x_includes'\
30086	ac_x_libraries='$ac_x_libraries'"
30087esac
30088fi
30089;; #(
30090    *) have_x=yes;;
30091  esac
30092  eval "$ac_cv_have_x"
30093fi # $with_x != no
30094
30095if test "$have_x" != yes; then
30096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
30097$as_echo "$have_x" >&6; }
30098  no_x=yes
30099else
30100  # If each of the values was on the command line, it overrides each guess.
30101  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
30102  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
30103  # Update the cache value to reflect the command line values.
30104  ac_cv_have_x="have_x=yes\
30105	ac_x_includes='$x_includes'\
30106	ac_x_libraries='$x_libraries'"
30107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
30108$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
30109fi
30110
30111if test "$no_x" = yes; then
30112  # Not all programs may use this symbol, but it does not hurt to define it.
30113
30114$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
30115
30116  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
30117else
30118  if test -n "$x_includes"; then
30119    X_CFLAGS="$X_CFLAGS -I$x_includes"
30120  fi
30121
30122  # It would also be nice to do this for all -L options, not just this one.
30123  if test -n "$x_libraries"; then
30124    X_LIBS="$X_LIBS -L$x_libraries"
30125    # For Solaris; some versions of Sun CC require a space after -R and
30126    # others require no space.  Words are not sufficient . . . .
30127    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
30128$as_echo_n "checking whether -R must be followed by a space... " >&6; }
30129    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
30130    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
30131    ac_cxx_werror_flag=yes
30132    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30133/* end confdefs.h.  */
30134
30135int
30136main ()
30137{
30138
30139  ;
30140  return 0;
30141}
30142_ACEOF
30143if ac_fn_cxx_try_link "$LINENO"; then :
30144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30145$as_echo "no" >&6; }
30146       X_LIBS="$X_LIBS -R$x_libraries"
30147else
30148  LIBS="$ac_xsave_LIBS -R $x_libraries"
30149       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30150/* end confdefs.h.  */
30151
30152int
30153main ()
30154{
30155
30156  ;
30157  return 0;
30158}
30159_ACEOF
30160if ac_fn_cxx_try_link "$LINENO"; then :
30161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30162$as_echo "yes" >&6; }
30163	  X_LIBS="$X_LIBS -R $x_libraries"
30164else
30165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
30166$as_echo "neither works" >&6; }
30167fi
30168rm -f core conftest.err conftest.$ac_objext \
30169    conftest$ac_exeext conftest.$ac_ext
30170fi
30171rm -f core conftest.err conftest.$ac_objext \
30172    conftest$ac_exeext conftest.$ac_ext
30173    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
30174    LIBS=$ac_xsave_LIBS
30175  fi
30176
30177  # Check for system-dependent libraries X programs must link with.
30178  # Do this before checking for the system-independent R6 libraries
30179  # (-lICE), since we may need -lsocket or whatever for X linking.
30180
30181  if test "$ISC" = yes; then
30182    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
30183  else
30184    # Martyn Johnson says this is needed for Ultrix, if the X
30185    # libraries were built with DECnet support.  And Karl Berry says
30186    # the Alpha needs dnet_stub (dnet does not exist).
30187    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
30188    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30189/* end confdefs.h.  */
30190
30191/* Override any GCC internal prototype to avoid an error.
30192   Use char because int might match the return type of a GCC
30193   builtin and then its argument prototype would still apply.  */
30194#ifdef __cplusplus
30195extern "C"
30196#endif
30197char XOpenDisplay ();
30198int
30199main ()
30200{
30201return XOpenDisplay ();
30202  ;
30203  return 0;
30204}
30205_ACEOF
30206if ac_fn_cxx_try_link "$LINENO"; then :
30207
30208else
30209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
30210$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
30211if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then :
30212  $as_echo_n "(cached) " >&6
30213else
30214  ac_check_lib_save_LIBS=$LIBS
30215LIBS="-ldnet  $LIBS"
30216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30217/* end confdefs.h.  */
30218
30219/* Override any GCC internal prototype to avoid an error.
30220   Use char because int might match the return type of a GCC
30221   builtin and then its argument prototype would still apply.  */
30222#ifdef __cplusplus
30223extern "C"
30224#endif
30225char dnet_ntoa ();
30226int
30227main ()
30228{
30229return dnet_ntoa ();
30230  ;
30231  return 0;
30232}
30233_ACEOF
30234if ac_fn_cxx_try_link "$LINENO"; then :
30235  ac_cv_lib_dnet_dnet_ntoa=yes
30236else
30237  ac_cv_lib_dnet_dnet_ntoa=no
30238fi
30239rm -f core conftest.err conftest.$ac_objext \
30240    conftest$ac_exeext conftest.$ac_ext
30241LIBS=$ac_check_lib_save_LIBS
30242fi
30243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
30244$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
30245if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then :
30246  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
30247fi
30248
30249    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
30250      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
30251$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
30252if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then :
30253  $as_echo_n "(cached) " >&6
30254else
30255  ac_check_lib_save_LIBS=$LIBS
30256LIBS="-ldnet_stub  $LIBS"
30257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30258/* end confdefs.h.  */
30259
30260/* Override any GCC internal prototype to avoid an error.
30261   Use char because int might match the return type of a GCC
30262   builtin and then its argument prototype would still apply.  */
30263#ifdef __cplusplus
30264extern "C"
30265#endif
30266char dnet_ntoa ();
30267int
30268main ()
30269{
30270return dnet_ntoa ();
30271  ;
30272  return 0;
30273}
30274_ACEOF
30275if ac_fn_cxx_try_link "$LINENO"; then :
30276  ac_cv_lib_dnet_stub_dnet_ntoa=yes
30277else
30278  ac_cv_lib_dnet_stub_dnet_ntoa=no
30279fi
30280rm -f core conftest.err conftest.$ac_objext \
30281    conftest$ac_exeext conftest.$ac_ext
30282LIBS=$ac_check_lib_save_LIBS
30283fi
30284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
30285$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
30286if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then :
30287  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
30288fi
30289
30290    fi
30291fi
30292rm -f core conftest.err conftest.$ac_objext \
30293    conftest$ac_exeext conftest.$ac_ext
30294    LIBS="$ac_xsave_LIBS"
30295
30296    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
30297    # to get the SysV transport functions.
30298    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
30299    # needs -lnsl.
30300    # The nsl library prevents programs from opening the X display
30301    # on Irix 5.2, according to T.E. Dickey.
30302    # The functions gethostbyname, getservbyname, and inet_addr are
30303    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
30304    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
30305if test "x$ac_cv_func_gethostbyname" = x""yes; then :
30306
30307fi
30308
30309    if test $ac_cv_func_gethostbyname = no; then
30310      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
30311$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
30312if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then :
30313  $as_echo_n "(cached) " >&6
30314else
30315  ac_check_lib_save_LIBS=$LIBS
30316LIBS="-lnsl  $LIBS"
30317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30318/* end confdefs.h.  */
30319
30320/* Override any GCC internal prototype to avoid an error.
30321   Use char because int might match the return type of a GCC
30322   builtin and then its argument prototype would still apply.  */
30323#ifdef __cplusplus
30324extern "C"
30325#endif
30326char gethostbyname ();
30327int
30328main ()
30329{
30330return gethostbyname ();
30331  ;
30332  return 0;
30333}
30334_ACEOF
30335if ac_fn_cxx_try_link "$LINENO"; then :
30336  ac_cv_lib_nsl_gethostbyname=yes
30337else
30338  ac_cv_lib_nsl_gethostbyname=no
30339fi
30340rm -f core conftest.err conftest.$ac_objext \
30341    conftest$ac_exeext conftest.$ac_ext
30342LIBS=$ac_check_lib_save_LIBS
30343fi
30344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
30345$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
30346if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then :
30347  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
30348fi
30349
30350      if test $ac_cv_lib_nsl_gethostbyname = no; then
30351	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
30352$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
30353if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then :
30354  $as_echo_n "(cached) " >&6
30355else
30356  ac_check_lib_save_LIBS=$LIBS
30357LIBS="-lbsd  $LIBS"
30358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30359/* end confdefs.h.  */
30360
30361/* Override any GCC internal prototype to avoid an error.
30362   Use char because int might match the return type of a GCC
30363   builtin and then its argument prototype would still apply.  */
30364#ifdef __cplusplus
30365extern "C"
30366#endif
30367char gethostbyname ();
30368int
30369main ()
30370{
30371return gethostbyname ();
30372  ;
30373  return 0;
30374}
30375_ACEOF
30376if ac_fn_cxx_try_link "$LINENO"; then :
30377  ac_cv_lib_bsd_gethostbyname=yes
30378else
30379  ac_cv_lib_bsd_gethostbyname=no
30380fi
30381rm -f core conftest.err conftest.$ac_objext \
30382    conftest$ac_exeext conftest.$ac_ext
30383LIBS=$ac_check_lib_save_LIBS
30384fi
30385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
30386$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
30387if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then :
30388  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
30389fi
30390
30391      fi
30392    fi
30393
30394    # lieder@skyler.mavd.honeywell.com says without -lsocket,
30395    # socket/setsockopt and other routines are undefined under SCO ODT
30396    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
30397    # on later versions), says Simon Leinen: it contains gethostby*
30398    # variants that don't use the name server (or something).  -lsocket
30399    # must be given before -lnsl if both are needed.  We assume that
30400    # if connect needs -lnsl, so does gethostbyname.
30401    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
30402if test "x$ac_cv_func_connect" = x""yes; then :
30403
30404fi
30405
30406    if test $ac_cv_func_connect = no; then
30407      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
30408$as_echo_n "checking for connect in -lsocket... " >&6; }
30409if test "${ac_cv_lib_socket_connect+set}" = set; then :
30410  $as_echo_n "(cached) " >&6
30411else
30412  ac_check_lib_save_LIBS=$LIBS
30413LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
30414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30415/* end confdefs.h.  */
30416
30417/* Override any GCC internal prototype to avoid an error.
30418   Use char because int might match the return type of a GCC
30419   builtin and then its argument prototype would still apply.  */
30420#ifdef __cplusplus
30421extern "C"
30422#endif
30423char connect ();
30424int
30425main ()
30426{
30427return connect ();
30428  ;
30429  return 0;
30430}
30431_ACEOF
30432if ac_fn_cxx_try_link "$LINENO"; then :
30433  ac_cv_lib_socket_connect=yes
30434else
30435  ac_cv_lib_socket_connect=no
30436fi
30437rm -f core conftest.err conftest.$ac_objext \
30438    conftest$ac_exeext conftest.$ac_ext
30439LIBS=$ac_check_lib_save_LIBS
30440fi
30441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
30442$as_echo "$ac_cv_lib_socket_connect" >&6; }
30443if test "x$ac_cv_lib_socket_connect" = x""yes; then :
30444  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
30445fi
30446
30447    fi
30448
30449    # Guillermo Gomez says -lposix is necessary on A/UX.
30450    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
30451if test "x$ac_cv_func_remove" = x""yes; then :
30452
30453fi
30454
30455    if test $ac_cv_func_remove = no; then
30456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
30457$as_echo_n "checking for remove in -lposix... " >&6; }
30458if test "${ac_cv_lib_posix_remove+set}" = set; then :
30459  $as_echo_n "(cached) " >&6
30460else
30461  ac_check_lib_save_LIBS=$LIBS
30462LIBS="-lposix  $LIBS"
30463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30464/* end confdefs.h.  */
30465
30466/* Override any GCC internal prototype to avoid an error.
30467   Use char because int might match the return type of a GCC
30468   builtin and then its argument prototype would still apply.  */
30469#ifdef __cplusplus
30470extern "C"
30471#endif
30472char remove ();
30473int
30474main ()
30475{
30476return remove ();
30477  ;
30478  return 0;
30479}
30480_ACEOF
30481if ac_fn_cxx_try_link "$LINENO"; then :
30482  ac_cv_lib_posix_remove=yes
30483else
30484  ac_cv_lib_posix_remove=no
30485fi
30486rm -f core conftest.err conftest.$ac_objext \
30487    conftest$ac_exeext conftest.$ac_ext
30488LIBS=$ac_check_lib_save_LIBS
30489fi
30490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
30491$as_echo "$ac_cv_lib_posix_remove" >&6; }
30492if test "x$ac_cv_lib_posix_remove" = x""yes; then :
30493  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
30494fi
30495
30496    fi
30497
30498    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
30499    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
30500if test "x$ac_cv_func_shmat" = x""yes; then :
30501
30502fi
30503
30504    if test $ac_cv_func_shmat = no; then
30505      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
30506$as_echo_n "checking for shmat in -lipc... " >&6; }
30507if test "${ac_cv_lib_ipc_shmat+set}" = set; then :
30508  $as_echo_n "(cached) " >&6
30509else
30510  ac_check_lib_save_LIBS=$LIBS
30511LIBS="-lipc  $LIBS"
30512cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30513/* end confdefs.h.  */
30514
30515/* Override any GCC internal prototype to avoid an error.
30516   Use char because int might match the return type of a GCC
30517   builtin and then its argument prototype would still apply.  */
30518#ifdef __cplusplus
30519extern "C"
30520#endif
30521char shmat ();
30522int
30523main ()
30524{
30525return shmat ();
30526  ;
30527  return 0;
30528}
30529_ACEOF
30530if ac_fn_cxx_try_link "$LINENO"; then :
30531  ac_cv_lib_ipc_shmat=yes
30532else
30533  ac_cv_lib_ipc_shmat=no
30534fi
30535rm -f core conftest.err conftest.$ac_objext \
30536    conftest$ac_exeext conftest.$ac_ext
30537LIBS=$ac_check_lib_save_LIBS
30538fi
30539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
30540$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
30541if test "x$ac_cv_lib_ipc_shmat" = x""yes; then :
30542  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
30543fi
30544
30545    fi
30546  fi
30547
30548  # Check for libraries that X11R6 Xt/Xaw programs need.
30549  ac_save_LDFLAGS=$LDFLAGS
30550  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
30551  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
30552  # check for ICE first), but we must link in the order -lSM -lICE or
30553  # we get undefined symbols.  So assume we have SM if we have ICE.
30554  # These have to be linked with before -lX11, unlike the other
30555  # libraries we check for below, so use a different variable.
30556  # John Interrante, Karl Berry
30557  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
30558$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
30559if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then :
30560  $as_echo_n "(cached) " >&6
30561else
30562  ac_check_lib_save_LIBS=$LIBS
30563LIBS="-lICE $X_EXTRA_LIBS $LIBS"
30564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30565/* end confdefs.h.  */
30566
30567/* Override any GCC internal prototype to avoid an error.
30568   Use char because int might match the return type of a GCC
30569   builtin and then its argument prototype would still apply.  */
30570#ifdef __cplusplus
30571extern "C"
30572#endif
30573char IceConnectionNumber ();
30574int
30575main ()
30576{
30577return IceConnectionNumber ();
30578  ;
30579  return 0;
30580}
30581_ACEOF
30582if ac_fn_cxx_try_link "$LINENO"; then :
30583  ac_cv_lib_ICE_IceConnectionNumber=yes
30584else
30585  ac_cv_lib_ICE_IceConnectionNumber=no
30586fi
30587rm -f core conftest.err conftest.$ac_objext \
30588    conftest$ac_exeext conftest.$ac_ext
30589LIBS=$ac_check_lib_save_LIBS
30590fi
30591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
30592$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
30593if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then :
30594  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
30595fi
30596
30597  LDFLAGS=$ac_save_LDFLAGS
30598
30599fi
30600
30601
30602# AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
30603# this doesn't make sense so we remove it.
30604if test "x$COMPILE_TYPE" = xcross; then
30605  X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
30606fi
30607
30608if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
30609
30610    # Print a helpful message on how to acquire the necessary build dependency.
30611    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30612    MISSING_DEPENDENCY=x11
30613    PKGHANDLER_COMMAND=
30614
30615    case $PKGHANDLER in
30616	apt-get)
30617                apt_help     $MISSING_DEPENDENCY ;;
30618    yum)
30619                yum_help     $MISSING_DEPENDENCY ;;
30620	port)
30621                port_help    $MISSING_DEPENDENCY ;;
30622	pkgutil)
30623                pkgutil_help $MISSING_DEPENDENCY ;;
30624	pkgadd)
30625                pkgadd_help  $MISSING_DEPENDENCY ;;
30626    * )
30627      break ;;
30628    esac
30629
30630    if test "x$PKGHANDLER_COMMAND" != x; then
30631        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30632    fi
30633
30634    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
30635fi
30636
30637# Some of the old makefiles require a setting of OPENWIN_HOME
30638# Since the X11R6 directory has disappeared on later Linuxes,
30639# we need to probe for it.
30640if test "x$OPENJDK_TARGET_OS" = xlinux; then
30641    if test -d "$SYS_ROOT/usr/X11R6"; then
30642        OPENWIN_HOME="$SYS_ROOT/usr/X11R6"
30643    fi
30644    if test -d "$SYS_ROOT/usr/include/X11"; then
30645        OPENWIN_HOME="$SYS_ROOT/usr"
30646    fi
30647fi
30648if test "x$OPENJDK_TARGET_OS" = xsolaris; then
30649    OPENWIN_HOME="/usr/openwin"
30650fi
30651
30652
30653
30654#
30655# Weird Sol10 something check...TODO change to try compile
30656#
30657if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
30658  if test "`uname -r`" = "5.10"; then
30659     if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
30660     	X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
30661     fi
30662  fi
30663fi
30664
30665ac_ext=c
30666ac_cpp='$CPP $CPPFLAGS'
30667ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30668ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30669ac_compiler_gnu=$ac_cv_c_compiler_gnu
30670
30671OLD_CFLAGS="$CFLAGS"
30672CFLAGS="$CFLAGS $X_CFLAGS"
30673
30674# Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
30675for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h
30676do :
30677  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30678ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " # include <X11/Xlib.h>
30679                   # include <X11/Xutil.h>
30680
30681"
30682if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30683  cat >>confdefs.h <<_ACEOF
30684#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30685_ACEOF
30686 X11_A_OK=yes
30687else
30688  X11_A_OK=no; break
30689fi
30690
30691done
30692
30693
30694CFLAGS="$OLD_CFLAGS"
30695ac_ext=cpp
30696ac_cpp='$CXXCPP $CPPFLAGS'
30697ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30698ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30699ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30700
30701
30702if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
30703
30704    # Print a helpful message on how to acquire the necessary build dependency.
30705    # x11 is the help tag: freetyp2, cups, pulse, alsa etc
30706    MISSING_DEPENDENCY=x11
30707    PKGHANDLER_COMMAND=
30708
30709    case $PKGHANDLER in
30710	apt-get)
30711                apt_help     $MISSING_DEPENDENCY ;;
30712    yum)
30713                yum_help     $MISSING_DEPENDENCY ;;
30714	port)
30715                port_help    $MISSING_DEPENDENCY ;;
30716	pkgutil)
30717                pkgutil_help $MISSING_DEPENDENCY ;;
30718	pkgadd)
30719                pkgadd_help  $MISSING_DEPENDENCY ;;
30720    * )
30721      break ;;
30722    esac
30723
30724    if test "x$PKGHANDLER_COMMAND" != x; then
30725        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30726    fi
30727
30728    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG" "$LINENO" 5
30729fi
30730
30731
30732
30733
30734
30735
30736###############################################################################
30737#
30738# The common unix printing system cups is used to print from java.
30739#
30740
30741# Check whether --with-cups was given.
30742if test "${with_cups+set}" = set; then :
30743  withval=$with_cups;
30744fi
30745
30746
30747# Check whether --with-cups-include was given.
30748if test "${with_cups_include+set}" = set; then :
30749  withval=$with_cups_include;
30750fi
30751
30752
30753if test "x$CUPS_NOT_NEEDED" = xyes; then
30754	if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
30755		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
30756$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
30757	fi
30758	CUPS_CFLAGS=
30759else
30760	CUPS_FOUND=no
30761
30762	if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
30763	    as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
30764	fi
30765
30766	if test "x${with_cups}" != x; then
30767	    CUPS_CFLAGS="-I${with_cups}/include"
30768	    CUPS_FOUND=yes
30769	fi
30770	if test "x${with_cups_include}" != x; then
30771	    CUPS_CFLAGS="-I${with_cups_include}"
30772	    CUPS_FOUND=yes
30773	fi
30774	if test "x$CUPS_FOUND" = xno; then
30775
30776
30777    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
30778        # Source the builddeps file again, to make sure it uses the latest variables!
30779        . $builddepsfile
30780        # Look for a target and build machine specific resource!
30781        eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
30782        if test "x$resource" = x; then
30783            # Ok, lets instead look for a target specific resource
30784            eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
30785        fi
30786        if test "x$resource" = x; then
30787            # Ok, lets instead look for a build specific resource
30788            eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
30789        fi
30790        if test "x$resource" = x; then
30791            # Ok, lets instead look for a generic resource
30792            # (The cups comes from M4 and not the shell, thus no need for eval here.)
30793            resource=${builddep_cups}
30794        fi
30795        if test "x$resource" != x; then
30796            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
30797$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
30798	    # If the resource in the builddeps.conf file is an existing directory,
30799	    # for example /java/linux/cups
30800	    if test -d ${resource}; then
30801	       depdir=${resource}
30802	    else
30803
30804# cups is for example mymodule
30805# $resource is for example libs/general/libmymod_1_2_3.zip
30806# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
30807# $with_builddeps_dir is for example /localhome/builddeps
30808# depdir is the name of the variable into which we store the depdir, eg MYMOD
30809# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
30810# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
30811    filename=`basename $resource`
30812    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
30813    filebase=${filename%%.*}
30814    extension=${filename#*.}
30815    installdir=$with_builddeps_dir/$filebase
30816    if test ! -f $installdir/$filename.unpacked; then
30817        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
30818$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
30819        if test ! -d $installdir; then
30820            mkdir -p $installdir
30821        fi
30822        if test ! -d $installdir; then
30823            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
30824        fi
30825        tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
30826        touch $tmpfile
30827        if test ! -f $tmpfile; then
30828            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
30829        fi
30830
30831    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
30832    # $tmpfile is the local file name for the downloaded file.
30833    VALID_TOOL=no
30834    if test "x$BDEPS_FTP" = xwget; then
30835       VALID_TOOL=yes
30836       wget -O $tmpfile $with_builddeps_server/$resource
30837    fi
30838    if test "x$BDEPS_FTP" = xlftp; then
30839       VALID_TOOL=yes
30840       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
30841    fi
30842    if test "x$BDEPS_FTP" = xftp; then
30843        VALID_TOOL=yes
30844        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
30845        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
30846        FTPUSERPWD=${FTPSERVER%%@*}
30847        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
30848            FTPUSER=${userpwd%%:*}
30849            FTPPWD=${userpwd#*@}
30850            FTPSERVER=${FTPSERVER#*@}
30851        else
30852            FTPUSER=ftp
30853            FTPPWD=ftp
30854        fi
30855        # the "pass" command does not work on some
30856        # ftp clients (read ftp.exe) but if it works,
30857        # passive mode is better!
30858        (\
30859            echo "user $FTPUSER $FTPPWD"        ;\
30860            echo "pass"                         ;\
30861            echo "bin"                          ;\
30862            echo "get $FTPPATH $tmpfile"              ;\
30863        ) | ftp -in $FTPSERVER
30864    fi
30865    if test "x$VALID_TOOL" != xyes; then
30866       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
30867    fi
30868
30869        mv $tmpfile $installdir/$filename
30870        if test ! -s $installdir/$filename; then
30871            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
30872        fi
30873        case "$extension" in
30874            zip)  echo "Unzipping $installdir/$filename..."
30875               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
30876            ;;
30877            tar.gz) echo "Untaring $installdir/$filename..."
30878               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30879            ;;
30880            tgz) echo "Untaring $installdir/$filename..."
30881               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
30882            ;;
30883            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
30884            ;;
30885        esac
30886    fi
30887    if test -f $installdir/$filename.unpacked; then
30888        depdir=$installdir
30889    fi
30890
30891	    fi
30892            # Source the builddeps file again, because in the previous command, the depdir
30893            # was updated to point at the current build dependency install directory.
30894            . $builddepsfile
30895            # Now extract variables from the builddeps.conf files.
30896            theroot=${builddep_cups_ROOT}
30897            thecflags=${builddep_cups_CFLAGS}
30898            thelibs=${builddep_cups_LIBS}
30899            if test "x$depdir" = x; then
30900                as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
30901            fi
30902            CUPS=$depdir
30903            if test "x$theroot" != x; then
30904               CUPS="$theroot"
30905            fi
30906            if test "x$thecflags" != x; then
30907               CUPS_CFLAGS="$thecflags"
30908            fi
30909            if test "x$thelibs" != x; then
30910               CUPS_LIBS="$thelibs"
30911            fi
30912            CUPS_FOUND=yes
30913
30914        fi
30915
30916    fi
30917
30918	fi
30919	if test "x$CUPS_FOUND" = xno; then
30920	    # Are the cups headers installed in the default /usr/include location?
30921	    for ac_header in cups/cups.h cups/ppd.h
30922do :
30923  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
30924ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
30925if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
30926  cat >>confdefs.h <<_ACEOF
30927#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
30928_ACEOF
30929 CUPS_FOUND=yes
30930	                      CUPS_CFLAGS=
30931	                      DEFAULT_CUPS=yes
30932fi
30933
30934done
30935
30936	fi
30937	if test "x$CUPS_FOUND" = xno; then
30938	    # Getting nervous now? Lets poke around for standard Solaris third-party
30939	    # package installation locations.
30940	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
30941$as_echo_n "checking for cups headers... " >&6; }
30942	    if test -s /opt/sfw/cups/include/cups/cups.h; then
30943	       # An SFW package seems to be installed!
30944	       CUPS_FOUND=yes
30945	       CUPS_CFLAGS="-I/opt/sfw/cups/include"
30946	    elif test -s /opt/csw/include/cups/cups.h; then
30947	       # A CSW package seems to be installed!
30948	       CUPS_FOUND=yes
30949	       CUPS_CFLAGS="-I/opt/csw/include"
30950	    fi
30951	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
30952$as_echo "$CUPS_FOUND" >&6; }
30953	fi
30954	if test "x$CUPS_FOUND" = xno; then
30955
30956    # Print a helpful message on how to acquire the necessary build dependency.
30957    # cups is the help tag: freetyp2, cups, pulse, alsa etc
30958    MISSING_DEPENDENCY=cups
30959    PKGHANDLER_COMMAND=
30960
30961    case $PKGHANDLER in
30962	apt-get)
30963                apt_help     $MISSING_DEPENDENCY ;;
30964    yum)
30965                yum_help     $MISSING_DEPENDENCY ;;
30966	port)
30967                port_help    $MISSING_DEPENDENCY ;;
30968	pkgutil)
30969                pkgutil_help $MISSING_DEPENDENCY ;;
30970	pkgadd)
30971                pkgadd_help  $MISSING_DEPENDENCY ;;
30972    * )
30973      break ;;
30974    esac
30975
30976    if test "x$PKGHANDLER_COMMAND" != x; then
30977        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30978    fi
30979
30980	    as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
30981	fi
30982fi
30983
30984
30985
30986
30987
30988
30989###############################################################################
30990#
30991# The ubiquitous freetype2 library is used to render fonts.
30992#
30993
30994# Check whether --with-freetype was given.
30995if test "${with_freetype+set}" = set; then :
30996  withval=$with_freetype;
30997fi
30998
30999
31000# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree
31001USING_SYSTEM_FT_LIB=false
31002
31003if test "x$FREETYPE2_NOT_NEEDED" = xyes; then
31004	if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
31005		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
31006$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
31007	fi
31008	FREETYPE2_CFLAGS=
31009	FREETYPE2_LIBS=
31010        FREETYPE2_LIB_PATH=
31011else
31012	FREETYPE2_FOUND=no
31013
31014	if test "x$with_freetype" != x; then
31015
31016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31017
31018  # Input might be given as Windows format, start by converting to
31019  # unix format.
31020  path="$with_freetype"
31021  new_path=`$CYGPATH -u "$path"`
31022
31023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31026  # "foo.exe" is OK but "foo" is an error.
31027  #
31028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31029  # It is also a way to make sure we got the proper file name for the real test later on.
31030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31031  if test "x$test_shortpath" = x; then
31032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31033$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31034    as_fn_error $? "Cannot locate the the path of with_freetype" "$LINENO" 5
31035  fi
31036
31037  # Call helper function which possibly converts this using DOS-style short mode.
31038  # If so, the updated path is stored in $new_path.
31039
31040  input_path="$new_path"
31041  # Check if we need to convert this using DOS-style short mode. If the path
31042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31043  # take no chances and rewrite it.
31044  # Note: m4 eats our [], so we need to use [ and ] instead.
31045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31046  if test "x$has_forbidden_chars" != x; then
31047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31051      # Going to short mode and back again did indeed matter. Since short mode is
31052      # case insensitive, let's make it lowercase to improve readability.
31053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31054      # Now convert it back to Unix-stile (cygpath)
31055      input_path=`$CYGPATH -u "$shortmode_path"`
31056      new_path="$input_path"
31057    fi
31058  fi
31059
31060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31061  if test "x$test_cygdrive_prefix" = x; then
31062    # As a simple fix, exclude /usr/bin since it's not a real path.
31063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31065      # a path prefixed by /cygdrive for fixpath to work.
31066      new_path="$CYGWIN_ROOT_PATH$input_path"
31067    fi
31068  fi
31069
31070
31071  if test "x$path" != "x$new_path"; then
31072    with_freetype="$new_path"
31073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31074$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31075  fi
31076
31077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31078
31079  path="$with_freetype"
31080  has_colon=`$ECHO $path | $GREP ^.:`
31081  new_path="$path"
31082  if test "x$has_colon" = x; then
31083    # Not in mixed or Windows style, start by that.
31084    new_path=`cmd //c echo $path`
31085  fi
31086
31087
31088  input_path="$new_path"
31089  # Check if we need to convert this using DOS-style short mode. If the path
31090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31091  # take no chances and rewrite it.
31092  # Note: m4 eats our [], so we need to use [ and ] instead.
31093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31094  if test "x$has_forbidden_chars" != x; then
31095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31097  fi
31098
31099
31100  windows_path="$new_path"
31101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31102    unix_path=`$CYGPATH -u "$windows_path"`
31103    new_path="$unix_path"
31104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31106    new_path="$unix_path"
31107  fi
31108
31109  if test "x$path" != "x$new_path"; then
31110    with_freetype="$new_path"
31111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_freetype to \"$new_path\"" >&5
31112$as_echo "$as_me: Rewriting with_freetype to \"$new_path\"" >&6;}
31113  fi
31114
31115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31117
31118  else
31119    # We're on a posix platform. Hooray! :)
31120    path="$with_freetype"
31121    has_space=`$ECHO "$path" | $GREP " "`
31122    if test "x$has_space" != x; then
31123      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_freetype, which resolves as \"$path\", is invalid." >&5
31124$as_echo "$as_me: The path of with_freetype, which resolves as \"$path\", is invalid." >&6;}
31125      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31126    fi
31127
31128    # Use eval to expand a potential ~
31129    eval path="$path"
31130    if test ! -f "$path" && test ! -d "$path"; then
31131      as_fn_error $? "The path of with_freetype, which resolves as \"$path\", is not found." "$LINENO" 5
31132    fi
31133
31134    with_freetype="`cd "$path"; $THEPWDCMD`"
31135  fi
31136
31137	    FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype"
31138            FREETYPE2_LIB_PATH="$with_freetype/lib"
31139            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -d "$with_freetype/lib/amd64"; then
31140                FREETYPE2_LIBS="-L$with_freetype/lib/amd64 -lfreetype"
31141                FREETYPE2_LIB_PATH="$with_freetype/lib/amd64"
31142            fi
31143            if test "x$OPENJDK_TARGET_OS" = xwindows; then
31144                FREETYPE2_LIBS="$with_freetype/lib/freetype.lib"
31145            fi
31146	    FREETYPE2_CFLAGS="-I$with_freetype/include"
31147            if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then
31148                FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include"
31149            fi
31150 	    FREETYPE2_FOUND=yes
31151   	    if test "x$FREETYPE2_FOUND" = xyes; then
31152	        # Verify that the directories exist
31153                if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then
31154		   as_fn_error $? "Could not find the expected directories $with_freetype/lib and $with_freetype/include" "$LINENO" 5
31155		fi
31156	        # List the contents of the lib.
31157		FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null`
31158                if test "x$FREETYPELIB" = x; then
31159		   as_fn_error $? "Could not find libfreetype.so nor freetype.dll in $with_freetype/lib" "$LINENO" 5
31160		fi
31161	        # Check one h-file
31162                if ! test -s "$with_freetype/include/ft2build.h"; then
31163		   as_fn_error $? "Could not find $with_freetype/include/ft2build.h" "$LINENO" 5
31164		fi
31165            fi
31166        fi
31167	if test "x$FREETYPE2_FOUND" = xno; then
31168
31169
31170    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31171        # Source the builddeps file again, to make sure it uses the latest variables!
31172        . $builddepsfile
31173        # Look for a target and build machine specific resource!
31174        eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31175        if test "x$resource" = x; then
31176            # Ok, lets instead look for a target specific resource
31177            eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
31178        fi
31179        if test "x$resource" = x; then
31180            # Ok, lets instead look for a build specific resource
31181            eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
31182        fi
31183        if test "x$resource" = x; then
31184            # Ok, lets instead look for a generic resource
31185            # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
31186            resource=${builddep_freetype2}
31187        fi
31188        if test "x$resource" != x; then
31189            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
31190$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
31191	    # If the resource in the builddeps.conf file is an existing directory,
31192	    # for example /java/linux/cups
31193	    if test -d ${resource}; then
31194	       depdir=${resource}
31195	    else
31196
31197# freetype2 is for example mymodule
31198# $resource is for example libs/general/libmymod_1_2_3.zip
31199# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31200# $with_builddeps_dir is for example /localhome/builddeps
31201# depdir is the name of the variable into which we store the depdir, eg MYMOD
31202# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31203# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31204    filename=`basename $resource`
31205    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31206    filebase=${filename%%.*}
31207    extension=${filename#*.}
31208    installdir=$with_builddeps_dir/$filebase
31209    if test ! -f $installdir/$filename.unpacked; then
31210        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
31211$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31212        if test ! -d $installdir; then
31213            mkdir -p $installdir
31214        fi
31215        if test ! -d $installdir; then
31216            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31217        fi
31218        tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
31219        touch $tmpfile
31220        if test ! -f $tmpfile; then
31221            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31222        fi
31223
31224    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31225    # $tmpfile is the local file name for the downloaded file.
31226    VALID_TOOL=no
31227    if test "x$BDEPS_FTP" = xwget; then
31228       VALID_TOOL=yes
31229       wget -O $tmpfile $with_builddeps_server/$resource
31230    fi
31231    if test "x$BDEPS_FTP" = xlftp; then
31232       VALID_TOOL=yes
31233       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31234    fi
31235    if test "x$BDEPS_FTP" = xftp; then
31236        VALID_TOOL=yes
31237        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31238        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31239        FTPUSERPWD=${FTPSERVER%%@*}
31240        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31241            FTPUSER=${userpwd%%:*}
31242            FTPPWD=${userpwd#*@}
31243            FTPSERVER=${FTPSERVER#*@}
31244        else
31245            FTPUSER=ftp
31246            FTPPWD=ftp
31247        fi
31248        # the "pass" command does not work on some
31249        # ftp clients (read ftp.exe) but if it works,
31250        # passive mode is better!
31251        (\
31252            echo "user $FTPUSER $FTPPWD"        ;\
31253            echo "pass"                         ;\
31254            echo "bin"                          ;\
31255            echo "get $FTPPATH $tmpfile"              ;\
31256        ) | ftp -in $FTPSERVER
31257    fi
31258    if test "x$VALID_TOOL" != xyes; then
31259       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31260    fi
31261
31262        mv $tmpfile $installdir/$filename
31263        if test ! -s $installdir/$filename; then
31264            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31265        fi
31266        case "$extension" in
31267            zip)  echo "Unzipping $installdir/$filename..."
31268               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31269            ;;
31270            tar.gz) echo "Untaring $installdir/$filename..."
31271               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31272            ;;
31273            tgz) echo "Untaring $installdir/$filename..."
31274               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31275            ;;
31276            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31277            ;;
31278        esac
31279    fi
31280    if test -f $installdir/$filename.unpacked; then
31281        depdir=$installdir
31282    fi
31283
31284	    fi
31285            # Source the builddeps file again, because in the previous command, the depdir
31286            # was updated to point at the current build dependency install directory.
31287            . $builddepsfile
31288            # Now extract variables from the builddeps.conf files.
31289            theroot=${builddep_freetype2_ROOT}
31290            thecflags=${builddep_freetype2_CFLAGS}
31291            thelibs=${builddep_freetype2_LIBS}
31292            if test "x$depdir" = x; then
31293                as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
31294            fi
31295            FREETYPE2=$depdir
31296            if test "x$theroot" != x; then
31297               FREETYPE2="$theroot"
31298            fi
31299            if test "x$thecflags" != x; then
31300               FREETYPE2_CFLAGS="$thecflags"
31301            fi
31302            if test "x$thelibs" != x; then
31303               FREETYPE2_LIBS="$thelibs"
31304            fi
31305            FREETYPE2_FOUND=yes
31306            else FREETYPE2_FOUND=no
31307
31308        fi
31309        else FREETYPE2_FOUND=no
31310
31311    fi
31312
31313            USING_SYSTEM_FT_LIB=true
31314	fi
31315	if test "x$FREETYPE2_FOUND" = xno && test "x$OPENJDK_TARGET_OS" = xwindows; then
31316            FREETYPELOCATION="$PROGRAMFILES/GnuWin32"
31317
31318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31319
31320  # Input might be given as Windows format, start by converting to
31321  # unix format.
31322  path="$FREETYPELOCATION"
31323  new_path=`$CYGPATH -u "$path"`
31324
31325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31328  # "foo.exe" is OK but "foo" is an error.
31329  #
31330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31331  # It is also a way to make sure we got the proper file name for the real test later on.
31332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31333  if test "x$test_shortpath" = x; then
31334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31335$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31336    as_fn_error $? "Cannot locate the the path of FREETYPELOCATION" "$LINENO" 5
31337  fi
31338
31339  # Call helper function which possibly converts this using DOS-style short mode.
31340  # If so, the updated path is stored in $new_path.
31341
31342  input_path="$new_path"
31343  # Check if we need to convert this using DOS-style short mode. If the path
31344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31345  # take no chances and rewrite it.
31346  # Note: m4 eats our [], so we need to use [ and ] instead.
31347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31348  if test "x$has_forbidden_chars" != x; then
31349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31353      # Going to short mode and back again did indeed matter. Since short mode is
31354      # case insensitive, let's make it lowercase to improve readability.
31355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31356      # Now convert it back to Unix-stile (cygpath)
31357      input_path=`$CYGPATH -u "$shortmode_path"`
31358      new_path="$input_path"
31359    fi
31360  fi
31361
31362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31363  if test "x$test_cygdrive_prefix" = x; then
31364    # As a simple fix, exclude /usr/bin since it's not a real path.
31365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31367      # a path prefixed by /cygdrive for fixpath to work.
31368      new_path="$CYGWIN_ROOT_PATH$input_path"
31369    fi
31370  fi
31371
31372
31373  if test "x$path" != "x$new_path"; then
31374    FREETYPELOCATION="$new_path"
31375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31376$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31377  fi
31378
31379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31380
31381  path="$FREETYPELOCATION"
31382  has_colon=`$ECHO $path | $GREP ^.:`
31383  new_path="$path"
31384  if test "x$has_colon" = x; then
31385    # Not in mixed or Windows style, start by that.
31386    new_path=`cmd //c echo $path`
31387  fi
31388
31389
31390  input_path="$new_path"
31391  # Check if we need to convert this using DOS-style short mode. If the path
31392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31393  # take no chances and rewrite it.
31394  # Note: m4 eats our [], so we need to use [ and ] instead.
31395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31396  if test "x$has_forbidden_chars" != x; then
31397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31399  fi
31400
31401
31402  windows_path="$new_path"
31403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31404    unix_path=`$CYGPATH -u "$windows_path"`
31405    new_path="$unix_path"
31406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31408    new_path="$unix_path"
31409  fi
31410
31411  if test "x$path" != "x$new_path"; then
31412    FREETYPELOCATION="$new_path"
31413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPELOCATION to \"$new_path\"" >&5
31414$as_echo "$as_me: Rewriting FREETYPELOCATION to \"$new_path\"" >&6;}
31415  fi
31416
31417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31419
31420  else
31421    # We're on a posix platform. Hooray! :)
31422    path="$FREETYPELOCATION"
31423    has_space=`$ECHO "$path" | $GREP " "`
31424    if test "x$has_space" != x; then
31425      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&5
31426$as_echo "$as_me: The path of FREETYPELOCATION, which resolves as \"$path\", is invalid." >&6;}
31427      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31428    fi
31429
31430    # Use eval to expand a potential ~
31431    eval path="$path"
31432    if test ! -f "$path" && test ! -d "$path"; then
31433      as_fn_error $? "The path of FREETYPELOCATION, which resolves as \"$path\", is not found." "$LINENO" 5
31434    fi
31435
31436    FREETYPELOCATION="`cd "$path"; $THEPWDCMD`"
31437  fi
31438
31439	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard windows locations" >&5
31440$as_echo_n "checking for freetype in some standard windows locations... " >&6; }
31441	    if test -s "$FREETYPELOCATION/include/ft2build.h" && test -d "$FREETYPELOCATION/include/freetype2/freetype"; then
31442	        FREETYPE2_CFLAGS="-I$FREETYPELOCATION/include/freetype2 -I$FREETYPELOCATION/include"
31443	        FREETYPE2_LIBS="$FREETYPELOCATION/lib/freetype.lib"
31444 	        FREETYPE2_LIB_PATH="$FREETYPELOCATION/lib"
31445                if ! test -s "$FREETYPE2_LIBS"; then
31446		   as_fn_error $? "Could not find $FREETYPE2_LIBS" "$LINENO" 5
31447		fi
31448                if ! test -s "$FREETYPE2_LIB_PATH/freetype.dll"; then
31449		   as_fn_error $? "Could not find $FREETYPE2_LIB_PATH/freetype.dll" "$LINENO" 5
31450		fi
31451                USING_SYSTEM_FT_LIB=true
31452                FREETYPE2_FOUND=yes
31453	    fi
31454	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31455$as_echo "$FREETYPE2_FOUND" >&6; }
31456        fi
31457	if test "x$FREETYPE2_FOUND" = xno; then
31458
31459pkg_failed=no
31460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE2" >&5
31461$as_echo_n "checking for FREETYPE2... " >&6; }
31462
31463if test -n "$FREETYPE2_CFLAGS"; then
31464    pkg_cv_FREETYPE2_CFLAGS="$FREETYPE2_CFLAGS"
31465 elif test -n "$PKG_CONFIG"; then
31466    if test -n "$PKG_CONFIG" && \
31467    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31468  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31469  ac_status=$?
31470  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31471  test $ac_status = 0; }; then
31472  pkg_cv_FREETYPE2_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
31473else
31474  pkg_failed=yes
31475fi
31476 else
31477    pkg_failed=untried
31478fi
31479if test -n "$FREETYPE2_LIBS"; then
31480    pkg_cv_FREETYPE2_LIBS="$FREETYPE2_LIBS"
31481 elif test -n "$PKG_CONFIG"; then
31482    if test -n "$PKG_CONFIG" && \
31483    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
31484  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
31485  ac_status=$?
31486  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31487  test $ac_status = 0; }; then
31488  pkg_cv_FREETYPE2_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
31489else
31490  pkg_failed=yes
31491fi
31492 else
31493    pkg_failed=untried
31494fi
31495
31496
31497
31498if test $pkg_failed = yes; then
31499
31500if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31501        _pkg_short_errors_supported=yes
31502else
31503        _pkg_short_errors_supported=no
31504fi
31505        if test $_pkg_short_errors_supported = yes; then
31506	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
31507        else
31508	        FREETYPE2_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
31509        fi
31510	# Put the nasty error message in config.log where it belongs
31511	echo "$FREETYPE2_PKG_ERRORS" >&5
31512
31513	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31514$as_echo "no" >&6; }
31515                FREETYPE2_FOUND=no
31516elif test $pkg_failed = untried; then
31517	FREETYPE2_FOUND=no
31518else
31519	FREETYPE2_CFLAGS=$pkg_cv_FREETYPE2_CFLAGS
31520	FREETYPE2_LIBS=$pkg_cv_FREETYPE2_LIBS
31521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31522$as_echo "yes" >&6; }
31523	FREETYPE2_FOUND=yes
31524fi
31525            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
31526            FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's/-lz//g'`
31527            USING_SYSTEM_FT_LIB=true
31528            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
31529            if test "x$FREETYPE2_FOUND" = xyes && test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
31530              FREETYPE2_LIBS=`$ECHO $FREETYPE2_LIBS | $SED 's?/lib?/lib/amd64?g'`
31531            fi
31532	fi
31533	if test "x$FREETYPE2_FOUND" = xno; then
31534	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype in some standard locations" >&5
31535$as_echo_n "checking for freetype in some standard locations... " >&6; }
31536
31537	    if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then
31538	        DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include"
31539	        DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype"
31540	    fi
31541	    if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then
31542	        DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2"
31543	        DEFAULT_FREETYPE_LIBS="-lfreetype"
31544	    fi
31545
31546	    PREV_CXXCFLAGS="$CXXFLAGS"
31547	    PREV_LDFLAGS="$LDFLAGS"
31548	    CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS"
31549	    LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS"
31550	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31551/* end confdefs.h.  */
31552#include<ft2build.h>
31553	                    #include FT_FREETYPE_H
31554	                   int main() { return 0; }
31555
31556_ACEOF
31557if ac_fn_cxx_try_link "$LINENO"; then :
31558
31559	                      # Yes, the default cflags and libs did the trick.
31560	                      FREETYPE2_FOUND=yes
31561	                      FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS"
31562	                      FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS"
31563
31564else
31565
31566	                      FREETYPE2_FOUND=no
31567
31568fi
31569rm -f core conftest.err conftest.$ac_objext \
31570    conftest$ac_exeext conftest.$ac_ext
31571            CXXCFLAGS="$PREV_CXXFLAGS"
31572	    LDFLAGS="$PREV_LDFLAGS"
31573	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE2_FOUND" >&5
31574$as_echo "$FREETYPE2_FOUND" >&6; }
31575            USING_SYSTEM_FT_LIB=true
31576	fi
31577	if test "x$FREETYPE2_FOUND" = xno; then
31578
31579    # Print a helpful message on how to acquire the necessary build dependency.
31580    # freetype2 is the help tag: freetyp2, cups, pulse, alsa etc
31581    MISSING_DEPENDENCY=freetype2
31582    PKGHANDLER_COMMAND=
31583
31584    case $PKGHANDLER in
31585	apt-get)
31586                apt_help     $MISSING_DEPENDENCY ;;
31587    yum)
31588                yum_help     $MISSING_DEPENDENCY ;;
31589	port)
31590                port_help    $MISSING_DEPENDENCY ;;
31591	pkgutil)
31592                pkgutil_help $MISSING_DEPENDENCY ;;
31593	pkgadd)
31594                pkgadd_help  $MISSING_DEPENDENCY ;;
31595    * )
31596      break ;;
31597    esac
31598
31599    if test "x$PKGHANDLER_COMMAND" != x; then
31600        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31601    fi
31602
31603		as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31604	fi
31605
31606        if test "x$OPENJDK_TARGET_OS" != xwindows; then
31607            # AC_CHECK_LIB does not support use of cl.exe
31608            PREV_LDFLAGS="$LDFLAGS"
31609            LDFLAGS="$FREETYPE2_LIBS"
31610            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FT_Init_FreeType in -lfreetype" >&5
31611$as_echo_n "checking for FT_Init_FreeType in -lfreetype... " >&6; }
31612if test "${ac_cv_lib_freetype_FT_Init_FreeType+set}" = set; then :
31613  $as_echo_n "(cached) " >&6
31614else
31615  ac_check_lib_save_LIBS=$LIBS
31616LIBS="-lfreetype  $LIBS"
31617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31618/* end confdefs.h.  */
31619
31620/* Override any GCC internal prototype to avoid an error.
31621   Use char because int might match the return type of a GCC
31622   builtin and then its argument prototype would still apply.  */
31623#ifdef __cplusplus
31624extern "C"
31625#endif
31626char FT_Init_FreeType ();
31627int
31628main ()
31629{
31630return FT_Init_FreeType ();
31631  ;
31632  return 0;
31633}
31634_ACEOF
31635if ac_fn_cxx_try_link "$LINENO"; then :
31636  ac_cv_lib_freetype_FT_Init_FreeType=yes
31637else
31638  ac_cv_lib_freetype_FT_Init_FreeType=no
31639fi
31640rm -f core conftest.err conftest.$ac_objext \
31641    conftest$ac_exeext conftest.$ac_ext
31642LIBS=$ac_check_lib_save_LIBS
31643fi
31644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_freetype_FT_Init_FreeType" >&5
31645$as_echo "$ac_cv_lib_freetype_FT_Init_FreeType" >&6; }
31646if test "x$ac_cv_lib_freetype_FT_Init_FreeType" = x""yes; then :
31647  FREETYPE2_FOUND=true
31648else
31649  as_fn_error $? "Could not find freetype2! $HELP_MSG " "$LINENO" 5
31650fi
31651
31652            LDFLAGS="$PREV_LDFLAGS"
31653        fi
31654fi
31655
31656
31657
31658
31659
31660
31661
31662
31663
31664###############################################################################
31665#
31666# Check for alsa headers and libraries. Used on Linux/GNU systems.
31667#
31668
31669# Check whether --with-alsa was given.
31670if test "${with_alsa+set}" = set; then :
31671  withval=$with_alsa;
31672fi
31673
31674
31675# Check whether --with-alsa-include was given.
31676if test "${with_alsa_include+set}" = set; then :
31677  withval=$with_alsa_include;
31678fi
31679
31680
31681# Check whether --with-alsa-lib was given.
31682if test "${with_alsa_lib+set}" = set; then :
31683  withval=$with_alsa_lib;
31684fi
31685
31686
31687if test "x$ALSA_NOT_NEEDED" = xyes; then
31688	if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
31689		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
31690$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
31691	fi
31692	ALSA_CFLAGS=
31693	ALSA_LIBS=
31694else
31695	ALSA_FOUND=no
31696
31697	if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
31698	    as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
31699	fi
31700
31701	if test "x${with_alsa}" != x; then
31702	    ALSA_LIBS="-L${with_alsa}/lib -lalsa"
31703	    ALSA_CFLAGS="-I${with_alsa}/include"
31704	    ALSA_FOUND=yes
31705	fi
31706	if test "x${with_alsa_include}" != x; then
31707	    ALSA_CFLAGS="-I${with_alsa_include}"
31708	    ALSA_FOUND=yes
31709	fi
31710	if test "x${with_alsa_lib}" != x; then
31711	    ALSA_LIBS="-L${with_alsa_lib} -lalsa"
31712	    ALSA_FOUND=yes
31713	fi
31714	if test "x$ALSA_FOUND" = xno; then
31715
31716
31717    if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
31718        # Source the builddeps file again, to make sure it uses the latest variables!
31719        . $builddepsfile
31720        # Look for a target and build machine specific resource!
31721        eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
31722        if test "x$resource" = x; then
31723            # Ok, lets instead look for a target specific resource
31724            eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
31725        fi
31726        if test "x$resource" = x; then
31727            # Ok, lets instead look for a build specific resource
31728            eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
31729        fi
31730        if test "x$resource" = x; then
31731            # Ok, lets instead look for a generic resource
31732            # (The alsa comes from M4 and not the shell, thus no need for eval here.)
31733            resource=${builddep_alsa}
31734        fi
31735        if test "x$resource" != x; then
31736            { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
31737$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
31738	    # If the resource in the builddeps.conf file is an existing directory,
31739	    # for example /java/linux/cups
31740	    if test -d ${resource}; then
31741	       depdir=${resource}
31742	    else
31743
31744# alsa is for example mymodule
31745# $resource is for example libs/general/libmymod_1_2_3.zip
31746# $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
31747# $with_builddeps_dir is for example /localhome/builddeps
31748# depdir is the name of the variable into which we store the depdir, eg MYMOD
31749# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
31750# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
31751    filename=`basename $resource`
31752    filebase=`echo $filename | sed 's/\.[^\.]*$//'`
31753    filebase=${filename%%.*}
31754    extension=${filename#*.}
31755    installdir=$with_builddeps_dir/$filebase
31756    if test ! -f $installdir/$filename.unpacked; then
31757        { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
31758$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
31759        if test ! -d $installdir; then
31760            mkdir -p $installdir
31761        fi
31762        if test ! -d $installdir; then
31763            as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
31764        fi
31765        tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
31766        touch $tmpfile
31767        if test ! -f $tmpfile; then
31768            as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
31769        fi
31770
31771    # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
31772    # $tmpfile is the local file name for the downloaded file.
31773    VALID_TOOL=no
31774    if test "x$BDEPS_FTP" = xwget; then
31775       VALID_TOOL=yes
31776       wget -O $tmpfile $with_builddeps_server/$resource
31777    fi
31778    if test "x$BDEPS_FTP" = xlftp; then
31779       VALID_TOOL=yes
31780       lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
31781    fi
31782    if test "x$BDEPS_FTP" = xftp; then
31783        VALID_TOOL=yes
31784        FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
31785        FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
31786        FTPUSERPWD=${FTPSERVER%%@*}
31787        if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
31788            FTPUSER=${userpwd%%:*}
31789            FTPPWD=${userpwd#*@}
31790            FTPSERVER=${FTPSERVER#*@}
31791        else
31792            FTPUSER=ftp
31793            FTPPWD=ftp
31794        fi
31795        # the "pass" command does not work on some
31796        # ftp clients (read ftp.exe) but if it works,
31797        # passive mode is better!
31798        (\
31799            echo "user $FTPUSER $FTPPWD"        ;\
31800            echo "pass"                         ;\
31801            echo "bin"                          ;\
31802            echo "get $FTPPATH $tmpfile"              ;\
31803        ) | ftp -in $FTPSERVER
31804    fi
31805    if test "x$VALID_TOOL" != xyes; then
31806       as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
31807    fi
31808
31809        mv $tmpfile $installdir/$filename
31810        if test ! -s $installdir/$filename; then
31811            as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
31812        fi
31813        case "$extension" in
31814            zip)  echo "Unzipping $installdir/$filename..."
31815               (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
31816            ;;
31817            tar.gz) echo "Untaring $installdir/$filename..."
31818               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31819            ;;
31820            tgz) echo "Untaring $installdir/$filename..."
31821               (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
31822            ;;
31823            *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
31824            ;;
31825        esac
31826    fi
31827    if test -f $installdir/$filename.unpacked; then
31828        depdir=$installdir
31829    fi
31830
31831	    fi
31832            # Source the builddeps file again, because in the previous command, the depdir
31833            # was updated to point at the current build dependency install directory.
31834            . $builddepsfile
31835            # Now extract variables from the builddeps.conf files.
31836            theroot=${builddep_alsa_ROOT}
31837            thecflags=${builddep_alsa_CFLAGS}
31838            thelibs=${builddep_alsa_LIBS}
31839            if test "x$depdir" = x; then
31840                as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
31841            fi
31842            ALSA=$depdir
31843            if test "x$theroot" != x; then
31844               ALSA="$theroot"
31845            fi
31846            if test "x$thecflags" != x; then
31847               ALSA_CFLAGS="$thecflags"
31848            fi
31849            if test "x$thelibs" != x; then
31850               ALSA_LIBS="$thelibs"
31851            fi
31852            ALSA_FOUND=yes
31853            else ALSA_FOUND=no
31854
31855        fi
31856        else ALSA_FOUND=no
31857
31858    fi
31859
31860	fi
31861	if test "x$ALSA_FOUND" = xno; then
31862
31863pkg_failed=no
31864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
31865$as_echo_n "checking for ALSA... " >&6; }
31866
31867if test -n "$ALSA_CFLAGS"; then
31868    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
31869 elif test -n "$PKG_CONFIG"; then
31870    if test -n "$PKG_CONFIG" && \
31871    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31872  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31873  ac_status=$?
31874  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31875  test $ac_status = 0; }; then
31876  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
31877else
31878  pkg_failed=yes
31879fi
31880 else
31881    pkg_failed=untried
31882fi
31883if test -n "$ALSA_LIBS"; then
31884    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
31885 elif test -n "$PKG_CONFIG"; then
31886    if test -n "$PKG_CONFIG" && \
31887    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
31888  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
31889  ac_status=$?
31890  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31891  test $ac_status = 0; }; then
31892  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
31893else
31894  pkg_failed=yes
31895fi
31896 else
31897    pkg_failed=untried
31898fi
31899
31900
31901
31902if test $pkg_failed = yes; then
31903
31904if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31905        _pkg_short_errors_supported=yes
31906else
31907        _pkg_short_errors_supported=no
31908fi
31909        if test $_pkg_short_errors_supported = yes; then
31910	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
31911        else
31912	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
31913        fi
31914	# Put the nasty error message in config.log where it belongs
31915	echo "$ALSA_PKG_ERRORS" >&5
31916
31917	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31918$as_echo "no" >&6; }
31919                ALSA_FOUND=no
31920elif test $pkg_failed = untried; then
31921	ALSA_FOUND=no
31922else
31923	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
31924	ALSA_LIBS=$pkg_cv_ALSA_LIBS
31925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31926$as_echo "yes" >&6; }
31927	ALSA_FOUND=yes
31928fi
31929	fi
31930	if test "x$ALSA_FOUND" = xno; then
31931	    for ac_header in alsa/asoundlib.h
31932do :
31933  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
31934if test "x$ac_cv_header_alsa_asoundlib_h" = x""yes; then :
31935  cat >>confdefs.h <<_ACEOF
31936#define HAVE_ALSA_ASOUNDLIB_H 1
31937_ACEOF
31938 ALSA_FOUND=yes
31939	                      ALSA_CFLAGS=-Iignoreme
31940	                      ALSA_LIBS=-lasound
31941	                      DEFAULT_ALSA=yes
31942else
31943  ALSA_FOUND=no
31944fi
31945
31946done
31947
31948	fi
31949	if test "x$ALSA_FOUND" = xno; then
31950
31951    # Print a helpful message on how to acquire the necessary build dependency.
31952    # alsa is the help tag: freetyp2, cups, pulse, alsa etc
31953    MISSING_DEPENDENCY=alsa
31954    PKGHANDLER_COMMAND=
31955
31956    case $PKGHANDLER in
31957	apt-get)
31958                apt_help     $MISSING_DEPENDENCY ;;
31959    yum)
31960                yum_help     $MISSING_DEPENDENCY ;;
31961	port)
31962                port_help    $MISSING_DEPENDENCY ;;
31963	pkgutil)
31964                pkgutil_help $MISSING_DEPENDENCY ;;
31965	pkgadd)
31966                pkgadd_help  $MISSING_DEPENDENCY ;;
31967    * )
31968      break ;;
31969    esac
31970
31971    if test "x$PKGHANDLER_COMMAND" != x; then
31972        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
31973    fi
31974
31975	    as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
31976	fi
31977fi
31978
31979
31980
31981
31982
31983
31984
31985###############################################################################
31986#
31987# Check for the jpeg library
31988#
31989
31990USE_EXTERNAL_LIBJPEG=true
31991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
31992$as_echo_n "checking for main in -ljpeg... " >&6; }
31993if test "${ac_cv_lib_jpeg_main+set}" = set; then :
31994  $as_echo_n "(cached) " >&6
31995else
31996  ac_check_lib_save_LIBS=$LIBS
31997LIBS="-ljpeg  $LIBS"
31998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31999/* end confdefs.h.  */
32000
32001
32002int
32003main ()
32004{
32005return main ();
32006  ;
32007  return 0;
32008}
32009_ACEOF
32010if ac_fn_cxx_try_link "$LINENO"; then :
32011  ac_cv_lib_jpeg_main=yes
32012else
32013  ac_cv_lib_jpeg_main=no
32014fi
32015rm -f core conftest.err conftest.$ac_objext \
32016    conftest$ac_exeext conftest.$ac_ext
32017LIBS=$ac_check_lib_save_LIBS
32018fi
32019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
32020$as_echo "$ac_cv_lib_jpeg_main" >&6; }
32021if test "x$ac_cv_lib_jpeg_main" = x""yes; then :
32022  cat >>confdefs.h <<_ACEOF
32023#define HAVE_LIBJPEG 1
32024_ACEOF
32025
32026  LIBS="-ljpeg $LIBS"
32027
32028else
32029   USE_EXTERNAL_LIBJPEG=false
32030               { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
32031$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
32032
32033fi
32034
32035
32036
32037###############################################################################
32038#
32039# Check for the gif library
32040#
32041
32042
32043# Check whether --with-giflib was given.
32044if test "${with_giflib+set}" = set; then :
32045  withval=$with_giflib;
32046fi
32047
32048
32049
32050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
32051$as_echo_n "checking for which giflib to use... " >&6; }
32052
32053# default is bundled
32054DEFAULT_GIFLIB=bundled
32055
32056#
32057# if user didn't specify, use DEFAULT_GIFLIB
32058#
32059if test "x${with_giflib}" = "x"; then
32060    with_giflib=${DEFAULT_GIFLIB}
32061fi
32062
32063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
32064$as_echo "${with_giflib}" >&6; }
32065
32066if test "x${with_giflib}" = "xbundled"; then
32067    USE_EXTERNAL_LIBGIF=false
32068elif test "x${with_giflib}" = "xsystem"; then
32069    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
32070if test "x$ac_cv_header_gif_lib_h" = x""yes; then :
32071
32072else
32073   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
32074fi
32075
32076
32077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
32078$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
32079if test "${ac_cv_lib_gif_DGifGetCode+set}" = set; then :
32080  $as_echo_n "(cached) " >&6
32081else
32082  ac_check_lib_save_LIBS=$LIBS
32083LIBS="-lgif  $LIBS"
32084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32085/* end confdefs.h.  */
32086
32087/* Override any GCC internal prototype to avoid an error.
32088   Use char because int might match the return type of a GCC
32089   builtin and then its argument prototype would still apply.  */
32090#ifdef __cplusplus
32091extern "C"
32092#endif
32093char DGifGetCode ();
32094int
32095main ()
32096{
32097return DGifGetCode ();
32098  ;
32099  return 0;
32100}
32101_ACEOF
32102if ac_fn_cxx_try_link "$LINENO"; then :
32103  ac_cv_lib_gif_DGifGetCode=yes
32104else
32105  ac_cv_lib_gif_DGifGetCode=no
32106fi
32107rm -f core conftest.err conftest.$ac_objext \
32108    conftest$ac_exeext conftest.$ac_ext
32109LIBS=$ac_check_lib_save_LIBS
32110fi
32111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
32112$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
32113if test "x$ac_cv_lib_gif_DGifGetCode" = x""yes; then :
32114  cat >>confdefs.h <<_ACEOF
32115#define HAVE_LIBGIF 1
32116_ACEOF
32117
32118  LIBS="-lgif $LIBS"
32119
32120else
32121   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
32122fi
32123
32124
32125    USE_EXTERNAL_LIBGIF=true
32126else
32127    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
32128fi
32129
32130
32131###############################################################################
32132#
32133# Check for the zlib library
32134#
32135
32136
32137# Check whether --with-zlib was given.
32138if test "${with_zlib+set}" = set; then :
32139  withval=$with_zlib;
32140fi
32141
32142
32143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
32144$as_echo_n "checking for compress in -lz... " >&6; }
32145if test "${ac_cv_lib_z_compress+set}" = set; then :
32146  $as_echo_n "(cached) " >&6
32147else
32148  ac_check_lib_save_LIBS=$LIBS
32149LIBS="-lz  $LIBS"
32150cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32151/* end confdefs.h.  */
32152
32153/* Override any GCC internal prototype to avoid an error.
32154   Use char because int might match the return type of a GCC
32155   builtin and then its argument prototype would still apply.  */
32156#ifdef __cplusplus
32157extern "C"
32158#endif
32159char compress ();
32160int
32161main ()
32162{
32163return compress ();
32164  ;
32165  return 0;
32166}
32167_ACEOF
32168if ac_fn_cxx_try_link "$LINENO"; then :
32169  ac_cv_lib_z_compress=yes
32170else
32171  ac_cv_lib_z_compress=no
32172fi
32173rm -f core conftest.err conftest.$ac_objext \
32174    conftest$ac_exeext conftest.$ac_ext
32175LIBS=$ac_check_lib_save_LIBS
32176fi
32177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
32178$as_echo "$ac_cv_lib_z_compress" >&6; }
32179if test "x$ac_cv_lib_z_compress" = x""yes; then :
32180   ZLIB_FOUND=yes
32181else
32182   ZLIB_FOUND=no
32183fi
32184
32185
32186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
32187$as_echo_n "checking for which zlib to use... " >&6; }
32188
32189DEFAULT_ZLIB=bundled
32190if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32191#
32192# On macosx default is system...on others default is
32193#
32194    DEFAULT_ZLIB=system
32195fi
32196
32197if test "x${ZLIB_FOUND}" != "xyes"; then
32198#
32199# If we don't find any system...set default to bundled
32200#
32201    DEFAULT_ZLIB=bundled
32202fi
32203
32204#
32205# If user didn't specify, use DEFAULT_ZLIB
32206#
32207if test "x${with_zlib}" = "x"; then
32208    with_zlib=${DEFAULT_ZLIB}
32209fi
32210
32211if test "x${with_zlib}" = "xbundled"; then
32212    USE_EXTERNAL_LIBZ=false
32213    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
32214$as_echo "bundled" >&6; }
32215elif test "x${with_zlib}" = "xsystem"; then
32216    if test "x${ZLIB_FOUND}" = "xyes"; then
32217        USE_EXTERNAL_LIBZ=true
32218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
32219$as_echo "system" >&6; }
32220    else
32221        { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
32222$as_echo "system not found" >&6; }
32223        as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
32224    fi
32225else
32226    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
32227fi
32228
32229
32230
32231###############################################################################
32232LIBZIP_CAN_USE_MMAP=true
32233
32234
32235
32236###############################################################################
32237#
32238# Check if altzone exists in time.h
32239#
32240
32241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32242/* end confdefs.h.  */
32243#include <time.h>
32244int
32245main ()
32246{
32247return (int)altzone;
32248  ;
32249  return 0;
32250}
32251_ACEOF
32252if ac_fn_cxx_try_link "$LINENO"; then :
32253  has_altzone=yes
32254else
32255  has_altzone=no
32256fi
32257rm -f core conftest.err conftest.$ac_objext \
32258    conftest$ac_exeext conftest.$ac_ext
32259if test "x$has_altzone" = xyes; then
32260
32261$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
32262
32263fi
32264
32265###############################################################################
32266#
32267# Check the maths library
32268#
32269
32270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
32271$as_echo_n "checking for cos in -lm... " >&6; }
32272if test "${ac_cv_lib_m_cos+set}" = set; then :
32273  $as_echo_n "(cached) " >&6
32274else
32275  ac_check_lib_save_LIBS=$LIBS
32276LIBS="-lm  $LIBS"
32277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32278/* end confdefs.h.  */
32279
32280/* Override any GCC internal prototype to avoid an error.
32281   Use char because int might match the return type of a GCC
32282   builtin and then its argument prototype would still apply.  */
32283#ifdef __cplusplus
32284extern "C"
32285#endif
32286char cos ();
32287int
32288main ()
32289{
32290return cos ();
32291  ;
32292  return 0;
32293}
32294_ACEOF
32295if ac_fn_cxx_try_link "$LINENO"; then :
32296  ac_cv_lib_m_cos=yes
32297else
32298  ac_cv_lib_m_cos=no
32299fi
32300rm -f core conftest.err conftest.$ac_objext \
32301    conftest$ac_exeext conftest.$ac_ext
32302LIBS=$ac_check_lib_save_LIBS
32303fi
32304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
32305$as_echo "$ac_cv_lib_m_cos" >&6; }
32306if test "x$ac_cv_lib_m_cos" = x""yes; then :
32307  cat >>confdefs.h <<_ACEOF
32308#define HAVE_LIBM 1
32309_ACEOF
32310
32311  LIBS="-lm $LIBS"
32312
32313else
32314
32315                  { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
32316$as_echo "$as_me: Maths library was not found" >&6;}
32317
32318fi
32319
32320
32321
32322###############################################################################
32323#
32324# Check for libdl.so
32325
32326save_LIBS="$LIBS"
32327LIBS=""
32328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
32329$as_echo_n "checking for dlopen in -ldl... " >&6; }
32330if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
32331  $as_echo_n "(cached) " >&6
32332else
32333  ac_check_lib_save_LIBS=$LIBS
32334LIBS="-ldl  $LIBS"
32335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32336/* end confdefs.h.  */
32337
32338/* Override any GCC internal prototype to avoid an error.
32339   Use char because int might match the return type of a GCC
32340   builtin and then its argument prototype would still apply.  */
32341#ifdef __cplusplus
32342extern "C"
32343#endif
32344char dlopen ();
32345int
32346main ()
32347{
32348return dlopen ();
32349  ;
32350  return 0;
32351}
32352_ACEOF
32353if ac_fn_cxx_try_link "$LINENO"; then :
32354  ac_cv_lib_dl_dlopen=yes
32355else
32356  ac_cv_lib_dl_dlopen=no
32357fi
32358rm -f core conftest.err conftest.$ac_objext \
32359    conftest$ac_exeext conftest.$ac_ext
32360LIBS=$ac_check_lib_save_LIBS
32361fi
32362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
32363$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
32364if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
32365  cat >>confdefs.h <<_ACEOF
32366#define HAVE_LIBDL 1
32367_ACEOF
32368
32369  LIBS="-ldl $LIBS"
32370
32371fi
32372
32373LIBDL="$LIBS"
32374
32375LIBS="$save_LIBS"
32376
32377
32378
32379###############################################################################
32380#
32381# statically link libstdc++ before C++ ABI is stablized on Linux unless
32382# dynamic build is configured on command line.
32383#
32384
32385# Check whether --with-stdc++lib was given.
32386if test "${with_stdc__lib+set}" = set; then :
32387  withval=$with_stdc__lib;
32388    if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
32389        && test "x$with_stdc__lib" != xdefault; then
32390      as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
32391    fi
32392
32393else
32394  with_stdc__lib=default
32395
32396fi
32397
32398
32399if test "x$OPENJDK_TARGET_OS" = xlinux; then
32400    # Test if -lstdc++ works.
32401    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
32402$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
32403    ac_ext=cpp
32404ac_cpp='$CXXCPP $CPPFLAGS'
32405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32408
32409    OLD_CXXFLAGS="$CXXFLAGS"
32410    CXXFLAGS="$CXXFLAGS -lstdc++"
32411    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32412/* end confdefs.h.  */
32413
32414int
32415main ()
32416{
32417return 0;
32418  ;
32419  return 0;
32420}
32421_ACEOF
32422if ac_fn_cxx_try_link "$LINENO"; then :
32423  has_dynamic_libstdcxx=yes
32424else
32425  has_dynamic_libstdcxx=no
32426fi
32427rm -f core conftest.err conftest.$ac_objext \
32428    conftest$ac_exeext conftest.$ac_ext
32429    CXXFLAGS="$OLD_CXXFLAGS"
32430    ac_ext=cpp
32431ac_cpp='$CXXCPP $CPPFLAGS'
32432ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32433ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32434ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32435
32436    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
32437$as_echo "$has_dynamic_libstdcxx" >&6; }
32438
32439    # Test if stdc++ can be linked statically.
32440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
32441$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
32442    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
32443    ac_ext=cpp
32444ac_cpp='$CXXCPP $CPPFLAGS'
32445ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32446ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32447ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32448
32449    OLD_LIBS="$LIBS"
32450    OLD_CXX="$CXX"
32451    LIBS="$STATIC_STDCXX_FLAGS"
32452    CXX="$CC"
32453    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32454/* end confdefs.h.  */
32455
32456int
32457main ()
32458{
32459return 0;
32460  ;
32461  return 0;
32462}
32463_ACEOF
32464if ac_fn_cxx_try_link "$LINENO"; then :
32465  has_static_libstdcxx=yes
32466else
32467  has_static_libstdcxx=no
32468fi
32469rm -f core conftest.err conftest.$ac_objext \
32470    conftest$ac_exeext conftest.$ac_ext
32471    LIBS="$OLD_LIBS"
32472    CXX="$OLD_CXX"
32473    ac_ext=cpp
32474ac_cpp='$CXXCPP $CPPFLAGS'
32475ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32476ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32477ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32478
32479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
32480$as_echo "$has_static_libstdcxx" >&6; }
32481
32482    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
32483        as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
32484    fi
32485
32486    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
32487        as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
32488    fi
32489
32490    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
32491        as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
32492    fi
32493
32494    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
32495$as_echo_n "checking how to link with libstdc++... " >&6; }
32496    # If dynamic was requested, it's available since it would fail above otherwise.
32497    # If dynamic wasn't requested, go with static unless it isn't available.
32498    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32499        LIBCXX="$LIBCXX -lstdc++"
32500        LDCXX="$CXX"
32501        STATIC_CXX_SETTING="STATIC_CXX=false"
32502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
32503$as_echo "dynamic" >&6; }
32504    else
32505        LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
32506        LDCXX="$CC"
32507        STATIC_CXX_SETTING="STATIC_CXX=true"
32508        { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
32509$as_echo "static" >&6; }
32510    fi
32511fi
32512
32513
32514if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32515    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
32516
32517pkg_failed=no
32518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
32519$as_echo_n "checking for LIBFFI... " >&6; }
32520
32521if test -n "$LIBFFI_CFLAGS"; then
32522    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
32523 elif test -n "$PKG_CONFIG"; then
32524    if test -n "$PKG_CONFIG" && \
32525    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32526  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32527  ac_status=$?
32528  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32529  test $ac_status = 0; }; then
32530  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
32531else
32532  pkg_failed=yes
32533fi
32534 else
32535    pkg_failed=untried
32536fi
32537if test -n "$LIBFFI_LIBS"; then
32538    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
32539 elif test -n "$PKG_CONFIG"; then
32540    if test -n "$PKG_CONFIG" && \
32541    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
32542  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
32543  ac_status=$?
32544  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32545  test $ac_status = 0; }; then
32546  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
32547else
32548  pkg_failed=yes
32549fi
32550 else
32551    pkg_failed=untried
32552fi
32553
32554
32555
32556if test $pkg_failed = yes; then
32557
32558if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
32559        _pkg_short_errors_supported=yes
32560else
32561        _pkg_short_errors_supported=no
32562fi
32563        if test $_pkg_short_errors_supported = yes; then
32564	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
32565        else
32566	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
32567        fi
32568	# Put the nasty error message in config.log where it belongs
32569	echo "$LIBFFI_PKG_ERRORS" >&5
32570
32571	as_fn_error $? "Package requirements (libffi) were not met:
32572
32573$LIBFFI_PKG_ERRORS
32574
32575Consider adjusting the PKG_CONFIG_PATH environment variable if you
32576installed software in a non-standard prefix.
32577
32578Alternatively, you may set the environment variables LIBFFI_CFLAGS
32579and LIBFFI_LIBS to avoid the need to call pkg-config.
32580See the pkg-config man page for more details.
32581" "$LINENO" 5
32582elif test $pkg_failed = untried; then
32583	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32584$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32585as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
32586is in your PATH or set the PKG_CONFIG environment variable to the full
32587path to pkg-config.
32588
32589Alternatively, you may set the environment variables LIBFFI_CFLAGS
32590and LIBFFI_LIBS to avoid the need to call pkg-config.
32591See the pkg-config man page for more details.
32592
32593To get pkg-config, see <http://pkg-config.freedesktop.org/>.
32594See \`config.log' for more details" "$LINENO" 5; }
32595else
32596	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
32597	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
32598        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32599$as_echo "yes" >&6; }
32600	:
32601fi
32602
32603fi
32604
32605if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
32606    # Extract the first word of "llvm-config", so it can be a program name with args.
32607set dummy llvm-config; ac_word=$2
32608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32609$as_echo_n "checking for $ac_word... " >&6; }
32610if test "${ac_cv_prog_LLVM_CONFIG+set}" = set; then :
32611  $as_echo_n "(cached) " >&6
32612else
32613  if test -n "$LLVM_CONFIG"; then
32614  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
32615else
32616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32617for as_dir in $PATH
32618do
32619  IFS=$as_save_IFS
32620  test -z "$as_dir" && as_dir=.
32621    for ac_exec_ext in '' $ac_executable_extensions; do
32622  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
32623    ac_cv_prog_LLVM_CONFIG="llvm-config"
32624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32625    break 2
32626  fi
32627done
32628  done
32629IFS=$as_save_IFS
32630
32631fi
32632fi
32633LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
32634if test -n "$LLVM_CONFIG"; then
32635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
32636$as_echo "$LLVM_CONFIG" >&6; }
32637else
32638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32639$as_echo "no" >&6; }
32640fi
32641
32642
32643
32644    if test "x$LLVM_CONFIG" != xllvm-config; then
32645        as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
32646    fi
32647
32648    llvm_components="jit mcjit engine nativecodegen native"
32649    unset LLVM_CFLAGS
32650    for flag in $("$LLVM_CONFIG" --cxxflags); do
32651      if echo "${flag}" | grep -q '^-[ID]'; then
32652        if test "${flag}" != "-D_DEBUG" ; then
32653          if test "${LLVM_CFLAGS}" != "" ; then
32654            LLVM_CFLAGS="${LLVM_CFLAGS} "
32655          fi
32656          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
32657        fi
32658      fi
32659    done
32660    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
32661    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
32662
32663    unset LLVM_LDFLAGS
32664    for flag in $("${LLVM_CONFIG}" --ldflags); do
32665      if echo "${flag}" | grep -q '^-L'; then
32666        if test "${LLVM_LDFLAGS}" != ""; then
32667          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
32668        fi
32669        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
32670      fi
32671    done
32672
32673    unset LLVM_LIBS
32674    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
32675      if echo "${flag}" | grep -q '^-l'; then
32676        if test "${LLVM_LIBS}" != ""; then
32677          LLVM_LIBS="${LLVM_LIBS} "
32678        fi
32679        LLVM_LIBS="${LLVM_LIBS}${flag}"
32680      fi
32681    done
32682
32683
32684
32685
32686fi
32687
32688# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
32689if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
32690    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
32691fi
32692
32693# TODO better (platform agnostic) test
32694if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
32695    LIBCXX="-lstdc++"
32696fi
32697
32698
32699
32700
32701
32702# After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
32703
32704# When using cygwin or msys, we need a wrapper binary that renames
32705# /cygdrive/c/ arguments into c:/ arguments and peeks into
32706# @files and rewrites these too! This wrapper binary is
32707# called fixpath.
32708FIXPATH=
32709if test "x$OPENJDK_BUILD_OS" = xwindows; then
32710    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
32711$as_echo_n "checking if fixpath can be created... " >&6; }
32712    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
32713    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
32714    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
32715      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
32716      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
32717      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
32718      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
32719    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
32720      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
32721      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
32722
32723      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
32724      # @ was chosen as separator to minimize risk of other tools messing around with it
32725      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
32726      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
32727
32728      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
32729    fi
32730    rm -f $OUTPUT_ROOT/fixpath*
32731    cd $OUTPUT_ROOT
32732    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
32733    cd $CURDIR
32734
32735    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
32736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32737$as_echo "no" >&6; }
32738        cat $OUTPUT_ROOT/fixpath1.log
32739        as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
32740    fi
32741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32742$as_echo "yes" >&6; }
32743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
32744$as_echo_n "checking if fixpath.exe works... " >&6; }
32745    cd $OUTPUT_ROOT
32746    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
32747    cd $CURDIR
32748    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
32749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32750$as_echo "no" >&6; }
32751        cat $OUTPUT_ROOT/fixpath2.log
32752        as_fn_error $? "fixpath did not work!" "$LINENO" 5
32753    fi
32754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32755$as_echo "yes" >&6; }
32756    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
32757fi
32758
32759
32760
32761
32762###############################################################################
32763#
32764# We need to do some final tweaking, when everything else is done.
32765#
32766###############################################################################
32767
32768
32769HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
32770
32771
32772# The name of the Service Agent jar.
32773SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
32774if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
32775  SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
32776fi
32777
32778
32779
32780
32781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
32782$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
32783
32784if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
32785    ENABLE_INTREE_EC=yes
32786    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32787$as_echo "yes" >&6; }
32788else
32789    ENABLE_INTREE_EC=no
32790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32791$as_echo "no" >&6; }
32792fi
32793
32794
32795
32796
32797###############################################################################
32798#
32799# Configure parts of the build that only affect the build performance,
32800# not the result.
32801#
32802###############################################################################
32803
32804
32805  # How many cores do we have on this build system?
32806
32807# Check whether --with-num-cores was given.
32808if test "${with_num_cores+set}" = set; then :
32809  withval=$with_num_cores;
32810fi
32811
32812  if test "x$with_num_cores" = x; then
32813    # The number of cores were not specified, try to probe them.
32814
32815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
32816$as_echo_n "checking for number of cores... " >&6; }
32817    NUM_CORES=1
32818    FOUND_CORES=no
32819
32820    if test -f /proc/cpuinfo; then
32821        # Looks like a Linux (or cygwin) system
32822        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
32823        FOUND_CORES=yes
32824    elif test -x /usr/sbin/psrinfo; then
32825        # Looks like a Solaris system
32826        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
32827        FOUND_CORES=yes
32828    elif test -x /usr/sbin/system_profiler; then
32829        # Looks like a MacOSX system
32830        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
32831        FOUND_CORES=yes
32832    elif test -n "$NUMBER_OF_PROCESSORS"; then
32833        # On windows, look in the env
32834        NUM_CORES=$NUMBER_OF_PROCESSORS
32835        FOUND_CORES=yes
32836    fi
32837
32838    if test "x$FOUND_CORES" = xyes; then
32839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
32840$as_echo "$NUM_CORES" >&6; }
32841    else
32842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
32843$as_echo "could not detect number of cores, defaulting to 1" >&6; }
32844        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
32845$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
32846    fi
32847
32848
32849  else
32850    NUM_CORES=$with_num_cores
32851  fi
32852
32853
32854
32855  # How much memory do we have on this build system?
32856
32857# Check whether --with-memory-size was given.
32858if test "${with_memory_size+set}" = set; then :
32859  withval=$with_memory_size;
32860fi
32861
32862  if test "x$with_memory_size" = x; then
32863    # The memory size was not specified, try to probe it.
32864
32865    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
32866$as_echo_n "checking for memory size... " >&6; }
32867    # Default to 1024 MB
32868    MEMORY_SIZE=1024
32869    FOUND_MEM=no
32870
32871    if test -f /proc/meminfo; then
32872        # Looks like a Linux (or cygwin) system
32873        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
32874        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
32875        FOUND_MEM=yes
32876    elif test -x /usr/sbin/prtconf; then
32877        # Looks like a Solaris system
32878        MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print $3 }'`
32879        FOUND_MEM=yes
32880    elif test -x /usr/sbin/system_profiler; then
32881        # Looks like a MacOSX system
32882        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
32883        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
32884        FOUND_MEM=yes
32885    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
32886        # Windows, but without cygwin
32887        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
32888        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
32889        FOUND_MEM=yes
32890    fi
32891
32892    if test "x$FOUND_MEM" = xyes; then
32893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
32894$as_echo "$MEMORY_SIZE MB" >&6; }
32895    else
32896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
32897$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
32898        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
32899$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
32900    fi
32901
32902  else
32903    MEMORY_SIZE=$with_memory_size
32904  fi
32905
32906
32907
32908  # Provide a decent default number of parallel jobs for make depending on
32909  # number of cores, amount of memory and machine architecture.
32910
32911# Check whether --with-jobs was given.
32912if test "${with_jobs+set}" = set; then :
32913  withval=$with_jobs;
32914fi
32915
32916  if test "x$with_jobs" = x; then
32917    # Number of jobs was not specified, calculate.
32918    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
32919$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
32920    # Approximate memory in GB, rounding up a bit.
32921    memory_gb=`expr $MEMORY_SIZE / 1100`
32922    # Pick the lowest of memory in gb and number of cores.
32923    if test "$memory_gb" -lt "$NUM_CORES"; then
32924      JOBS="$memory_gb"
32925    else
32926      JOBS="$NUM_CORES"
32927      # On bigger machines, leave some room for other processes to run
32928      if test "$JOBS" -gt "4"; then
32929        JOBS=`expr $JOBS '*' 90 / 100`
32930      fi
32931    fi
32932    # Cap number of jobs to 16
32933    if test "$JOBS" -gt "16"; then
32934      JOBS=16
32935    fi
32936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
32937$as_echo "$JOBS" >&6; }
32938  else
32939    JOBS=$with_jobs
32940  fi
32941
32942
32943
32944# Setup smart javac (after cores and memory have been setup)
32945
32946
32947# Check whether --with-sjavac-server-java was given.
32948if test "${with_sjavac_server_java+set}" = set; then :
32949  withval=$with_sjavac_server_java;
32950fi
32951
32952
32953if test "x$with_sjavac_server_java" != x; then
32954    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
32955    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
32956    if test "x$FOUND_VERSION" = x; then
32957        as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
32958    fi
32959else
32960    SJAVAC_SERVER_JAVA=""
32961    # Hotspot specific options.
32962
32963    $ECHO "Check if jvm arg is ok: -verbosegc" >&5
32964    $ECHO "Command: $JAVA -verbosegc -version" >&5
32965    OUTPUT=`$JAVA -verbosegc -version 2>&1`
32966    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32967    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32968    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32969        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
32970	JVM_ARG_OK=true
32971    else
32972	$ECHO "Arg failed:" >&5
32973	$ECHO "$OUTPUT" >&5
32974	JVM_ARG_OK=false
32975    fi
32976
32977    # JRockit specific options.
32978
32979    $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
32980    $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
32981    OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
32982    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
32983    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
32984    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
32985        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
32986	JVM_ARG_OK=true
32987    else
32988	$ECHO "Arg failed:" >&5
32989	$ECHO "$OUTPUT" >&5
32990	JVM_ARG_OK=false
32991    fi
32992
32993    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
32994fi
32995
32996
32997if test "$MEMORY_SIZE" -gt "2500"; then
32998
32999    $ECHO "Check if jvm arg is ok: -d64" >&5
33000    $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
33001    OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
33002    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33003    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33004    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33005        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
33006	JVM_ARG_OK=true
33007    else
33008	$ECHO "Arg failed:" >&5
33009	$ECHO "$OUTPUT" >&5
33010	JVM_ARG_OK=false
33011    fi
33012
33013    if test "$JVM_ARG_OK" = true; then
33014        JVM_64BIT=true
33015	JVM_ARG_OK=false
33016    fi
33017    fi
33018
33019if test "$JVM_64BIT" = true; then
33020    if test "$MEMORY_SIZE" -gt "17000"; then
33021
33022    $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
33023    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
33024    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
33025    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33026    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33027    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33028        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
33029	JVM_ARG_OK=true
33030    else
33031	$ECHO "Arg failed:" >&5
33032	$ECHO "$OUTPUT" >&5
33033	JVM_ARG_OK=false
33034    fi
33035
33036    fi
33037    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
33038
33039    $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
33040    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
33041    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
33042    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33043    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33044    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33045        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
33046	JVM_ARG_OK=true
33047    else
33048	$ECHO "Arg failed:" >&5
33049	$ECHO "$OUTPUT" >&5
33050	JVM_ARG_OK=false
33051    fi
33052
33053    fi
33054    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
33055
33056    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
33057    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
33058    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
33059    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33060    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33061    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33062        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
33063	JVM_ARG_OK=true
33064    else
33065	$ECHO "Arg failed:" >&5
33066	$ECHO "$OUTPUT" >&5
33067	JVM_ARG_OK=false
33068    fi
33069
33070    fi
33071    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
33072
33073    $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
33074    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
33075    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
33076    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33077    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33078    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33079        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
33080	JVM_ARG_OK=true
33081    else
33082	$ECHO "Arg failed:" >&5
33083	$ECHO "$OUTPUT" >&5
33084	JVM_ARG_OK=false
33085    fi
33086
33087    fi
33088fi
33089if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
33090
33091    $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
33092    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
33093    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
33094    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33095    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33096    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33097        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
33098	JVM_ARG_OK=true
33099    else
33100	$ECHO "Arg failed:" >&5
33101	$ECHO "$OUTPUT" >&5
33102	JVM_ARG_OK=false
33103    fi
33104
33105fi
33106if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
33107
33108    $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
33109    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
33110    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
33111    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33112    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33113    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33114        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
33115	JVM_ARG_OK=true
33116    else
33117	$ECHO "Arg failed:" >&5
33118	$ECHO "$OUTPUT" >&5
33119	JVM_ARG_OK=false
33120    fi
33121
33122fi
33123if test "$JVM_ARG_OK" = false; then
33124
33125    $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
33126    $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
33127    OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
33128    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
33129    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
33130    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
33131        SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
33132	JVM_ARG_OK=true
33133    else
33134	$ECHO "Arg failed:" >&5
33135	$ECHO "$OUTPUT" >&5
33136	JVM_ARG_OK=false
33137    fi
33138
33139fi
33140
33141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
33142$as_echo_n "checking whether to use sjavac... " >&6; }
33143# Check whether --enable-sjavac was given.
33144if test "${enable_sjavac+set}" = set; then :
33145  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
33146else
33147  ENABLE_SJAVAC='no'
33148fi
33149
33150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
33151$as_echo "$ENABLE_SJAVAC" >&6; }
33152
33153
33154if test "x$ENABLE_SJAVAC" = xyes; then
33155    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
33156else
33157    SJAVAC_SERVER_DIR=
33158fi
33159
33160
33161
33162
33163# Can the C/C++ compiler use precompiled headers?
33164
33165
33166###############################################################################
33167#
33168# Can the C/C++ compiler use precompiled headers?
33169#
33170# Check whether --enable-precompiled-headers was given.
33171if test "${enable_precompiled_headers+set}" = set; then :
33172  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
33173else
33174  ENABLE_PRECOMPH=yes
33175fi
33176
33177
33178USE_PRECOMPILED_HEADER=1
33179if test "x$ENABLE_PRECOMPH" = xno; then
33180    USE_PRECOMPILED_HEADER=0
33181fi
33182
33183if test "x$ENABLE_PRECOMPH" = xyes; then
33184    # Check that the compiler actually supports precomp headers.
33185    if test "x$GCC" = xyes; then
33186         { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
33187$as_echo_n "checking that precompiled headers work... " >&6; }
33188         echo "int alfa();" > conftest.h
33189         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
33190         if test ! -f conftest.hpp.gch; then
33191             USE_PRECOMPILED_HEADER=0
33192             { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33193$as_echo "no" >&6; }
33194         else
33195             { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33196$as_echo "yes" >&6; }
33197         fi
33198         rm -f conftest.h conftest.hpp.gch
33199    fi
33200fi
33201
33202
33203
33204
33205# Setup use of ccache, if available
33206
33207    # Check whether --enable-ccache was given.
33208if test "${enable_ccache+set}" = set; then :
33209  enableval=$enable_ccache; ENABLE_CCACHE=${enable_ccache}
33210else
33211  ENABLE_CCACHE=yes
33212fi
33213
33214    if test "x$ENABLE_CCACHE" = xyes; then
33215        # Extract the first word of "ccache", so it can be a program name with args.
33216set dummy ccache; ac_word=$2
33217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33218$as_echo_n "checking for $ac_word... " >&6; }
33219if test "${ac_cv_path_CCACHE+set}" = set; then :
33220  $as_echo_n "(cached) " >&6
33221else
33222  case $CCACHE in
33223  [\\/]* | ?:[\\/]*)
33224  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
33225  ;;
33226  *)
33227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33228for as_dir in $PATH
33229do
33230  IFS=$as_save_IFS
33231  test -z "$as_dir" && as_dir=.
33232    for ac_exec_ext in '' $ac_executable_extensions; do
33233  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
33234    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
33235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33236    break 2
33237  fi
33238done
33239  done
33240IFS=$as_save_IFS
33241
33242  ;;
33243esac
33244fi
33245CCACHE=$ac_cv_path_CCACHE
33246if test -n "$CCACHE"; then
33247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
33248$as_echo "$CCACHE" >&6; }
33249else
33250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33251$as_echo "no" >&6; }
33252fi
33253
33254
33255    else
33256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ccache" >&5
33257$as_echo_n "checking for ccache... " >&6; }
33258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: explicitly disabled" >&5
33259$as_echo "explicitly disabled" >&6; }
33260        CCACHE=
33261    fi
33262
33263
33264
33265# Check whether --with-ccache-dir was given.
33266if test "${with_ccache_dir+set}" = set; then :
33267  withval=$with_ccache_dir;
33268fi
33269
33270
33271    if test "x$with_ccache_dir" != x; then
33272        # When using a non home ccache directory, assume the use is to share ccache files
33273        # with other users. Thus change the umask.
33274        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
33275    fi
33276    CCACHE_FOUND=""
33277    if test "x$CCACHE" != x; then
33278
33279    if test "x$CCACHE" != x; then
33280        CCACHE_FOUND="true"
33281        # Only use ccache if it is 3.1.4 or later, which supports
33282        # precompiled headers.
33283        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
33284$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
33285        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
33286        if test "x$HAS_GOOD_CCACHE" = x; then
33287            { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
33288$as_echo "no, disabling ccache" >&6; }
33289            CCACHE=
33290        else
33291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33292$as_echo "yes" >&6; }
33293            { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
33294$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
33295            PUSHED_FLAGS="$CXXFLAGS"
33296            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
33297            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33298/* end confdefs.h.  */
33299
33300int
33301main ()
33302{
33303
33304  ;
33305  return 0;
33306}
33307_ACEOF
33308if ac_fn_cxx_try_compile "$LINENO"; then :
33309  CC_KNOWS_CCACHE_TRICK=yes
33310else
33311  CC_KNOWS_CCACHE_TRICK=no
33312fi
33313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33314            CXXFLAGS="$PUSHED_FLAGS"
33315            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
33316                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33317$as_echo "yes" >&6; }
33318            else
33319                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
33320$as_echo "no, disabling ccaching of precompiled headers" >&6; }
33321                CCACHE=
33322            fi
33323        fi
33324    fi
33325
33326    if test "x$CCACHE" != x; then
33327        CCACHE_SLOPPINESS=time_macros
33328        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
33329        CCACHE_FLAGS=-fpch-preprocess
33330
33331        if test "x$SET_CCACHE_DIR" != x; then
33332            mkdir -p $CCACHE_DIR > /dev/null 2>&1
33333	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
33334        fi
33335    fi
33336
33337    fi
33338
33339
33340###############################################################################
33341#
33342# And now the finish...
33343#
33344###############################################################################
33345
33346# Check for some common pitfalls
33347
33348  if test x"$OPENJDK_BUILD_OS" = xwindows; then
33349    file_to_test="$SRC_ROOT/LICENSE"
33350    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
33351      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
33352    fi
33353  fi
33354
33355
33356
33357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
33358$as_echo_n "checking if build directory is on local disk... " >&6; }
33359
33360	# df -l lists only local disks; if the given directory is not found then
33361	# a non-zero exit code is given
33362  if test "x$DF" = x; then
33363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33364      # msys does not have df; use Windows "net use" instead.
33365      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
33366      if test "x$IS_NETWORK_DISK" = x; then
33367        OUTPUT_DIR_IS_LOCAL="yes"
33368      else
33369        OUTPUT_DIR_IS_LOCAL="no"
33370      fi
33371    else
33372      # No df here, say it's local
33373      OUTPUT_DIR_IS_LOCAL="yes"
33374    fi
33375  else
33376    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
33377      OUTPUT_DIR_IS_LOCAL="yes"
33378    else
33379      OUTPUT_DIR_IS_LOCAL="no"
33380    fi
33381  fi
33382
33383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
33384$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
33385
33386
33387
33388# Check if the user has any old-style ALT_ variables set.
33389FOUND_ALT_VARIABLES=`env | grep ^ALT_`
33390
33391# Before generating output files, test if they exist. If they do, this is a reconfigure.
33392# Since we can't properly handle the dependencies for this, warn the user about the situation
33393if test -e $OUTPUT_ROOT/spec.gmk; then
33394  IS_RECONFIGURE=yes
33395else
33396  IS_RECONFIGURE=no
33397fi
33398
33399if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
33400  HIDE_PERFORMANCE_HINTS=yes
33401else
33402  HIDE_PERFORMANCE_HINTS=no
33403  # Hide it the next time around...
33404  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
33405fi
33406
33407
33408
33409# At the end, call the custom hook. (Dummy macro if no custom sources available)
33410
33411
33412# We're messing a bit with internal autoconf variables to put the config.status
33413# in the output directory instead of the current directory.
33414CONFIG_STATUS="$OUTPUT_ROOT/config.status"
33415# Create the actual output files. Now the main work of configure is done.
33416cat >confcache <<\_ACEOF
33417# This file is a shell script that caches the results of configure
33418# tests run on this system so they can be shared between configure
33419# scripts and configure runs, see configure's option --config-cache.
33420# It is not useful on other systems.  If it contains results you don't
33421# want to keep, you may remove or edit it.
33422#
33423# config.status only pays attention to the cache file if you give it
33424# the --recheck option to rerun configure.
33425#
33426# `ac_cv_env_foo' variables (set or unset) will be overridden when
33427# loading this file, other *unset* `ac_cv_foo' will be assigned the
33428# following values.
33429
33430_ACEOF
33431
33432# The following way of writing the cache mishandles newlines in values,
33433# but we know of no workaround that is simple, portable, and efficient.
33434# So, we kill variables containing newlines.
33435# Ultrix sh set writes to stderr and can't be redirected directly,
33436# and sets the high bit in the cache file unless we assign to the vars.
33437(
33438  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
33439    eval ac_val=\$$ac_var
33440    case $ac_val in #(
33441    *${as_nl}*)
33442      case $ac_var in #(
33443      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
33444$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
33445      esac
33446      case $ac_var in #(
33447      _ | IFS | as_nl) ;; #(
33448      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
33449      *) { eval $ac_var=; unset $ac_var;} ;;
33450      esac ;;
33451    esac
33452  done
33453
33454  (set) 2>&1 |
33455    case $as_nl`(ac_space=' '; set) 2>&1` in #(
33456    *${as_nl}ac_space=\ *)
33457      # `set' does not quote correctly, so add quotes: double-quote
33458      # substitution turns \\\\ into \\, and sed turns \\ into \.
33459      sed -n \
33460	"s/'/'\\\\''/g;
33461	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
33462      ;; #(
33463    *)
33464      # `set' quotes correctly as required by POSIX, so do not add quotes.
33465      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
33466      ;;
33467    esac |
33468    sort
33469) |
33470  sed '
33471     /^ac_cv_env_/b end
33472     t clear
33473     :clear
33474     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
33475     t end
33476     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
33477     :end' >>confcache
33478if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
33479  if test -w "$cache_file"; then
33480    test "x$cache_file" != "x/dev/null" &&
33481      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
33482$as_echo "$as_me: updating cache $cache_file" >&6;}
33483    cat confcache >$cache_file
33484  else
33485    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
33486$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
33487  fi
33488fi
33489rm -f confcache
33490
33491test "x$prefix" = xNONE && prefix=$ac_default_prefix
33492# Let make expand exec_prefix.
33493test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
33494
33495DEFS=-DHAVE_CONFIG_H
33496
33497ac_libobjs=
33498ac_ltlibobjs=
33499U=
33500for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
33501  # 1. Remove the extension, and $U if already installed.
33502  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
33503  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
33504  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
33505  #    will be set to the directory where LIBOBJS objects are built.
33506  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
33507  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
33508done
33509LIBOBJS=$ac_libobjs
33510
33511LTLIBOBJS=$ac_ltlibobjs
33512
33513
33514
33515: ${CONFIG_STATUS=./config.status}
33516ac_write_fail=0
33517ac_clean_files_save=$ac_clean_files
33518ac_clean_files="$ac_clean_files $CONFIG_STATUS"
33519{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
33520$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
33521as_write_fail=0
33522cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
33523#! $SHELL
33524# Generated by $as_me.
33525# Run this file to recreate the current configuration.
33526# Compiler output produced by configure, useful for debugging
33527# configure, is in config.log if it exists.
33528
33529debug=false
33530ac_cs_recheck=false
33531ac_cs_silent=false
33532
33533SHELL=\${CONFIG_SHELL-$SHELL}
33534export SHELL
33535_ASEOF
33536cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
33537## -------------------- ##
33538## M4sh Initialization. ##
33539## -------------------- ##
33540
33541# Be more Bourne compatible
33542DUALCASE=1; export DUALCASE # for MKS sh
33543if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
33544  emulate sh
33545  NULLCMD=:
33546  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
33547  # is contrary to our usage.  Disable this feature.
33548  alias -g '${1+"$@"}'='"$@"'
33549  setopt NO_GLOB_SUBST
33550else
33551  case `(set -o) 2>/dev/null` in #(
33552  *posix*) :
33553    set -o posix ;; #(
33554  *) :
33555     ;;
33556esac
33557fi
33558
33559
33560as_nl='
33561'
33562export as_nl
33563# Printing a long string crashes Solaris 7 /usr/bin/printf.
33564as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
33565as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
33566as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
33567# Prefer a ksh shell builtin over an external printf program on Solaris,
33568# but without wasting forks for bash or zsh.
33569if test -z "$BASH_VERSION$ZSH_VERSION" \
33570    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
33571  as_echo='print -r --'
33572  as_echo_n='print -rn --'
33573elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
33574  as_echo='printf %s\n'
33575  as_echo_n='printf %s'
33576else
33577  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
33578    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
33579    as_echo_n='/usr/ucb/echo -n'
33580  else
33581    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
33582    as_echo_n_body='eval
33583      arg=$1;
33584      case $arg in #(
33585      *"$as_nl"*)
33586	expr "X$arg" : "X\\(.*\\)$as_nl";
33587	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
33588      esac;
33589      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
33590    '
33591    export as_echo_n_body
33592    as_echo_n='sh -c $as_echo_n_body as_echo'
33593  fi
33594  export as_echo_body
33595  as_echo='sh -c $as_echo_body as_echo'
33596fi
33597
33598# The user is always right.
33599if test "${PATH_SEPARATOR+set}" != set; then
33600  PATH_SEPARATOR=:
33601  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
33602    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
33603      PATH_SEPARATOR=';'
33604  }
33605fi
33606
33607
33608# IFS
33609# We need space, tab and new line, in precisely that order.  Quoting is
33610# there to prevent editors from complaining about space-tab.
33611# (If _AS_PATH_WALK were called with IFS unset, it would disable word
33612# splitting by setting IFS to empty value.)
33613IFS=" ""	$as_nl"
33614
33615# Find who we are.  Look in the path if we contain no directory separator.
33616case $0 in #((
33617  *[\\/]* ) as_myself=$0 ;;
33618  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33619for as_dir in $PATH
33620do
33621  IFS=$as_save_IFS
33622  test -z "$as_dir" && as_dir=.
33623    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
33624  done
33625IFS=$as_save_IFS
33626
33627     ;;
33628esac
33629# We did not find ourselves, most probably we were run as `sh COMMAND'
33630# in which case we are not to be found in the path.
33631if test "x$as_myself" = x; then
33632  as_myself=$0
33633fi
33634if test ! -f "$as_myself"; then
33635  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
33636  exit 1
33637fi
33638
33639# Unset variables that we do not need and which cause bugs (e.g. in
33640# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
33641# suppresses any "Segmentation fault" message there.  '((' could
33642# trigger a bug in pdksh 5.2.14.
33643for as_var in BASH_ENV ENV MAIL MAILPATH
33644do eval test x\${$as_var+set} = xset \
33645  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
33646done
33647PS1='$ '
33648PS2='> '
33649PS4='+ '
33650
33651# NLS nuisances.
33652LC_ALL=C
33653export LC_ALL
33654LANGUAGE=C
33655export LANGUAGE
33656
33657# CDPATH.
33658(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
33659
33660
33661# as_fn_error STATUS ERROR [LINENO LOG_FD]
33662# ----------------------------------------
33663# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
33664# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
33665# script with STATUS, using 1 if that was 0.
33666as_fn_error ()
33667{
33668  as_status=$1; test $as_status -eq 0 && as_status=1
33669  if test "$4"; then
33670    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
33671    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
33672  fi
33673  $as_echo "$as_me: error: $2" >&2
33674  as_fn_exit $as_status
33675} # as_fn_error
33676
33677
33678# as_fn_set_status STATUS
33679# -----------------------
33680# Set $? to STATUS, without forking.
33681as_fn_set_status ()
33682{
33683  return $1
33684} # as_fn_set_status
33685
33686# as_fn_exit STATUS
33687# -----------------
33688# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
33689as_fn_exit ()
33690{
33691  set +e
33692  as_fn_set_status $1
33693  exit $1
33694} # as_fn_exit
33695
33696# as_fn_unset VAR
33697# ---------------
33698# Portably unset VAR.
33699as_fn_unset ()
33700{
33701  { eval $1=; unset $1;}
33702}
33703as_unset=as_fn_unset
33704# as_fn_append VAR VALUE
33705# ----------------------
33706# Append the text in VALUE to the end of the definition contained in VAR. Take
33707# advantage of any shell optimizations that allow amortized linear growth over
33708# repeated appends, instead of the typical quadratic growth present in naive
33709# implementations.
33710if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
33711  eval 'as_fn_append ()
33712  {
33713    eval $1+=\$2
33714  }'
33715else
33716  as_fn_append ()
33717  {
33718    eval $1=\$$1\$2
33719  }
33720fi # as_fn_append
33721
33722# as_fn_arith ARG...
33723# ------------------
33724# Perform arithmetic evaluation on the ARGs, and store the result in the
33725# global $as_val. Take advantage of shells that can avoid forks. The arguments
33726# must be portable across $(()) and expr.
33727if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
33728  eval 'as_fn_arith ()
33729  {
33730    as_val=$(( $* ))
33731  }'
33732else
33733  as_fn_arith ()
33734  {
33735    as_val=`expr "$@" || test $? -eq 1`
33736  }
33737fi # as_fn_arith
33738
33739
33740if expr a : '\(a\)' >/dev/null 2>&1 &&
33741   test "X`expr 00001 : '.*\(...\)'`" = X001; then
33742  as_expr=expr
33743else
33744  as_expr=false
33745fi
33746
33747if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
33748  as_basename=basename
33749else
33750  as_basename=false
33751fi
33752
33753if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
33754  as_dirname=dirname
33755else
33756  as_dirname=false
33757fi
33758
33759as_me=`$as_basename -- "$0" ||
33760$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
33761	 X"$0" : 'X\(//\)$' \| \
33762	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
33763$as_echo X/"$0" |
33764    sed '/^.*\/\([^/][^/]*\)\/*$/{
33765	    s//\1/
33766	    q
33767	  }
33768	  /^X\/\(\/\/\)$/{
33769	    s//\1/
33770	    q
33771	  }
33772	  /^X\/\(\/\).*/{
33773	    s//\1/
33774	    q
33775	  }
33776	  s/.*/./; q'`
33777
33778# Avoid depending upon Character Ranges.
33779as_cr_letters='abcdefghijklmnopqrstuvwxyz'
33780as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
33781as_cr_Letters=$as_cr_letters$as_cr_LETTERS
33782as_cr_digits='0123456789'
33783as_cr_alnum=$as_cr_Letters$as_cr_digits
33784
33785ECHO_C= ECHO_N= ECHO_T=
33786case `echo -n x` in #(((((
33787-n*)
33788  case `echo 'xy\c'` in
33789  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
33790  xy)  ECHO_C='\c';;
33791  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
33792       ECHO_T='	';;
33793  esac;;
33794*)
33795  ECHO_N='-n';;
33796esac
33797
33798rm -f conf$$ conf$$.exe conf$$.file
33799if test -d conf$$.dir; then
33800  rm -f conf$$.dir/conf$$.file
33801else
33802  rm -f conf$$.dir
33803  mkdir conf$$.dir 2>/dev/null
33804fi
33805if (echo >conf$$.file) 2>/dev/null; then
33806  if ln -s conf$$.file conf$$ 2>/dev/null; then
33807    as_ln_s='ln -s'
33808    # ... but there are two gotchas:
33809    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
33810    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
33811    # In both cases, we have to default to `cp -p'.
33812    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
33813      as_ln_s='cp -p'
33814  elif ln conf$$.file conf$$ 2>/dev/null; then
33815    as_ln_s=ln
33816  else
33817    as_ln_s='cp -p'
33818  fi
33819else
33820  as_ln_s='cp -p'
33821fi
33822rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
33823rmdir conf$$.dir 2>/dev/null
33824
33825
33826# as_fn_mkdir_p
33827# -------------
33828# Create "$as_dir" as a directory, including parents if necessary.
33829as_fn_mkdir_p ()
33830{
33831
33832  case $as_dir in #(
33833  -*) as_dir=./$as_dir;;
33834  esac
33835  test -d "$as_dir" || eval $as_mkdir_p || {
33836    as_dirs=
33837    while :; do
33838      case $as_dir in #(
33839      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
33840      *) as_qdir=$as_dir;;
33841      esac
33842      as_dirs="'$as_qdir' $as_dirs"
33843      as_dir=`$as_dirname -- "$as_dir" ||
33844$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33845	 X"$as_dir" : 'X\(//\)[^/]' \| \
33846	 X"$as_dir" : 'X\(//\)$' \| \
33847	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
33848$as_echo X"$as_dir" |
33849    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33850	    s//\1/
33851	    q
33852	  }
33853	  /^X\(\/\/\)[^/].*/{
33854	    s//\1/
33855	    q
33856	  }
33857	  /^X\(\/\/\)$/{
33858	    s//\1/
33859	    q
33860	  }
33861	  /^X\(\/\).*/{
33862	    s//\1/
33863	    q
33864	  }
33865	  s/.*/./; q'`
33866      test -d "$as_dir" && break
33867    done
33868    test -z "$as_dirs" || eval "mkdir $as_dirs"
33869  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
33870
33871
33872} # as_fn_mkdir_p
33873if mkdir -p . 2>/dev/null; then
33874  as_mkdir_p='mkdir -p "$as_dir"'
33875else
33876  test -d ./-p && rmdir ./-p
33877  as_mkdir_p=false
33878fi
33879
33880if test -x / >/dev/null 2>&1; then
33881  as_test_x='test -x'
33882else
33883  if ls -dL / >/dev/null 2>&1; then
33884    as_ls_L_option=L
33885  else
33886    as_ls_L_option=
33887  fi
33888  as_test_x='
33889    eval sh -c '\''
33890      if test -d "$1"; then
33891	test -d "$1/.";
33892      else
33893	case $1 in #(
33894	-*)set "./$1";;
33895	esac;
33896	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
33897	???[sx]*):;;*)false;;esac;fi
33898    '\'' sh
33899  '
33900fi
33901as_executable_p=$as_test_x
33902
33903# Sed expression to map a string onto a valid CPP name.
33904as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
33905
33906# Sed expression to map a string onto a valid variable name.
33907as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
33908
33909
33910exec 6>&1
33911## ----------------------------------- ##
33912## Main body of $CONFIG_STATUS script. ##
33913## ----------------------------------- ##
33914_ASEOF
33915test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
33916
33917cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33918# Save the log message, to keep $0 and so on meaningful, and to
33919# report actual input values of CONFIG_FILES etc. instead of their
33920# values after options handling.
33921ac_log="
33922This file was extended by OpenJDK $as_me jdk8, which was
33923generated by GNU Autoconf 2.67.  Invocation command line was
33924
33925  CONFIG_FILES    = $CONFIG_FILES
33926  CONFIG_HEADERS  = $CONFIG_HEADERS
33927  CONFIG_LINKS    = $CONFIG_LINKS
33928  CONFIG_COMMANDS = $CONFIG_COMMANDS
33929  $ $0 $@
33930
33931on `(hostname || uname -n) 2>/dev/null | sed 1q`
33932"
33933
33934_ACEOF
33935
33936case $ac_config_files in *"
33937"*) set x $ac_config_files; shift; ac_config_files=$*;;
33938esac
33939
33940case $ac_config_headers in *"
33941"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
33942esac
33943
33944
33945cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33946# Files that config.status was made for.
33947config_files="$ac_config_files"
33948config_headers="$ac_config_headers"
33949
33950_ACEOF
33951
33952cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33953ac_cs_usage="\
33954\`$as_me' instantiates files and other configuration actions
33955from templates according to the current configuration.  Unless the files
33956and actions are specified as TAGs, all are instantiated by default.
33957
33958Usage: $0 [OPTION]... [TAG]...
33959
33960  -h, --help       print this help, then exit
33961  -V, --version    print version number and configuration settings, then exit
33962      --config     print configuration, then exit
33963  -q, --quiet, --silent
33964                   do not print progress messages
33965  -d, --debug      don't remove temporary files
33966      --recheck    update $as_me by reconfiguring in the same conditions
33967      --file=FILE[:TEMPLATE]
33968                   instantiate the configuration file FILE
33969      --header=FILE[:TEMPLATE]
33970                   instantiate the configuration header FILE
33971
33972Configuration files:
33973$config_files
33974
33975Configuration headers:
33976$config_headers
33977
33978Report bugs to <build-dev@openjdk.java.net>.
33979OpenJDK home page: <http://openjdk.java.net>."
33980
33981_ACEOF
33982cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33983ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
33984ac_cs_version="\\
33985OpenJDK config.status jdk8
33986configured by $0, generated by GNU Autoconf 2.67,
33987  with options \\"\$ac_cs_config\\"
33988
33989Copyright (C) 2010 Free Software Foundation, Inc.
33990This config.status script is free software; the Free Software Foundation
33991gives unlimited permission to copy, distribute and modify it."
33992
33993ac_pwd='$ac_pwd'
33994srcdir='$srcdir'
33995AWK='$AWK'
33996test -n "\$AWK" || AWK=awk
33997_ACEOF
33998
33999cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34000# The default lists apply if the user does not specify any file.
34001ac_need_defaults=:
34002while test $# != 0
34003do
34004  case $1 in
34005  --*=?*)
34006    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34007    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
34008    ac_shift=:
34009    ;;
34010  --*=)
34011    ac_option=`expr "X$1" : 'X\([^=]*\)='`
34012    ac_optarg=
34013    ac_shift=:
34014    ;;
34015  *)
34016    ac_option=$1
34017    ac_optarg=$2
34018    ac_shift=shift
34019    ;;
34020  esac
34021
34022  case $ac_option in
34023  # Handling of the options.
34024  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
34025    ac_cs_recheck=: ;;
34026  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
34027    $as_echo "$ac_cs_version"; exit ;;
34028  --config | --confi | --conf | --con | --co | --c )
34029    $as_echo "$ac_cs_config"; exit ;;
34030  --debug | --debu | --deb | --de | --d | -d )
34031    debug=: ;;
34032  --file | --fil | --fi | --f )
34033    $ac_shift
34034    case $ac_optarg in
34035    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34036    '') as_fn_error $? "missing file argument" ;;
34037    esac
34038    as_fn_append CONFIG_FILES " '$ac_optarg'"
34039    ac_need_defaults=false;;
34040  --header | --heade | --head | --hea )
34041    $ac_shift
34042    case $ac_optarg in
34043    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
34044    esac
34045    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
34046    ac_need_defaults=false;;
34047  --he | --h)
34048    # Conflict between --help and --header
34049    as_fn_error $? "ambiguous option: \`$1'
34050Try \`$0 --help' for more information.";;
34051  --help | --hel | -h )
34052    $as_echo "$ac_cs_usage"; exit ;;
34053  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
34054  | -silent | --silent | --silen | --sile | --sil | --si | --s)
34055    ac_cs_silent=: ;;
34056
34057  # This is an error.
34058  -*) as_fn_error $? "unrecognized option: \`$1'
34059Try \`$0 --help' for more information." ;;
34060
34061  *) as_fn_append ac_config_targets " $1"
34062     ac_need_defaults=false ;;
34063
34064  esac
34065  shift
34066done
34067
34068ac_configure_extra_args=
34069
34070if $ac_cs_silent; then
34071  exec 6>/dev/null
34072  ac_configure_extra_args="$ac_configure_extra_args --silent"
34073fi
34074
34075_ACEOF
34076cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34077if \$ac_cs_recheck; then
34078  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
34079  shift
34080  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
34081  CONFIG_SHELL='$SHELL'
34082  export CONFIG_SHELL
34083  exec "\$@"
34084fi
34085
34086_ACEOF
34087cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34088exec 5>>config.log
34089{
34090  echo
34091  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
34092## Running $as_me. ##
34093_ASBOX
34094  $as_echo "$ac_log"
34095} >&5
34096
34097_ACEOF
34098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34099_ACEOF
34100
34101cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34102
34103# Handling of arguments.
34104for ac_config_target in $ac_config_targets
34105do
34106  case $ac_config_target in
34107    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
34108    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
34109    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
34110    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
34111    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
34112    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
34113    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
34114
34115  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
34116  esac
34117done
34118
34119
34120# If the user did not use the arguments to specify the items to instantiate,
34121# then the envvar interface is used.  Set only those that are not.
34122# We use the long form for the default assignment because of an extremely
34123# bizarre bug on SunOS 4.1.3.
34124if $ac_need_defaults; then
34125  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
34126  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
34127fi
34128
34129# Have a temporary directory for convenience.  Make it in the build tree
34130# simply because there is no reason against having it here, and in addition,
34131# creating and moving files from /tmp can sometimes cause problems.
34132# Hook for its removal unless debugging.
34133# Note that there is a small window in which the directory will not be cleaned:
34134# after its creation but before its name has been assigned to `$tmp'.
34135$debug ||
34136{
34137  tmp=
34138  trap 'exit_status=$?
34139  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
34140' 0
34141  trap 'as_fn_exit 1' 1 2 13 15
34142}
34143# Create a (secure) tmp directory for tmp files.
34144
34145{
34146  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
34147  test -n "$tmp" && test -d "$tmp"
34148}  ||
34149{
34150  tmp=./conf$$-$RANDOM
34151  (umask 077 && mkdir "$tmp")
34152} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
34153
34154# Set up the scripts for CONFIG_FILES section.
34155# No need to generate them if there are no CONFIG_FILES.
34156# This happens for instance with `./config.status config.h'.
34157if test -n "$CONFIG_FILES"; then
34158
34159
34160ac_cr=`echo X | tr X '\015'`
34161# On cygwin, bash can eat \r inside `` if the user requested igncr.
34162# But we know of no other shell where ac_cr would be empty at this
34163# point, so we can use a bashism as a fallback.
34164if test "x$ac_cr" = x; then
34165  eval ac_cr=\$\'\\r\'
34166fi
34167ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
34168if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
34169  ac_cs_awk_cr='\\r'
34170else
34171  ac_cs_awk_cr=$ac_cr
34172fi
34173
34174echo 'BEGIN {' >"$tmp/subs1.awk" &&
34175_ACEOF
34176
34177
34178{
34179  echo "cat >conf$$subs.awk <<_ACEOF" &&
34180  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
34181  echo "_ACEOF"
34182} >conf$$subs.sh ||
34183  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34184ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
34185ac_delim='%!_!# '
34186for ac_last_try in false false false false false :; do
34187  . ./conf$$subs.sh ||
34188    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34189
34190  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
34191  if test $ac_delim_n = $ac_delim_num; then
34192    break
34193  elif $ac_last_try; then
34194    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
34195  else
34196    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34197  fi
34198done
34199rm -f conf$$subs.sh
34200
34201cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34202cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
34203_ACEOF
34204sed -n '
34205h
34206s/^/S["/; s/!.*/"]=/
34207p
34208g
34209s/^[^!]*!//
34210:repl
34211t repl
34212s/'"$ac_delim"'$//
34213t delim
34214:nl
34215h
34216s/\(.\{148\}\)..*/\1/
34217t more1
34218s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
34219p
34220n
34221b repl
34222:more1
34223s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34224p
34225g
34226s/.\{148\}//
34227t nl
34228:delim
34229h
34230s/\(.\{148\}\)..*/\1/
34231t more2
34232s/["\\]/\\&/g; s/^/"/; s/$/"/
34233p
34234b
34235:more2
34236s/["\\]/\\&/g; s/^/"/; s/$/"\\/
34237p
34238g
34239s/.\{148\}//
34240t delim
34241' <conf$$subs.awk | sed '
34242/^[^""]/{
34243  N
34244  s/\n//
34245}
34246' >>$CONFIG_STATUS || ac_write_fail=1
34247rm -f conf$$subs.awk
34248cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34249_ACAWK
34250cat >>"\$tmp/subs1.awk" <<_ACAWK &&
34251  for (key in S) S_is_set[key] = 1
34252  FS = ""
34253
34254}
34255{
34256  line = $ 0
34257  nfields = split(line, field, "@")
34258  substed = 0
34259  len = length(field[1])
34260  for (i = 2; i < nfields; i++) {
34261    key = field[i]
34262    keylen = length(key)
34263    if (S_is_set[key]) {
34264      value = S[key]
34265      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
34266      len += length(value) + length(field[++i])
34267      substed = 1
34268    } else
34269      len += 1 + keylen
34270  }
34271
34272  print line
34273}
34274
34275_ACAWK
34276_ACEOF
34277cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34278if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
34279  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
34280else
34281  cat
34282fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
34283  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
34284_ACEOF
34285
34286# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
34287# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
34288# trailing colons and then remove the whole line if VPATH becomes empty
34289# (actually we leave an empty line to preserve line numbers).
34290if test "x$srcdir" = x.; then
34291  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
34292h
34293s///
34294s/^/:/
34295s/[	 ]*$/:/
34296s/:\$(srcdir):/:/g
34297s/:\${srcdir}:/:/g
34298s/:@srcdir@:/:/g
34299s/^:*//
34300s/:*$//
34301x
34302s/\(=[	 ]*\).*/\1/
34303G
34304s/\n//
34305s/^[^=]*=[	 ]*$//
34306}'
34307fi
34308
34309cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34310fi # test -n "$CONFIG_FILES"
34311
34312# Set up the scripts for CONFIG_HEADERS section.
34313# No need to generate them if there are no CONFIG_HEADERS.
34314# This happens for instance with `./config.status Makefile'.
34315if test -n "$CONFIG_HEADERS"; then
34316cat >"$tmp/defines.awk" <<\_ACAWK ||
34317BEGIN {
34318_ACEOF
34319
34320# Transform confdefs.h into an awk script `defines.awk', embedded as
34321# here-document in config.status, that substitutes the proper values into
34322# config.h.in to produce config.h.
34323
34324# Create a delimiter string that does not exist in confdefs.h, to ease
34325# handling of long lines.
34326ac_delim='%!_!# '
34327for ac_last_try in false false :; do
34328  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
34329  if test -z "$ac_t"; then
34330    break
34331  elif $ac_last_try; then
34332    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
34333  else
34334    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
34335  fi
34336done
34337
34338# For the awk script, D is an array of macro values keyed by name,
34339# likewise P contains macro parameters if any.  Preserve backslash
34340# newline sequences.
34341
34342ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
34343sed -n '
34344s/.\{148\}/&'"$ac_delim"'/g
34345t rset
34346:rset
34347s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
34348t def
34349d
34350:def
34351s/\\$//
34352t bsnl
34353s/["\\]/\\&/g
34354s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34355D["\1"]=" \3"/p
34356s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
34357d
34358:bsnl
34359s/["\\]/\\&/g
34360s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
34361D["\1"]=" \3\\\\\\n"\\/p
34362t cont
34363s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
34364t cont
34365d
34366:cont
34367n
34368s/.\{148\}/&'"$ac_delim"'/g
34369t clear
34370:clear
34371s/\\$//
34372t bsnlc
34373s/["\\]/\\&/g; s/^/"/; s/$/"/p
34374d
34375:bsnlc
34376s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
34377b cont
34378' <confdefs.h | sed '
34379s/'"$ac_delim"'/"\\\
34380"/g' >>$CONFIG_STATUS || ac_write_fail=1
34381
34382cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34383  for (key in D) D_is_set[key] = 1
34384  FS = ""
34385}
34386/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
34387  line = \$ 0
34388  split(line, arg, " ")
34389  if (arg[1] == "#") {
34390    defundef = arg[2]
34391    mac1 = arg[3]
34392  } else {
34393    defundef = substr(arg[1], 2)
34394    mac1 = arg[2]
34395  }
34396  split(mac1, mac2, "(") #)
34397  macro = mac2[1]
34398  prefix = substr(line, 1, index(line, defundef) - 1)
34399  if (D_is_set[macro]) {
34400    # Preserve the white space surrounding the "#".
34401    print prefix "define", macro P[macro] D[macro]
34402    next
34403  } else {
34404    # Replace #undef with comments.  This is necessary, for example,
34405    # in the case of _POSIX_SOURCE, which is predefined and required
34406    # on some systems where configure will not decide to define it.
34407    if (defundef == "undef") {
34408      print "/*", prefix defundef, macro, "*/"
34409      next
34410    }
34411  }
34412}
34413{ print }
34414_ACAWK
34415_ACEOF
34416cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34417  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
34418fi # test -n "$CONFIG_HEADERS"
34419
34420
34421eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
34422shift
34423for ac_tag
34424do
34425  case $ac_tag in
34426  :[FHLC]) ac_mode=$ac_tag; continue;;
34427  esac
34428  case $ac_mode$ac_tag in
34429  :[FHL]*:*);;
34430  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
34431  :[FH]-) ac_tag=-:-;;
34432  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
34433  esac
34434  ac_save_IFS=$IFS
34435  IFS=:
34436  set x $ac_tag
34437  IFS=$ac_save_IFS
34438  shift
34439  ac_file=$1
34440  shift
34441
34442  case $ac_mode in
34443  :L) ac_source=$1;;
34444  :[FH])
34445    ac_file_inputs=
34446    for ac_f
34447    do
34448      case $ac_f in
34449      -) ac_f="$tmp/stdin";;
34450      *) # Look for the file first in the build tree, then in the source tree
34451	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
34452	 # because $ac_f cannot contain `:'.
34453	 test -f "$ac_f" ||
34454	   case $ac_f in
34455	   [\\/$]*) false;;
34456	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
34457	   esac ||
34458	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
34459      esac
34460      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
34461      as_fn_append ac_file_inputs " '$ac_f'"
34462    done
34463
34464    # Let's still pretend it is `configure' which instantiates (i.e., don't
34465    # use $as_me), people would be surprised to read:
34466    #    /* config.h.  Generated by config.status.  */
34467    configure_input='Generated from '`
34468	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
34469	`' by configure.'
34470    if test x"$ac_file" != x-; then
34471      configure_input="$ac_file.  $configure_input"
34472      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
34473$as_echo "$as_me: creating $ac_file" >&6;}
34474    fi
34475    # Neutralize special characters interpreted by sed in replacement strings.
34476    case $configure_input in #(
34477    *\&* | *\|* | *\\* )
34478       ac_sed_conf_input=`$as_echo "$configure_input" |
34479       sed 's/[\\\\&|]/\\\\&/g'`;; #(
34480    *) ac_sed_conf_input=$configure_input;;
34481    esac
34482
34483    case $ac_tag in
34484    *:-:* | *:-) cat >"$tmp/stdin" \
34485      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
34486    esac
34487    ;;
34488  esac
34489
34490  ac_dir=`$as_dirname -- "$ac_file" ||
34491$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
34492	 X"$ac_file" : 'X\(//\)[^/]' \| \
34493	 X"$ac_file" : 'X\(//\)$' \| \
34494	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
34495$as_echo X"$ac_file" |
34496    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
34497	    s//\1/
34498	    q
34499	  }
34500	  /^X\(\/\/\)[^/].*/{
34501	    s//\1/
34502	    q
34503	  }
34504	  /^X\(\/\/\)$/{
34505	    s//\1/
34506	    q
34507	  }
34508	  /^X\(\/\).*/{
34509	    s//\1/
34510	    q
34511	  }
34512	  s/.*/./; q'`
34513  as_dir="$ac_dir"; as_fn_mkdir_p
34514  ac_builddir=.
34515
34516case "$ac_dir" in
34517.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
34518*)
34519  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
34520  # A ".." for each directory in $ac_dir_suffix.
34521  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
34522  case $ac_top_builddir_sub in
34523  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
34524  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
34525  esac ;;
34526esac
34527ac_abs_top_builddir=$ac_pwd
34528ac_abs_builddir=$ac_pwd$ac_dir_suffix
34529# for backward compatibility:
34530ac_top_builddir=$ac_top_build_prefix
34531
34532case $srcdir in
34533  .)  # We are building in place.
34534    ac_srcdir=.
34535    ac_top_srcdir=$ac_top_builddir_sub
34536    ac_abs_top_srcdir=$ac_pwd ;;
34537  [\\/]* | ?:[\\/]* )  # Absolute name.
34538    ac_srcdir=$srcdir$ac_dir_suffix;
34539    ac_top_srcdir=$srcdir
34540    ac_abs_top_srcdir=$srcdir ;;
34541  *) # Relative name.
34542    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
34543    ac_top_srcdir=$ac_top_build_prefix$srcdir
34544    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
34545esac
34546ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
34547
34548
34549  case $ac_mode in
34550  :F)
34551  #
34552  # CONFIG_FILE
34553  #
34554
34555_ACEOF
34556
34557cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34558# If the template does not know about datarootdir, expand it.
34559# FIXME: This hack should be removed a few years after 2.60.
34560ac_datarootdir_hack=; ac_datarootdir_seen=
34561ac_sed_dataroot='
34562/datarootdir/ {
34563  p
34564  q
34565}
34566/@datadir@/p
34567/@docdir@/p
34568/@infodir@/p
34569/@localedir@/p
34570/@mandir@/p'
34571case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
34572*datarootdir*) ac_datarootdir_seen=yes;;
34573*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
34574  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
34575$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
34576_ACEOF
34577cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34578  ac_datarootdir_hack='
34579  s&@datadir@&$datadir&g
34580  s&@docdir@&$docdir&g
34581  s&@infodir@&$infodir&g
34582  s&@localedir@&$localedir&g
34583  s&@mandir@&$mandir&g
34584  s&\\\${datarootdir}&$datarootdir&g' ;;
34585esac
34586_ACEOF
34587
34588# Neutralize VPATH when `$srcdir' = `.'.
34589# Shell code in configure.ac might set extrasub.
34590# FIXME: do we really want to maintain this feature?
34591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
34592ac_sed_extra="$ac_vpsub
34593$extrasub
34594_ACEOF
34595cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
34596:t
34597/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
34598s|@configure_input@|$ac_sed_conf_input|;t t
34599s&@top_builddir@&$ac_top_builddir_sub&;t t
34600s&@top_build_prefix@&$ac_top_build_prefix&;t t
34601s&@srcdir@&$ac_srcdir&;t t
34602s&@abs_srcdir@&$ac_abs_srcdir&;t t
34603s&@top_srcdir@&$ac_top_srcdir&;t t
34604s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
34605s&@builddir@&$ac_builddir&;t t
34606s&@abs_builddir@&$ac_abs_builddir&;t t
34607s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
34608$ac_datarootdir_hack
34609"
34610eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
34611  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34612
34613test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
34614  { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
34615  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
34616  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34617which seems to be undefined.  Please make sure it is defined" >&5
34618$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
34619which seems to be undefined.  Please make sure it is defined" >&2;}
34620
34621  rm -f "$tmp/stdin"
34622  case $ac_file in
34623  -) cat "$tmp/out" && rm -f "$tmp/out";;
34624  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
34625  esac \
34626  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34627 ;;
34628  :H)
34629  #
34630  # CONFIG_HEADER
34631  #
34632  if test x"$ac_file" != x-; then
34633    {
34634      $as_echo "/* $configure_input  */" \
34635      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
34636    } >"$tmp/config.h" \
34637      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
34638    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
34639      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
34640$as_echo "$as_me: $ac_file is unchanged" >&6;}
34641    else
34642      rm -f "$ac_file"
34643      mv "$tmp/config.h" "$ac_file" \
34644	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
34645    fi
34646  else
34647    $as_echo "/* $configure_input  */" \
34648      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
34649      || as_fn_error $? "could not create -" "$LINENO" 5
34650  fi
34651 ;;
34652
34653
34654  esac
34655
34656done # for ac_tag
34657
34658
34659as_fn_exit 0
34660_ACEOF
34661ac_clean_files=$ac_clean_files_save
34662
34663test $ac_write_fail = 0 ||
34664  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
34665
34666
34667# configure is writing to config.log, and then calls config.status.
34668# config.status does its own redirection, appending to config.log.
34669# Unfortunately, on DOS this fails, as config.log is still kept open
34670# by configure, so config.status won't be able to write to it; its
34671# output is simply discarded.  So we exec the FD to /dev/null,
34672# effectively closing config.log, so it can be properly (re)opened and
34673# appended to by config.status.  When coming back to configure, we
34674# need to make the FD available again.
34675if test "$no_create" != yes; then
34676  ac_cs_success=:
34677  ac_config_status_args=
34678  test "$silent" = yes &&
34679    ac_config_status_args="$ac_config_status_args --quiet"
34680  exec 5>/dev/null
34681  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
34682  exec 5>>config.log
34683  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
34684  # would make configure fail if this is the last instruction.
34685  $ac_cs_success || as_fn_exit 1
34686fi
34687if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
34688  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
34689$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
34690fi
34691
34692
34693# Make the compare script executable
34694$CHMOD +x $OUTPUT_ROOT/compare.sh
34695
34696# Finally output some useful information to the user
34697
34698# Finally output some useful information to the user
34699
34700if test "x$CCACHE_FOUND" != x; then
34701	if  test "x$HAS_GOOD_CCACHE" = x; then
34702		CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
34703		CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
34704	else
34705		CCACHE_STATUS="installed and in use"
34706	fi
34707else
34708	if test "x$GCC" = xyes; then
34709		CCACHE_STATUS="not installed (consider installing)"
34710		CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
34711	else
34712		CCACHE_STATUS="not available for your system"
34713	fi
34714fi
34715
34716printf "\n"
34717printf "====================================================\n"
34718printf "A new configuration has been successfully created in\n"
34719printf "$OUTPUT_ROOT\n"
34720if test "x$CONFIGURE_COMMAND_LINE" != x; then
34721	printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
34722else
34723	printf "using default settings.\n"
34724fi
34725
34726printf "\n"
34727printf "Configuration summary:\n"
34728printf "* Debug level:    $DEBUG_LEVEL\n"
34729printf "* JDK variant:    $JDK_VARIANT\n"
34730printf "* JVM variants:   $with_jvm_variants\n"
34731printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
34732
34733printf "\n"
34734printf "Tools summary:\n"
34735if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
34736  printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
34737fi
34738printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
34739printf "* C Compiler:     $CC_VENDOR version $CC_VERSION (at $CC)\n"
34740printf "* C++ Compiler:   $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
34741
34742printf "\n"
34743printf "Build performance summary:\n"
34744printf "* Cores to use:   $JOBS\n"
34745printf "* Memory limit:   $MEMORY_SIZE MB\n"
34746printf "* ccache status:  $CCACHE_STATUS\n"
34747printf "\n"
34748
34749if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
34750	printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
34751	printf "$CCACHE_HELP_MSG\n"
34752
34753    # Print a helpful message on how to acquire the necessary build dependency.
34754    # ccache is the help tag: freetyp2, cups, pulse, alsa etc
34755    MISSING_DEPENDENCY=ccache
34756    PKGHANDLER_COMMAND=
34757
34758    case $PKGHANDLER in
34759	apt-get)
34760                apt_help     $MISSING_DEPENDENCY ;;
34761    yum)
34762                yum_help     $MISSING_DEPENDENCY ;;
34763	port)
34764                port_help    $MISSING_DEPENDENCY ;;
34765	pkgutil)
34766                pkgutil_help $MISSING_DEPENDENCY ;;
34767	pkgadd)
34768                pkgadd_help  $MISSING_DEPENDENCY ;;
34769    * )
34770      break ;;
34771    esac
34772
34773    if test "x$PKGHANDLER_COMMAND" != x; then
34774        HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34775    fi
34776
34777	printf "$HELP_MSG\n"
34778	printf "\n"
34779fi
34780
34781if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
34782	printf "NOTE: You have requested to build more than one version of the JVM, which\n"
34783	printf "will result in longer build times.\n"
34784	printf "\n"
34785fi
34786
34787if test "x$FOUND_ALT_VARIABLES" != "x"; then
34788	printf "WARNING: You have old-style ALT_ environment variables set.\n"
34789	printf "These are not respected, and will be ignored. It is recommended\n"
34790	printf "that you clean your environment. The following variables are set:\n"
34791	printf "$FOUND_ALT_VARIABLES\n"
34792	printf "\n"
34793fi
34794
34795if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
34796	printf "WARNING: Your build output directory is not on a local disk.\n"
34797	printf "This will severely degrade build performance!\n"
34798	printf "It is recommended that you create an output directory on a local disk,\n"
34799	printf "and run the configure script again from that directory.\n"
34800	printf "\n"
34801fi
34802
34803if test "x$IS_RECONFIGURE" = "xyes"; then
34804	printf "WARNING: The result of this configuration has overridden an older\n"
34805	printf "configuration. You *should* run 'make clean' to make sure you get a\n"
34806	printf "proper build. Failure to do so might result in strange build problems.\n"
34807	printf "\n"
34808fi
34809
34810